Commit Graph

114 Commits (3faf716d73713891653530901652ad62ce3fec9b)

Author SHA1 Message Date
Jeffrey Walton 1650cac3f3
Update comments 2019-05-23 19:35:05 -04:00
Jeffrey Walton cf85d768b4
Fix armv8l-unknown-linux-gnueabihf yet again 2019-05-21 18:48:13 -04:00
Jeffrey Walton 751515901b
Limit Cryptogams AES and SHA to Linux distros
The Apple assembler cannot translate the source files for iOS.
2019-05-21 05:59:58 -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 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 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 83ee4e1fc0
Use test_arm_sha1.cxx for feature tests 2019-05-17 23:42:15 -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 08b9e21e5a
Use TCXXFLAGS for feature tests in GNUmakefile-cross
This mirrors PR #815, where we used CXXFLAGS instead of TCXXFLAGS for feature tests
2019-02-28 06:42:16 -05:00
Jeffrey Walton 84ab1f3c66
Remove early NEON qualification tests from Makefile (GH #812, GH #813)
The makefile tries to pre-qualify NEON (for lack of a better term), and sets IS_NEON accordingly. If IS_NEON=1, then we go on to perform test compiles to see if -mfloat-abi=X -mfpu=neon (and friends) actually work. Effectively we are performing a test to see if we should perform another test.

The IS_NEON flag predates our compile time feature tests. It was kind of helpful when we were trying to sort out if a platform and compiler options supported NEON without a compile test. That was an absolute mess and we quickly learned we needed a real compile time feature test (which we now have).

Additionally, Debian and Fedora ARMEL builds are failing because we are misdetecting NEON availability. It looks like we fail to set IS_NEON properly, so we never get into the code paths that set either (1) -mfloat-abi=X -mfpu=neon or (2) -DCRYPTOPP_DISABLE_NEON or -DCRYPTOPP_DISABLE_ASM. Later, the makefile builds a *_simd.cpp and the result is an error that NEON needs to be activated (or disabled).

This commit removes IS_NEON so we immediately move to compile time feature tests.
2019-02-27 19:35:04 -05:00
Jeffrey Walton 5b1e6fd28f
Fix Fedora 7 compile
Fedora 7 toolchain supplies upto SSE4.2
2019-02-05 01:14:35 -05:00
Jeffrey Walton e10736482c
Add test compile to makefile 2019-02-03 11:09:10 -05:00
Jeffrey Walton 86fd3ef109
Rework makefile, avoid GNU install program
Solaris lacks a GNU compatible install program in /usr/bin and /usr/xpg4/bin. Just use cp and chmod. Cp and chmod work everywhere
2019-01-02 19:48:20 -05:00
Jeffrey Walton 2d06777747
Fix GCM build when SSSE3 not available 2018-12-29 00:56:25 -05:00
Jeffrey Walton 152ac6177c
Add Moon's curve25519 using SSE2 (GH #761)
Moon's code is very fast. In fact it is so fast it broke our benchmarks. Moon's code registers 0.00 milliseconds and 0.00 megacycles/operation.
2018-12-13 10:19:54 -05:00
Jeffrey Walton 7656ff2b49
Fix Fedora and Red Hat feature tests
They use a hardened build and include flags like -Werror=XXX and -Wp,FORTIFY_SOURCE
2018-12-05 18:35:21 -05:00
Jeffrey Walton 482151a980
Fix Aarch64 with early GCC 2018-12-04 05:49:21 -05:00
Jeffrey Walton 774454ba7c
Cleanup Disable rules for x86 2018-12-01 21:33:17 -05:00
Jeffrey Walton 62b1b7d65b
Update comments 2018-12-01 13:13:35 -05:00
Jeffrey Walton 92ae496c80
Update GNUmakefile-cross for feature tests (GH #741) 2018-12-01 12:48:47 -05:00
Jeffrey Walton 0ac7b25221
Use C++ compiler for all source files (PR #733) 2018-11-15 19:13:28 -05:00
Blue 2d2f69c235 Fix missing cpu-features.o in shared object (PR #733) 2018-11-15 19:11:29 -05:00
Jeffrey Walton 896225069d
Rename files with dashes to underscores (GH #736)
Also see https://groups.google.com/forum/#!topic/cryptopp-users/HBz-6gZZFOA on the mailing list
2018-11-10 08:00:14 -05:00
Jeffrey Walton 81db4ea5e3
Switch to pch.cpp for compile tests.
adhoc.cpp was a bit uncomfortable because we had to copy it out from adhoc.cpp.proto. For some reason CMake could not perform the copy, so we started using pch.cpp in CMake. This commit keeps them consistent.
We may have problems with one test, and that is the Newlib tests. I seem to recall they a C++ header included to properly identify its use. We cross that bridge during MinGW testing.
2018-10-29 08:41:54 -04:00
Jeffrey Walton a281cd9d48
Add ChaCha recipes to GNUmakefile-cross 2018-10-27 12:59:29 -04:00
Jeffrey Walton 06d0072d6a
Add CRYPTOPP_DISABLE_ASM to dependency recipe
This stops the inclusion of SSE headers without arch options that break the recipe
2018-10-27 11:34:11 -04:00
Jeffrey Walton 2876371cea
Add GNUmakefile-cross flags SIMON and SPECK 2018-08-16 18:24:22 -04:00
Jeffrey Walton aee00b69ad
Clean *.lst files created by XLC 2018-08-04 20:18:50 -04:00
Jeffrey Walton f9f307668b
Add false DOCUMENT_DIRECTORY for GNUmakefile-cross 2018-08-01 21:52:46 -04:00
Jeffrey Walton a1b30685ab
Fix distclean rule in GNUmakefile-cross 2018-08-01 21:33:24 -04:00
Jeffrey Walton 5367d26327
Fix compile when adhoc.cpp is missing 2018-07-31 13:33:57 -04:00
Jeffrey Walton 8c3658fce8
Rework GNUmakefiles for XL C/C++ changes 2018-07-31 02:13:17 -04:00
Jeffrey Walton d51f701e06
Refactor validat5.cpp and validat6.cpp
Also see https://groups.google.com/forum/#\!topic/cryptopp-users/j_aQj6r-PoI
2018-07-29 20:30:19 -04:00
Jeffrey Walton 138ce8f626
Cleanup Makefiles and Android and iOS scripts 2018-07-28 18:45:37 -04:00
Jeffrey Walton 28fe1a6a4d
Split validat*.cpp source files
Also see https://groups.google.com/forum/#\!topic/cryptopp-users/j_aQj6r-PoI
2018-07-28 14:57:12 -04:00
Jeffrey Walton 0ea807f2eb
Add additional artifacts to autotools-clean rule 2018-07-28 12:38:15 -04:00
Jeffrey Walton 5cc3f72d33
Add -Wa,--noexecstack for aes-armv4.S 2018-07-28 10:36:40 -04:00
Jeffrey Walton 3657f8c235
Add cryptest-results.txt to clean rule 2018-07-28 09:31:41 -04:00
Jeffrey Walton ef5a3d3905
Add autotools-clean and cmake-clean rules to GNUmakefile 2018-07-28 09:21:31 -04:00
Jeffrey Walton a0ad5e815c
Remove -marm from aes-armv4.S flags 2018-07-27 22:00:28 -04:00
Jeffrey Walton 5861d9342d
Split regtest2.cpp into two files
Rename regtest3.cpp to regtest4.cpp. Split regtest2.cpp into regtest2.cpp and regtest3.cpp
2018-07-27 18:16:25 -04:00
Jeffrey Walton 1f914feaf9
Split bench1.cpp into two files
Renamed bench2.cpp to bench3.cpp. Split bench1.cpp into bench1.cpp and bench2.cpp
2018-07-27 14:13:58 -04:00
Jeffrey Walton e50a40ec59
Fix 'make sources' recipe 2018-07-25 00:11:09 -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 26ae1fb7e9
Fix ARM compile for sm4-simd.cpp 2018-07-13 10:39:08 -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 b35df75890
Update attribution for SIMECK 2018-07-01 03:21:42 -04:00