Jeffrey Walton
31533db421
Disable X32 for SHA (GH #686 )
...
Thanks to Peter Cordes for the feedback
2018-07-15 11:39:41 -04:00
Jeffrey Walton
7d1eb4fc8b
Fix AppVeyor Win32 build
2018-07-15 11:31:12 -04:00
Jeffrey Walton
c2a9958d9c
Make m4/ directory during testing
2018-07-15 10:13:33 -04:00
Jeffrey Walton
437b2f9b7d
Set LC_ALL=C for Darwin Autotools testing
2018-07-15 09:35:26 -04:00
Jeffrey Walton
4e3a1ea962
Add ARMv8.4 cpu feature detection support (GH #685 ) ( #687 )
...
This PR adds ARMv8.4 cpu feature detection support. Previously we only needed ARMv8.1 and things were much easier. For example, ARMv8.1 `__ARM_FEATURE_CRYPTO` meant PMULL, AES, SHA-1 and SHA-256 were available. ARMv8.4 `__ARM_FEATURE_CRYPTO` means PMULL, AES, SHA-1, SHA-256, SHA-512, SHA-3, SM3 and SM4 are available.
We still use the same pattern as before. We make something available based on compiler version and/or preprocessor macros. But this time around we had to tighten things up a bit to ensure ARMv8.4 did not cross-pollinate down into ARMv8.1.
ARMv8.4 is largely untested at the moment. There is no hardware in the field and CI lacks QEMU with the relevant patches/support. We will probably have to revisit some of this stuff in the future.
Since this update applies to ARM gadgets we took the time to expand Android and iOS testing on Travis. Travis now tests more platforms, and includes Autotools and CMake builds, too.
2018-07-15 08:35:14 -04:00
Jeffrey Walton
2600f6dcc2
Clear unused variable warning
2018-07-14 13:26:49 -04:00
Jeffrey Walton
5460f14857
Clear unused variable warning
2018-07-14 13:01:48 -04:00
Jeffrey Walton
7cc6531dd2
Clear unused variable warning
2018-07-14 12:59:42 -04:00
Jeffrey Walton
7a67e43b27
Fix Apple feature detection (GH #685 )
2018-07-14 08:40:06 -04:00
Jeffrey Walton
d11a7b3436
Add ARMv8 CPU feature queries (GH #685 )
...
CPU feature probes are still outstanding. They are going to be trickier because if CRYPTOPP_XXX_FEATURE_AVAILABLE
2018-07-14 08:20:16 -04:00
Jeffrey Walton
25abe71e69
Fix failed compile with Clang
2018-07-14 04:48:26 -04:00
Jeffrey Walton
28e20d6e5f
Fix "Error: symbol SHA512_Round is already defined" (GH #684 )
2018-07-13 17:05:14 -04:00
Jeffrey Walton
26ae1fb7e9
Fix ARM compile for sm4-simd.cpp
2018-07-13 10:39:08 -04:00
Jeffrey Walton
380829284c
Update documentation
2018-07-13 09:54:06 -04:00
Jeffrey Walton
678bdb1735
Add AES-NI accelerated SM4 encryption (GH #540 )
...
Thanks to Markku-Juhani Olavi Saarinen for the code. Also see https://github.com/mjosaarinen/sm4ni
2018-07-13 08:48:43 -04:00
Jeffrey Walton
3c21233440
Add AES-NI accelerated SM4 encryption (GH #540 )
...
Thanks to Markku-Juhani Olavi Saarinen for the code. Also see https://github.com/mjosaarinen/sm4ni
2018-07-13 08:33:13 -04:00
Jeffrey Walton
2f71e4d7d9
Fix header include
2018-07-13 05:48:03 -04:00
Jeffrey Walton
90e7b85814
Update documentation
2018-07-12 12:04:37 -04:00
Jeffrey Walton
40d70375a9
Increase use of ptrdiff_t when performing pointer math
2018-07-12 09:48:46 -04:00
Jeffrey Walton
ed143608a8
Revert "Increase use of ptrdiff_t when performing pointer math"
...
This reverts commit bbf9a109f2
. It did not fix A-32. Something got crossed in my test case.
2018-07-12 09:43:18 -04:00
Jeffrey Walton
25179e00d3
Fix PtrByteDiff cast
...
A quick testing pass that loaded the code with asserts caused a compile failure
2018-07-12 09:37:43 -04:00
Jeffrey Walton
bbf9a109f2
Increase use of ptrdiff_t when performing pointer math
...
This fixes the incorrect result with CFB mode on A-32 in CFB_CipherTemplate<BASE>::ProcessData
2018-07-12 08:29:46 -04:00
Jeffrey Walton
6434ec597d
Update comments
2018-07-12 07:59:05 -04:00
Jeffrey Walton
e580ed588a
Disable same buffer for in and out on ARM A-32 (GH #683 )
2018-07-12 07:05:18 -04:00
Jeffrey Walton
7eb0535a98
Call Deflator::IsolatedInitialize during Gzip init (GH #660 )
2018-07-11 17:10:32 -04:00
Jeffrey Walton
9b4476ef7b
Update symbol script for Crypto++ 7.x
2018-07-11 16:16:32 -04:00
Jeffrey Walton
d094bc61cd
Update comments
2018-07-11 15:12:53 -04:00
Jeffrey Walton
b3fe24b8b5
Remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support (GH #682 )
...
We were able to gut CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS for everything except Rijndael. Rijndael uses unaligned accesses on x86 to harden against timing attacks.
There's a little more to CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS and Rijndael. If we remove unaligned access then AliasedWithTable hangs in an endless loop on non-AESNI machines. So care must be taken when trying to remove the vestige from Rijndael.
2018-07-11 11:40:25 -04:00
Jeffrey Walton
1e77a72ed6
Disable Cryptogams AES under Clang
...
What a surprise... Clang pretends to be GCC with __GNUC__ but fails to consume the source file
2018-07-11 09:19:11 -04:00
Jeffrey Walton
3ff7d7f028
Add ARM AES asm implementation from Cryptogams (GH #683 )
2018-07-11 06:59:44 -04:00
Jeffrey Walton
bdac2de36e
Increase use of ptrdiff_t when performing pointer math
2018-07-10 17:41:23 -04:00
Jeffrey Walton
1836a7feb4
Cleanup datatest.cpp
...
Switch to non-blocking rngs for Linux and Windows
2018-07-10 17:34:55 -04:00
Jeffrey Walton
004d213e29
Increase use of ptrdiff_t when performing pointer math
2018-07-10 17:31:01 -04:00
Jeffrey Walton
961e9b483c
Revert "Clear conversion warning"
...
This reverts commit 9748c3cf3e
. It broke Windows.
2018-07-10 17:18:11 -04:00
Jeffrey Walton
a2ca2cfc0f
Use OS rng as alternate test generator
2018-07-10 17:08:13 -04:00
Jeffrey Walton
722d3e38c1
Avoid cast in PtrDiff
...
ptrdiff_t is the return type
2018-07-10 11:55:50 -04:00
Jeffrey Walton
9748c3cf3e
Clear conversion warning
2018-07-10 11:54:13 -04:00
Jeffrey Walton
45fcd47c07
Clear conversion warning
2018-07-10 11:37:21 -04:00
Jeffrey Walton
3b6872a8cd
Avoid cast in PtrDiff
...
ptrdiff_t is the return type
2018-07-10 11:36:48 -04:00
Jeffrey Walton
9e50eae673
Clear unused variable warning
2018-07-10 11:30:32 -04:00
Jeffrey Walton
33a1baa1a5
Clear conversion warning
2018-07-10 11:30:13 -04:00
Jeffrey Walton
50f99ae802
Increase use of ptrdiff_t when performing pointer math
2018-07-10 09:21:52 -04:00
Jeffrey Walton
59d8ccd64f
Switch to PtrAdd and PtrSub in ByteQueue
2018-07-10 08:25:35 -04:00
Jeffrey Walton
8dc15f4c56
Fix ARMv7 detection after c6c44aa5d1
2018-07-10 05:08:27 -04:00
Jeffrey Walton
c6c44aa5d1
Add PtrAdd and PtrSub helper functions
...
This helps contain UB on pointer subtraction by ensuring a ptrdiff_t is used. The code is a little uglier but it is also more portable.
2018-07-10 05:00:02 -04:00
Jeffrey Walton
c186689273
Add RandomizedTransfer overload
2018-07-10 02:55:29 -04:00
Jeffrey Walton
4c5487b0e4
Increase use of ptrdiff_t when performing pointer math
...
Increase use of ptrdiff_t when performing pointer math
Reduce AlgorithmProvider overrides
Fix CPU_ProbeARMv7 on Aarch64
2018-07-09 06:31:17 -04:00
Jeffrey Walton
86773e942c
Make GNUmakefile aware of *.S files
2018-07-09 06:19:58 -04:00
Jeffrey Walton
03bceda159
Use C++ style casts and take addr of elem 0 for non-const pointers
2018-07-09 03:08:28 -04:00
Jeffrey Walton
664d67e0f6
Add additional asserts in modes.cpp
2018-07-08 22:14:17 -04:00