Commit Graph

3641 Commits (1543de863c57877a900b6536c84e4438bc7d3507)

Author SHA1 Message Date
Jeffrey Walton ff82b5a886
Fix incorrect InverseMod (GH #602) (#603) 2018-03-25 00:43:21 -04:00
rocksonhead b0f7170595 Fix calling multiple ZlibDecompressor in parallel causes adler32 checksum failure (GH #596, #600) 2018-03-24 20:27:03 -04:00
Jeffrey Walton b42d728628
Update documentation 2018-03-22 22:16:42 -04:00
Jeffrey Walton 5ae74e2fd5
Update documentation 2018-03-22 22:11:35 -04:00
Jeffrey Walton af6b96c78b
Whitespace check-in 2018-03-22 00:20:45 -04:00
Jeffrey Walton f589de0839
Rework Glibc sysconf code
It looks like the 0 return value for _SC_LEVEL1_DCACHE_LINESIZE is not a 1-off problem with PPC. It appears Glibc regularly returns 0 instead of failure. Also see https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/posix/sysconf.c.
We were OK before the change. The difference now is, we expect all Glibc queries to misbehave
2018-03-21 16:19:43 -04:00
Jeffrey Walton ddf9e70234
Fix Power7 test using PPC_FEATURE_ARCH_2_06 2018-03-21 00:35:56 -04:00
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