Commit Graph

145 Commits (26c83877ef30c81054746721f23f8df91ef44337)

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 6ada677461
Whitespace check-in 2019-01-22 03:44:34 -05:00
Jeffrey Walton 8572541841
Use #pragma omp simd for OpenMP 3.0 compilers (GH #787) 2019-01-22 03:42:53 -05:00
Jeffrey Walton 2113a471eb
Fix compile on MinGW32 2019-01-16 03:14:06 -05:00
Jeffrey Walton dbec62cdb2
Update distclean rule in cryptest.nmake 2019-01-09 01:04:59 -05:00
Jeffrey Walton 7428fa82ab
Clear unused variable warning with GCC 2019-01-08 17:31:53 -05:00
Jeffrey Walton 6d5316812f
Fix compile when NO_OS_DEPENDENCE is defined 2019-01-08 17:03:45 -05:00
Jeffrey Walton a79fe3a826
Use _NSGetExecutablePath on OS X (GH #760)
Also test for symlinks and reject them, if found.
2019-01-02 23:43:44 -05:00
Jeffrey Walton 7819af671b
Use _get_pgmptr on Windows (GH #760)
Let's see how well this works across the versions of Visual Studio we support
2019-01-02 20:22:55 -05:00
Jeffrey Walton 748ebe6328
Use getexecname() on Solaris (GH #) 2019-01-02 19:46:00 -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 83a37b8284
Fix Debug PowerPC build 2018-12-26 12:29:32 -05:00
Jeffrey Walton a749296504
Add additional self tests
And whitespace check-in
2018-12-25 10:08:49 -05:00
Jeffrey Walton 77923a291a
Add Langley's curve25519 (GH #761, PR# 762) 2018-12-11 16:17:56 -05:00
Jeffrey Walton 5b0df2592a
Handle test vectors with extensions 2018-12-07 14:25:10 -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 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 1d5eaf5268
Fix test scripts on ancient Bash
This showed up on Solaris 9 with Bash 2.05. Also see https://unix.stackexchange.com/q/468579/56041
2018-09-12 13:06:28 -04:00
Jeffrey Walton f2171cbe2f
Remove Thread and Socket classes (GH #208, PR #703)
Also see https://groups.google.com/forum/#!topic/cryptopp-users/5btwLoxXXD4.
2018-08-17 23:55:39 -04:00
Jeffrey Walton 989c3bfbf2
Update comments 2018-08-09 18:18:40 -04: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 3ff7d7f028
Add ARM AES asm implementation from Cryptogams (GH #683) 2018-07-11 06:59:44 -04:00
Jeffrey Walton 1836a7feb4
Cleanup datatest.cpp
Switch to non-blocking rngs for Linux and Windows
2018-07-10 17:34:55 -04:00
Jeffrey Walton a2ca2cfc0f
Use OS rng as alternate test generator 2018-07-10 17:08:13 -04:00
Jeffrey Walton 50f99ae802
Increase use of ptrdiff_t when performing pointer math 2018-07-10 09:21:52 -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 54d5100344
Add CHAM lightweight block cipher (PR #670)
Add CHAM lightweight block cipher
2018-06-17 23:24:47 -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 9b174e84de
Remove AsymmetricAlgorithm::BERDecode (GH #569) 2018-01-21 08:45:02 -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 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 e4498a105e
Use ::time() and ::log() instead of std::time() and std::log() (GH #512)
The 35c0fa82fd change broke GCC 4.8
2017-09-20 18:43:51 -04: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 c40a4dc9f7
Fix Clang warning on missing template definitions 2017-08-16 12:21:07 -04:00
Jeffrey Walton a2cab93117
Add hash static transform test (Issue 455) 2017-08-04 23:35:38 -04:00
Jeffrey Walton 34c4c9f1bd
Move 'main' into CryptoPP::Test, proxy an empty main into Test::main (Issue 447)
This seems to be a little cleaner than the triage at 00e1337456 commit.
2017-07-23 16:20:52 -04:00
Jeffrey Walton 00e1337456
Fix "C2872: 'byte': ambiguous symbol" with Windows Kit (Issue 442, 447)
AppVeyor detected the break but we did not receive the email about it. It looks like we have an AppVeyor configuration problem
2017-07-23 11:22:42 -04:00
Jeffrey Walton 52b4cceda5
Remove extraneous return 2017-05-29 21:53:59 -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 537ee61ade
Switch to _MSC_FULL_VER for SP1 releases 2017-05-11 12:05:57 -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 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
Jeffrey Walton 2297dd000a
Removed "typedef SHA1 SHA" (Issue 369)
This should have happened when we removed most of MAINTAIN_BACKWARDS_COMPATIBILITY artifacts. Its not practical move SHA1 into Weak:: namespace or "typedef SHA256 SHA" because SHA1 is too intertwined at the moment.

In the interim, maybe we can place SHA1 in both CryptoPP:: and Weak:: namespaces. This will allow us to transition into Weak::SHA1 over time, and signal to users SHA1 should be avoided.
2017-04-24 05:05:14 -04:00
Jeffrey Walton cf160e91c4
Added comments on using InformationDisperseFile and SecretShareFile
This is based on feedback from https://groups.google.com/forum/#\!topic/cryptopp-users/XEKKLCEFH3Y
2017-04-13 23:13:07 -04:00