Commit Graph

145 Commits

Author SHA1 Message Date
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