Commit Graph

4784 Commits

Author SHA1 Message Date
John Safranek
b87fca669d 1. Rename and relabel the FIPS 140-3 option as wolfCrypt v5.
2. Make sure the correct SHA assembly files are copied over for the latest FIPS build.
2021-03-11 08:51:54 -08:00
John Safranek
30d0188fca Add callback option for RNG seeding. 2021-03-09 10:43:26 -08:00
John Safranek
7134608d9f Merge branch 'master' into fipsv3
# Conflicts:
#	wolfssl/wolfcrypt/hash.h
2021-03-05 07:59:04 -08:00
JacobBarthelmeh
f15450f63e Merge pull request #3839 from cconlon/pkcs7free
fix PKCS7 dynamic content save/restore in PKCS7_VerifySignedData
2021-03-05 05:53:38 +07:00
Sean Parkinson
25228cb6c0 Merge pull request #3798 from dgarske/no_hash
wolfcrypt: Fixes for building without hash or rng
2021-03-05 08:16:34 +10:00
John Safranek
69d2e4db6a DH key gen should call DH check key. 2021-03-04 14:10:48 -08:00
David Garske
7983734dcb Merge pull request #3786 from tmael/cc310_ecc_importkey
Add Cryptocell wc_ecc_import_x963_ex
2021-03-04 13:59:54 -08:00
John Safranek
6fa1fe5b8e ECC key gen should call ECC check key. 2021-03-04 13:19:02 -08:00
toddouska
bd57e3e4cf Merge pull request #3818 from dgarske/zd11760
Fix for InTime RTOS v5 random
2021-03-04 11:14:34 -08:00
John Safranek
5080b1d633 Restrict AES-GCM IV minimum size to 96-bits for newer FIPS builds. 2021-03-04 09:55:44 -08:00
Chris Conlon
2be80acdd3 fix PKCS7 dynamic content save/restore in PKCS7_VerifySignedData for multiPart bundles with certs 2021-03-03 16:19:58 -07:00
Guido Vranken
6725a4f5d2 Return error code from sp_cond_swap_ct
ZD 11824
2021-03-03 20:03:10 +01:00
David Garske
3752347f14 Improve the random logic for the INTIME RTOS RNG. 2021-03-02 15:04:01 -08:00
David Garske
9fe7be5ac4 Improve the key ecc_set NULL checking for possible use of key->dp == NULL cases. This is cases where the key has not been properly iniailized or loaded prior to calling from a public API. 2021-03-01 17:17:40 -08:00
David Garske
9d4d36f7fe Fix hasty copy/paste with privSz2. 2021-03-01 16:02:51 -08:00
David Garske
14faf16955 Dismiss unused warnings for dh_test. 2021-03-01 10:14:28 -08:00
David Garske
8c1a93d9e1 Using "rand()" to seed our PRNG as its available on all INTIME RTOS versions. 2021-03-01 09:23:19 -08:00
John Safranek
675a571818 Add CASTs for TLSv1.2, TLSv1.3, and SSH KDFs. 2021-03-01 08:47:03 -08:00
John Safranek
1368cac8b5 Add RSA PAT. 2021-02-26 10:17:51 -08:00
toddouska
4c1a94a6ad Merge pull request #3768 from SparkiDev/mp_add_d_too_big
MP small: mp_add_d doesn't support adding a digit greater than MP_DIG…
2021-02-25 16:56:23 -08:00
John Safranek
4a75585c7a Add ECDSA-KAT CAST. 2021-02-25 16:03:55 -08:00
toddouska
5682d61e75 Merge pull request #3817 from SparkiDev/i2d_x509_name_mv
ASN: move wolfSSL_i2d_X509_NAME to ssl.c
2021-02-25 16:03:30 -08:00
toddouska
dbc4c51a4e Merge pull request #3815 from SparkiDev/sp_math_keygen
SP int: get keygen working with SP math again
2021-02-25 16:00:27 -08:00
David Garske
bc585e85b6 Dismiss unused warnings for rsa_test. 2021-02-25 11:23:21 -08:00
David Garske
acff0e8781 Fix for InTime RTOS v5. The arc4random_buf wasn't added until v6, so opting to use arc4random. ZD 11760. 2021-02-25 08:54:30 -08:00
John Safranek
5343092346 1. Add flag to DH keys when using safe parameters.
2. The LN check is skipped when using safe parameters.
3. Enable all FFDHE parameter sets when building for FIPS 140-3.
2021-02-24 18:23:37 -08:00
John Safranek
8ab396cb45 Move the TLSv1.3 KDF into wolfCrypt with the other KDFs. 2021-02-24 18:23:37 -08:00
John Safranek
77e6849786 Add HMAC-SHA2-512 to the TLSv1.2 PRF. 2021-02-24 18:23:37 -08:00
John Safranek
08c2f7f656 Add prototype for the ssh-kdf test in the wolfCrypt test. 2021-02-24 18:23:36 -08:00
John Safranek
131fb2c1e6 KDF Update
1. Move wolfSSH's KDF into wolfCrypt.
2021-02-24 18:23:36 -08:00
John Safranek
2672856042 FIPS KDF Update
1. Copied the TLSv1.2 PRF into hmac.c since it uses it and the TLSv1.3
   HKDF is in there as well.
2. Added guard around the old TLS PRF so that it switches in correctly
   for older FIPS builds only.
2021-02-24 18:23:36 -08:00
John Safranek
d5f6ef9f3b FIPS 140-3
1. Change the internal version number for the FIPS 140-3 changes as v4.
2. Insert v3 as an alias for FIPS Ready.
3. Use the correct directory for the FIPS old files sources. (For local
   testing of 140-3 builds.)
4. Change back the check for the FIPS version in internal.c for
   EccMakeKey().
2021-02-24 18:21:02 -08:00
John Safranek
2b6dc31145 FIPS 140-3
1. Added enable option for FIPS 140-3 in configure script.
2. Modify DES3 source to disallow DES3 for the new option.
3. Added the new constants to fips_test.h.
4. Added some new test functions.
5. Added API for doing the POST.
6. Added a processing state for the CASTs.
7. Delete some unused prototypes from FIPS test API.
2021-02-24 18:00:44 -08:00
Sean Parkinson
d271092aef ASN: move wolfSSL_i2d_X509_NAME to ssl.c
Move WOLFSSL_X509_NAME APIs out of asn.[ch].
2021-02-25 11:45:12 +10:00
Sean Parkinson
d805a5c681 SP int: get keygen working with SP math again
./configure --enable-sp --enable-sp-math --enable-keygen
2021-02-25 10:01:27 +10:00
Sean Parkinson
982ba6c1e0 Math: GCD(0,0) is undefined and LCM(0,*) is undefined.
All integers divide 0 so there is no greatest common divisor.
0 is not in the set of numbers for LCM.
2021-02-25 09:29:21 +10:00
David Garske
5cc8979309 Review feedback for unused `pubSz2. 2021-02-24 15:09:51 -08:00
David Garske
3a3c0be43f Fixes for build warnings for CryptoCell with ECC and RSA. 2021-02-24 15:05:27 -08:00
David Garske
49a0f70c24 Fix errors from last commit. 2021-02-24 14:19:13 -08:00
David Garske
9ebdc8d61c Additional fixes for building without RNG. Fix for possible use of key->dp == NULL in wc_ecc_export_ex. 2021-02-24 13:21:54 -08:00
David Garske
bf63b41465 Fixes for building without hash. If all hash algorithms are disabled wc_HashAlg could report empty union. ZD 11585. 2021-02-24 11:04:03 -08:00
Eric Blankenhorn
1d16af4f32 Warnings and error fixes 2021-02-24 09:08:15 -06:00
Sean Parkinson
3cdbc242b4 Merge pull request #3803 from dgarske/zd11759
Fix misplaced endif and brace
2021-02-24 09:04:38 +10:00
David Garske
7a71ec4692 Merge pull request #3802 from tmael/pkcs8err
Fix PKCS8 build config
2021-02-23 13:42:17 -08:00
Tesfa Mael
9bfbc999d9 Move variable declarations to the top 2021-02-23 13:21:50 -08:00
toddouska
5eba89c3ca Merge pull request #3742 from julek-wolfssl/error-queue-per-thread
Add --enable-error-queue-per-thread
2021-02-23 12:02:16 -08:00
toddouska
60614ff8b1 Merge pull request #3772 from SparkiDev/sp_ecdsa_set_k
SP ECDSA sign: fix multiple loops work of generating k
2021-02-23 12:00:21 -08:00
toddouska
363185669a Merge pull request #3776 from cconlon/pkcs7testfix
fix wolfCrypt PKCS#7 test when PKCS7_OUTPUT_TEST_BUNDLES is defined
2021-02-23 11:58:00 -08:00
toddouska
244accece1 Merge pull request #3799 from SparkiDev/sp_gcd_protect
SP int: fix guard around sp_gcm and sp_lcm
2021-02-23 11:53:25 -08:00
David Garske
6cc137dce0 Fix misplaced endif and brace. 2021-02-23 10:22:59 -08:00