Commit Graph

48 Commits (9b174e84de7a4cf92b9c640f011c455e88182862)

Author SHA1 Message Date
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
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 69a40e992c
Fix GNUmakefile-cross distclean recipe (GH #514) 2017-09-26 01:05:15 -04:00
Jeffrey Walton f0c2324f6b
Fix armeabi and armv7-a for Android (GH #509) 2017-09-17 20:07:53 -04:00
Jeffrey Walton 09f1a2fb38
Add i686 and x86_64 specific flags (GH #508) 2017-09-17 15:33:41 -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 1c41da35bc
Use AOSP_CPU_OBJ instead of cpu-features.o 2017-09-13 18:58:07 -04:00
Jeffrey Walton 4c6a866a8d
Remove debug info statement from makefile 2017-09-13 18:51:45 -04:00
Jeffrey Walton 8d98417306
Add Aarch64 specific defines to Android cross-compile
Move <arm_acle.h> logic into "sonfig.h". Detecting when we can/should include <arm_acle.h> is proving to be troublesome
2017-09-13 17:16:57 -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 ea12b5af0b
Use IS_IOS instead of IS_DARWIN 2017-05-26 22:23:35 -04:00
Jeffrey Walton 0af3a2525c
Update makefile rules and recipes 2017-05-26 22:20:38 -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 86a45fd1ca
Suppress unneeded output in Makefiles 2017-03-09 04:01:36 -05:00
Jeffrey Walton 26db40567d
Add Integer Bitops tests (Issue 344) 2016-12-06 20:56:57 -05:00
Jeffrey Walton 7e9a60da47
Add adhoc.cpp to test sources (Issue 332)
This should have been included in Commit 8de854cae6
2016-11-04 21:20:45 -04:00
Jeffrey Walton b20e498fc5
Additional use of $(strip $(CXXFLAGS)) cleanup 2016-10-26 18:26:07 -04:00
Jeffrey Walton c892295487 Remove uneeded -Wno-delete-non-virtual-dtor from GNUmakefile
-Wno-delete-non-virtual-dtor is no longer needed since we have virtual destructors in place and they are active in config.h
2016-09-24 00:05:24 -04:00
Jeffrey Walton c569e81edc Cleaned dylib artifacts 2016-09-10 09:46:24 -04:00
Jeffrey Walton 64281d26f7 Add integer.cpp to third position in GNUmakefile 2016-09-08 12:44:22 -04:00
Jeffrey Walton f8ad685c3d Rename bench.cpp to bench1.cpp 2016-04-22 14:15:09 -04:00
Jeffrey Walton dfe2946a75 Add Coverity artifacts to clean recipe 2016-04-11 00:51:15 -04:00
Jeffrey Walton d9c3c51aa8 Made non-SOLIBNAME the default version for Android and Embedded 2016-01-05 15:05:29 -05:00
Jeffrey Walton 8f5ff96b0b Added "lean" target to cross compiles 2016-01-04 20:23:19 -05:00
Todd Knarr 69a76042e2 Fix problem, issue #65 comment 168191115 2015-12-31 13:05:14 -08:00
Jeffrey Walton 6652e94d20 Added -headerpad_max_install_names to dylib targets. Added standard directory vairables to GNUmakefile-cross 2015-12-31 01:43:42 -05:00
Grant Ayers 4f277dab59 Fix an issue that caused targets to be rebuilt unnecessarily
and prevented updated object files from regenerating targets.

The 'public_service' phony target should be an 'order-only' prerequisite so
that it doesn't cause its target to be rebuilt when it is run.
However, object files were specified as order-only while the 'public_service'
target was not. This is reproducible by running 'make' twice. Another effect
is that when these object files change they will not cause the target to be
updated while they are order-only.
2015-12-28 16:30:01 -08:00
Jeffrey Walton 1ab5cbd047 Added DESTDIR to various recipes 2015-12-27 13:13:16 -05:00
Todd Knarr 56abc4e4c9 Apply the same versioned solib changes as to GNUmakefile 2015-12-26 10:57:04 -08:00
Jeffrey Walton bdebe53dd6 Updated to recognize arm64-v8a as an architecture 2015-12-09 00:41:15 -05:00
Jeffrey Walton 5703c85d2d Fixed makefile to use IS_IOS rather than IS_DARWIN for iOS cross-compiles. Updated Android to use AOSP_* variables rather than ANDROID_* variables 2015-12-08 14:55:58 -05:00
Jeffrey Walton 628f40755a Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup) 2015-11-18 15:35:35 -05:00
Jeffrey Walton 48809d4e85 CRYPTOPP 5.6.3 RC6 checkin 2015-11-05 01:59:46 -05:00
Jeffrey Walton 9b552d06d2 Changed cross-compile makefile to use "-Os" by default 2015-07-31 15:33:08 -04:00
Jeffrey Walton 158bb2c94f Added "system" target that dumps a number of internal variables for testing and troubleshooting 2015-07-31 14:24:49 -04:00
Jeffrey Walton d40eee99c0 Ported relevant GNUmakefile changes to GNUmakefile-cross 2015-07-20 06:55:42 -04:00
Jeffrey Walton e385e24654 Removed unneeded object and library files from CLEAN rule 2015-06-08 13:03:46 -04:00
Jeffrey Walton f23c30000d Removed -flat_namespace from LDFLAGS for iOS cross compile. That's something that was used for OS X around 10.4 or so while transitioning to namespaes in dylibs 2015-06-08 12:11:38 -04:00
Jeffrey Walton 467a224723 Added GNUmakefile-cross for Android, iOS and Embedded 2015-06-08 07:50:22 -04:00