Commit Graph

430 Commits (39418a85122fa7954cca6354be30a44d6335874e)

Author SHA1 Message Date
Jeffrey Walton 8c3658fce8
Rework GNUmakefiles for XL C/C++ changes 2018-07-31 02:13:17 -04:00
Jeffrey Walton b4a041a71b
Add -qxlcompatmacros for IBM XL C/C++ when available
Also see https://lists.tetaneutral.net/pipermail/cfarm-users/2018-July/000331.html
2018-07-30 23:22:10 -04:00
Jeffrey Walton 4b13ccea5d
Remove automatic bitness selection on PPC64 2018-07-30 20:40:05 -04:00
Jeffrey Walton 0c8a9458cc
Fix compile for AIX using GCC and IBM XL C/C++ 2018-07-30 19:14:51 -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 98e35d2925
Remove addition of -m32|-m64 from GNUmakefile
Sun recommends 32-bit binaries instead of 64-bit ones, even on amd64 and sparcv9
2018-07-29 14:37:25 -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 baff390f28
Fix older Solaris and SunCC compile
Found during testing on OpenCSW compile farm on Solaris 9 (host unstable9s)
2018-07-21 06:15:40 -04:00
Jeffrey Walton ca302c952e
Fix Solaris 11/Sparc crash in SHA-384 (GH #689, GH #403)
I believe Andrew Marlow first reported it. At the time we could not get our hands on hardware to fully test things. Instead we were using -xmemalign=4i option as a band-aide to avoid running afoul of the Sparc instruction that moves 64-bits of data in one shot.
2018-07-20 13:24:04 -04:00
Jeffrey Walton ee8c141d3c
Fix xompile on downlevel assemblers
This surfaced on Solaris with an ancient Binutils
2018-07-16 15:27:25 -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 3ff7d7f028
Add ARM AES asm implementation from Cryptogams (GH #683) 2018-07-11 06:59:44 -04:00
Jeffrey Walton 86773e942c
Make GNUmakefile aware of *.S files 2018-07-09 06:19:58 -04:00
Jeffrey Walton 6d1bb00b05
Update Makefile DLLSRCS to include latest files 2018-07-06 22:10:11 -04:00
Jeffrey Walton e6f87274c1
Update Makefile DLLSRCS to include latest files 2018-07-06 21:54:55 -04:00
Jeffrey Walton c73b471dec
Fix CHAM compile on ARMv7 2018-07-04 06:48:54 -04:00
Jeffrey Walton 08e6137082
Add SIMECK-64 SSSE3 implementation (GH #675) 2018-07-01 03:11:00 -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
Jeffrey Walton 4bb331f5d0
Post-release version increment 2018-04-08 15:58:25 -04:00
Jeffrey Walton c8d8caf700
Prepare for Crypto++ 7.0 release 2018-04-08 04:48:59 -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 51ce834cc4
Fix ARM detection (GH #573) 2018-01-28 13:33:03 -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
Jeffrey Walton c16eddb40e
Use /bin/sh (GH #573) 2018-01-25 18:39:24 -05:00
XU Cheng 0bec012333 Fix building for Linuxbrew (#575)
Linuxbrew is a fork of Homebrew on Linux.
In which, the `gcc --version` will report "homebrew".
Therefore, the current code will incorrectly set OSXPORT_COMPILER
under such environment, which results to the following compiling errors:

gcm.cpp:823: Error: too many memory references for `add'
gcm.cpp:824: Error: too many memory references for `pxor'
gcm.cpp:825: Error: ambiguous operand size for `shr'
gcm.cpp:826: Error: too many memory references for `movzx'
gcm.cpp:827: Error: too many memory references for `add'
gcm.cpp:828: Error: too many memory references for `pxor'
gcm.cpp:829: Error: too many memory references for `movzx'
gcm.cpp:830: Error: too many memory references for `add'
gcm.cpp:831: Error: too many memory references for `pxor'
gcm.cpp:832: Error: ambiguous operand size for `add'
gcm.cpp:833: Error: ambiguous operand size for `sub'
gcm.cpp:835: Error: too many memory references for `movdqa'
g++-5 -DNDEBUG -g2 -O3 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe -c md4.cpp
make: *** [GNUmakefile:1120: gcm.o] Error 1
make: *** Waiting for unfinished jobs....

Fix this problem by checking IS_DARWIN before setting OSXPORT_COMPILER.
2018-01-25 09:17:54 -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 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 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 cd35346f70
Fix Solaris failed compile due to SHA with GCC (GH #551) 2017-12-28 19:14:20 -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 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 25709d2597
Fix SPECK64 vector permutes
Thanks to Peter Cordes for the suggestion on handling the case
2017-12-04 09:47:26 -05:00
Jeffrey Walton 18ccd89965
Add SSE4 flags to makefile for Simon and Speck 2017-12-03 06:02:24 -05:00
Jeffrey Walton f86c6124a8
Add Valgrind suppression file (GH #543) 2017-11-29 06:52:43 -05:00
Jeffrey Walton 33caa1e13f
Add Valgrind --track-origins=yes to recipe 2017-11-29 05:26:21 -05:00
Jeffrey Walton 568e608ea6
Add NEON and ASIMD intrinsics for SPECK-128 (GH #539)
Performance increased by about 200% on a 980 MHz BananaPi dev-board. Throughput went from about 176.6 cpb to about 60.3 cpb.
2017-11-27 00:36:45 -05:00
Jeffrey Walton c5303b9c2a
Fix "variable tracking size limit exceeded" with UBsan
threefish.cpp: In member function ‘virtual void CryptoPP::Threefish512::Enc::ProcessAndXorBlock(const byte*, const byte*, CryptoPP::byte*) const’:
threefish.cpp:316:6: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 void Threefish512::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
...
2017-11-26 05:27:03 -05:00
Jeffrey Walton f4975461a9
Remove IS_ARM64 from makefile
ARM64 is kind of useless. We need A-32 (old ARM), Aarch32 (new 32-bit ARM) and Aarch64 (new 64-bit ARM). Aarch32 and Aarch64 is captured by IS_ARMV8, and A-32 is captured by IS_ARM
2017-11-23 03:42:26 -05:00
Jeffrey Walton 304809a65d
Add NEON and ASIMD intrinsics for SPECK-128 (GH #538)
Performance increased by about 115% on a 980 MHz BananaPi dev-board. Throughput went from about 46.2 cpb to about 21.5 cpb.
2017-11-23 02:47:44 -05:00
Jeffrey Walton 78ec2aa5f4
Fix NEON detection on arm-hf 2017-11-22 23:15:20 -05:00
Jeffrey Walton 39697d92bf
Add SSSE3 intrinsics for SPECK-128 (GH #538)
Performance increased by about 100% on a 3.1 GHz Core i5 Skylake. Throughput went from about 7.3 cpb to about 3.5 cpb. Not bad for a software-based implementation of a block cipher
2017-11-22 07:57:39 -05:00
Jeffrey Walton a5bf962681
Fix target misdetection on OS X with '-arch i386'
This tested OK on Linux OS X, Solaris and Windows. It may break things under IBM XL C/C++. We will cross that bridge when we get to it.
2017-11-16 19:37:29 -05:00
Jeffrey Walton bd41c3d5dd
Remove SSE2 from cpu.cpp, add sse-simd.cpp
We need to ensure SSE2 does not cross pollinate into other CPU functions since SSE2 is greater than the minimum arch. The minimum arch is i586/i686, and both lack SSE2 instructions
2017-11-16 15:11:51 -05:00
Jeffrey Walton 8b52a03d08
Fix SunCC 12.2 compiler crash with GCM_Xor16_SSE2
SunCC 12.3 through 12.5 still cannot handle CLMUL, though. It would be nice if Sun fixed the regression.
2017-11-16 02:38:53 -05:00
Jeffrey Walton c49b6d4d71
Cleanup comments and old code artifacts 2017-11-15 21:11:42 -05:00
Jeffrey Walton e8bed05b7d
Use SSE4.1 instead of SSE4.2 for BLAKE2
BLAKE2 requires SSE4.1, no SSE4.2. This change should have been made when we split SSE4 into .1 and .2, but we needed more OS X and LLVM testing
2017-11-15 20:08:06 -05:00
Jeffrey Walton a3784a3ac5
Update Power8 support for Autotools 2017-11-14 20:54:43 -05:00
Jeffrey Walton dd1484800c
Rename mapfile for Solaris 2017-11-12 22:48:51 -05:00
Marcel Raad 4043164205 RFC: workarounds for original MinGW (#531)
* Set default target Windows version for MinGW to XP

The original MinGW from mingw.org targets Windows 2000 by default, but lacks
the <wspiapi.h> include needed for Windows 2000 support.

* Disable CRYPTOPP_CXX11_SYNCHRONIZATION for original MinGW

std::mutex is only available in libstdc++ if _GLIBCXX_HAS_GTHREADS is defined,
which is not the case for original MinGW. Make the existing fix for AIX more
general to fix this. Unfortunately, any C++ header has to be included to
detect the standard library and the otherwise empty <ciso646> is going to be
removed from C++20, so use <cstddef> instead.
2017-11-06 20:49:16 -05:00
Jeffrey Walton f40afed631
Add more Autotools artifacts to distclean recipe 2017-11-06 07:27:37 -05:00
Jeffrey Walton 432881065c
Removed *.pl from clean rules 2017-11-05 07:21:09 -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
Jeffrey Walton 9e85633ff7
Add more Autotools artifacts to distclean recipe 2017-11-01 13:12:27 -04:00
Jeffrey Walton 0f2f753696
Add Autotools artifacts to distclean recipe 2017-11-01 12:11:04 -04:00
Jeffrey Walton 4e6c4e0522
Fix Solaris build using SunCC
This broke when we fixed xlC builds on AIX
2017-10-27 18:09:40 -04:00
Jeffrey Walton 6f25cf682a
Improve 64-bit support for GCC on AIX 2017-10-18 05:55:12 -04:00
Jeffrey Walton c2c0a1ed82
Improve 64-bit support for XL C/C++ 2017-10-18 04:49:26 -04:00
Jeffrey Walton f8d97b83ed
Fix compile on old PowerPC
This cleans up the compile on old PwerMac G5's. Our Altivec and Crypto code relies on Power7 and Power8 extensions. There's no need to shoehorn Altivec and Power4 into old platforms, so we disable Altivec and Crypto unless Power7 is available. The GNUmakefile sets CRYPTOPP_DISABLE_ALTIVEC if Power7 is not available.
2017-10-17 20:47:14 -04:00
Jeffrey Walton 3ffff750d7
Fix feature detection on AIX with XL C/C++ 2017-10-13 01:27:09 -04:00
Jeffrey Walton 8f6afb3079
Fix -pipe warning under SunCC 2017-09-16 22:09:50 -04:00
Jeffrey Walton 913a9e60d3
Remove CMake from library sources (GH #506)
CMake can now be found at http://www.cryptopp.com/wiki/CMake. The Cmake project files are now maintianed by the community.
2017-09-16 21:09:40 -04:00
Jeffrey Walton 30d519c0bc
Use -O3 for IBM XL C/C++ (GH #502)
We held back XL C/C++ due to warnings and self test failures. Since clearing Issue 502, we are OK for -O3 so we can live with the warnings.
2017-09-16 08:22:25 -04:00
Jeffrey Walton 4670e3d5bc Revert "Use -O3 for IBM XL C/C++ (GH #502)"
This reverts commit aa348abd15. It caused a hang in the TEA algorithm. Also see GH #503.
2017-09-16 05:55:37 -04:00
Jeffrey Walton aa348abd15
Use -O3 for IBM XL C/C++ (GH #502)
We held back XL C/C++ due to warnings and self test failures. Since clearing Issue 502, we are OK for -O3 so we can live with the warnings.
2017-09-16 02:19:06 -04:00
Jeffrey Walton 502fdc61c9
Add -msse2 to i586 build (Issue 494) 2017-09-12 21:23:23 -04:00
Jeffrey Walton 2ebd30d43c
Remove -mvsx option from Linux Power8 builds
This option is not needed
2017-09-12 18:10:07 -04:00
Jeffrey Walton fb78afba29
Add PowerPC support to cpu.h and validate.cpp 2017-09-11 03:05:04 -04:00
Jeffrey Walton 9276b95221
Add Power8 support to Makefile 2017-09-09 20:33:06 -04:00
Jeffrey Walton ba569b55ca
Reduce IBM XL C/C++ compiler to -O2
Early versions of IBM XL C/C++ for AIX, V13.1 fail some self tests, like TEA and XTEA
2017-09-09 17:22:42 -04:00
Jeffrey Walton 38de6b0436
Fix RTTI and PIC under IBM XL C/C++ on AIX 2017-09-09 16:24:01 -04:00
Jeffrey Walton b974c7f98e
Avoid -pipe for IBM XL C/C++ compiler 2017-09-09 15:10:32 -04:00
Jeffrey Walton 55a5dd8b85
Add core to clean rule 2017-08-31 12:15:39 -04:00
Jeffrey Walton ea07825127
Add -pthread for Linux and GCC compatibles
Fix AIX dtection
Guard use of -m32 and -m64
2017-08-31 10:08:18 -04:00
Jeffrey Walton c079abdbc0
Fix missing DetectArmFeatures for ARMv7 (GH #480) 2017-08-30 11:12:39 -04:00
Jeffrey Walton b2693c4327
Fix IS_ARMV8 in GNUmakefile
Fix guard for HasPMULL()
2017-08-30 10:00:46 -04:00
Jeffrey Walton c06995a71b
Consistent use of grep and sed (GH #476)
MinGW is really messing things up for us.
2017-08-29 08:57:04 -04:00
Jeffrey Walton 76c4d6e9fa
Add -xarch options to linker flags (Issue 472)
Also see https://docs.oracle.com/cd/E19205-01/819-5267/bkabt/index.html
2017-08-28 17:51:59 -04:00
Jeffrey Walton f488221992
Test align 16 for i386 and x86_64 2017-08-27 19:01:00 -04:00
Jeffrey Walton 2d5ed51ca9
Add Mapfile for CMake on Solaris (Issue 380) 2017-08-27 05:47:38 -04:00
Jeffrey Walton 5c6a32ba0f
Support Base Implementation + SIMD implementation on Solaris (PR #461) 2017-08-24 19:17:21 -04:00
Jeffrey Walton b57f7f0ae0 Rollup CMake fixes for OpenBSD, MinGW (Issues 380, 466-468, PR #469)
Rollup CMake fixes for OpenBSD (Issues 467-468)
Rollup CMake fixes for MinGW (Issues 466)
Add CRYPTOPP_ENABLE_ARCH (Issue 380)
2017-08-24 07:26:14 -04:00
Jeffrey Walton b3cacd8287
Fix 32-bit ARM NEON detection
BeagleBone's, RPI-3's, etc
2017-08-23 19:35:45 -04:00
Jeffrey Walton 9c9e69119f Remove -march=native as default in Makefile and CMake (PR #465)
Remove -march=native as default in Makefile and CMake (PR #465)
2017-08-23 16:13:20 -04:00
Jeffrey Walton 2a2f6cb7b3
Fix SSSE3 issues under GCC 4.4.5 on Debian 6 2017-08-17 19:04:00 -04:00
Jeffrey Walton e3c8e69ba3
Rework makefile cpu feature detection code for the BSDs 2017-08-17 16:35:56 -04:00
Jeffrey Walton e2c377effd Split source files to support Base Implementation + SIMD implementation (GH #461)
Split source files to support Base Implementation + SIMD implementation
2017-08-17 12:33:43 -04:00
Jeffrey Walton 6a29d8c56f
Use -O1 for Asan and UBsan 2017-08-14 01:05:03 -04:00
Jeffrey Walton 18a05659f3
Switch from -O2 to -O3 in the makefile (Issue 454)
Also see https://groups.google.com/d/msg/cryptopp-users/AEiGyjq15tw/GBAyDA6fBgAJ
2017-08-04 18:31:52 -04:00
Jeffrey Walton 77d2e4eaf5
Add AppVeyor rule to makefile
This should sidestep some problems we are experiencing with AppVeyor during x64 builds. Specifically, the missing VCUpgrade.exe and the poor job it does when upgrading our project for the platform\'s tools.
This recipe takes cryptlib.vcxproj and cryptest.vcxproj, and copies it into TestScripts. This ensures TestScripts always has the latest Visual Studio project files. Then, the recipe changes PlatformToolset to the undocumented $\(DefaultPlatformToolset\). Finally, our AppVeyor test script will copy TestScripts/*.vcxproj into PWD before executing MSbuild.
Also see http://stackoverflow.com/questions/43423761/cant-perform-64-bit-testing-under-appveyor, http://stackoverflow.com/questions/45452145/how-to-set-platformtoolset-property-from-msbuild and  http://stackoverflow.com/questions/43441273/how-to-run-vcupgrade-before-appveyor-build
2017-08-02 22:01:16 -04:00
Jeffrey Walton 2171a3a379
Update DLL_SRCS list
Also see http://groups.google.com/forum/#!topic/cryptopp-users/Q8_6mSS5ZSw on the mailing list
2017-07-31 19:04:48 -04:00
Jeffrey Walton 0df38c3506
Fix build timeout due to tracking vars under UBsan
Also see https://stackoverflow.com/q/2954473/608639 and https://stackoverflow.com/q/708807/608639
2017-05-28 17:00:09 -04:00
Jeffrey Walton 814de0f0c7
Use "relative" option for gcov recipe 2017-05-27 07:18:48 -04:00
Jeffrey Walton a139d6a846
Cleanup gcov artifacts in clean rule 2017-05-27 07:02:44 -04:00
Jeffrey Walton cab2b5a181
Reduce optimizations for code coverage recipes 2017-05-27 05:16:09 -04:00
Jeffrey Walton 40395c0150
Attempt to add Code Coverage report (Take 3)
This should be interesting...
2017-05-27 03:47:50 -04:00
Jeffrey Walton 345b4e49e2
Attempt to add Code Coverage report (Take 2)
This should be interesting...
2017-05-27 03:42:50 -04:00
Jeffrey Walton 84e6961457
Updated makefile trim and convert rules
Whitespace check-in
2017-05-26 10:08:44 -04:00
Jeffrey Walton 0c4b80c995
Remove unaligned access safety with Asan and UBsan
NO_UNALIGNED_DATA_ACCESS is now the norm. Those who allow unaligned data accesses are the special case.
2017-05-21 20:45:08 -04:00
Bernhard M. Wiedemann 033fed8c92 have constant link order (#426)
Make builds reproducible
See https://reproducible-builds.org/ for why this is good.

Without this patch g++ would order functions in libcryptopp.so.5.6.5
depending on random order of files in the build system's filesystem.
2017-05-19 18:34:08 -04:00
Jeffrey Walton 1b1c32d7cf
Build RDRAND for all platofrms (Issue 419, PR 424)
We have not been able to determine a reliable way to detect cpu's and platforms with Cmake. We are side stepping the Cmake problem by building rdrand.cpp all the time. If its not avilable for a cpu or platform, then RDRAND or RDSEED throw an exception.
2017-05-17 16:21:20 -04:00
Jeffrey Walton ae09662f43
Update Makefile to trim data files 2017-05-15 22:53:44 -04:00
Jeffrey Walton 32ab4af5ff
Add Threefish to project files
Whitespace check-in
2017-05-14 15:27:50 -04:00
Jeffrey Walton b40d4d9180
Add CRYPTOPP_COVERAGE for Asan and UBsan builds 2017-05-11 01:35:32 -04:00
Jeffrey Walton c62e1ade6e
Add Makefile recipe for Valgrind builds 2017-05-06 22:54:49 -04:00
Jeffrey Walton c1377b2955
Add additional self tests under debug builds 2017-05-05 17:21:08 -04:00
Jeffrey Walton 9614307ab7
Add CRYPTOPP_COVERAGE define for 'make coverage' recipe 2017-05-04 03:01:07 -04:00
Jeffrey Walton e2f5da337e
Add mapfile to allow additional capability bits
Also see http://www.oracle.com/technetwork/server-storage/solaris/hwcap-modification-139536.html
2017-04-23 12:11:08 -04:00
Jeffrey Walton 89176e51cd
Add safety for SSSE4.1 and SSE4.2 intructions
They are giving ARIA and BLAKE2 trouble. It looks like SSE4  support appeared in the GCC compiler around 4.1 or 4.2. It looks like SHA support appeared in the GNU assembler around 2.18
2017-04-23 06:37:03 -04:00
Jeffrey Walton 7562e38ad6
Add safety for SHA intructions
It looks like SHA support appeared in the GCC compiler around 4.8 or 4.9. It looks like SHA support appeared in the GNU assembler around 2.23
2017-04-22 19:46:13 -04:00
Jeffrey Walton cd65ce873a
Add -xmemalign=4i for Sun SPARC (Issue 403) 2017-04-22 01:15:17 -04:00
Jeffrey Walton b784852998
Add no-asm target to ease testing of -DCRYPTOPP_DISABLE_ASM
This is intended to be used on Travis CI
2017-04-17 00:20:22 -04:00
Jeffrey Walton bf92cb0039
Split regtest.cpp into regtest{1|2|3}.cpp
regtest.cpp is where ciphers register by name. The library has added a number of ciphers over the last couple of years and the source file has experienced bloat. Most of the ARM and MIPS test borads were suffering Out of Memory (OOM) kills as the compiler processed the source fille and the included header files.
This won't stop the OOM kills, but it will help the situation. An early BeagleBoard with 512 MB of RAM is still going to have trouble, but it can be worked around by building with 1 make job as opposed to 2 or 4.
2017-04-13 21:45:21 -04:00
Jeffrey Walton c21023e2dc
Removed 'aligned' makefile target. It was made default in 5.6.5 2017-03-28 23:49:58 -04:00
Jeffrey Walton 6c50a99254
Fix GNUmakefile to keep *.s files
The distclean recipe deleted ASM files (*.s) rather than preprocessed ASM files (*.S). Leave them both now.
2017-03-25 01:42:23 -04:00
Jeffrey Walton 6381faf277
Rename rdrand.S to rdrand.s 2017-03-23 16:05:30 -04:00
Jeffrey Walton d865cf9e62
Fix OpenBSD 6.0 compile with GCC 4.9 (Issue 395)
This check-in also enables the 64-bit RDRAND routines for X32. The changes were with held until they could be tested. The testing occurred with Issue 395
2017-03-22 17:26:25 -04:00
Jeffrey Walton f502ee9218
Simplify C++ dynamic object initialization
Wrap DetectArmFeatures and DetectX86Features in InitializeCpu class
Use init_priority for InitializeCpu
Remove HAVE_GCC_CONSTRUCTOR1 and HAVE_GCC_CONSTRUCTOR0
Use init_seg(<name>) on Windows and explicitly insert at XCU segment
Simplify logic for HAVE_GAS
Remove special recipies for MACPORTS_GCC_COMPILER
Move C++ static initializers into anonymous namespace when possible
Add default NullNameValuePairs ctor for Clang
2017-03-20 08:51:10 -04:00
Jeffrey Walton 354502d59d
Change HAS_NASM to USE_NASM. The makefile does not etect it automatically 2017-03-14 18:38:37 -04:00
Jeffrey Walton 4bcaabbe26
Updated RDRAND and RDSEED under NASM
Port rdrand.S to Cygwin and OS X
Add DISABLE_NATIVE_ARCH to CmakefileList and GNUmakefile. It supresses the addition of -march=native. DISABLE_NATIVE_ARCH replaces DISABLE_CXXFLAGS_OPTIMIZATIONS in CmakefileList (the latter is now deprecated).
2017-03-13 15:57:47 -04:00
Jeffrey Walton a0bb490056
Define _XOPEN_SOURCE for Cygwin/Newlib (Issue 315) 2017-03-10 01:53:51 -05:00
Jeffrey Walton 86a45fd1ca
Suppress unneeded output in Makefiles 2017-03-09 04:01:36 -05:00
Jeffrey Walton 448282331b
Remove HTML echo's from 'make benchmark' recipe 2017-03-08 15:45:38 -05:00
Jeffrey Walton 1e5d6ee8d4
Add ASM and S files to trim recipe 2017-03-07 02:48:58 -05:00
Jeffrey Walton 26db40567d
Add Integer Bitops tests (Issue 344) 2016-12-06 20:56:57 -05:00