Commit Graph

1987 Commits

Author SHA1 Message Date
John Safranek
ce1e987650 FIPS Revalidation
1. Bug fixes to AES-GCM. Separated out the internal and external IV set functions.
2018-03-22 15:50:54 -07:00
John Safranek
6108540c7c FIPS Revalidation
1. Add new APIs for AES-GCM so it can manage the IV per SP 800-38D.
2. Add new APIs for AES-CCM so it can manage the IV, similar to the behavior in AES-GCM.
3. Add new APIs for GMAC that use the new AES-GCM APIs.
2018-03-22 15:50:54 -07:00
John Safranek
b92b8222ed Test Fixes
1. Added error code for ECDHE FIPS KAT failure.
2018-03-22 15:50:54 -07:00
John Safranek
9d4de6908c Test Fixes
1. AesGcmEncrypt_ex requires the RNG, remove function if RNG disabled.
2. Fix a couple function name changes in the example server.
3. Removed the old FIPS wrapping added to dh.h, was redundant.
4. Move include of random.h in the aes.h file.
5. Fix where ecc.c was being left out of old FIPS builds.
6. Exclude the AES-GCM internal IV test case when building without the RNG.
7. Fix api test where AES-GCM Encrypt was called with a too-long IV in old FIPS mode. Non-FIPS and new FIPS are allowed longer IVs.
2018-03-22 15:50:54 -07:00
John Safranek
84e36f012a FIPS Revalidation
1. AES-GCM encrypt IV length allowed to be 8-bits.
2018-03-22 15:50:54 -07:00
John Safranek
cc02098760 FIPS Revalidation
1. Update the const data and code segment tags for the Windown builds.
2018-03-22 15:50:54 -07:00
John Safranek
e3ea7e1efc FIPS Revalidation
1. Enabled ECC Cofactor DH for the FIPSv2 build.
2. Updated the wolfCrypt HMAC-SHA-3 test to leave out the set of test cases that use the four-byte key in FIPS mode.
2018-03-22 15:50:54 -07:00
John Safranek
5c452f26d7 AES-GCM
1. Updated the wolfCrypt GMAC test to leave out the test case with the 15-byte tag when building for FIPS.
2. Replace tabs with spaces.
2018-03-22 15:50:54 -07:00
John Safranek
94835b2c1b FIPS Revalidation
1. Updated CMAC to allow tag length from 4 to 16 bytes, inclusive.
2018-03-22 15:50:54 -07:00
John Safranek
2683fb29df FIPS Revalidation
1. Added new AES-GCM Encrypt API for FIPS where the IV is generated internally.
2. Fix the AES-NI guard flags so it can be used when FIPS enabled.
2018-03-22 15:50:54 -07:00
John Safranek
80e589c7d9 FIPS Revalidation
1. Added CMAC to the boundary.
2. Added DHE to the boundary.
2018-03-22 15:50:54 -07:00
John Safranek
8576dc4a6c FIPS Update
1. Moved the rest of the FIPS algorithms to FIPSv2.
2. Updated the fips-check and autogen scripts.
3. Updated the automake include for the crypto files.
4. Updated the example server to use the wolfSSL API and wolfSSL-based OpenSSL compatibility layer.
5. Added error code for the SHA-3 KAT.
6. Updated an test case in the API test for AES-GCM encrypt that is now considered a success case, but the FIPS mode was still treating as a failure.
2018-03-22 15:50:54 -07:00
John Safranek
c56c2ea8e4 FIPS Update
1. Move SHA-224 and SHA-256 into FIPSv2.
2. Move HMAC into FIPSv2.
3. Move Hash_DRBG into FIPSv2.
2018-03-22 15:50:54 -07:00
John Safranek
5cc93bdda4 FIPS Update
1. Add SHA-3 to the src/include.am so that it is always included in FIPSv2.
2. Tweak the SHA-3 header to follow the new FIPS pattern.
2018-03-22 15:50:54 -07:00
John Safranek
786c1ef956 AES-CCM FIPS
1. Add new error code for the AES-CCM FIPS KAT failure.
2. When enabling FIPSv2, force enable AES-CCM.
2018-03-22 15:50:53 -07:00
toddouska
aee6f4d0ca Merge pull request #1457 from dgarske/base16
Base16/64 improvements
2018-03-22 15:14:57 -07:00
toddouska
a92696edec Merge pull request #1454 from dgarske/noprivkey
Support for not loading a private key when using `HAVE_PK_CALLBACKS`
2018-03-22 12:47:22 -07:00
David Garske
3bf325290d Base16/64 improvements:
* Add define `WOLFSSL_BASE16` to explicitly expose base16 support.
* Add `./configure --enable-base16` option (disabled by default in configure, but enabled in coding.h when required internally).
* Added base16 tests in test.c `base16_test`.
* Enabled base64 decode tests when `WOLFSSL_BASE64_ENCODE` is not defined.
2018-03-22 10:36:56 -07:00
toddouska
104f7a0170 Merge pull request #1451 from JacobBarthelmeh/Optimizations
Adjust X509 small build and add more macro guards
2018-03-21 15:15:27 -07:00
toddouska
f3d0879ed7 Merge pull request #1449 from dgarske/asn_nullterm
ASN improvements for building header/footer in `wc_DerToPemEx`
2018-03-21 15:13:46 -07:00
toddouska
2a356228be Merge pull request #1445 from SparkiDev/wpas_fix
Fixes for wpa_supplicant
2018-03-21 15:11:43 -07:00
David Garske
dbb34126f6 * Added support for not loading a private key for server or client when HAVE_PK_CALLBACK is defined and the private PK callback is set. Tested with all cipher suites, TLS 1.2/1.3, client/server certs, RSA/ECC/ED25519.
* Added PK callback context tests for client/server examples (`SetupPkCallbackContexts`).
* Added new test define for `TEST_PK_PRIVKEY` to allows simulating hardware based private key.
* Added new test.h function for loading PEM key file and converting to DER (`load_key_file`).
* Added way to get private key signature size (`GetPrivateKeySigSize`).
* Added new ECC API `wc_ecc_sig_size_calc` to return max signature size for a key size.
* Added inline comments to help track down handshake message types.
* Cleanup of RSS PSS terminating byte (0xbc) to use enum value.
* Fixed bug with PK callback for `myEccVerify` public key format.
* Fixed bug with PK callback for ED25519 verify key buffer in DoServerKeyExchange.
2018-03-21 11:27:08 -07:00
Jacob Barthelmeh
90f97f4a5a fix for unused variable 2018-03-21 09:16:43 -06:00
Jacob Barthelmeh
0aa3b5fa0e macros for conditionally compiling code 2018-03-21 00:09:29 -06:00
Jacob Barthelmeh
087df8f1cd more macro guards to reduce size 2018-03-20 17:15:16 -06:00
Jacob Barthelmeh
4d65e4cc1e add WOLFSSL_NO_DH186 macro to optionally compile out DH186 function 2018-03-20 15:31:20 -06:00
Jacob Barthelmeh
df6ea54cd5 add support for PKCS8 decryption to OPENSSL_EXTRA_X509_SMALL build 2018-03-20 15:06:35 -06:00
David Garske
764aec071c Further improvement to the null termination and newline logic in wc_DerToPemEx. 2018-03-19 22:58:18 -07:00
David Garske
59aa893260 Cleanup ECC point import/export code. Added new API wc_ecc_import_unsigned to allow importing public x/y and optional private as unsigned char. Cleanup wc_ecc_sign_hash to move the hardware crypto code into a separate function. Added missing tests for wc_ecc_export_public_raw, wc_ecc_export_private_raw and new test for wc_ecc_import_unsigned. 2018-03-19 13:28:57 -07:00
toddouska
1040cf9caa Merge pull request #1437 from dgarske/eccrsrawtosig
Added new ECC API `wc_ecc_rs_raw_to_sig`
2018-03-19 09:12:39 -07:00
toddouska
7ce2efd572 Merge pull request #1431 from JacobBarthelmeh/Optimizations
more aes macro key size guards
2018-03-19 09:07:05 -07:00
Sean Parkinson
b325e0ff91 Fixes for wpa_supplicant 2018-03-19 11:46:38 +10:00
John Safranek
465f1d491f Merge pull request #1443 from cconlon/dhagree
check z against 1 in wc_DhAgree()
2018-03-17 20:15:31 -07:00
David Garske
250cd3b7eb Merge pull request #1433 from SparkiDev/sp_size
Fix size on Intel and improve 32-bit C code performance
2018-03-16 17:05:46 -07:00
Chris Conlon
3118c8826b check z against 1 in wc_DhAgree() 2018-03-16 15:59:48 -06:00
JacobBarthelmeh
f70351242b Merge pull request #1432 from kojo1/mdk5
3.14.0 update on mdk5 pack
2018-03-15 14:47:14 -06:00
Jacob Barthelmeh
a207cae0f4 add some more macro guards to reduce size 2018-03-14 17:24:23 -06:00
Sean Parkinson
4d1986fc21 Improve speed of 32-bit C code 2018-03-15 08:33:04 +10:00
David Garske
9ccf876a21 Added new ECC API wc_ecc_rs_raw_to_sig to take raw unsigned R and S and encodes them into ECDSA signature format. 2018-03-14 10:59:25 -07:00
Takashi Kojo
1de291be8d macro INLINE 2018-03-14 07:14:07 +09:00
Sean Parkinson
c4dfa41088 SP improvements
Tag functions to not be inlined so llvm doesn't make huge builds.
Add sp_mod to support new DH key generation function.
2018-03-13 14:16:48 +10:00
Jacob Barthelmeh
8fb3ccacb7 opensslextra fixs and warning for unused variable 2018-03-12 18:05:24 -06:00
Jacob Barthelmeh
6b04ebe3a4 fix for compiling with different build settings 2018-03-12 16:12:10 -06:00
Jacob Barthelmeh
fa21fb4a27 more aes macro key size guards 2018-03-12 15:44:48 -06:00
Jacob Barthelmeh
8fdb99443a fix for build with NTRU and certgen 2018-03-09 14:21:43 -07:00
toddouska
0ab4166a80 Merge pull request #1421 from JacobBarthelmeh/Optimizations
trim out more strings and fix DN tag
2018-03-08 14:03:10 -08:00
Chris Conlon
0ac833790d check q in wc_CheckPubKey_ex() if available in DhKey 2018-03-08 10:17:52 -07:00
Chris Conlon
6f95677bb8 add wc_DhSetKey_ex() with support for q and SP 800-56A 2018-03-08 09:36:44 -07:00
Jacob Barthelmeh
a9c6385fd1 trim out more strings and fix DN tag 2018-03-07 10:35:31 -07:00
David Garske
a4000ba196 Merge pull request #1418 from SparkiDev/sp_armasm
Add assembly code for ARM and 64-bit ARM
2018-03-07 09:18:16 -08:00