Commit Graph

3622 Commits

Author SHA1 Message Date
Jeffrey Walton
8c5abe604a
Remove '#undef BLOCKING_RNG_AVAILABLE' from validate.cpp
This was for testing on low-resource ARM dev-boards. It accidentally cross-pollinated into other systems.
2018-03-28 13:06:16 -04:00
Jeffrey Walton
69915e1755
Remove double CRYPTOPP_SECTION_INIT for g_hasSSE2
Also change to a single declaration per line. The multiple declarations got to be messy
2018-03-27 23:19:26 -04:00
Jeffrey Walton
8fca97da54
Update documentation 2018-03-27 21:17:10 -04:00
Jeffrey Walton
e9b6e85b77
Bump version numbers 2018-03-27 21:07:53 -04:00
Jeffrey Walton
3958fad099
Add sbyte, sword16, sword32 and sword64 (GH #608, GH #609)
Visual Studio 2008 kind of forced out hand with this. VS2008 lacks <stdint.h> and <cstdint> and it caused compile problems in NaCl gear. We were being a tad bit lazy by relying on int8_t, int32_t and int64_t, but the compiler errors made us act
2018-03-27 20:47:20 -04:00
Jeffrey Walton
1c60f6480f
Fix Windows compile error using VS2008 2018-03-27 20:38:26 -04:00
Jeffrey Walton
43ff11a089
Suppress C4231 and C4505 warnings using VS2008 2018-03-27 20:37:42 -04:00
Jeffrey Walton
506f90bcc8
Fix VS2010 and "error C2065: uint32_t: undeclared identifier" (GH #608)
We could fix aria.cpp by using word32. However, NaCl gear uses int64_t and we don't have a typedef setup for it. So we will need <cstdint> later for NaCl
2018-03-27 19:18:44 -04:00
Ilja
71ea29d893 Remove extra ';' from oids.h (GH #607) 2018-03-27 14:15:42 -04:00
Jeffrey Walton
f26a07ad98
Add extraneous calls for code coverage 2018-03-27 03:29:56 -04:00
Jeffrey Walton
3b8bc690bb
Add additional self tests 2018-03-27 00:33:27 -04:00
Jeffrey Walton
36bde8eab5
Switch to <nbtheory.h> functions 2018-03-26 23:49:04 -04:00
Jeffrey Walton
9ab3f61810
Update documentation 2018-03-26 23:30:34 -04:00
Jeffrey Walton
c9fc704941
Remove double include 2018-03-26 23:16:35 -04:00
Jeffrey Walton
780a2b8c82
Update documentation 2018-03-26 17:41:06 -04:00
Jeffrey Walton
83c9d29875
Update documentation 2018-03-26 16:54:39 -04:00
Jeffrey Walton
0253fa9940
Update documentation 2018-03-26 15:41:31 -04:00
Jeffrey Walton
a665e0825f
Use '*this >= m' for InverseMod reduction
The previous test used '*this > m', which did not capture 'm'
2018-03-26 13:31:18 -04:00
Jeffrey Walton
302d210ceb
Add additional Integer class tests 2018-03-26 13:02:55 -04:00
Ilja
c2e4ee60b3 Remove extra ;s (GH #605) 2018-03-26 11:36:54 -04:00
Jeffrey Walton
dd74bc93a4
Add additional Integer class tests 2018-03-25 19:53:26 -04:00
Jeffrey Walton
874c48a329
Fix a_exp_b_mod_c and divide by 0 (GH #604) 2018-03-25 19:22:42 -04:00
Jeffrey Walton
1efa1a9fc7
Add additional Integer class tests 2018-03-25 18:28:56 -04:00
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