Commit Graph

131 Commits

Author SHA1 Message Date
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
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
8ca0f47939
Add ARIA block cipher
This is the reference implementation, test data and test vectors from the ARIA.zip package on the KISA website. The website is located at http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002.

We have optimized routines that improve Key Setup and Bulk Encryption performance, but they are not being checked-in at the moment. The ARIA team is updating its implementation for contemporary hardware and we would like to use it as a starting point before we wander too far away from the KISA implementation.
2017-04-10 10:52:40 -04:00
Jeffrey Walton
ce38a411fc
Add Random Number Generator benchmarks (Issue 386)
Move HTML header and footer into benchmark functions
Switch to <cmath> and standard math routines
Switch to <ctime> and standard clock and time routines
Move static variable^Cinto anonymous namespace
Add TimeToString function for printing start and end times
2017-03-08 16:59:24 -05:00
Jeffrey Walton
5efb019d8b
Add C++ nullptr support (Issue 383) 2017-03-01 06:10:06 -05:00
Jeffrey Walton
73836e58a5
Add Test namespace within CryptoPP namespace (Issue 379) 2017-02-21 02:03:29 -05:00
Jeffrey Walton
9d7c5fce55
Remove old VerifierFilter, switch to SignatureVerificationFilter
VerifierFilter was a typedef for SignatureVerificationFilter. The name changed at Crypto++ 5.0
Updated documentation
2017-02-07 18:51:44 -05:00
Jeffrey Walton
2868452193
Add NIST SP800-90A HMAC_DRBG generator
Move bodies out-of-line
Whitespace
2017-02-07 08:51:58 -05:00
Jeffrey Walton
81b1a18063
Change file preamble to include "originally written by Wei Dai"
We have made a fair number of changes, and we don't want WD to receive credit for issues he was not part of
2017-01-27 07:05:45 -05:00
Jeffrey Walton
1778432013
Add self tests for RoundUpToMultipleOf (Issue 360)
Thanks to Boldizsár Lipka
2017-01-10 22:09:38 -05:00
Jeffrey Walton
5c932fcc3b
Add NIST SP800-90A Hash_DRBG generator 2016-12-30 21:46:03 -05:00
Jeffrey Walton
7031fc7f6f
Add test cases for ASN.1 parsing (Issue 346) 2016-12-24 04:56:34 -05:00
Jeffrey Walton
9739ba8afe
Add Aumasson and Bernstein's SipHash (Issue 348) 2016-12-17 03:58:36 -05:00
Jeffrey Walton
379e76d27d
Add ECGDSA benchmarks using secp256k1 and sect233r1
Also add missing validation functions to test.cpp. The test and functions were present, but only accessible with 'cryptest.ex v', where all the tests were run
2016-12-13 19:16:21 -05:00
Jeffrey Walton
cecf719fcd
Add German digital signature algorithm (ECGDSA) (Issue 113)
Also see ISO/IEC 15946 and http://www.teletrust.de/fileadmin/files/oid/ecgdsa_final.pdf
2016-12-13 16:20:41 -05:00