Commit Graph

89 Commits

Author SHA1 Message Date
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
Jeffrey Walton
9980d30734
Add LEA-128 NEON and ARMv8 implementation (GH #669)
LEA-128(128) from 35.6 cpb to 14.11 cpb on a LeMaker HiKey dev-board. LEA-128 from 12.60 cpb to 11.89 cpb on AMD Opteron 1100.
2018-06-23 03:54:51 -04:00
Jeffrey Walton
fa7714f6cb
Add LEA-128 SSSE3 implementation (GH #669)
LEA-128(128) from 6.73 cpb to 2.84 cpb on modern Core-i5 6400. LEA-128 from 10.12 cpb to 7.84 cpb antique Core2 Duo.
2018-06-22 16:26:27 -04:00
Jeffrey Walton
6138829572
Add CHAM128 SSSE3 implementation (PR #670)
CHAM-128(128) from 10.5 cpb to 4.1 cpb. CHAM-128(256) from 12.5 cpb to 4.7 cpb.
2018-06-19 18:03:28 -04:00
Jeffrey Walton
a07a0e5e5f
Add recipe to install the library only (GH #653)
Some distros don't want to install cryptest.exe. For folks who don't want to install the test program, they can issue 'make install-lib'.
install-lib is a non-standard target, but the GNU Coding Standard does not have a standard target for the task.
2018-05-06 00:10:38 -04:00
PetteriHuusko
d132639881 Fix ios build for cases where Xcode is installed in a path with spaces (PR #646) 2018-04-26 06:56:26 -04:00
Nicolas Chauvet (kwizart)
b6fec08da1 Freeze ABI compatibility with LIB_MAJOR (#589)
This is a convention that binary compatibity uses one number.
Using that, it's possible to have bugfixes releases (patchlevel
incremented) and enhancement release (minor incremented with no
public interface removed).

Here is more information about convention
https://autotools.io/libtool/version.html
(libtool isn't relevant to this project, but the explanation hold)

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2018-02-20 10:05:52 -05:00
Jeffrey Walton
e416b243d3
Re-add Simon and Speck, enable SSE (GH #585)
This commit re-adds Simon and Speck. The commit includes C++, SSSE3 and SSE4. NEON, Aarch32 and Aarch64 are disabled at the moment.
2018-02-18 23:23:50 -05:00
Jeffrey Walton
15b14cc618
Remove Simon and Speck ciphers (GH #585)
We recently learned our Simon and Speck implementation was wrong. The removal will stop harm until we can loop back and fix the issue.
The issue is, the paper, the test vectors and the ref-impl do not align. Each produces slightly different result. We followed the test vectors but they turned out to be wrong for the ciphers.
We have one kernel test vector but we don't have a working implementation to observe it to fix our implementation. Ugh...
2018-02-14 04:06:16 -05:00
Jeffrey Walton
d5161923cb
Use INSTALL_PROGRAM for shared objects (GH #582) 2018-02-05 09:03:21 -05:00
Jeffrey Walton
0a43341cec
Use install program for Makefile (GH #582) 2018-02-05 08:54:13 -05:00
Jeffrey Walton
96bc82fe12
Avoid a compiler warning in Makefile tests 2018-01-28 20:23:48 -05:00
Jeffrey Walton
1a23285576
Remove unneeded path include
This one is part of sysroot
2018-01-28 15:29:14 -05:00
Jeffrey Walton
69d5400b3f
Fix MinGW misdetection (GH #573)
This commit does a few things. First, it uses the compiler's triplet and the build component to determine the machine we are targeting. Second, it adds an 'X' prefix so we don't collide with someone else's variables. Third it cleans up some of the recipes. Fourth, it removes X32 detection since the system differences are handled in config.h and the source files
2018-01-27 13:05:23 -05:00
zorun
6103900be4 build: add missing flags for SIMON and SPECK in GNUMakefile-cross (#577) 2018-01-27 12:23:44 -05:00
Jeffrey Walton
c16eddb40e
Use /bin/sh (GH #573) 2018-01-25 18:39:24 -05:00
Felix Barz
105f78495c Update Android build scripts to the latest NDK (#546)
Fix Environment setup for android to match the new unified headers.
Adjust the Makefile accordingly.
Updated the test scripts and travis to test these changes.
2018-01-21 09:05:34 -05:00
Jeffrey Walton
13ea8f374f
Add interface to TweetNaCl library (#566)
TweetNaCl is a compact reimplementation of the NaCl library by Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen, Tanja Lange, Peter Schwabe and Sjaak Smetsers. The library is less than 20 KB in size and provides 25 of the NaCl library functions.

The compact library uses curve25519, XSalsa20, Poly1305 and SHA-512 as default primitives, and includes both x25519 key exchange and ed25519 signatures. The complete list of functions can be found in TweetNaCl: A crypto library in 100 tweets (20140917), Table 1, page 5.

Crypto++ retained the function names and signatures but switched to data types provided by <stdint.h> to promote interoperability with Crypto++ and avoid size problems on platforms like Cygwin. For example, NaCl typdef'd u64 as an unsigned long long, but Cygwin, MinGW and MSYS are LP64 systems (not LLP64 systems). In addition, Crypto++ was missing NaCl's signed 64-bit integer i64.

Crypto++ enforces the 0-key restriction due to small points. The TweetNaCl library allowed the 0-keys to small points. Also see RFC 7748, Elliptic Curves for Security, Section 6.

TweetNaCl is well written but not well optimized. It runs 2x to 3x slower than optimized routines from libsodium. However, the library is still 2x to 4x faster than the algorithms NaCl was designed to replace.

The Crypto++ wrapper for TweetNaCl requires OS features. That is, NO_OS_DEPENDENCE cannot be defined. It is due to TweetNaCl's internal function randombytes. Crypto++ used DefaultAutoSeededRNG within randombytes, so OS integration must be enabled. You can use another generator like RDRAND to avoid the restriction.
2018-01-17 22:02:09 -05:00
Jeffrey Walton
8b7f21b07d
Update makefiles to use one call to $(CXX) -dumpmachine 2017-12-30 18:38:40 -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
f40afed631
Add more Autotools artifacts to distclean recipe 2017-11-06 07:27:37 -05:00
Jeffrey Walton
3b43ce53ec
Add more Autotools artifacts to distclean recipe 2017-11-05 03:42:39 -05:00
Jeffrey Walton
c50f2f23d8
Add more Autotools artifacts to distclean recipe 2017-11-05 03:38:19 -05:00
Jeffrey Walton
78a64e37d3
Remove cryptopp.mapfile from distclean rule 2017-11-01 18:30:49 -04:00
Jeffrey Walton
defa3f78d1
Add more Autotools artifacts to distclean recipe 2017-11-01 18:25:44 -04:00
Jeffrey Walton
a72225afff
Add more Autotools artifacts to distclean recipe 2017-11-01 15:51:10 -04:00