Commit Graph

4754 Commits

Author SHA1 Message Date
John Safranek
69d2e4db6a DH key gen should call DH check key. 2021-03-04 14:10:48 -08:00
John Safranek
6fa1fe5b8e ECC key gen should call ECC check key. 2021-03-04 13:19:02 -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
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
John Safranek
4a75585c7a Add ECDSA-KAT CAST. 2021-02-25 16:03:55 -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
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
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
Tesfa Mael
b199c2e444 Fix PKCS8 test 2021-02-23 09:33:14 -08:00
Sean Parkinson
22349e0539 Merge pull request #3800 from dgarske/zd11759
Fixes for warnings in Windows and failing `wc_BufferKeyEncrypt` test
2021-02-23 17:07:14 +10:00
David Garske
b5239f97c4 Fixes for warnings in Windows. Fix for failing wc_BufferKeyEncrypt with PBKDF disabled. ZD 11759. 2021-02-22 16:51:17 -08:00
David Garske
3ac40be091 Merge pull request #3797 from tmael/builderr
Correct a build error with a non-standard configurations
2021-02-22 16:33:01 -08:00
Sean Parkinson
d2f9f4c4ce SP int: fix guard around sp_gcm and sp_lcm 2021-02-23 10:21:32 +10:00
Tesfa Mael
243c3ceacc Fix build err 2021-02-22 13:36:21 -08:00
Elms
451b8ede51 tests: fix preprocessor test for gcd/lcm
Fixes `--enable-valgrind --enable-fpecc --enable-ecc` build
2021-02-22 09:53:55 -08:00
Jacob Barthelmeh
3079ca4d6a add comment that use is blocking and adjust indentation 2021-02-20 02:54:10 +07:00
JacobBarthelmeh
8d7c61cf10 prep for Async release 2021-02-19 11:51:23 -07:00
Chris Conlon
4da0328e1a fix wolfCrypt PKCS#7 test when PKCS7_OUTPUT_TEST_BUNDLES is defined 2021-02-18 12:14:48 -07:00
David Garske
10be54054e Minor fixes for build errors and bad macro names. 2021-02-18 10:55:47 -08:00
David Garske
c62b48f7d0 Fixes for building with RSA public or verify only. Fixes issue with reserved "div" keyword as variable name. ZD11585 2021-02-18 07:47:00 -08:00
Sean Parkinson
3bf9b49274 SP ECDSA sign: fix multiple loops work of generating k
Support only one loop of generated k.
2021-02-18 09:06:50 +10:00
Sean Parkinson
80e75c3db8 Merge pull request #3766 from guidovranken/zd11733
Better error propagation in _fp_exptmod_ct
2021-02-17 08:45:43 +10:00
Guido Vranken
b47809e718 Better error propagation in _fp_exptmod_ct 2021-02-16 19:54:59 +01:00
Guido Vranken
7bd3cccd87 Fix memory leak in fp_gcd
ZD 11732
2021-02-16 17:47:00 +01:00
Juliusz Sosinowicz
b8f841599c Add --enable-error-queue-per-thread 2021-02-16 16:08:13 +01:00
toddouska
30462fcf95 Merge pull request #3756 from SparkiDev/sp_math_dh_agree
DH SP math: return key size error with DH Agree
2021-02-15 12:26:04 -08:00
toddouska
917205442b Merge pull request #3757 from SparkiDev/sp_smallstack_fixes
sp_lcm small stack: fix size of temporary
2021-02-15 12:25:13 -08:00
Sean Parkinson
e4f8545e36 SP math all: sp_exch fixed up 2021-02-15 10:29:45 +10:00
Sean Parkinson
e187a74b1c sp_lcm small stack: fix size of temporary
Temporary sp_int needs to be allocated to be 1 digit larger than a or b
for the div operation.
Change sp_div to check sizes of r and rem when passed in.
Fix sp_invmod, sp_gcm, sp_submod to use temporary sp_int sizes that work
with calls to sp_div().
2021-02-15 09:48:18 +10:00
Sean Parkinson
4b1c89ab38 DH SP math: return key size error with DH Agree
SP math requires SP to support DH operations.
When SP doesn't support bit size, WC_KEY_SIZE_E must be returned.
2021-02-15 09:04:43 +10:00
Sean Parkinson
3926ccd39b AES-GCM type fixes: internal functions now have word32 type parameters
Lengths were signed int for decrypt while unsigned int for encrypt.
Use word32 across the board.
Also fix AES-NI code on Windows to cast lengths to word64 before
multiplying by 8 to avoid averflow.
2021-02-12 08:30:08 +10:00
toddouska
d40ea03621 Merge pull request #3703 from SparkiDev/sp_int_malloc
SP int: Rework allocation of temporaries
2021-02-11 13:49:45 -08:00
toddouska
3eeeb39fb7 Merge pull request #3711 from dgarske/ecc_encrypt_rng
Fix for `--enable-eccencrypt` with timing resistance enabled
2021-02-11 12:28:13 -08:00
toddouska
80b9949052 Merge pull request #3739 from kaleb-himes/FusionRTOS-Porting-R3
Fusion RTOS porting round 3
2021-02-11 12:25:55 -08:00
JacobBarthelmeh
e87e818c6e Merge pull request #3749 from dgarske/zd11624_pkcs11
Fix another PKCS11 case where the ECC key type is not set
2021-02-12 01:36:41 +07:00
toddouska
39cb84de25 Merge pull request #3697 from julek-wolfssl/openvpn-2.5-missing-stuff
OpenVPN master additions
2021-02-11 08:56:45 -08:00