aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data/pad.vec
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug in OneAndZeros unpaddingJack Lloyd2018-11-301-0/+6
| | | | | | | Introduced in b13c0cc8590199d, it could only trigger if the block size was more than 256 bytes. In that case an invalid padding could be accepted. OSS-Fuzz 11608 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11608)
* Fix a crash in the mode padding fuzzerJack Lloyd2018-09-231-0/+3
| | | | | | The reference version of 1and0 padding would crash on an all-zero input. OSS-Fuzz 10628
* Add fuzzer for mode unpadding, and fix bugs found therebyJack Lloyd2018-09-221-0/+89
| | | | | | | Both PKCS7 and X9.23 padding modes did not examine the first byte of the purported padding if the padding took an entire block. So for example for a 64-bit cipher, PKCS7 would accept XX08080808080808 as a valid padding for any byte value.
* Add negative tests for cipher mode paddingJack Lloyd2016-11-151-26/+69
|
* Add ESP block cipher padding from RFC 4303René Korthaus2016-11-141-0/+21
| | | | | ESP padding is one of the recommended padding methods from BSI-TR-02102-1.
* Add test vectors for block cipher padding modesRené Korthaus2016-07-111-0/+83
Exports get_bc_pad() to be used from tests. Adds separate handcrafted tests for block cipher padding modes. They were previously only tested implicitly during the block cipher modes of operation tests, though not all padding modes were covered. And in case a mode of operation is not part of the enabled modules, the previously tested padding modes are not covered at all. Fixes an off-by-one bug in the previously untested ANSI X9.23 padding mode, where the number of zero bytes in the pad was one more than allowed by the standard.