Commit Graph

99 Commits

Author SHA1 Message Date
Jeffrey Walton
a11ac1e879
Use ConstBytePtr in TestDataNameValuePairs (GH #827) 2019-04-29 00:13:32 -04:00
Jeffrey Walton
ec1aa8874c
Prepare for Crypto++ 8.2 release
Fix SHAKE-128 and SHAKE-256 tests
2019-04-28 19:09:45 -04:00
Jeffrey Walton
7ba4657375
Prepare for Crypto++ 8.2 release
Fix VS2010 compile on WIndows Vista; Add BytePtr inline function
2019-04-28 18:10:03 -04:00
Jeffrey Walton
5603661eec
Add ChaChaTLS implementation (GH #265)
We tweaked ChaCha to arrive at the IETF's implementation specified by RFC 7539. We are not sure how to handle block counter wrap. At the moment the caller is responsible for managing it. We were not able to find a reference implementation so we disable SIMD implementations like SSE, AVX, NEON and Power4. We need the wide block tests for corner cases to ensure our implementation is correct.
2019-01-24 09:36:05 -05:00
Jeffrey Walton
1c88fd6f59
Add search for test vectors and test data (GH #760) 2018-12-07 12:25:52 -05:00
Jeffrey Walton
05f053007b
Make TrimComment call TrimSpace 2018-11-11 12:41:29 -05:00
Jeffrey Walton
5a36cd54bd
Add meaningful test failure messages 2018-11-05 21:26:16 -05:00
Jeffrey Walton
93c7518900
Improve datatest parser
This switches to line oriented parsing for the test files. Previously we we using streams for names, and lines for values. We can now use whitespace and make the tests a bit more readable by grouping similar tests. AlgorithmType will clear the current accumlated values.
2018-11-05 20:40:39 -05:00
Jeffrey Walton
f5bce1ab8c
Fix missing errno on PPC64 with GCC 4.8.5 2018-11-04 15:36:13 -05:00
Jeffrey Walton
40fa6873f9
Add ability to Seek64 in test framework (GH #732)
Also see https://github.com/randombit/botan/pull/1728
2018-11-04 14:21:54 -05:00
Jeffrey Walton
dc840e49a6
Make datatest.cpp more tolerant of comments 2018-10-23 07:09:22 -04:00
Jeffrey Walton
afd1ff651a
Add assert to RunTestDataFile 2018-07-29 21:11:36 -04:00
Jeffrey Walton
1836a7feb4
Cleanup datatest.cpp
Switch to non-blocking rngs for Linux and Windows
2018-07-10 17:34:55 -04:00
Jeffrey Walton
45fcd47c07
Clear conversion warning 2018-07-10 11:37:21 -04:00
Jeffrey Walton
c186689273
Add RandomizedTransfer overload 2018-07-10 02:55:29 -04:00
Jeffrey Walton
4c5487b0e4
Increase use of ptrdiff_t when performing pointer math
Increase use of ptrdiff_t when performing pointer math
Reduce AlgorithmProvider overrides
Fix CPU_ProbeARMv7 on Aarch64
2018-07-09 06:31:17 -04:00
Jeffrey Walton
03bceda159
Use C++ style casts and take addr of elem 0 for non-const pointers 2018-07-09 03:08:28 -04:00
Jeffrey Walton
32abab75f2
Add KeyDerivationFunction interface (GH #610, PR #611) 2018-03-29 20:18:27 -04:00
Jeffrey Walton
f26a07ad98
Add extraneous calls for code coverage 2018-03-27 03:29:56 -04:00
Jeffrey Walton
f8a6a9c9e0
Change case of FAILED message in datatest.cpp
Throughout the library the message "FAILED" (not "failed") is used to signal failures. It makes it easy to grep for them. This change makes the message consistent.
2018-02-19 16:17:03 -05:00
Jeffrey Walton
8c4300a36c
Remove variable block size in datatest.cpp (GH #535) 2018-02-18 11:57:26 -05:00
Jeffrey Walton
92436b9f9b
Re-enable Salsa20 ASM (GH #543)
We are fairly certain this is a false positive due to glibc's __memcmp_sse4_1.
2017-11-29 06:55:19 -05:00
Jeffrey Walton
37e02f9e0e
Revert AltiVec and Power8 commits
The strategy of "cleanup under-aligned buffers" is not scaling well. Corner cases are still turing up. The library has some corner-case breaks, like old 32-bit Intels. And it still has not solved the AltiVec and Power8 alignment problems.
For now we are backing out the changes and investigating other strategies
2017-09-05 16:28:00 -04:00
Jeffrey Walton
efe88c043b
Use aligned buffer for datatest.cpp 2017-09-04 20:07:47 -04:00
Jeffrey Walton
7ac77ca9ac Revert "Revert "Clear Visual Studio warnings (Issue 412)""
This reverts commit c3871aec94.
2017-06-02 05:18:52 -04:00
Jeffrey Walton
c3871aec94 Revert "Clear Visual Studio warnings (Issue 412)"
This reverts commit eb3b27a6a5. The change broke GCC 4.8 and unknown version of Clang on OS X. UB reported the OS X break, and JW found duplicated the break on a ARM CubieTruck with GCC 4.8.
2017-06-02 05:06:56 -04:00
Jeffrey Walton
eb3b27a6a5
Clear Visual Studio warnings (Issue 412) 2017-05-30 16:37:41 -04:00
Jeffrey Walton
30ac53ff41
Add support for word32 and word64 parsing 2017-05-15 21:55:39 -04:00
Jeffrey Walton
4da06919eb
Switch conversion switch from 'ce' to 'cvt'
There were some collisions in the RSA test vectors
2017-05-15 21:02:47 -04:00
Jeffrey Walton
30ac06dd0d
Fix substring length 2017-05-15 20:41:32 -04:00
Jeffrey Walton
7fd5c13e06
Fix PutDecodedDatumInto on OS X 2017-05-15 20:14:22 -04:00
Jeffrey Walton
a61c97f7ee
Re-enable the Tweak on Threefish
We also add a helper to PutDecodedDatumInto which reverses the little-endian values from the Threefish test vectors. Test vectors will follow at next check-in.
2017-05-15 18:42:20 -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
017f7f61b4
Rearrange characters in whitespace string
The arrangement saves about 1.3 seconds when running the test vectors. It looks like the tab character is dominant, so we profit by listing it first.
2017-05-14 04:09:26 -04:00
Jeffrey Walton
2c570e27a0
Explicitly add space on line continuation
Formatting of data for a failed self test was still off a bit. It was due to retaining a whitespace character from the test vector file. The problem was, the whitespace was a tab on occasion.
2017-05-14 02:41:22 -04:00
Jeffrey Walton
973de7712a
Fix GetField for stray CR or LF
The test vector rsa_pkcs1_1_5.txt is the torture test. We calculated an incorrect index when a line continuation was part of a comment
2017-05-12 14:25:25 -04:00
Jeffrey Walton
3f9667f3cd
Remove VC++ 6.0 workaround in datatest.cpp 2017-05-12 03:50:37 -04:00
Jeffrey Walton
b160cb40e1
Add comment concerning empty value 2017-05-12 03:09:06 -04:00
Jeffrey Walton
d3986223a6
Add early continuation for parsing a continued line 2017-05-12 03:05:24 -04:00
Jeffrey Walton
ac6db2fa91
Fix parser break on OS X
This was introduced at Commit e456cd2275, and affected Uri during his rounds of testing.
We also took the opportunity to write it in modern C++ (and remove the VC++ 6.0 bug workaround)
2017-05-12 02:20:44 -04:00
Jeffrey Walton
537ee61ade
Switch to _MSC_FULL_VER for SP1 releases 2017-05-11 12:05:57 -04:00
Jeffrey Walton
e456cd2275
Modify datatest parse to eat whitespace when line continuation is in effect
Previously the parsed string would look as follows. You would get this on a failed self test.
Key: 0000000000000000
    0000000000000000
        0000000000000000
            0000000000000000

The new behavior eats the leading whitespace, so the key is reported as:
Key: 0000000000000000000000000000000000000000000000000000000000000000
2017-05-10 16:20:12 -04:00
Jeffrey Walton
b2a6ba460f
Make datatest.cpp aware of padding schemes
This change was needed for Kalyna and its CBC test vectors. One test uses OneAndZeros padding
2017-05-10 15:26:36 -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
5efb019d8b
Add C++ nullptr support (Issue 383) 2017-03-01 06:10:06 -05:00
Jeffrey Walton
73836e58a5
Add Test namespace within CryptoPP namespace (Issue 379) 2017-02-21 02:03:29 -05:00
Jeffrey Walton
9d7c5fce55
Remove old VerifierFilter, switch to SignatureVerificationFilter
VerifierFilter was a typedef for SignatureVerificationFilter. The name changed at Crypto++ 5.0
Updated documentation
2017-02-07 18:51:44 -05:00