Commit Graph

3403 Commits (befd04312d8bdf2363921bf5ccb1393f5852a9a3)

Author SHA1 Message Date
Jeffrey Walton d6d53f2e9d
Add Power4 Vector Load, Store, Add and Xor 2018-01-02 08:13:42 -05:00
Jeffrey Walton fac3a44a84
Move Altivec AdvancedProcessBlocks into adv-simd.h 2018-01-02 07:08:13 -05:00
Jeffrey Walton fb0ecfde62
Clear clang-tidy warnings
This commit also tweaks the way Integer parses byte arrays. The modified routines are slightly faster. On a Core-i5 6400 the self tests are 0.1 to 0.2 seconds faster
2018-01-02 04:17:22 -05:00
Jeffrey Walton 1a7f19cdde
Use 'command -v' to test for ld.gold 2018-01-02 01:13:59 -05:00
Jeffrey Walton 58726498f1
Clear clang-tidy warnings 2018-01-02 00:15:34 -05:00
Jeffrey Walton 5f083d652e
Clear signed/unsigned warnings 2017-12-31 03:54:33 -05:00
Jeffrey Walton ba98c2bfb9
Clear signed/unsigned warning in Debug 2017-12-31 02:24:16 -05:00
Jeffrey Walton 651563e6c2
Temporary fix for IBM XLC failed SM3 self tests (GH #553) 2017-12-30 22:18:08 -05:00
Jeffrey Walton 8b7f21b07d
Update makefiles to use one call to $(CXX) -dumpmachine 2017-12-30 18:38:40 -05:00
Jeffrey Walton f3618f4b7f
Fix IBM xlC compile 2017-12-30 18:37:56 -05:00
Tanzinul Islam b4df31c7f9 Change ::log() to log() to work with C++Builder (#552)
As reported in #520, C++Builder standard libraries don't have a `log()` function at global namespace. Change the invocations to unqualified name lookup, and apply a using-declaration to `std::log()` when compiling under C++Builder.
2017-12-30 15:16:27 -05:00
Jeffrey Walton 1699562581 Remove commented code 2017-12-28 19:25:45 -05:00
Jeffrey Walton cd35346f70
Fix Solaris failed compile due to SHA with GCC (GH #551) 2017-12-28 19:14:20 -05:00
Jeffrey Walton 3c6eb74cd7
Clear Coverity issue CID 186341 2017-12-28 01:29:31 -05:00
Jeffrey Walton 7b14ead0f3
Fix unaligned load for _mm_loaddup_pd with GCC and UBsan
This function was missed earlier. Unfortunately, it does not squash all of the unaligned load findings. I'm pretty sure it is a GCC problem
2017-12-28 01:16:17 -05:00
Jeffrey Walton 24883ca79f
Clear Coverity issue CID 186337 2017-12-27 00:43:00 -05:00
Jeffrey Walton 3b1f6827f5
Clear Coverity issue CID 186338 2017-12-27 00:40:24 -05:00
Jeffrey Walton 09f9d76631
Fix "cast from 'struct sockaddr*' to 'struct sockaddr_in*' increases required alignment" on OS X 2017-12-26 17:57:26 -05:00
Jeffrey Walton 0aa2ebbbf3
Clear signed/unsigned warnings with GCC and -Wall -Wextra 2017-12-26 16:59:32 -05:00
Jeffrey Walton 4d9c91b425
Fix missing define for MSVC 2017-12-26 15:07:28 -05:00
Jeffrey Walton 4904d0fc8d
Fix unaligned load for _mm_loaddup_pd with GCC and UBsan 2017-12-26 14:55:10 -05:00
Jeffrey Walton 3fff9e85df
Fix unaligned load for _mm_loaddup_pd with GCC and UBsan 2017-12-26 12:41:04 -05:00
Jeffrey Walton ae445c0b0f
Clear signed/unsigned warnings with GCC and -Wall -Wextra 2017-12-26 11:48:11 -05:00
Jeffrey Walton 66da740ad3
Use M128_CAST and CONST_M128_CAST for Clang
Also see http://bugs.llvm.org/show_bug.cgi?id=20670
2017-12-26 11:20:18 -05:00
Jeffrey Walton 8e916e7bac
Use M128_CAST and CONST_M128_CAST for Clang
Also see http://bugs.llvm.org/show_bug.cgi?id=20670
2017-12-26 11:16:52 -05:00
Jeffrey Walton bee2598ecd
Add <emsa2.h> to dll.cpp 2017-12-26 10:53:11 -05:00
Jeffrey Walton b7133e7b3b
Fix Clang specialization and definition warnings (GH #300, GH #533)
Clang 3.8 and above generates lots of "'PKCS_DigestDecoration<SHA1>::decoration' required here, but no definition is available" warnings
2017-12-26 00:46:50 -05:00
Jeffrey Walton c0a8dab984
Fix failed self test under Clang (GH #533)
This may cause GH #300, "Clang 3.9 and missing member definitions for template classes" or GH #294, "Fix clang warnings about undefined variable templates in pkcspad.h" to resurface. Man I hope not...
2017-12-25 22:29:21 -05:00
Jeffrey Walton 4232cfd40b
Fix failed self test under Clang (GH #533)
This may cause GH #300, "Clang 3.9 and missing member definitions for template classes" or GH #294, "Fix clang warnings about undefined variable templates in pkcspad.h" to resurface. Man I hope not...
2017-12-25 22:27:53 -05:00
Jeffrey Walton b20a91f6b2
Update documentation 2017-12-24 21:07:18 -05:00
Jeffrey Walton 41da3fa7f1
Use ptrdiff_t cast in BlockTransformation (GH #549) 2017-12-17 09:07:12 -05:00
Jeffrey Walton d7a2e0e10c
Removed unneeded defines from ppc-simd.cpp
Whitespace check-in
2017-12-16 20:26:59 -05:00
Jeffrey Walton 19deccf3ba
Fix Clang 5.0 "runtime error: addition of unsigned offset to 0xXXXX overflowed to 0xYYYY" (GH #549) 2017-12-16 18:18:53 -05:00
Jeffrey Walton dc21de2483
Fix UBsan overflow finding
We were cating UBsan findings under Clang similar to "adv-simd.h:1138:26: runtime error: addition of unsigned offset to 0x000002d41410 overflowed to 0x000002d41400". The problem was CRYPTOPP_CONSTANT, which used an enum. The compiler is allowed to pick the underlying data type, and Clang was picking a signed type
2017-12-16 14:21:08 -05:00
zorun c3a85caf52 Build fixes (#547)
* GNUmakefile-cross: Fix install target

The install target was not working: missing mkdir before copying files,
wrong dynamic library copied, missing ldconf.

The fix is mostly taken from the install target from GNUmakefile.

* Makefile: call 'ln -sf' instead of 'ln -sf -sf'
2017-12-16 09:07:23 -05:00
Jeffrey Walton e56caf72ec
Fix unwanted Git mode change 2017-12-15 19:13:20 -05:00
Jeffrey Walton 7aa3377bbd Prepare for changes to support latest NDK liek r16 (GH #546) 2017-12-15 19:10:02 -05:00
Jeffrey Walton 93f6901119
Avoid including <arm_acle.h> on Android (GH #546)
It sure would be nice if everyone just followed the ACLE guidlines at http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053c/IHI0053C_acle_2_0.pdf
2017-12-15 17:00:39 -05:00
Jeffrey Walton 43a34590a9
Add Altivec detection for PowerMac
We now need to detect Altivec/Power4. Formerly it did not matter so CPU_QueryAltivec simply returned false
2017-12-13 11:49:35 -05:00
Jeffrey Walton e1c9746b70
Fix Power8 compile under GCC 2017-12-12 10:52:57 -05:00
Jeffrey Walton 57e3ae309b
Update documentation
Remove typedefs
Whitespace check-in
2017-12-12 09:22:03 -05:00
Jeffrey Walton 2c79be7a54
Add CRYPTOPP_POWER5_AVAILABLE
Power4 lacks 'vector long long'
Rename datatypes such as 'uint8x16_p8' to 'uint8x16_p'. Originally the p8 suffix indicated use with Power8 in-core crypto. We are now using Altivec/Power4 for general vector operations.
2017-12-12 08:17:17 -05:00
Jeffrey Walton ca54d0c7da
Add CRYPTOPP_POWER5_AVAILABLE
Power4 lacks 'vector long long'
Rename datatypes such as 'uint8x16_p8' to 'uint8x16_p'. Originally the p8 suffix indicated use with Power8 in-core crypto. We are now using Altivec/Power4 for general vector operations.
2017-12-12 08:14:53 -05:00
Jeffrey Walton 15d637771f
Add CRYPTOPP_POWER5_AVAILABLE
Power4 lacks 'vector long long'
Rename datatypes such as 'uint8x16_p8' to 'uint8x16_p'. Originally the p8 suffix indicated use with Power8 in-core crypto. We are now using Altivec/Power4 for general vector operations.
2017-12-12 08:09:31 -05:00
Jeffrey Walton b7e636ac51
Rename ppc-crypto.h to ppc-simd.h 2017-12-12 07:15:59 -05:00
Jeffrey Walton 074c889210
Add NEON flags to rijndael-simd.cpp
AES does not have a NEON implementation. However, because it includes "adv-simd.h", it needs the compiler options so NEON types are available. Otherwise the compile fails.
We can't guard "adv-simd.h" and NEON on just AES because Simon and Speck use the templates in their NEON implementations.
2017-12-10 12:11:53 -05:00
Jeffrey Walton 195ac2c7c9
Refactor rijndael-simd.cpp and simon.simd.cpp to use adv-simd.h 2017-12-10 11:09:50 -05:00
Jeffrey Walton e90cc9a028
Update comments 2017-12-10 05:41:19 -05:00
Jeffrey Walton 8a5911e6eb
Refactor <cipher>_AdvancedProcessBlocks_<arch> into adv-simd.h
This also fixes the SPECK64 bug where CTR mode self tests fail. It was an odd failure because it only affected 64-bit SPECK. SIMON was fine and it used nearly the same code. We tracked it down through trial and error to the table based rotates.
2017-12-09 21:04:25 -05:00
Jeffrey Walton 3ff04f1bf0
Cleanup includes for CRC32 and CRC32C 2017-12-09 13:09:49 -05:00