Commit Graph

147 Commits

Author SHA1 Message Date
Jeffrey Walton
32abab75f2
Add KeyDerivationFunction interface (GH #610, PR #611) 2018-03-29 20:18:27 -04:00
Jeffrey Walton
48033dac0a
Updated source comment 2018-02-20 00:01:23 -05:00
Jeffrey Walton
c6a29e8708
Add Simon and Speck test vectors to All group (GH #585) 2018-02-19 18:03:17 -05:00
Jeffrey Walton
e5b9fa6485
Use random IV's for Simon and Speck test vectors 2018-02-18 12:10:51 -05:00
Jeffrey Walton
3efef479d1
Re-add Simon and Speck test vectors (GH #585)
Of the 200+ test vectors only 10 are semi-authentic. The ten are from the Simon and Speck paper but they had permutations applied to them so they worked with the algorithms described in the paper. The remaining 200 or so were generated with Crypto++ using straight C++ code. The library generated the test vectors because we don't have a reference implementation
2018-02-18 11:19:26 -05:00
Jeffrey Walton
2a367627f0
Finish removing Simon and Speck (GH #585) 2018-02-15 06:17:35 -05:00
Jeffrey Walton
15b14cc618
Remove Simon and Speck ciphers (GH #585)
We recently learned our Simon and Speck implementation was wrong. The removal will stop harm until we can loop back and fix the issue.
The issue is, the paper, the test vectors and the ref-impl do not align. Each produces slightly different result. We followed the test vectors but they turned out to be wrong for the ciphers.
We have one kernel test vector but we don't have a working implementation to observe it to fix our implementation. Ugh...
2018-02-14 04:06:16 -05:00
Jeffrey Walton
ac4c87a1b8
Add Speck-128/CTR test vectors 2018-02-12 01:53:22 -05:00
Jeffrey Walton
939e6fa0f0
Add Simon-128/CTR test vectors 2018-02-12 01:32:51 -05:00
Jeffrey Walton
58b6999274
Convert Kalyna from variable block size (GH #535) 2018-01-18 20:26:10 -05:00
Jeffrey Walton
07f2a4fc3f
Fix Simon-64 and Speck-64 CTR mode
This fixes CTR mode for IA-32. We were only incrementing half the counters.
Added additional test vectors
2017-12-07 16:55:23 -05:00
Jeffrey Walton
77ff7aa528
Add additional Simon test vectors 2017-12-02 21:07:33 -05:00
Jeffrey Walton
ca158d56f8
Add additional Speck test vectors 2017-12-02 20:00:32 -05:00
Jeffrey Walton
49a119cbf7
Add SPECK-64 and SPECK-128 large block tests
The tests were generated using Crypto++ and the straight C++ implementation. It should allow us to test the SSE and NEON impelmentations and multiple blocks
2017-12-01 07:33:21 -05:00
Jeffrey Walton
3c1914b020
Add SIMON-64 and SIMON-128 large block tests
The tests were generated using Crypto++ and the straight C++ implementation. It should allow us to test the SSE and NEON impelmentations and multiple blocks
2017-12-01 07:10:42 -05:00
Jeffrey Walton
0db1ef29e1
List Key after Comments in Simon test vectors 2017-11-28 01:34:42 -05:00
Jeffrey Walton
a6ca22f6b6
Add additional Simon-64 test vectors 2017-11-28 01:18:21 -05:00
Jeffrey Walton
a33868b98d
Add additional Simon-128 test vectors 2017-11-28 00:34:22 -05:00
Jeffrey Walton
c797bd9523
Add additional SM3 test vectors (GH #541) 2017-11-24 19:41:58 -05:00
Jeffrey Walton
4382b1a559
Add additional SM3 test vectors (GH #541) 2017-11-24 07:24:09 -05:00
Jeffrey Walton
0dc72380a9
Add additional SM3 test vectors (GH #541) 2017-11-24 06:52:57 -05:00
Jeffrey Walton
5a577e71ac
Add additional SM3 test vectors
Cleanup SM3 whitespace
2017-11-24 00:40:18 -05:00
Jeffrey Walton
8c29b1a4d3
Update documentation 2017-11-24 00:06:48 -05:00
Jeffrey Walton
5267723a49
Add SM3 hash function (GH #541) 2017-11-23 23:19:09 -05:00
Jeffrey Walton
13652cf9bf
Add additional SM4 test vectors (GH #540)
The additional ECB mode vectors were generated with Botan. We still need some vectors for SM4/CBC
2017-11-23 19:03:47 -05:00
Jeffrey Walton
2c8a618a03
Add SM4 block ciphers (GH #540) 2017-11-23 11:41:40 -05:00
Jeffrey Walton
c447918815
Add additional test vectors (GH #538, #539)
These were generated by Crypto++ using the C/C++ implementation, which operates on 1 block at a time. They are consumed by the SSSE3 implementation, which operates on 4 blocks at a time. Its not ideal, but it will have to do.
2017-11-22 07:38:55 -05:00
Jeffrey Walton
3970a066e3
Add SIMON-64 and SIMON-128 lightweight block ciphers (GH #539) 2017-11-21 04:58:51 -05:00
Jeffrey Walton
78922e9c85
Remove unneeded include 2017-11-21 03:01:23 -05:00
Jeffrey Walton
f6f5583e63
Add additional SPECK test vectors (GH #538)
These were generated by modifying the reference implementation
2017-11-20 11:27:01 -05:00
Jeffrey Walton
b9fc470bc7
Add SPECK-64 and SPECK-128 lightweight block ciphers (GH #538) 2017-11-20 06:30:21 -05:00
Jeffrey Walton
b9bd51f7a6
Remove variable block size for Threefish (GH #535) 2017-11-17 19:15:14 -05:00
Jeffrey Walton
5bf43f4ef3
Add additional Threefish test vectors
The test vectors came from NIST submission archive (NIST_CD_102610), skein_golden_kat_short_internals.txt
2017-05-15 22:55:33 -04:00
Jeffrey Walton
8c34a5f7f5
Add Threefish block cipher (Issue 422) 2017-05-14 13:51:41 -04:00
Jeffrey Walton
7ee87af86b
Don't latch BlockSize or BlockPaddingScheme across tests 2017-05-14 05:26:33 -04:00
Jeffrey Walton
d236cf1277
Add Kalyna CBC test vectors 2017-05-10 15:27:57 -04:00
Jeffrey Walton
0de44edde1
Remove EncryptBlockCipher
The test mode EncryptBlockCipher is not needed. datatest.cpp is versatile enough to handle variable block sizes under test mode Encrypt
2017-05-10 13:50:36 -04:00
Jeffrey Walton
a5c67cfdd6
Add Kalyna block cipher (Issue 411)
Thanks to Roman Oliynykov and Oleksandr Kazymyrov for their assistance. Thanks to Keru Kuro for the reference implementation.
2017-05-06 00:24:35 -04:00
Jeffrey Walton
5c1de7b5a5
Add variable block size support to test and benchmarks
CRYPTOPP_COVERAGE was added at 9614307ab7 to increase code coverage support. This commit enables additional validation routines when  CRYPTOPP_COVERAGE is in effect.
2017-05-04 19:11:24 -04:00
Jeffrey Walton
83a87cb4df
Group DSA-RFC6979 tests together by hash value
Previously, all 1024-bit tests were run, and then 2048-bit tests were run. Splitting them meant there were two entries for DSA-RFC6979/SHA-1, two entries for DSA-RFC6979/SHA-256 and so on. Now there will be one entry output during testing.
2017-04-15 09:03:22 -04:00
Jeffrey Walton
5e27404a15
Add missing sha2 and sha3 test file names
sha2.txt and sha3.txt are just collections of other files, so they don't take up much space.

This commit stens from and exception when running 'cryptest.exe tv sha2' and  'cryptest.exe tv sha3'. Its not obvious the name of the file to be run sha2_224_fips_180.txt. Users should not have to hunt for the reason sha2 and sha3 do not work.
2017-04-15 08:49:00 -04:00
Jeffrey Walton
2bb36c790e
Add ARIA test vectors from RFC 5794 2017-04-13 16:00:59 -04:00
Jeffrey Walton
7990da2c02
Reformat aria.txt test vectors 2017-04-11 06:53:44 -04:00
Jeffrey Walton
8ca0f47939
Add ARIA block cipher
This is the reference implementation, test data and test vectors from the ARIA.zip package on the KISA website. The website is located at http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002.

We have optimized routines that improve Key Setup and Bulk Encryption performance, but they are not being checked-in at the moment. The ARIA team is updating its implementation for contemporary hardware and we would like to use it as a starting point before we wander too far away from the KISA implementation.
2017-04-10 10:52:40 -04:00
Jeffrey Walton
9739ba8afe
Add Aumasson and Bernstein's SipHash (Issue 348) 2016-12-17 03:58:36 -05:00
Jeffrey Walton
c6b529ffd5
Removed unused ecdsa_rfc6979.txt references (Issue 121) 2016-12-11 01:32:58 -05:00
Jeffrey Walton
7e42780517
Add Deterministic DSA and ECDSA Signatures (Issue 121)
Based on Douglas Roark PR 131
2016-12-11 01:02:00 -05:00
Jeffrey Walton
764ae95e45
Add full NIST SHA test vector suite for use with 'cryptest.exe tv' 2016-12-01 12:57:15 -05:00
Jeffrey Walton
fff2c91b96 Add TLS-ChaCha test vectors from http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305
The implementations do not interoperate at the moment
2016-09-12 19:51:43 -04:00
Jeffrey Walton
7f958575ea Squashed commit of the following:
commit 47c75c6e9397e240919207e50e5a611d3e2a2428
Merge: d7685c2 42085ee
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 20:20:39 2016 -0400

    Attempting to fix binary file merge conflict

commit d7685c2d946beecc419ddb6901c24e972c7cf3ee
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 16:39:23 2016 -0400

    Add vsClean.cmd to vs2010.zip

commit 4b96fdf1c551260da60eb021f324bcc3fcfec626
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 16:15:38 2016 -0400

    Add Keccak to vs2010.zip

commit 3962db73b7113ee805b46a5bb4da64e204fe6bb0
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 15:40:35 2016 -0400

    Fold hmqv.cpp and fhmqv.cpp into mqv.cpp. There's no need for three empty source files

commit 44401448cbb6c8125b0f1ab4419c5b174408ffd7
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 15:39:23 2016 -0400

    Fold hmqv.cpp and fhmqv.cpp into mqv.cpp. There's no need for three empty source files

commit 847bfccb8d5c388e67745dc8c69768fa503c5135
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 14:48:02 2016 -0400

    Whitespace cleanup

commit 46a37be6fef361704dcf852bc9a099ce0a1da4c8
Merge: aefb8f8 3697867
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 14:43:01 2016 -0400

    Merge 'master' into 'keccak'

commit aefb8f8ff2b81b967089c53b457a92fc6f7544d6
Merge: 51a828b 3c91d93
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 12:39:51 2016 -0400

    Merge 'master' into 'keccak'

commit 51a828b88e37a4d18abb00300cd5522bd0e110c5
Merge: 4152870 e7c7722
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:41:36 2016 -0400

    Merge 'master' into 'keccak'

commit 415287041e69ddadf5ca1f6fc794b87e145fc2db
Merge: 357a0c5 83ac849
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:34:45 2016 -0400

    Merge 'master' into 'keccak'

commit 357a0c510f75e4e58078b500dd469462e90f7650
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:13:32 2016 -0400

    Removed deprecated warning from SHA3 classes

commit 5cf9ec10d53b895b5a583e265e4e1298ed402195
Merge: 10ce0ed c2d60cc
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 09:43:15 2016 -0400

    Merge 'master' into 'keccak'

commit 10ce0ed4c5b8a1ea230062fd2dfdec0d87ec5b42
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 09:37:40 2016 -0400

    Add Keccak implementation based on early SHA3. Change SHA3 to NIST FIPS 202 conforming implementation
2016-09-08 20:24:25 -04:00
Jeffrey Walton
251be0e874 Comment test vector files not present in HMQV branch 2016-08-21 15:04:33 -04:00
Jeffrey Walton
6f0bb9411f Whitespace cleanup in test vectors and data files 2016-07-19 01:13:26 -04:00
Jeffrey Walton
3ee10576bb Make test program aware of CRYPTOPP_USE_FIPS_202_SHA3, use alternate all.txt 2016-04-23 23:34:48 -04:00
Jeffrey Walton
7b1d3a7d71 Add missing short test vectors 2016-04-23 23:01:16 -04:00
Jeffrey Walton
01d137155c Add SHA3/FIPS 202 test vectors. Add note to config.h on uncommenting sha3_fips_202.txt when defining CRYPTOPP_USE_FIPS_202_SHA3 2016-04-23 21:55:47 -04:00
Jeffrey Walton
da05d100e3 Add ChaCha test vectors to All group 2016-04-21 13:16:03 -04:00
Jeffrey Walton
b5ec56219e Add test vectors 2016-04-21 12:37:02 -04:00
Jeffrey Walton
30c1af2858 Added BLAKE2 Cryptographic Hash and Message Authentication Code 2016-04-17 03:06:28 -04:00
Jeffrey Walton
0b77c77230 Added 2048-bit modulus tests 2016-04-10 16:41:32 -04:00
Jeffrey Walton
e2a13152cf Enable DSA test vectors for deterministic signatures 2016-04-10 03:35:29 -04:00
Jeffrey Walton
0c3791566f Folded Signature tests into objects of same Name 2016-04-10 03:23:26 -04:00
Jeffrey Walton
79c231edcb Added DSA test vectors for deterministic signatures 2016-04-10 02:58:08 -04:00
Jeffrey Walton
75555369d9 Prepare for RFC6979, Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA) 2016-04-09 23:50:33 -04:00
Jeffrey Walton
89d0581525 Updated documentation 2016-04-09 22:50:21 -04:00
Jeffrey Walton
298988a5b9 Crypto++ 5.6.3 check-in 2015-11-22 19:17:15 -05:00
Jeffrey Walton
62618fda97 Revert botched "Crypto++ 5.6.3 check-in". Corruption due to VMware adding garbage to the end of some source files during drag and drop from guest to host.
This reverts commit c454358122.
2015-11-22 19:11:31 -05:00
Jeffrey Walton
c454358122 Crypto++ 5.6.3 check-in 2015-11-20 19:15:33 -05:00
Jeffrey Walton
9f6a942218 Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup) 2015-11-18 15:34:27 -05:00
Jeffrey Walton
025337a94a CRYPTOPP 5.6.3 RC6 checkin 2015-11-05 01:50:12 -05:00
weidai
334a611e8a fix line endings 2013-01-26 17:14:15 +00:00
weidai
2fb44ea6db add SHA-3
update DSA to FIPS 186-3
update version numbers
2013-01-19 02:20:00 +00:00
weidai
87a60d8825 add HMAC/SHA2 test vectors
fix cosmetic issues with test suite
2010-08-08 07:29:51 +00:00
weidai
a070ff16ae add longer self-generated test vectors 2010-07-24 05:42:18 +00:00
weidai
7fbcee6ca1 remove WAKE-CFB 2010-07-06 04:41:28 +00:00
weidai
2cb9074afd fix incorrect encryption bug with WAKE-OFB that was introduced in version 5.5 (reported by John Famiglietti) 2009-10-31 21:18:37 +00:00
weidai
3be02e9a1a fix EC2N skipping of optional seed, switch to public domain MARS code, deliver vc80.pdb to OutDir 2009-03-28 03:08:27 +00:00
weidai
2779fc6050 - add EAX mode, XSalsa20
- speed up GCM key setup
- wipe stack in AES assembly code
- speed up CFB mode
2009-03-12 11:24:12 +00:00
weidai
8ca6148ad5 add x86/x64 assembly for SHA-256,
add DEFAULT_CHANNEL and AAD_CHANNEL,
fix macChannel for AuthenticatedEncryptionFilter
2009-03-10 02:56:19 +00:00
weidai
d8a644fc4e changes for 5.6:
- added AuthenticatedSymmetricCipher interface class and Filter wrappers
    - added CCM, GCM (with SSE2 assembly), CMAC, and SEED
    - improved AES speed on x86 and x64
    - removed WORD64_AVAILABLE; compiler 64-bit int support is now required
2009-03-02 02:39:17 +00:00
weidai
eb5732337b fix incorrect VMAC computation on message lengths that are >64 mod 128 2009-01-24 02:51:45 +00:00
weidai
c09618a557 update to draft-01 2007-05-04 15:03:07 +00:00
weidai
914ec2626b new test vectors. 'Test: Encrypt' now tests decryption also 2007-04-15 22:51:12 +00:00
weidai
28c392e082 add Salsa20 cipher 2006-12-09 17:18:13 +00:00
weidai
fd0683ba19 Updated to Whirlpool version 3.0 2006-12-09 17:08:13 +00:00
weidai
0156adfd5e additional AES test vectors 2006-07-17 14:43:35 +00:00
weidai
6d4f31be8b add SHA-224 2004-07-23 09:57:11 +00:00
weidai
ad8043d50c add Panama test vectors 2004-07-22 00:35:02 +00:00
weidai
4bf1528bb0 add XTEA and BTEA 2003-07-30 00:28:54 +00:00
weidai
397f566bf7 *** empty log message *** 2003-04-15 00:39:44 +00:00
weidai
d52b49c51f fix bug in Grouper
add RIPEMD-???, Whirlpool, Shacal2, Camellia, Two-Track MAC (Kevin Springle)
change ChannelSwitch to allow non-blocking input (denis bider)
change Redirector to allow more options (denis bider)
fix MaurerRandomnessTest
optimize MD2 (Kevin Springle)
2003-04-15 00:38:48 +00:00
weidai
b4f6ef8e16 fix bugs in SEAL and Panama 2003-03-26 21:50:44 +00:00
weidai
bd51507621 fix RW/EMSA2 standard conformance bug 2003-03-20 03:09:44 +00:00
weidai
538de80a91 various changes for 5.1 2003-03-20 01:24:12 +00:00
weidai
4cbd2ef39e *** empty log message *** 2002-10-29 01:11:03 +00:00
weidai
50c0dc2277 *** empty log message *** 2002-10-27 03:37:39 +00:00
weidai
6f69209eee *** empty log message *** 2002-10-27 02:38:10 +00:00
weidai
adb8bd0866 *** empty log message *** 2002-10-27 02:19:04 +00:00