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
f60f212687
Remove Tweak handling.
...
We are arriving at incorrect result for G2 after the first Key Injection, and its not readily apparent why.
2017-05-15 14:38:24 -04:00
Jeffrey Walton
b3399b4f86
Remove SSE2 intrinsics from Threefish
...
The benchmarks showed things ran slower with GCC and MSVC
2017-05-14 16:59:04 -04:00
Jeffrey Walton
54ca8b3a16
Whitespace check-in
2017-05-14 15:30:59 -04:00
Jeffrey Walton
32ab4af5ff
Add Threefish to project files
...
Whitespace check-in
2017-05-14 15:27:50 -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
bc2678478c
Add polynomial for 1024-bit block cipher.
...
This will support Threefish and its 1024-bit block size. I believe this is correct, but it may be wrong. According to "Table of Low-Weight Binary Irreducible Polynomials" (http://www.hpl.hp.com/techreports/98/HPL-98-135.pdf ), the polynomial is x^1024 + x^19 + x^6 + x + 1.
2017-05-13 19:23:24 -04:00
Jeffrey Walton
cea45eb024
Revert "Add polynomial for 1024-bit block cipher."
...
This reverts commit d654c893ef . The polinomial for 1024-bit block sizes had a typo.
2017-05-13 19:18:24 -04:00
Jeffrey Walton
d654c893ef
Add polynomial for 1024-bit block cipher.
...
This will support Threefish and its 1024-bit block size. I believe this is correct, but it may be wrong. According to "Table of Low-Weight Binary Irreducible Polynomials" (http://www.hpl.hp.com/techreports/98/HPL-98-135.pdf ), the polynomial is x^1024 + x^19 + x^6 + x + 1.
2017-05-13 19:15:46 -04:00
Jeffrey Walton
7697857481
Add polynomial for 512-bit block ciphers
...
I believe this is correct, but it may be wrong. According to the Kalyna team, the polynomial for GCM mode is x^512 + x^8 + x^5 + x^2 + 1. It appears the polinomial applies to other block cipher modes of operations, like CMAC.Dropping the first term and evaluating the remaining terms at X=2 results in 293 (0x125)
2017-05-13 17:36:29 -04:00
Jeffrey Walton
e226523b05
Call cipher.SetKey() before cipher.BlockSize() (Issue 408)
...
Variable block size ciphers need the key set before they can return an accurate size for BlockSize(). This issue surfaced during Kalyna testing with authenticated encryption modes. In particular, EAX mode, which effectively uses CMAC:
AlgorithmParameters params = MakeParameters(Name::BlockSize(), 64)
(Name::IV(), ConstByteArrayParameter((const byte *)iv, 64));
EAX<Kalyna>::Encryption kalyna;
kalyna.SetKey(key, 64, params);
2017-05-13 16:28:05 -04:00
Jeffrey Walton
0611e11507
Disable word128 for PPC64 and GCC 4.8 (Issue 421)
2017-05-12 23:51:27 -04:00
Jeffrey Walton
78db20d939
Add FileName, FileTime and Comment to argnames.h
...
Add self tests to verify handling of filenames, filetimes and comments
2017-05-12 19:52:42 -04:00
Jeffrey Walton
e3ae7000ea
Whitespace check-in
2017-05-12 16:53:07 -04:00
Jeffrey Walton
cfa339535b
Revert "Write MTIME in big-endian order"
...
This reverts commit 591b139343 . RFC 1952 states the bytes are written in little-endian order, not big-endian. That includes MTIME.
2017-05-12 16:51:03 -04:00
Jeffrey Walton
591b139343
Write MTIME in big-endian order
...
Whitespace
2017-05-12 15:29:03 -04:00
c0ff
d901ecd9a4
Gunzip: added GetFilename() and GetComment() methods ( #418 )
...
Add Filename, Filtetime and Comment support to Gzip classes
2017-05-12 15:09:21 -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
9850576d0b
Improve compressor error messages
2017-05-11 17:59:20 -04:00
Jeffrey Walton
35451f3ab6
Additional self tests for Decompressors
2017-05-11 13:00:17 -04:00
Jeffrey Walton
537ee61ade
Switch to _MSC_FULL_VER for SP1 releases
2017-05-11 12:05:57 -04:00
Jeffrey Walton
aa287d6112
Fix compile under GCC 6.3 on Fedora
2017-05-11 11:55:00 -04:00
Jeffrey Walton
308336c4e1
Switch to COUNTOF in validat3.cpp
2017-05-11 11:18:52 -04:00
Jeffrey Walton
34edf7e12f
Fix subscript out of range in test
2017-05-11 04:14:13 -04:00
Jeffrey Walton
ea5d003a9a
Move TestPolynomialMod2 to validat0.cpp
2017-05-11 03:56:19 -04:00
Jeffrey Walton
c87b0d1485
Fix subscript out of range in test
2017-05-11 02:57:48 -04:00
Jeffrey Walton
598f838e0a
Reduce random string size.
...
Tests run faster without diminishing returns
2017-05-11 02:13:27 -04:00
Jeffrey Walton
b40d4d9180
Add CRYPTOPP_COVERAGE for Asan and UBsan builds
2017-05-11 01:35:32 -04:00
Jeffrey Walton
b3f5bae3b9
Merge pull request #417 from c0ff/master
...
NULLPTR fix for blake2 tests
2017-05-11 00:46:56 -04:00
Dmitry S. Baikov
a9b06b40e7
fixed type casts in blake2 tests
2017-05-11 07:39:51 +03:00
Dmitry S. Baikov
39abbbb070
NULLPTR fix for blake2 tests
2017-05-11 07:14:37 +03:00
Jeffrey Walton
e1b9582a4a
Merge pull request #416 from c0ff/master
...
Fixed non-keyed blake2x hashes when using non-standard digest sizes
2017-05-11 00:10:14 -04:00
Dmitry S. Baikov
369fa3bc52
NULLPTR fix for blake2
2017-05-11 07:04:51 +03:00
Dmitry S. Baikov
e8e0b1c3f2
blake2: Fixed initialization when using non-keyed constructor with non-standard digest size. Added test vectors.
...
https://github.com/weidai11/cryptopp/issues/415
Test vectors generated with pyblake2 which uses 'BLAKE2 reference source code package' by Samuel Neves
2017-05-11 06:46:56 +03:00
Jeffrey Walton
702dae7db9
Fix Mersenne output on big-endian machines
2017-05-10 21:00:53 -04:00
Jeffrey Walton
2a20d09dc6
Additional self tests for Decompressors
2017-05-10 20:32:50 -04:00
Jeffrey Walton
07dbcc3d96
Add Inflator::BadDistanceErr exception (Issue 414)
...
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
2017-05-10 18:17:12 -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
d236cf1277
Add Kalyna CBC test vectors
2017-05-10 15:27:57 -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
3bee1f57cf
XOR block in specialized ProcessBlock
...
Use Put and Get blocks consistently
2017-05-10 06:34:22 -04:00
Jeffrey Walton
20c3d556c3
Revert "XOR block in specialized ProcessBlock"
...
This reverts commit 76bb4ead40 . The Visual Studio project files and other test files were not supposed to be checked-in.
2017-05-10 06:30:08 -04:00