Daniel Pouzzner
ed33315f25
wolfcrypt/src/sp_int.c: add pragma to sp_set() to suppress false positive -Warray-bounds on gcc-11.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
b673622322
FIPS 140-3 misc fixes including fixes for rebase errors.
2021-10-26 20:24:26 -05:00
John Safranek
b615309a7b
update FFDHE4096 test with the updated usage
2021-10-26 20:24:26 -05:00
John Safranek
c31ed64eb5
Add guard around the public key check for DH to skip it when we have
...
the condition to perform the small key test. The small key is
mathematically valid, but does not necessarily pass the SP 800-56Ar3
test for DH keys. The most recent FIPS build will add the tested file.
This change is only used in the older FIPS releases and in some rare
configurations that include the small key test.
2021-10-26 20:24:26 -05:00
John Safranek
b00b95ef6c
Cofactor flag in wolfcrypt test needed a guard.
2021-10-26 20:24:26 -05:00
John Safranek
f53a4db4e7
Unwind a few changes adding guards so it'll build with old FIPS.
2021-10-26 20:24:26 -05:00
John Safranek
b54459ace3
When the ECC PCT verify result is 0, the PCT fails.
2021-10-26 20:24:26 -05:00
John Safranek
175bab9a6f
Add missed step in DH key pair generation.
2021-10-26 20:24:26 -05:00
John Safranek
f42106201a
In the RSA PCT, initialize the plain output pointer.
2021-10-26 20:24:26 -05:00
John Safranek
aa3fb6f0d0
Update visibility on a SP math function for DH.
2021-10-26 20:24:26 -05:00
John Safranek
04ffd2ab45
Fixes:
...
1. When enabling FIPSv5 in configure, enable WOLFSSL_WOLFSSH.
2. Appropriate size selection of DH private keys.
2021-10-26 20:24:26 -05:00
John Safranek
3eaeaf3a57
Add sign/verify PCT to ECC.
2021-10-26 20:24:25 -05:00
John Safranek
9bf36f329a
Add sign/verify PCT to RSA key gen.
2021-10-26 20:24:25 -05:00
John Safranek
5d7c6dda72
Restore the PCTs to ECC and DH.
2021-10-26 20:24:25 -05:00
John Safranek
1065d2accf
Fix some Windows build warnings.
2021-10-26 20:24:25 -05:00
John Safranek
9022762e5a
Check to see if a pointer is nonnull that is expected to be.
2021-10-26 20:24:25 -05:00
John Safranek
908ec9b14a
Modify ffdhe to not return addresses.
2021-10-26 20:24:25 -05:00
John Safranek
7af87e5b32
Restore the HKDF code to hmac.c. For compatibility between FIPS builds.
2021-10-26 20:24:25 -05:00
John Safranek
54a1b4c881
Remove redundant pairwise test from DH and ECC.
2021-10-26 20:24:25 -05:00
John Safranek
c0e6a55aaa
Skip the small key DH test for SP and FFDHE builds.
2021-10-26 20:24:25 -05:00
John Safranek
3b5c8231c2
Move the PCT down to where it used to be located as CheckKeyPair.
2021-10-26 20:24:25 -05:00
John Safranek
2de6b3b2bd
Move the KDF functions into their own source file.
2021-10-26 20:24:25 -05:00
John Safranek
f78887d2ab
Add 'static' to the test vector arrays for the SSH KDF test.
2021-10-26 20:24:25 -05:00
John Safranek
86c040a3ae
Rename the PCT error codes to remove 'FIPS' since they can be enabled without FIPS.
2021-10-26 20:24:25 -05:00
John Safranek
9c5607a677
Add guard around ECC PCT for builds without validate keygen.
2021-10-26 20:24:25 -05:00
John Safranek
133faea89a
Hushed compiler warnings about unused variables.
2021-10-26 20:24:25 -05:00
John Safranek
a967cbcb7b
56Ar3 Testing Updates
...
1. Add PCTs for ECC and FFC.
2. Update the public key checks for ECC and FFC.
2021-10-26 20:24:25 -05:00
John Safranek
976402e04b
RNG Update
...
1. When the seed callback is enabled, allow wc_GenerateSeed() to be used
as a default callback.
2. Modify all the tests and examples to use the default seed callback if
the seed callback is enabled.
2021-10-26 20:24:25 -05:00
John Safranek
0c6d8cfc22
If the RNG seeding callback is missing or returns an error, the RNG instantiate fails.
2021-10-26 20:24:25 -05:00
John Safranek
c6486d7392
Removed an outdated comment.
2021-10-26 20:24:25 -05:00
John Safranek
a562db82ef
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-10-26 20:24:25 -05:00
John Safranek
c47e354eed
Add callback option for RNG seeding.
2021-10-26 20:24:25 -05:00
John Safranek
a2f802199d
DH key gen should call DH check key.
2021-10-26 20:24:25 -05:00
John Safranek
e3b2be5ea3
ECC key gen should call ECC check key.
2021-10-26 20:24:25 -05:00
John Safranek
1f67e4519c
Restrict AES-GCM IV minimum size to 96-bits for newer FIPS builds.
2021-10-26 20:24:25 -05:00
John Safranek
17a4c891ce
Add CASTs for TLSv1.2, TLSv1.3, and SSH KDFs.
2021-10-26 20:24:25 -05:00
John Safranek
e32c58d533
Add RSA PAT.
2021-10-26 20:24:25 -05:00
John Safranek
9656b83a03
Add ECDSA-KAT CAST.
2021-10-26 20:24:25 -05:00
John Safranek
e67bbf7526
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-10-26 20:24:25 -05:00
John Safranek
7f64fc4efb
Move the TLSv1.3 KDF into wolfCrypt with the other KDFs.
2021-10-26 20:24:25 -05:00
John Safranek
38064bb396
Add HMAC-SHA2-512 to the TLSv1.2 PRF.
2021-10-26 20:24:25 -05:00
John Safranek
c7ea896759
Add prototype for the ssh-kdf test in the wolfCrypt test.
2021-10-26 20:24:24 -05:00
John Safranek
de4af35f89
KDF Update
...
1. Move wolfSSH's KDF into wolfCrypt.
2021-10-26 20:24:24 -05:00
John Safranek
a49125e613
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-10-26 20:24:24 -05:00
John Safranek
df859d30f3
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-10-26 20:24:24 -05:00
John Safranek
f1bd79ac50
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-10-26 20:24:24 -05:00
Chris Conlon
5810e45cb7
fix CAVP selftest v2 build error in test.c
2021-10-26 10:33:05 -06:00
Sean Parkinson
905683c98c
Merge pull request #4496 from dgarske/sniffer_keywatch
...
Fix for sniffer key watch callback
2021-10-26 09:55:17 +10:00
Sean Parkinson
6070981366
Merge pull request #4490 from dgarske/static_mem_unittest
...
Add CTX static memory API unit tests
2021-10-26 09:52:14 +10:00
David Garske
aa72f0685d
Merge pull request #4499 from SparkiDev/dec_ku_len
...
KeyUsage dcoding: Ensure data length is 1 or 2
2021-10-25 15:11:18 -07:00