Commit Graph

3248 Commits

Author SHA1 Message Date
Jeffrey Walton
2a4d58a208
Fix Sosemanuk when -DCRYPTOPP_DISABLE_ASM is in effect
It looks like a copy/paste error was introduced at Commit a074722bfa
2017-11-27 21:54:15 -05:00
Jeffrey Walton
45db15e51b
Increase precision of cpb
When cpb is less than 24 or so print two decimal places
2017-11-27 11:38:15 -05:00
Jeffrey Walton
a29b36c197
Whitespace check-in 2017-11-27 01:51:27 -05:00
Jeffrey Walton
07c2047cec
Add simon-simd.cpp to file list and nmake file 2017-11-27 01:20:15 -05:00
Jeffrey Walton
1211f25de5
Fix cryptest.vcxproj.user
The file was unintentionally checked in with the SIMON-128 commit
2017-11-27 00:50:05 -05:00
Jeffrey Walton
568e608ea6
Add NEON and ASIMD intrinsics for SPECK-128 (GH #539)
Performance increased by about 200% on a 980 MHz BananaPi dev-board. Throughput went from about 176.6 cpb to about 60.3 cpb.
2017-11-27 00:36:45 -05:00
Jeffrey Walton
7576cca8d2
Switch to 'L' for blocksize in SPECK_Info 2017-11-26 23:51:05 -05:00
Jeffrey Walton
84fdcbf384
Use non-macro version of ttmac 2017-11-26 07:59:33 -05:00
Jeffrey Walton
c5303b9c2a
Fix "variable tracking size limit exceeded" with UBsan
threefish.cpp: In member function ‘virtual void CryptoPP::Threefish512::Enc::ProcessAndXorBlock(const byte*, const byte*, CryptoPP::byte*) const’:
threefish.cpp:316:6: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 void Threefish512::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
...
2017-11-26 05:27:03 -05:00
Jeffrey Walton
4c0bfe4548
Update documentation 2017-11-26 02:45:34 -05:00
Jeffrey Walton
14e631fd84 Update documentation 2017-11-26 02:26:58 -05:00
Jeffrey Walton
d19ef1c716
Update documentation 2017-11-26 01:59:06 -05:00
Jeffrey Walton
c518b31ae8
Update documentation 2017-11-26 01:43:00 -05:00
Jeffrey Walton
679c9583a0
Update oids for SM2 (GH #542)
Also see https://www.cryptopp.com/wiki/SM2. The wiki page is documenting some of this stuff
2017-11-25 10:40:17 -05:00
Jeffrey Walton
1ca704aec6
Add Identity name/value pair (GH #542)
China’s SM2 uses an identity field for digital signatures. We used a ConstByteArrayParameter rather than a char* because the identifier may not be a C-string. The observation is based on experience with Thomas Wu’s Secure Remote Protocol (SRP)
2017-11-25 05:27:28 -05:00
Jeffrey Walton
3dbd762728
Update documentation 2017-11-25 05:16:15 -05:00
Jeffrey Walton
c1acc9fcfa
Add OIDs for SM2 standard (GH #542) 2017-11-25 05:01:21 -05:00
Jeffrey Walton
e85b388234
Add thorough param to ValidateECGDSA 2017-11-25 03:27:07 -05:00
Jeffrey Walton
a074722bfa
Switch to rotlConstant and rotrConstant
This will help Clang and its need for a constexpr
2017-11-25 02:52:19 -05:00
Jeffrey Walton
2d4614084a
Update documentation 2017-11-24 22:35:53 -05:00
Jeffrey Walton
571cbf058c
Fix LLVM detection of SSSE3 on 32-bit cpus 2017-11-24 21:38:49 -05:00
Jeffrey Walton
c797bd9523
Add additional SM3 test vectors (GH #541) 2017-11-24 19:41:58 -05:00
Jeffrey Walton
dcd27e8a1f
Update documentation 2017-11-24 18:58:31 -05:00
Jeffrey Walton
2ac9e61335
Switch to rotlConstant and rotrConstant 2017-11-24 18:21:27 -05:00
Jeffrey Walton
4f2d6f713f
Switch to rotlConstant and rotrConstant
Update comments
2017-11-24 17:54:12 -05:00
Jeffrey Walton
2abf7d7bc4
Fix compile on MIPS due to missing definition of NULL
Whitespace check-in
2017-11-24 17:53:25 -05:00
Jeffrey Walton
3b80ead695
Add rotlConstant and rotrConstant
The template functions take the rotate amount as a template parameter, which will allow the constexpr to propagate into the rotate expression. It should avoid some of the compile problems we were seeing under Clang and C++11
2017-11-24 17:37:55 -05:00
Jeffrey Walton
4382b1a559
Add additional SM3 test vectors (GH #541) 2017-11-24 07:24:09 -05:00
Jeffrey Walton
16290b2f1c Fix crash on VIA C7-D when using GCM
This was interesting... The C&-D is an early 2000's 32-bit processor with SSE2 and SSSE3. Using a destination register constraint of "xm" witnessed a crash, while a constraint of "m" does not
2017-11-24 07:08:41 -05:00
Jeffrey Walton
0dc72380a9
Add additional SM3 test vectors (GH #541) 2017-11-24 06:52:57 -05:00
Jeffrey Walton
c3107d2519
Fix "impossible constraint in \\asm\" on i686
gcm.cpp:89:50: error: impossible constraint in \\asm\
          : "=xm" (a[0]) : "xm"(b[0]), "xm"(c[0]));
2017-11-24 05:49:56 -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
521e4ea5fb
Update documentation 2017-11-23 12:42:16 -05:00
Jeffrey Walton
eae5f40c19
Add missing test vectors to file list 2017-11-23 11:52:07 -05:00
Jeffrey Walton
2c8a618a03
Add SM4 block ciphers (GH #540) 2017-11-23 11:41:40 -05:00
Jeffrey Walton
2e63e46747
Fix Speck compile error with iOS Watch 2017-11-23 09:45:53 -05:00
Jeffrey Walton
f4975461a9
Remove IS_ARM64 from makefile
ARM64 is kind of useless. We need A-32 (old ARM), Aarch32 (new 32-bit ARM) and Aarch64 (new 64-bit ARM). Aarch32 and Aarch64 is captured by IS_ARMV8, and A-32 is captured by IS_ARM
2017-11-23 03:42:26 -05:00
Jeffrey Walton
304809a65d
Add NEON and ASIMD intrinsics for SPECK-128 (GH #538)
Performance increased by about 115% on a 980 MHz BananaPi dev-board. Throughput went from about 46.2 cpb to about 21.5 cpb.
2017-11-23 02:47:44 -05:00
Jeffrey Walton
b08596da44
Add CRYPTOPP_SLOW_ARMV8_SHIFT for Aarch32 and Aarch64
Both BLAKE2 and SPECK slow down when using NEON/ASIMD. When just BLAKE2 experienced the issue, it was a one-off problem. Its now wider than a one-off, so add the formal define
2017-11-23 02:22:27 -05:00
Jeffrey Walton
78ec2aa5f4
Fix NEON detection on arm-hf 2017-11-22 23:15:20 -05:00
Jeffrey Walton
aec67799a3
Add CTR to display for SIMON and SPECK 2017-11-22 18:43:08 -05:00
Jeffrey Walton
561926db34
Rename CRYPTOPP_ENABLE_ADVANCED_PROCESS_BLOCKS for Rijndael 2017-11-22 17:55:20 -05:00
Jeffrey Walton
f5784c1634
Update comments 2017-11-22 17:35:59 -05:00
Jeffrey Walton
f2bc3cd0ca
Add speck-simd.cpp to project files (GH #538, #539)
Cleaned up whitespace
2017-11-22 08:45:38 -05:00
Jeffrey Walton
e7fee716d6
Add SSSE3 intrinsics for SPECK-128 (GH #538)
Performance increased by about 100% on a 3.1 GHz Core i5 Skylake. Throughput went from about 7.3 cpb to about 3.5 cpb. Not bad for a software-based implementation of a block cipher
2017-11-22 08:01:41 -05:00
Jeffrey Walton
39697d92bf
Add SSSE3 intrinsics for SPECK-128 (GH #538)
Performance increased by about 100% on a 3.1 GHz Core i5 Skylake. Throughput went from about 7.3 cpb to about 3.5 cpb. Not bad for a software-based implementation of a block cipher
2017-11-22 07:57:39 -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