Commit Graph

233 Commits (2d4a932c33fc229e538103b3fe7118b9b2f9a5a6)

Author SHA1 Message Date
Jeffrey Walton c4ef77bcdb
Attempt to use glibtool if available 2018-08-02 23:21:59 -04:00
Jeffrey Walton 85ea200ff0 Revert "Copy setenv-ios.sh into TestScripts"
The copy happened the wrong way.

This reverts commit a6143862a3.
2018-08-02 00:28:35 -04:00
Jeffrey Walton a6143862a3
Copy setenv-ios.sh into TestScripts
This is one of the scripts we have in two places due to historical reasons. The current practice is to put them in TestScripts/
2018-08-02 00:13:13 -04:00
Jeffrey Walton 3753a4301d
Disable ASM for iOS simulators 2018-08-01 23:10:01 -04:00
Jeffrey Walton 89ec3c4a25
Guard for missing libtoolize 2018-08-01 13:57:35 -04:00
Jeffrey Walton 57521bd22a
Add calls to 'make clean' to ensure building artifacts 2018-07-31 19:53:40 -04:00
Jeffrey Walton 27968af8a9
Update to support IBM XLC and LLVM backend 2018-07-31 18:21:44 -04:00
Jeffrey Walton f36562218f
Add call to ls upon failure of script 2018-07-30 15:40:13 -04:00
Jeffrey Walton 12bb4866dd
Add check for setenv-*.sh scripts 2018-07-30 15:32:53 -04:00
Jeffrey Walton 138ce8f626
Cleanup Makefiles and Android and iOS scripts 2018-07-28 18:45:37 -04:00
Jeffrey Walton a411ac350b
Cleanup cryptest-autotools.sh script 2018-07-28 10:58:51 -04:00
Jeffrey Walton 4066d70731
Cleanup cryptest-autotools.sh script 2018-07-28 10:57:53 -04:00
Jeffrey Walton ef5a3d3905
Add autotools-clean and cmake-clean rules to GNUmakefile 2018-07-28 09:21:31 -04:00
Jeffrey Walton 884851cd9a
Update failure message 2018-07-27 19:17:25 -04:00
Jeffrey Walton ed91b278bb
Run autoupdate and libtoolize if available 2018-07-27 16:51:32 -04:00
Jeffrey Walton f201bc9493
Remove calls to format script 2018-07-27 16:10:43 -04:00
Jeffrey Walton a3efa68da7
Add call to autoupdate if available 2018-07-27 16:09:27 -04:00
Jeffrey Walton 14dd03544e
Update cryptest-automake test script for Solaris 2018-07-16 10:53:11 -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 9b4476ef7b
Update symbol script for Crypto++ 7.x 2018-07-11 16:16:32 -04:00
Jeffrey Walton 3b92255b8b
Add recipe to trim trailing whitespace 2018-07-01 21:45:01 -04:00
Jeffrey Walton 7bfeb4f3a2
Add recipe to call dos2unix if available 2018-07-01 21:38:47 -04:00
Jeffrey Walton 7fdb66d46e
Fix cryptest-cmake message 2018-06-30 04:30:58 -04:00
Jeffrey Walton 9a75d09ca4
Add cleanup function to cryptest-cmake.sh 2018-06-29 19:43:31 -04:00
Jeffrey Walton 598e371b8a
Add cryptest-cmake.sh 2018-06-29 19:28:16 -04:00
Jeffrey Walton 574097bd6f
Add cryptest-autotools.sh 2018-06-29 17:04:22 -04:00
Jeffrey Walton 3deb24b7de
Fix Android build after renaming defines for CMake
This change should have occurred during commits 188e0df650 and 5422f0c13a.
2018-05-05 21:46:17 -04:00
Jeffrey Walton 55071c49c1
Fix failed Android tests on Travis
This change should have been made at https://github.com/weidai11/cryptopp/commit/e2bc3b55caab
2018-04-26 21:35:01 -04:00
Jeffrey Walton e2bc3b55ca
Rename setenv-android.sh to setenv-android-gcc.sh (GH #637)
This makes room for a Clang/LLVM version of the script
2018-04-19 22:39:07 -04:00
Jeffrey Walton bdd0f02867
Make chenage-version.sh OS X friendly 2018-04-08 16:19:16 -04:00
Jeffrey Walton 4bb331f5d0
Post-release version increment 2018-04-08 15:58:25 -04:00
Jeffrey Walton 7065702ba1
Fix return codes from cryptest-ios.sh 2018-04-05 18:38:43 -04:00
Jeffrey Walton 1103819a86
Remove extra space between variable and value for setenv-ios.sh 2018-04-05 15:19:57 -04:00
Jeffrey Walton 37d723e680
Fix iPhoneSimulator build (GH #635) 2018-04-05 08:00:25 -04:00
Jeffrey Walton ea9a5cf755
Add OpenMP support to Scrypt (GH #613) (#628)
Scrypt performance jumps as expected. For example, on a machine with 4 logical cores:

    $ time OMP_NUM_THREADS=1 ./test.exe
    Threads: 1
    Key: DCF073537D25A10C9733...

    real    0m17.959s
    user    0m16.165s
    sys     0m1.759s

    $ time OMP_NUM_THREADS=4 ./test.exe
    Threads: 4
    Key: B37A0127DBE178ED604F...

    real    0m4.488s
    user    0m15.391s
    sys     0m1.981s
2018-04-01 06:58:00 -04:00
Jeffrey Walton d94ef9c70c
Re-enable OS X and iOS on Travis (GH #570, PR #627) 2018-04-01 02:37:32 -04:00
Jeffrey Walton e9b6e85b77
Bump version numbers 2018-03-27 21:07:53 -04:00
Jeffrey Walton c51856dd20
Add Power8 code generation tests to cryptest.sh 2018-03-11 19:25:42 -04:00
Jeffrey Walton 6d35beb05d
Add Linux Sparc64 support to test script (GH #597) 2018-03-08 20:14:37 -05:00
Jeffrey Walton 2f1c984264
Post-release version increment 2018-02-22 12:50:29 -05:00
Jeffrey Walton 59088779d8
Update comments in test script 2018-02-21 08:06:51 -05:00
Jeffrey Walton d556586d27
Add Reptoline option tests to test script 2018-02-21 04:23:46 -05:00
Jeffrey Walton 5c36c99d3f
Add -O2 test to test script (GH #588) 2018-02-21 03:22:34 -05:00
Jeffrey Walton d4342558d0
Remove unneeded AOSP_SYS_INC 2018-01-28 16:37:34 -05:00
Jeffrey Walton e546b2af85
Add cryptest-tidy.sh script 2018-01-24 18:30:21 -05:00
Jeffrey Walton 91a8652f9e
Update version info 2018-01-22 18:22:34 -05:00
Jeffrey Walton 8ffd165c7a
Rename nacl.h to naclite.h
This should avoid confusion with header files from the reference implementation and libsodium
2018-01-21 17:04:15 -05:00
Jeffrey Walton 5631da3697
Disable Travis iOS testing (GH #570) 2018-01-21 12:48:50 -05:00
Jeffrey Walton 133b2411d4
Disable Travis OS X and iOS testing (GH #570)
Travis is having infrastructure problems since it migrated in November 2017. Our OS X and iOS tests hang for days. When the current job hangs, new jobs that enter the queue later hang too because the original job is still waiting.

The subsequent hangs effect Android and Linux, too. Our Travis scripts test Android, Linux, OS X and iOS. A hang effects everything.

We are going to disable Travis OS X and iOS tests until things improve.
2018-01-21 11:02:42 -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 2d011dff34
Cleared GCC warning with -Wall 2018-01-20 17:09:23 -05:00
Jeffrey Walton 65963c5504
Fix Android x86 and x86-64 cross-compilesexit 2018-01-20 13:54:02 -05:00
Jeffrey Walton 5cee4a6573
Improve logic for <arm_acle.h> include (GH #568) 2018-01-20 13:23:41 -05:00
Jeffrey Walton 5adfe4e812
Sync setenv scripts 2018-01-20 12:46:34 -05:00
Jeffrey Walton 600fa4d107
Clear unary minus on unsigned warning under MSVC 2018-01-19 20:09:02 -05:00
Jeffrey Walton 347c0e56c6
Clear Coverity finding CID 186949
The finding is "Overflowed return value", and it is rooted in the constant time code bit manipulations
2018-01-19 18:28:56 -05:00
Jeffrey Walton 0bb73e7035
Add _unchecked versions of crypto_box, crypto_box_open and crypto_box_beforenm
This check-in adds three additional functions for backwards compatibility: crypto_box_unchecked, crypto_box_open_unchecked and crypto_box_beforenm_unchecked. The functions can be used for interoperability with downlevel clients, like old versions of NaCl and libsodium. It should also help some cryptocurrencies, like Bitcoin, Ethereum, Monero and Zcash.

Also see https://eprint.iacr.org/2017/806.pdf (low order element attack) and https://github.com/jedisct1/libsodium/issues/662 (Zcash break).
2018-01-18 12:43:57 -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 166d3f4363
Add C++20 elevated warnings test 2018-01-14 03:34:25 -05:00
Jeffrey Walton 3360e97ad9
Add C++20 testing to cryptest.sh
This is initial testing support for N4713, "Working Draft, Standard for Programming Language C++". We know GCC uses -std=c++20 and -std=gnu++20, so we can start testing things
2018-01-06 05:00:24 -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 5856ab5a7e
Add Valgrind suppression file for Salsa20 and runtime's __memcmp_sse4_1 2017-12-08 17:46:44 -05:00
Jeffrey Walton dbd79a1e49
Fix GCC inline asm register constraint for SSE register
Also see https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
2017-11-17 01:01:12 -05:00
Jeffrey Walton 3c537f3e02
Remove master-merge script
We don't use branches for development because they pollute the logs on Master
2017-11-16 12:55:38 -05:00
Jeffrey Walton 156fedea7f Revert "Remove master-merge script"
This reverts commit d3dc091. A version number change used to build the docs cross-pollinated into the deletion of the script.
2017-11-16 12:53:33 -05:00
Jeffrey Walton d3dc09120b
Remove master-merge script
We don't use branches for development because they pollute the logs on Master
2017-11-16 12:51:33 -05:00
Jeffrey Walton 4ec1f89ac6
Fix minimum arch test on OS X with MacPort compiler 2017-11-14 00:47:20 -05:00
Jeffrey Walton 91b8d85f4c
Fix SunCC compile with -xarch=sse2
Fix copy/paste messages in cryptest.sh
2017-11-13 19:10:15 -05:00
Jeffrey Walton 4990129f0f
Add summary total back 2017-11-13 17:32:26 -05:00
Jeffrey Walton f56e4e193f
Fix summary output in cryptest.sh 2017-11-13 16:57:03 -05:00
Jeffrey Walton 51eca5dd87
Change sed strings for cryptest.sh 2017-11-13 12:11:31 -05:00
Jeffrey Walton 6fa0d8429d
Add shared object and dynamic library tests (GH #533) 2017-11-12 20:32:41 -05:00
Jeffrey Walton 8e06391ad3
Update setenv-ios.sh to export tools
This is needed for Autotools and cross-compiles. GNUmakefile-cross does not use it
2017-11-10 09:30:47 -05:00
Jeffrey Walton fdc262e884
Add tests for CRYPTOPP_NO_CXX11 to cryptest.sh (GH #529) 2017-11-06 09:10:37 -05:00
Jeffrey Walton 5d7175bf03
Fix permissions 2017-11-05 07:22:18 -05:00
Jeffrey Walton bbf10b1250
Remove cryptest-windows.pl
It was useless fodder
2017-11-01 09:44:45 -04:00
Jeffrey Walton dcabbd2112
Fix Elevated Warnings test
We were using HAVE_GCC and HAVE_CLANG instead of GCC_COMPILER and CLANG_COMPIELR
2017-10-30 08:33:16 -04:00
Jeffrey Walton 5be2c777f7
Disable ShellCheck SC2181 warning in cryptest.sh
Add tests for Support for Control-flow Enforcement Technology (CET). This is an upcoming processor feature. We want to be out in front of breaks to our inline assembly
2017-10-30 08:19:50 -04:00
Jeffrey Walton 1eb49a8db6
Fix CPU frequency of 0 in script 2017-10-27 13:20:22 -04:00
Jeffrey Walton 27aa70c240
Fix checkshell warnings 2017-10-26 12:03:20 -04:00
Jeffrey Walton 9df87dc7d4
Cleanup cryptest.sh a bit 2017-10-16 06:39:50 -04:00
Jeffrey Walton 55fe79e5ee
Add governor.sh to run benchmarks from a performance state on Linux
The script is based on code by Andy Polyakov, http://www.openssl.org/~appro/cryptogams.
2017-10-08 14:12:16 -04:00
Jeffrey Walton 6102333fc3
Add CRYPTOPP_NO_CPU_FEATURE_PROBES (GH #511)
We determine machine capabilities by performing an os/platform *query* first, like getauxv(). If the *query* fails, we move onto a cpu *probe*. The cpu *probe* tries to exeute an instruction and then catches a SIGILL on Linux or the exception EXCEPTION_ILLEGAL_INSTRUCTION on Windows. Some OSes fail to hangle a SIGILL gracefully, like Apple OSes. Apple machines corrupt memory and variables around the probe.
2017-09-19 21:08:37 -04:00
Jeffrey Walton 1661ff127a
Fix dead code strip test on AIX 2017-09-18 02:45:03 -04:00
Jeffrey Walton cc855dd181
Update cryptest-android.sh file with LLVM 2017-09-18 02:26:50 -04:00
Jeffrey Walton f3c04dbcb7
Remove CMake testing support (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:23:35 -04:00
Jeffrey Walton e891347212
Clear TODO items for setenv-android.sh for 6.0 (GH #491) 2017-09-13 19:37:48 -04:00
Jeffrey Walton 40859a80da
Improve detection of ANDROID_NDK_ROOT
We were searching for R10 NDK's, but Android is at R15 in 2017
2017-09-13 17:00:52 -04:00
Jeffrey Walton 6e1a07025c
Build Android cpu-features from sources (GH #491)
Thanks to Deadpikle for suggesting the strategy
2017-09-13 07:16:41 -04:00
Jeffrey Walton fcee76594c
Make armv7a-neon the default in 2017 with NDK R15 2017-09-13 05:22:19 -04:00
Jeffrey Walton 2375e87a5c
Fix unterminated close paren 2017-09-13 04:09:44 -04:00
Jeffrey Walton 66c84a9af4
Fix failed feature detections under IBM XL C/C++ compiler 2017-09-09 18:44:08 -04:00
Jeffrey Walton e6f19111e0
Fix IBM XL C/C++ compiler version output in test script 2017-09-09 16:26:16 -04:00
Jeffrey Walton 2118ce8fea
Add Power8 support to cryptest.sh 2017-09-09 14:56:47 -04:00
Jeffrey Walton a57cd5e193
Update test script 2017-09-02 06:18:08 -04:00
Jeffrey Walton 5b12be29e6
Update test script 2017-09-01 20:38:57 -04:00
Jeffrey Walton 6c35eaf737
Update test script for AIX 2017-08-31 08:05:48 -04:00