4872 Commits

Author SHA1 Message Date
Jeffrey Walton
1973674732
Add sanity check to setenv-*.sh scripts
Prompt user to source the script when required. Whitespace check-in
2019-05-21 05:37:40 -04:00
Jeffrey Walton
3e897eb0f6
Use CRYPTOPP_ARM_NEON_AVAILABLE in neon_simd.cpp 2019-05-21 05:11:24 -04:00
Jeffrey Walton
02baab2307
Enable Cryptogams AES on ARM using Clang
It looks like AES needed -mthumb for Clang. SHA must not use -mthumb under Clang due to a crash.
2019-05-21 04:23:40 -04:00
Jeffrey Walton
6acbbf1849
Fix crash in GCM mode on ARM with -mthumb 2019-05-21 04:03:22 -04:00
Jeffrey Walton
08235400b0
Add CRYPTOPP_CLANG_VERSION for ARM asm defines
We should be using both CRYPTOPP_APPLE_CLANG_VERSION and CRYPTOPP_LLVM_CLANG_VERSION. We'll loop back to it when we have some time.
2019-05-21 03:02:35 -04:00
Jeffrey Walton
5fb03078eb
Use void return value for Cryptogams SHA functions 2019-05-21 02:38:30 -04:00
Jeffrey Walton
e8603143dc
Whitespace check-in
We also simplified the CPU_ProbeNEON logic a bit to a vmov.u32 and vshl.u32.
2019-05-21 02:21:15 -04:00
Jeffrey Walton
40251d9b7f
Guard CPU_ProbeARMv7 with CRYPTOPP_BOOL_ARM32 (GH #844)
We make these queries available on all platforms so folks don't need to guard code.
2019-05-20 23:33:06 -04:00
Jeffrey Walton
c456d6aa69
Guard CPU_ProbeARMv7 with CRYPTOPP_BOOL_ARM32 (GH #844)
We make these queries available on all platforms so folks don't need to guard code.
2019-05-20 23:30:12 -04:00
Jeffrey Walton
cc011d2e44
Remove Aarch32 and Aarch64 from CPU_QueryARMv7
I believe some of the code may be generated differently. When testing CPU_ProbeARMv7 I had trouble compiling it on ARMv8.
2019-05-20 23:09:57 -04:00
Jeffrey Walton
a9be7ced86
Fix CPU_QueryARMv7 for Clang (GH #844)
This fixes the query under Clang. This appears to be a trickier problem because there is no explicit define for HWCAP_ARMv7. We rely on HWCAP_NEON as a proxy, or fallback to a CPU_ProbeARMv7.
2019-05-20 23:02:36 -04:00
Jeffrey Walton
a164c1f41d
Fix CPU_ProbeARMv7 for Clang (GH #844)
This fixes the probe undr Clang. However, we need to fix the CPU_QueryARMv7
2019-05-20 21:41:57 -04:00
Jeffrey Walton
c0cff24953
Update comments 2019-05-20 17:11:59 -04:00
Jeffrey Walton
b1b6ea5b78
Fold declarations for CRYPTOGAMS_armcaps
Also declare storage for CRYPTOGAMS_armcaps. This moves the symbol from BSS to initialized data. The Cryptogams module declares the symbol as common, so they are weak and use our declaration.
2019-05-20 17:03:57 -04:00
Jeffrey Walton
5c7c092336
Cleanup Cryptogams defines 2019-05-20 16:39:26 -04:00
Jeffrey Walton
00155d42cc
Enable Cryptogams SHA asm for Clang
AES is still disabled
2019-05-20 15:29:30 -04:00
Jeffrey Walton
9590481c7f
Update cryptest-autotools.sh 2019-05-20 03:48:02 -04:00
Jeffrey Walton
122529ed4a
Add test for automake in cryptest-autotools.sh 2019-05-19 21:46:36 -04:00
Jeffrey Walton
e0b60439bf
Fix Scrypt crash when blockSize is 0 (GH #842)
This may change in the future. I prefer to recover, and use default block size when block size is 0. But this stops the immediate problem of a crash.
2019-05-19 21:24:32 -04:00
Jeffrey Walton
2c0455edf8
Add additional asserts in Scrypt::ValidateParameters (GH #842)
We still need to figure out what to do, but we can start warning users immediately.
2019-05-19 18:52:37 -04:00
Jeffrey Walton
e3788aacc5
Display C++ for SHA512_AlgorithmProvider on ARM 2019-05-19 18:17:46 -04:00
Jeffrey Walton
6528561cb3
Update comments 2019-05-19 18:10:09 -04:00
Jeffrey Walton
e19a6152b5
Return CRYPTOGAMS_armcaps in CryptogamsArmCaps 2019-05-19 16:51:40 -04:00
Jeffrey Walton
62d53e6c44
Disable Cryptogams ASM on static Transform function
This needs mmore testing.
2019-05-19 16:46:01 -04:00
Jeffrey Walton
d38e5a954d
Add ARM SHA512 asm implementation from Cryptogams (GH #841, PR #843)
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams  has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.

Andy's implementation runs about 45% faster than C/C++ code. Testing on a 1.8 GHz Cortex-A17 shows Cryptograms at 45 cpb, and C++ at 79 cpb.

The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA) on the OpenSSL wiki.
2019-05-19 16:29:45 -04:00
Jeffrey Walton
4c9ca6b723
Add ARM SHA256 asm implementation from Cryptogams (GH #840, PR #840)
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams  has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.

Andy's implementation runs about 45% faster than C/C++ code. Testing on a 1 GHz Cortex-A7 shows Cryptograms at 17 cpb, and C++ at 30 cpb.

The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA) on the OpenSSL wiki.
2019-05-19 06:59:12 -04:00
Jeffrey Walton
8c99b1cd75
Add call to automake in cryptest-automake.sh 2019-05-19 02:26:44 -04:00
Jeffrey Walton
ffb11da13b
Add call to automake in cryptest-automake.sh 2019-05-19 02:19:47 -04:00
Jeffrey Walton
1a63112faf
Add ARM SHA1 asm implementation from Cryptogams (GH #837, PR #838)
Add ARM SHA1 asm implementation from Cryptogams.

Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams  has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.

Andy's implementation runs about 30% faster than C/C++ code. Testing on a 1 GHz Cortex-A7 shows Cryptograms at 16 cpb, and C++ at 23 cpb.

The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA) on the OpenSSL wiki.
2019-05-18 23:07:17 -04:00
Jeffrey Walton
4a21619bff
Regenerate Cryptogams AES assembly file
> It does not look like much has changed in the last year.
2019-05-18 06:49:51 -04:00
Jeffrey Walton
6cc9c81fa5
Use test_arm_sha1.cxx for feature tests 2019-05-17 23:45:23 -04:00
Jeffrey Walton
83ee4e1fc0
Use test_arm_sha1.cxx for feature tests 2019-05-17 23:42:15 -04:00
Jeffrey Walton
f027361369
Split test_arm_sha.cxx into SHA1 and SHA256 tests 2019-05-17 22:19:26 -04:00
Jeffrey Walton
c51f0ecbfd
Make config.h more Autoconf friendly (GH #835, PR #836) 2019-05-17 15:18:17 -04:00
Jeffrey Walton
b25b6f0892
Cleanup SIMON64 and SPECK64 flags in Makefile (GH #834) 2019-05-16 18:57:57 -04:00
Jeffrey Walton
edc0952b25
Whitespace check-in 2019-05-16 02:47:44 -04:00
Jeffrey Walton
ef3968f551
Guard x86 cache line size 2019-05-08 21:20:49 -04:00
Jeffrey Walton
72a71eb230
Use fallback in detecting ARM and PowerPC cache line size 2019-05-08 19:54:05 -04:00
Jeffrey Walton
c91813c0b4
Use fallback in detecting VIA cach line size 2019-05-08 19:46:23 -04:00
Jeffrey Walton
40e5891635
Use CPU_QuerySHA256 for ARM 2019-05-08 19:31:31 -04:00
Jeffrey Walton
73bf2f29c0
Add "AMDisbetter!" cpuid detection 2019-05-08 18:51:12 -04:00
Jeffrey Walton
986fded372
Spelling 2019-05-08 18:33:55 -04:00
Jeffrey Walton
d9aed27ad3
Add code for VIA L1 data cache line size 2019-05-08 18:29:33 -04:00
Jeffrey Walton
30fc56d58c
Clear alignment warnings on ARM 32-bit platforms 2019-05-01 12:54:25 -04:00
Jeffrey Walton
337d1c88c8
Use armv7l for machine of Clang triplet armv8l-unknown-linux-gnueabihf (GH #831)
Autotools uses armv7l. We should be safe using the same machine.
2019-05-01 11:00:34 -04:00
Jeffrey Walton
a5fe6fa6da
Remove unneeded perm check in cryptest-autotools.sh 2019-05-01 10:45:11 -04:00
Jeffrey Walton
4acdcc46d0
Try workaround Clang triplet on ARMv7l (GH #831) 2019-05-01 01:48:00 -04:00
Jeffrey Walton
7ef3dacdc2
Remove C++11 constexpr code for CRYPTOPP_ALIGN_DATA (PR #830)
I don't have faith in it even though it has tested good so far.
2019-04-30 23:00:56 -04:00
Jeffrey Walton
ff544c386c
Use dynamic_cast in ed25519 (GH #829) 2019-04-30 20:29:21 -04:00
Jeffrey Walton
a379c5644a
Clear alignment warnings on ARM 32-bit platforms (#828) 2019-04-30 17:53:58 -04:00