Commit Graph

92 Commits (33e401116c55911260fb0dd8546d44b3b25adb96)

Author SHA1 Message Date
Jeffrey Walton 5603661eec
Add ChaChaTLS implementation (GH #265)
We tweaked ChaCha to arrive at the IETF's implementation specified by RFC 7539. We are not sure how to handle block counter wrap. At the moment the caller is responsible for managing it. We were not able to find a reference implementation so we disable SIMD implementations like SSE, AVX, NEON and Power4. We need the wide block tests for corner cases to ensure our implementation is correct.
2019-01-24 09:36:05 -05:00
Jeffrey Walton da2444d243
Update documentation 2019-01-02 12:02:32 -05:00
Jeffrey Walton 9484815960
Cache DataDir when C++11 dynamic init is available (GH #760) 2019-01-02 03:30:49 -05:00
Jeffrey Walton 174f247c44
Add LSB install location to DataDir (GH #760) 2019-01-02 01:22:23 -05:00
Jeffrey Walton d62674b561
Add ed25519 (GH #764, PR #767)
Add ed25519
2018-12-24 17:17:32 -05:00
Jeffrey Walton 235c615a10
Make TestCurve25519 available in Release builds 2018-12-14 12:15:58 -05:00
Jeffrey Walton 77923a291a
Add Langley's curve25519 (GH #761, PR# 762) 2018-12-11 16:17:56 -05:00
Jeffrey Walton 5124ff7b20
Use OS X 10.1 image for Travis testing 2018-12-08 08:08:08 -05:00
Jeffrey Walton 8c4f38b27d
Update comments 2018-12-08 00:01:38 -05:00
Jeffrey Walton eee358b025
Fix DataDir for C++03 and below (GH #760) 2018-12-07 23:42:31 -05:00
Jeffrey Walton 1c88fd6f59
Add search for test vectors and test data (GH #760) 2018-12-07 12:25:52 -05:00
Jeffrey Walton 3db34abf2f
Add Power9 Random Number Generator support (GH #747, PR #748) 2018-11-27 02:54:26 -05:00
Jeffrey Walton af9fb9d21e
Add ChaCha to self tests (GH #732) 2018-11-08 22:08:59 -05:00
Jeffrey Walton ca08d63a10
Add SIMON and SPECK to validation suite 2018-10-14 10:45:46 -04:00
Jeffrey Walton 9a8b4a8024
Make TestStringSink a debug test 2018-09-08 21:52:14 -04:00
orangefour 9b81a545fc Add VectorSink 2018-09-05 09:25:09 +02:00
Jeffrey Walton d4428d7f1c
Add VectorLoad and VectorStore test code
Applies to POWER4 and above only
2018-08-06 22:19:59 -04:00
Jeffrey Walton f290746a36
Remove Coverity worakaround StreamState
Use std::ostringstream instead. Eventually I'd like to see the output stream passed into the function of interest. It will avoid problems on some mobile OSes that don't have standard inputs and outputs.
2018-07-29 22:35:36 -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 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 989bf6dc5e
Add HC-256 stream cipher (GH #680) 2018-07-05 06:43:04 -04:00
Jeffrey Walton dd31eb80c0
Add HC-128 stream cipher (GH #679) 2018-07-05 00:29:07 -04:00
Jeffrey Walton d00777e1d7
Add Rabbit stream cipher (GH #678) 2018-07-04 03:47:28 -04:00
Jeffrey Walton 61f635b837
Add additional SIMECK tests (GH #675) 2018-06-30 08:25:32 -04:00
Jeffrey Walton 2f5b110b52
Add HIGHT lightweight block cipher (GH #672) 2018-06-24 00:54:16 -04:00
Jeffrey Walton 54d5100344
Add CHAM lightweight block cipher (PR #670)
Add CHAM lightweight block cipher
2018-06-17 23:24:47 -04:00
Jeffrey Walton 1f06c512c4
Add LEA lightweight block cipher (GH #669) 2018-06-17 22:36:41 -04:00
Jeffrey Walton 64d02e3a18
Add scrypt key derivation function (GH #613, PR #626) 2018-03-31 20:09:38 -04:00
Jeffrey Walton ff82b5a886
Fix incorrect InverseMod (GH #602) (#603) 2018-03-25 00:43:21 -04: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 746fd6a648
add self test for custom Encoder and Decoder alphabet (GH #562) 2018-01-12 18:59:48 -05:00
Linmao Song 1823b9d9c4 Fix error in bits2octets: should use the base point's bit count, instead of the hash value's. Also add test case for GetRandom, with original data from RFC6979 (#560) 2018-01-10 20:18:15 -05:00
Jeffrey Walton e85b388234
Add thorough param to ValidateECGDSA 2017-11-25 03:27:07 -05:00
Jeffrey Walton 5267723a49
Add SM3 hash function (GH #541) 2017-11-23 23:19:09 -05:00
Jeffrey Walton 14a5221d82
Remove unneeded Debug tests
These tests are effectively performed in MDC, SEAL and OldRandomPool
2017-09-01 02:37:41 -04:00
Jeffrey Walton 7fb5953055
Add VIA Padlock RNG 2017-08-19 15:41:45 -04:00
Jeffrey Walton a2cab93117
Add hash static transform test (Issue 455) 2017-08-04 23:35:38 -04:00
Jeffrey Walton ae3922dda0
Remove calls to cout.flush() for AppVeyor
They seemed to produce a hang when running self tests in AppVeyor.
Also use IsDebuggerPresent() to determine when we should call DebugBreak(). The OS killed our debug build when fuzzing caused an assert to fail
2017-05-29 00:43:20 -04:00
Jeffrey Walton 8c02c60584
Add missing <sstream> header
This failed under C++03 builds. C++11 was OK, so it slipped past the initial smoke tests
2017-05-20 04:09:17 -04:00
Jeffrey Walton 4fef9b8837
Rework benchmark code
This change moves test selections from test.cpp into bench.cpp. It also allows us finer control over test classes and algorithms
2017-05-19 23:29:59 -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 5f0cbde980
Removed MSVC warning suppression for many warnings (Issue 412)
Most of these appear to have been cleared over the last couple of years.

C4127 is too prevelant. We are probably going to have to live with it.

We may be able to clear C4250 with a using statement. For example 'using ASN1CryptoMaterial::Load'.

MSVC resisted clearing C4661 by pushing/poping in iterhash.h and osrng.h. It was like MSVC simply ignored it.
2017-05-16 03:52:03 -04:00
Jeffrey Walton 093499260e
Fix compile error with NO_OS_DEPENDENCE 2017-05-10 03:50:32 -04:00
Jeffrey Walton 151ec518e8
Add additional tests 2017-05-10 01:28:52 -04:00
Jeffrey Walton 0cbaea0428
Add tests for Information Dispersal and Secret Sharing 2017-05-09 18:44:45 -04:00
Jeffrey Walton c62e1ade6e
Add Makefile recipe for Valgrind builds 2017-05-06 22:54:49 -04:00
Jeffrey Walton 14236ce94b
Fold compressor and default encryptor tests 2017-05-06 19:20:57 -04:00
Jeffrey Walton 02df6ea847
Add additional self tests under debug builds 2017-05-05 23:16:28 -04:00
Jeffrey Walton c1377b2955
Add additional self tests under debug builds 2017-05-05 17:21:08 -04:00
Jeffrey Walton 5c1de7b5a5
Add variable block size support to test and benchmarks
CRYPTOPP_COVERAGE was added at 9614307ab7 to increase code coverage support. This commit enables additional validation routines when  CRYPTOPP_COVERAGE is in effect.
2017-05-04 19:11:24 -04:00