Commit Graph

3549 Commits (b096401b7ccd44c706c38b3ae8e9d83b783996b6)

Author SHA1 Message Date
Jeffrey Walton b096401b7c
Add additional Integer class tests 2018-03-25 16:44:51 -04:00
Jeffrey Walton a6c9419059
Update documentation 2018-03-25 15:31:43 -04:00
Jeffrey Walton d165544131
Update documentation 2018-03-25 15:14:18 -04:00
Jeffrey Walton 2f61c159b0
Add additional Integer class tests 2018-03-25 14:12:51 -04:00
Jeffrey Walton 932f392b2d
Fix incorrect InverseMod (GH #602)
cryptest.sh revealed a corner case still producing an incorrect result. We need to check for '*this > m', not '*this > 2m-1'.

The corner case looks obscure. The failure surfaced as 1 failed self test for about every 2048 tests. It was also in a code path where 'a' was explicitly set to '2m-1', with 'm' random.

The test result can be duplicated with 'cryptest.exe v 9996 1521969687'. The value '1521969687' is a seed for the random number generator to reproduce.
2018-03-25 11:15:34 -04:00
Jeffrey Walton 34be01231c
Fix conversion warnings under MSC 2018-03-25 02:47:38 -04:00
Jeffrey Walton a8d40ee07f
Add additional InverseMod tests
This commit adds tests using 'word' moduli
2018-03-25 01:57:12 -04:00
Jeffrey Walton eb0d040786
Move some tests from TestIntegerBitops to TestIntegerOps (GH #602) 2018-03-25 00:58:11 -04:00
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