Commit graph

30 commits

Author SHA1 Message Date
Helder Eijs
eda4f65718 Move test vectors in a separate package 2021-01-03 23:49:50 +01:00
Helder Eijs
b2482ffe65 Drop support for Python 2.6 and 3.4 2020-12-30 00:02:17 +01:00
Helder Eijs
ac4a5650d0 Bypass output paramter test on OpenPGP 2020-06-22 23:06:21 +02:00
Helder Eijs
88ab1ad96b Reproduce GH#420 bug 2020-06-22 23:06:21 +02:00
Helder Eijs
cd7f0128b6 Make code base suitable for Python 2 and 3 - stop using 2to3 2018-11-04 15:04:23 +01:00
Helder Eijs
7033f34e54 Add output parameter for CBC mode 2018-10-27 21:26:05 +02:00
Helder Eijs
066b8969ee More cleanup 2018-10-16 22:09:53 +02:00
Helder Eijs
96517333f4 Remove Crypto.Util.py3compat.unhexlify and hexlify 2018-09-25 22:57:32 +02:00
Helder Eijs
1a56f87afe Support for memoryview in CBC/OFB/CFB mode 2018-04-02 20:59:03 +02:00
Helder Eijs
3b317be2a6 Add support for bytearray's in ciphers
[skip ci]
2018-03-06 08:25:42 +01:00
Helder Eijs
7f88aee973 Optionally skip slow tests for ciphers 2018-01-25 22:05:37 +01:00
Legrandin
b710d1d3aa Unify loader for test vectors 2016-01-06 22:21:05 +01:00
Legrandin
fb44aabdff Check length of automatically generated iv/nonces 2015-12-23 23:27:24 +01:00
Legrandin
7ae7df57fa IV/Nonce optional for CBC/OFB/CFB/OPENPGP 2015-12-23 23:27:24 +01:00
Legrandin
6fede775c3 Rename unit test for unknown parameters 2015-11-16 00:05:02 +01:00
Legrandin
988f4cc17f Reduce code duplication between CBC and OFB 2015-11-14 22:08:33 +01:00
Legrandin
f24a6108f9 Add tests to CFB/CBC to verify that only byte strings are used 2015-11-12 16:19:57 -05:00
Legrandin
029371491c Validate that CBC and CFB use IV always in the same way 2015-11-12 16:19:55 -05:00
Legrandin
3a079cdb86 Check CBC and CFB with parameters only consumed by base cipher 2015-11-12 16:19:55 -05:00
Legrandin
e6654c1682 TDES block size is 8 bytes 2015-11-09 22:46:16 +01:00
Legrandin
782ab3ca24 Add CBC tests for 64 bit block size 2015-11-09 12:09:38 -05:00
Legrandin
c1aa5c0aff Add NIST tests for single DES CBC 2015-11-09 12:04:47 -05:00
Legrandin
c4bc428b51 Add dedicated NIST tests for DES2/DES3 2015-11-09 11:49:45 -05:00
Legrandin
eefc7ac34c Fix to empty IV becoming None 2015-11-08 22:37:43 +01:00
Legrandin
f5f0d9089e Move SP800-38A tests into dedicated CBC module 2015-11-08 22:26:15 +01:00
Legrandin
7099824e2c Added dedicated tests for CBC
In the process, the following changes are done to CBC code:
- `new` detects when a spurious extra positional parameter is passed
- `new` accepts 'iv' or 'IV' keywords, but not both
- the cipher object has both 'iv' and 'IV' attributes, for convenience
- `encrypt` and `decrypt` cannot be intermixed
- some ValueError exceptions have been converted to TypeError when
  they refer to erroneuous API usage
2015-11-08 22:05:58 +01:00
Legrandin
ab7851060c Simplify Monte Carlo test for AES CBC 2015-11-08 21:08:28 +01:00
Legrandin
c48cffcc99 Fix binding of arguments (only the last test vector file was picked up) 2015-11-08 21:03:11 +01:00
Legrandin
c9da50cc8b Add Monte Carlo and multi-block tests from NIST for AES CBC 2015-11-08 14:01:42 +01:00
Legrandin
1d580adc7c Dedicated tests for CBC mode 2015-11-08 13:15:41 +01:00