Commit Graph

3120 Commits

Author SHA1 Message Date
Jeffrey Walton
b2693c4327
Fix IS_ARMV8 in GNUmakefile
Fix guard for HasPMULL()
2017-08-30 10:00:46 -04:00
Jeffrey Walton
1aecb3d4ad
Use optimization level -O3 for release testing (GH #454)
This change should have been made with Commit 18a05659f3
2017-08-30 08:32:20 -04:00
Jeffrey Walton
796a5c1a02
Remove PLATFORM_CXXFLAGS tests (GH #481)
cryptest.sh still needs some tweaking from the recent changes
2017-08-30 07:58:34 -04:00
Wyatt O'Day
5149237a5d Fix compilation of secblock.h under Visual Studio 2010 (which only has partial C++ 2011 support). (#477) 2017-08-29 14:55:01 -04:00
Jeffrey Walton
8624587943
Remove WORKAROUND_MS_BUG_Q258000 from the config and osrng 2017-08-29 14:48:08 -04:00
Jeffrey Walton
c06995a71b
Consistent use of grep and sed (GH #476)
MinGW is really messing things up for us.
2017-08-29 08:57:04 -04:00
Jeffrey Walton
ef28f46691
Fix CMakeList.txt under Solaris
We needed to add GREP_CMD back and use grep from /usr/bin/xpg4 for Posix xompliant grep.
2017-08-29 07:33:25 -04:00
Jeffrey Walton
7e7de550e9
Fix broken CMakeList.txt under MinGW (again) (Issue 476)
Sorry about that Anonimal (x2)
2017-08-28 18:51:41 -04:00
Jeffrey Walton
238154966c
Fix broken CMakeList.txt under MinGW (again) (Issue 476)
Sorry about that Anonimal
2017-08-28 18:15:32 -04:00
Jeffrey Walton
76c4d6e9fa
Add -xarch options to linker flags (Issue 472)
Also see https://docs.oracle.com/cd/E19205-01/819-5267/bkabt/index.html
2017-08-28 17:51:59 -04:00
Jeffrey Walton
a3b035b6a8
Add CRYPTOPP_CXX11_ENUM (Issue 475) 2017-08-28 17:37:59 -04:00
Jeffrey Walton
97317914d5
Since moving to split sources (base+simd) we found SecBlocks declared in headers may not be 16-byte aligned because the architecture switch is present on the simd file, and not the base file.
16-byte aligned is the default for most systems nowadays, so we side stepped alignment problems on all platforms except 32-bit Solaris. We need the 16-byte alignment for all Intel compatibles since the late 1990s, which is nearly all processors in the class.

The worst case is, if a processor lacks SSE2, then it gets an aligned SecBlock anyways. The last time we saw processors without the features was 486 and early Pentiums, and that was 1996 or so. Even low-end processors like Intel Atoms and VIA have SSE2+SSSE3.

Also see "Enable 16-byte alignment full-time for i386 and x86_64?" (https://groups.google.com/forum/#!topic/cryptopp-users/ubp-gFC1BJI) for a discussion.
2017-08-28 05:40:23 -04:00
Jeffrey Walton
d4ac135f93
Test align 16 for i386 and x86_64
Take 2
2017-08-27 19:53:12 -04:00
Jeffrey Walton
f488221992
Test align 16 for i386 and x86_64 2017-08-27 19:01:00 -04:00
Jeffrey Walton
7c667bc71e
Fix SunCC crash when compiling GCM 2017-08-27 06:16:04 -04:00
Jeffrey Walton
2d5ed51ca9
Add Mapfile for CMake on Solaris (Issue 380) 2017-08-27 05:47:38 -04:00
Jeffrey Walton
67a24ec75a
Fix output artifact name under Cygwin (GH #466) 2017-08-26 22:34:10 -04:00
Jeffrey Walton
33d20af445
Fix CMake compiler feature misdetection on under SunCC (GH #472)
Take 2
2017-08-26 20:53:35 -04:00
Jeffrey Walton
052c06b2ea Revert "Fix CMake compiler feature misdetection on under SunCC (GH #472)"
This reverts commit 64def346cd. It broke AppVeyor and Travis builds (it tested good locally on Intel, Aarch and Solaris i86). CMake is so fucked up. I regret the day we added it to the project.
2017-08-26 18:47:04 -04:00
Jeffrey Walton
64def346cd
Fix CMake compiler feature misdetection on under SunCC (GH #472) 2017-08-26 17:18:26 -04:00
Jeffrey Walton
62c2ef2073
Fix if statement (GH# 380, Commit efcf7fa59c) 2017-08-26 09:59:45 -04:00
Jeffrey Walton
efcf7fa59c
Add SunCC and Solaris to CMakeFile.txt (GH# 380) 2017-08-26 09:55:06 -04:00
Jeffrey Walton
19cabcf15d
Fold arguments to DumpMachine and use egrep (GH #466) 2017-08-26 05:16:22 -04:00
0x914409F1
a6f24d663e CMake: create DumpMachine function for machine targeting (#471)
Also fixes/resolves MinGW build (Issue 466)
2017-08-26 05:07:21 -04:00
Jeffrey Walton
a403c32cf2
Remove DISABLE_NATIVE_ARCH from test script (GH #380) 2017-08-25 19:59:34 -04:00
Jeffrey Walton
a6ddb5ec40
Remove Platform CXXFLAGS test
Add CMake build tests
Add Sun Studio 12.6 tests
2017-08-25 13:58:34 -04:00
Jeffrey Walton
77e9d8c2db
Try fix CMake on MinGW (Issue 466)
We don't know if this is going to fix the issue because we don't have a MinGW platofrm for testing. However, from VRE's answer on Stack Overflow (and the chronic CMake problems with execute_process), we believe this may be the fix.
The fix tested OK on WIndows, Linux, OS X and Cygwin. At worse, it won't do any harm
2017-08-25 10:33:48 -04:00
Jeffrey Walton
952ec1c5c8
Update comments 2017-08-25 06:41:24 -04:00
Jeffrey Walton
b3278a3cd2
Remove ospstore.cpp from cryptest.nmake 2017-08-25 06:20:57 -04:00
Jeffrey Walton
2651de246b
Support Base Implementation + SIMD implementation in cryptest.nmake (PR #461) 2017-08-25 06:12:46 -04:00
Jeffrey Walton
e9a0553b5d
Fix typo 2017-08-24 20:24:32 -04:00
Jeffrey Walton
5c6a32ba0f
Support Base Implementation + SIMD implementation on Solaris (PR #461) 2017-08-24 19:17:21 -04:00
Jeffrey Walton
b57f7f0ae0 Rollup CMake fixes for OpenBSD, MinGW (Issues 380, 466-468, PR #469)
Rollup CMake fixes for OpenBSD (Issues 467-468)
Rollup CMake fixes for MinGW (Issues 466)
Add CRYPTOPP_ENABLE_ARCH (Issue 380)
2017-08-24 07:26:14 -04:00
Jeffrey Walton
b3cacd8287
Fix 32-bit ARM NEON detection
BeagleBone's, RPI-3's, etc
2017-08-23 19:35:45 -04:00
Jeffrey Walton
9c9e69119f Remove -march=native as default in Makefile and CMake (PR #465)
Remove -march=native as default in Makefile and CMake (PR #465)
2017-08-23 16:13:20 -04:00
Jeffrey Walton
559fc3bd89 Fix benchmark selection code (GH #464) 2017-08-22 05:10:25 -04:00
Jeffrey Walton
7851a0d510 Remove BOOL macro value (GH #462)
Currently the CRYPTOPP_BOOL_XXX macros set the macro value to 0 or 1. If we remove setting the 0 value (the #else part of the expression), then the self tests speed up by about 0.3 seconds. I can't explain it, but I have observed it repeatedly.
This check-in prepares for the removal in Upstream master
2017-08-20 21:25:29 -04:00
Jeffrey Walton
bac3c1cc40
Fix Asan 64-bit build
The Padlock SDK sample code leaves a lot to be desired. Regariding the 64-bit samples and instr_linux64.asm... it looks like the sample sill uses 32-bit constants, but most anything related to extended registers, like rdi, is commented out
2017-08-20 11:19:32 -04:00
Jeffrey Walton
3db6f361d2
Fix compile under MSVC
(ClCompile target) ->
  validat1.cpp(1081): warning C4800: 'CryptoPP::word32' : forcing value to bool
 'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
  validat1.cpp(1090): warning C4800: 'CryptoPP::word32' : forcing value to bool
 'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
  validat1.cpp(1099): warning C4800: 'CryptoPP::word32' : forcing value to bool
 'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
2017-08-20 07:15:02 -04:00
Jeffrey Walton
40d0710d43
Fix compile under Clang
padlkrng.cpp:45:34: error: no matching function for call to 'STDMIN'
                const size_t rem = STDMIN(ret, STDMIN(size, 16U));
                                               ^~~~~~
./misc.h:516:36: note: candidate template ignored: deduced conflicting types for parameter 'T' ('unsigned long' vs. 'unsigned int')
template <class T> inline const T& STDMIN(const T& a, const T& b)
                                   ^
1 error generated.
2017-08-20 07:09:10 -04:00
Jeffrey Walton
88f08afcb0
Add additional VIA RNG tests
The are configurations tests as recommended by Cryptography Research, Inc in their 2003 audit report
2017-08-20 07:01:59 -04:00
Jeffrey Walton
855922b2ca
Updated documentation 2017-08-20 04:59:41 -04:00
Jeffrey Walton
ce74eac58d
Updated documentation 2017-08-20 04:40:57 -04:00
Jeffrey Walton
8c47095a57
FIX GCC ASM template
is the constant 2. %2 is the second positional argument, which is the XSTORE divisor. We want the later.
2017-08-20 04:21:24 -04:00
Jeffrey Walton
61c8b74951
Add Divisor and MSR member variables
Guard ASM based on CRYPTOPP_X86_ASM_AVAILABLE
Increased depth of internal buffer
Update documentation for using the generator
Whitespace check-in
2017-08-20 04:09:19 -04:00
Jeffrey Walton
bc4bb9a952 Fix 0-size FixedSizeAlignedSecBlockwith GetUserKey 2017-08-19 17:35:56 -04:00
Jeffrey Walton
7fb5953055
Add VIA Padlock RNG 2017-08-19 15:41:45 -04:00
Jeffrey Walton
65a96fe983
Update Readme with FIPS 1402-2 info 2017-08-19 10:08:31 -04:00
Jeffrey Walton
2daa991427
Update comments 2017-08-19 09:48:24 -04:00
Jeffrey Walton
fe64547a26
Update Readme 2017-08-19 09:09:41 -04:00