Commit Graph

3534 Commits (04e361889efdc4a8e3d52e034ef0e8b17dbe52c4)

Author SHA1 Message Date
Jeffrey Walton 04e361889e
Add CPU feature queries for AIX
Also see the discussion at https://github.com/noloader/POWER8-crypto
2018-03-20 23:52:10 -04:00
Jeffrey Walton e7be3a8357
Fix compile on AIX using const pointers
Also see the discussion at noloader/POWER8-crypto#2
2018-03-20 23:50:51 -04:00
Jeffrey Walton 9a52edcfdb
Remove non-const cast from POWER8 loads and stores
Also see the discussion at https://github.com/noloader/POWER8-crypto/issues/2
2018-03-20 15:02:47 -04:00
Jeffrey Walton 244abbe41c
Fix compile error on Windows due to symbol U collision (GH #599)
A package called cpprest provides U as a macro
2018-03-16 09:00:50 -04:00
Jeffrey Walton 92ad65bfae
Clear unused variable warning 2018-03-11 21:45:19 -04:00
Jeffrey Walton c51856dd20
Add Power8 code generation tests to cryptest.sh 2018-03-11 19:25:42 -04:00
Jeffrey Walton a0cbdc7ba4
Switch to 2-mask version of vec_perm for repack 2018-03-11 13:56:02 -04:00
Jeffrey Walton 03d4508a76
Whitespace check-in 2018-03-11 12:52:03 -04:00
Jeffrey Walton 07ece016b7
Add VectorLoadMsg and comments (GH #513) 2018-03-11 12:45:14 -04:00
Jeffrey Walton 0630d46fe8
Add PowerPC Power8 SHA hashing (GH #513)
Perforance increases significantly, but there's still room for improvement. Even OpenSSL's numbers are relatively dull. We expect Power8's SHA-256 to be somewhere between 2 to 8 cpb but we are not hitting them.

SHA-256, GCC112 (ppc64-le): C++ 23.43, Power8 13.24 cpb (+ 110 MiB/s)
SHA-256, GCC119 (ppc64-be): C++ 10.16, Power8  9.74 cpb (+ 50 MiB/s)

SHA-512, GCC112 (ppc64-le): C++ 14.00, Power8 9.25 cpb (+ 150 MiB/s)
SHA-512, GCC119 (ppc64-be): C++ 21.05, Power8 6.17 cpb (+ 450 MiB/s)
2018-03-10 16:19:11 -05:00
Fabrice Fontaine 95804ce572 Fix GCC version for RDSEED intrinsic (#598)
rdseed is only available on gcc 4.8.x, not on gcc 4.7.x

Fixes:
 - http://autobuild.buildroot.org/results/9ab386124e4a09b50598c6f95ad40b25a83d227e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-03-10 08:38:44 -05:00
Jeffrey Walton 8146eda6a3
Clear unused variable warnings under GCC 2018-03-09 06:45:32 -05:00
Jeffrey Walton 6d35beb05d
Add Linux Sparc64 support to test script (GH #597) 2018-03-08 20:14:37 -05:00
Jeffrey Walton 80f70442df
Add comment on RK cast (GH #597) 2018-03-08 20:04:50 -05:00
Jeffrey Walton 730eebe233
Fix SIGBUS on Sparc64 (GH #597)
PutAndGetBlock did not handle an unaligned outblock properly. Ugh...
2018-03-08 17:01:00 -05:00
Fabrice Fontaine 3c01bcc352 Allow user to set -DCRYPTOPP_ARM_NEON_AVAILABLE=0 (#595)
Disable neon through -DCRYPTOPP_ARM_NEON_AVAILABLE=0,
replace "if defined(CRYPTOPP_ARM_NEON_AVAILABLE)" by
"if (CRYPTOPP_ARM_NEON_AVAILABLE)"

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-03-05 18:49:10 -05:00
Jeffrey Walton 626c86987b
Fix SHA feature detection on AIX
This one should have been fixed before the Crypto++ 6.1 release. Its no big deal, however. Power8 accelerated SHA-256 is 1.5x to 2x slower than straight C++. SHA-512 may be better, but the implementation is not ready to performance test.
2018-03-05 07:05:12 -05:00
Jeffrey Walton f1a3da834a
Tie CRYPTOPP_CXX17 to CRYPTOPP_CXX11 2018-03-05 06:47:05 -05:00
Fabrice Fontaine f7f13c70c8 Define AT_HWCAP/AT_HWCAP2 if getauxval unavailable (#594)
If CRYPTOPP_GETAUXV_AVAILABLE is undefined, getauxval function is
defined to return 0 however AT_HWCAP and AT_HWCAP2 are not defined so
compilation on toolchain without getauxval and these variables such as
uclibc-ng will fail.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-03-04 09:17:03 -05:00
Jeffrey Walton 53ccd310b8
Clear C4742 warning using MSVC (GH #591) 2018-02-24 17:00:40 -05:00
Jeffrey Walton 2f1c984264
Post-release version increment 2018-02-22 12:50:29 -05:00
Jeffrey Walton 481cf06dfe
Post-release version increment 2018-02-22 12:48:33 -05:00
Jeffrey Walton da11d90ddb
Post-release version increment 2018-02-22 12:47:18 -05:00
Jeffrey Walton cfc6173312 Merge branch 'master' of https://github.com/weidai11/cryptopp 2018-02-22 12:44:56 -05:00
Jeffrey Walton 4909c9acfd
Update History.txt 2018-02-22 12:39:06 -05:00
Jeffrey Walton 5be140bcea
Prepare for Crypto++ 6.1 release 2018-02-22 09:26:16 -05:00
Jeffrey Walton 63d038fa18
Update documentation
The commit also adds an assert on memcpy_s pointers. GCC 8 claims the pointers are the same. We think it is a spurious finding. The assert never fired during test.
2018-02-22 08:01:08 -05:00
Jeffrey Walton f83550809d
Fix __cplusplus version for C++17
Formerly we were using 201402L from N4594, and it caused a compile failure when using -std=c++14
2018-02-21 18:01:31 -05:00
Jeffrey Walton 143f5a3079
Handle C++17 std::uncaught_exceptions (GH #590) 2018-02-21 09:59:52 -05:00
Jeffrey Walton 59088779d8
Update comments in test script 2018-02-21 08:06:51 -05:00
Jeffrey Walton d556586d27
Add Reptoline option tests to test script 2018-02-21 04:23:46 -05:00
Jeffrey Walton 5c36c99d3f
Add -O2 test to test script (GH #588) 2018-02-21 03:22:34 -05:00
Jeffrey Walton bd8c20562c
Clear unused variable warnings 2018-02-20 17:03:32 -05:00
Jeffrey Walton 244c40ed61
Remove unneeded round parameter on Rijndael_UncheckedSetKey_SSE4_AESNI 2018-02-20 13:32:53 -05:00
Jeffrey Walton 33c10bc027
Fix ODR violation in AdvancedProcessBlocks_{ARCH} (GH #585)
The ALTIVEC function required an inline declaration. Lack of inline caused the self test failure. Two NEON functions needed the same. We also cleaned up constants in unnamed namespaces
2018-02-20 13:17:05 -05:00
Nicolas Chauvet (kwizart) b6fec08da1 Freeze ABI compatibility with LIB_MAJOR (#589)
This is a convention that binary compatibity uses one number.
Using that, it's possible to have bugfixes releases (patchlevel
incremented) and enhancement release (minor incremented with no
public interface removed).

Here is more information about convention
https://autotools.io/libtool/version.html
(libtool isn't relevant to this project, but the explanation hold)

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2018-02-20 10:05:52 -05:00
Jeffrey Walton c80e28eec8
Remove unneeded parameter for Rijndael_UncheckedSetKey_POWER8 2018-02-20 06:42:43 -05:00
Jeffrey Walton d30afa4d01
Whitespace check-in 2018-02-20 04:18:58 -05:00
Jeffrey Walton 2b2303bc75
Remove unneeded Rijndael_Subkey_POWER8 (GH #588)
This is due to the removal of a path in Rijndael_UncheckedSetKey_POWER8
2018-02-20 02:24:09 -05:00
Jeffrey Walton 5b09d46665
Cleanup signed integer overflow on ppc64 (GH #588)
The code below was flagged by undefined behavior santizier under GCC 8. The offender was the doubling at "r4 = vec_add(r4, r4)". R4 is rcon and an unsigned type. It depends on integer wrap but GCC is generating code that is being flagged for signed overflow. GCC 7 and below is OK.

   for (unsigned int i=0; i<8; ++i)
   {
      r1 = Rijndael_Subkey_POWER8(r1, r4, r5);
      r4 = vec_add(r4, r4);
      skptr = IncrementPointerAndStore(r1, skptr);
   }

   // Final two rounds using table lookup
   ...
2018-02-20 02:10:17 -05: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 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 dbab746bd9
Remove previous Simon and Speck zip file (GH #585)
The implementation was incorrect. The zip file was added to allow access for users who needed it.
2018-02-19 12:57:00 -05:00
Jeffrey Walton e5a362c026
Re-add Simon and Speck, enable NEON and Aarch64 (GH #585)
This commit re-adds Simon and Speck. The commit includes NEON, Aarch32 and Aarch64
2018-02-19 04:47:19 -05:00
Jeffrey Walton 5da795bf56
Whitespace check-in 2018-02-18 23:44:23 -05:00
Jeffrey Walton e416b243d3
Re-add Simon and Speck, enable SSE (GH #585)
This commit re-adds Simon and Speck. The commit includes C++, SSSE3 and SSE4. NEON, Aarch32 and Aarch64 are disabled at the moment.
2018-02-18 23:23:50 -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 8c4300a36c
Remove variable block size in datatest.cpp (GH #535) 2018-02-18 11:57:26 -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