Commit Graph

109 Commits

Author SHA1 Message Date
Jeffrey Walton
b706548e6c
Fix MinGW compile
Also see https://groups.google.com/d/msg/cryptopp-users/fVLk79sIBEE/Euhu6x9nAQAJ
2020-01-27 02:13:22 -05:00
Jeffrey Walton
1b8cd7e818
Clear missing initializer under early GCC
This created over 700 warnings when running cryptest.sh
2019-10-14 09:23:53 -04:00
Jeffrey Walton
76c29eadaf
Add XTS block cipher mode of operation (GH #891, PR #892) 2019-10-12 07:14:38 -04:00
Răzvan Cojocaru
9912d0630e Add support for Mcrypt's blowfish-compat (PR #877) 2019-09-29 20:18:56 -04:00
Jeffrey Walton
5aac8506bd
Use recipient rather than responder in authenticated key agreement
The recipient may not respond (though they do in the case of these key agreement schemes)
2019-08-03 23:52:50 -04:00
Jeffrey Walton
2e6ccd7fb1
Fix authenticated key agreement domain parameter consistency test 2019-08-03 17:01:02 -04:00
Jeffrey Walton
7eeb954b23
Add AuthenticatedKeyAgreementValidateWithRoles free standing test function 2019-08-03 16:32:36 -04:00
Jeffrey Walton
6c995e215a Fold CRYPTOPP_VALGRIND into CRYPTOPP_COVERAGE 2019-07-05 19:10:01 -04:00
Jeffrey Walton
cd0d145635 Add legacy ECIES EC2N cryptosystem and kat (GH #856) 2019-07-03 03:06:58 -04:00
Jeffrey Walton
ce6d3c1306 Add legacy ECIES ECP cryptosystem and kat (GH #856) 2019-07-03 01:41:23 -04:00
Andrew Wason
9c307ff4ba Use MAC::DIGESTSIZE in ECIES SymmetricEncrypt/SymmetricDecrypt
Fixes #856
2019-07-02 10:47:46 -04:00
Jeffrey Walton
994c98b6c0
Fix GCC compile on AIX
In file included from test.cpp:31:0:
validate.h:213:93: error: operator '||' has no right operand
 #elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE)
2019-06-04 09:45:33 -04:00
Jeffrey Walton
3afb1f1099
Fix GCC compile on AIX
In file included from test.cpp:31:0:
validate.h:213:93: error: operator '||' has no right operand
 #elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE)
2019-06-04 09:37:28 -04:00
Jeffrey Walton
342cdb9589
Clear lgtm warning on unsafe functions 2019-06-03 05:41:58 -04:00
Jeffrey Walton
00f9c1f0eb
Enable extended output in SHAKE-128 and SHAKE-256 (GH #805, PR #806) 2019-02-13 11:31:18 -05:00
Jeffrey Walton
1b8c00b37c
Update comments 2019-02-02 00:47:56 -05:00
Jeffrey Walton
96eac11d3b
Update DataDir search paths (GH #760) 2019-02-02 00:29:36 -05:00
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