Commit Graph

45 Commits (c4e0942a68a3242ff9d9c4e9a0da26a06b57f201)

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 07c2047cec
Add simon-simd.cpp to file list and nmake file 2017-11-27 01:20:15 -05:00
Jeffrey Walton 5267723a49
Add SM3 hash function (GH #541) 2017-11-23 23:19:09 -05:00
Jeffrey Walton f2bc3cd0ca
Add speck-simd.cpp to project files (GH #538, #539)
Cleaned up whitespace
2017-11-22 08:45:38 -05:00
Jeffrey Walton 3970a066e3
Add SIMON-64 and SIMON-128 lightweight block ciphers (GH #539) 2017-11-21 04:58:51 -05:00
Jeffrey Walton b9fc470bc7
Add SPECK-64 and SPECK-128 lightweight block ciphers (GH #538) 2017-11-20 06:30:21 -05:00
Jeffrey Walton 8734cfaa07
Add sse-simd.cpp to nmake file and vcxproj filters 2017-11-16 15:29:24 -05:00
Jeffrey Walton b3278a3cd2
Remove ospstore.cpp from cryptest.nmake 2017-08-25 06:20:57 -04:00
Jeffrey Walton 2651de246b
Support Base Implementation + SIMD implementation in cryptest.nmake (PR #461) 2017-08-25 06:12:46 -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 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 876142b1b6
Update with latest sources and reproducible build 2017-08-15 03:05:45 -04:00
Jeffrey Walton 32ab4af5ff
Add Threefish to project files
Whitespace check-in
2017-05-14 15:27:50 -04:00
Jeffrey Walton a5c67cfdd6
Add Kalyna block cipher (Issue 411)
Thanks to Roman Oliynykov and Oleksandr Kazymyrov for their assistance. Thanks to Keru Kuro for the reference implementation.
2017-05-06 00:24:35 -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 bae30d6767
Add ARIA to nmake makefile for Windows 2017-04-13 18:44:20 -04:00
Jeffrey Walton 2ea91ba1b9
Fix ARM compile under VS2013 2017-03-20 15:11:27 -04:00
Jeffrey Walton 5b98a255f7
Add pch.obj to clean recipe 2017-03-08 12:25:21 -05:00
Jeffrey Walton ecc818f341
Pickup "$(PLATFORM)" == "amd64" for VS2017 2017-01-18 03:52:21 -05:00
Jeffrey Walton 3e82a3102a
Pickup "$(PLATFORM)" == "arm" for VS2017 2017-01-18 03:41:59 -05:00
klemens 5a5c633073 spelling fixes 2016-12-27 18:34:57 +01:00
Jeffrey Walton ba00b9e46b
Add debug/release options to cryptest.nmake. Update to make PHONE_APP default for ARM builds 2016-12-18 03:42:34 -05:00
Jeffrey Walton 26db40567d
Add Integer Bitops tests (Issue 344) 2016-12-06 20:56:57 -05:00
Jeffrey Walton 484da03c7b
Add Poly1305 class to project files (Issue 338) 2016-11-27 16:56:57 -05:00
Jeffrey Walton 7223bbc119
Add /MACHINE option for linker 2016-11-14 05:32:58 -05:00
Jeffrey Walton ef47a5c148
Selectively add <sdkddkver.h> and <winapifamily.h> to cryptest.nmake 2016-11-13 16:18:41 -05:00
Jeffrey Walton 68cdfd1119
Updated comments 2016-10-09 22:42:31 -04:00
Jeffrey Walton e1f0252b71 Add SSE2 and AVX2 arch switches 2016-09-21 02:17:02 -04:00
Jeffrey Walton c88f09dad8 Updated comments 2016-09-18 17:55:23 -04:00
Jeffrey Walton 7de39aa18f Updated comments in cryptest.nmake 2016-09-17 23:21:34 -04:00
Jeffrey Walton 5360823bfb Add /GR to squash C4541 "'identifier' used on polymorphic type 'type' with /GR-; unpredictable behavior may result" on Windows XP with .Net 2003 2016-09-09 18:44:54 -04:00
Jeffrey Walton 24cbd7c451 Add missing keccak.cpp and keccak.obj to cryptest.nmake 2016-09-09 04:14:41 -04:00
Jeffrey Walton 7f958575ea Squashed commit of the following:
commit 47c75c6e9397e240919207e50e5a611d3e2a2428
Merge: d7685c2 42085ee
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 20:20:39 2016 -0400

    Attempting to fix binary file merge conflict

commit d7685c2d946beecc419ddb6901c24e972c7cf3ee
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 16:39:23 2016 -0400

    Add vsClean.cmd to vs2010.zip

commit 4b96fdf1c551260da60eb021f324bcc3fcfec626
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 16:15:38 2016 -0400

    Add Keccak to vs2010.zip

commit 3962db73b7113ee805b46a5bb4da64e204fe6bb0
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 15:40:35 2016 -0400

    Fold hmqv.cpp and fhmqv.cpp into mqv.cpp. There's no need for three empty source files

commit 44401448cbb6c8125b0f1ab4419c5b174408ffd7
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 15:39:23 2016 -0400

    Fold hmqv.cpp and fhmqv.cpp into mqv.cpp. There's no need for three empty source files

commit 847bfccb8d5c388e67745dc8c69768fa503c5135
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 14:48:02 2016 -0400

    Whitespace cleanup

commit 46a37be6fef361704dcf852bc9a099ce0a1da4c8
Merge: aefb8f8 3697867
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 14:43:01 2016 -0400

    Merge 'master' into 'keccak'

commit aefb8f8ff2b81b967089c53b457a92fc6f7544d6
Merge: 51a828b 3c91d93
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 12:39:51 2016 -0400

    Merge 'master' into 'keccak'

commit 51a828b88e37a4d18abb00300cd5522bd0e110c5
Merge: 4152870 e7c7722
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:41:36 2016 -0400

    Merge 'master' into 'keccak'

commit 415287041e69ddadf5ca1f6fc794b87e145fc2db
Merge: 357a0c5 83ac849
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:34:45 2016 -0400

    Merge 'master' into 'keccak'

commit 357a0c510f75e4e58078b500dd469462e90f7650
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:13:32 2016 -0400

    Removed deprecated warning from SHA3 classes

commit 5cf9ec10d53b895b5a583e265e4e1298ed402195
Merge: 10ce0ed c2d60cc
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 09:43:15 2016 -0400

    Merge 'master' into 'keccak'

commit 10ce0ed4c5b8a1ea230062fd2dfdec0d87ec5b42
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 09:37:40 2016 -0400

    Add Keccak implementation based on early SHA3. Change SHA3 to NIST FIPS 202 conforming implementation
2016-09-08 20:24:25 -04:00
Jeffrey Walton 3c91d9327f Add missing winpipes.cpp to cryptest.sh 2016-09-08 12:27:13 -04:00
Jeffrey Walton 64ac2b44f1 Add missing hmqv.h, hmqv.cpp, fhmqv.h, fhmqv.cpp to down level VS project, Borland project and cryptest.nmake 2016-09-08 11:18:43 -04:00
Jeffrey Walton 2551ec0d4c Add detection based on PROCESSOR_ARCHITECTURE = "AMD64" 2016-09-07 19:53:38 -04:00
Jeffrey Walton 2ec4045824 Add /wd4511 to disable "could not generate a default copy-constructor" 2016-09-07 19:32:09 -04:00
Jeffrey Walton d24babdecc Force include <sdkddkver.h>, detect X86 and X64 (in addition to x86 and x64) 2016-04-30 22:48:14 -04:00
Jeffrey Walton c11d334665 Updated to provide commented CXXFLAGS for WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP (desktop) and WINAPI_FAMILY=WINAPI_FAMILY_APP (store) 2016-04-29 02:24:48 -04:00
Jeffrey Walton c47e4a95de Force include <winapifamily.h> for ARM builds of Store and Phone apps 2016-04-28 06:54:19 -04:00
Jeffrey Walton c32d4a8505 Add missing winpipes.cpp and winpipes.obj. Fix rules for rdrand.cpp and rdrand.asm 2016-04-28 01:36:41 -04:00
Jeffrey Walton e06b50f564 Updated to include precompiled headers 2016-04-26 20:21:00 -04:00
Jeffrey Walton ba596654af Updated for x86, x64 and ARM 2016-04-26 17:12:21 -04:00
Jeffrey Walton 32ce24f4aa Add missing fipstest.cpp and fipstest.obj 2016-04-25 18:51:32 -04:00
Jeffrey Walton e69738e80b Add Windows NMAKE-based makefile for testing 2016-04-25 17:45:23 -04:00