Commit Graph

3640 Commits

Author SHA1 Message Date
Jacob Barthelmeh
59ab600d76 refactor decrypt content with PKCS12 and fix for AES-256 + HMAC SHA256 case 2020-03-24 22:23:44 -06:00
toddouska
26f539400a Merge pull request #2866 from SparkiDev/curve448_gcc_bug
Curve448 - 128-bit impl workaround for compiler
2020-03-24 09:55:43 -07:00
toddouska
e66334e56b Merge pull request #2865 from SparkiDev/sp_cast_fix
Fix casting warning in SP when mp_digit < sp_digit
2020-03-24 09:52:26 -07:00
Sean Parkinson
c95e7f88aa Curve448 - 128-bit impl workaround for compiler
Old gcc compilers can keep track of the 128-bit multiplication and left
shift results' size.
Split all multiplication and left shift results into separate variables.
Add/subtract into the correct variable at end.
Don't want variable declarations after statements so reduce doesn't use
'tr' anymore.
2020-03-24 16:28:14 +10:00
Sean Parkinson
a7d265bf46 Fix casting warning in SP when mp_digit < sp_digit 2020-03-24 12:41:25 +10:00
David Garske
7fabd74a90 Merge pull request #2859 from SparkiDev/tfm_ec_invmod_ct
Constant time EC map to affine for private operations
2020-03-23 19:16:45 -07:00
toddouska
9b8752e314 Merge pull request #2858 from SparkiDev/netscape_cert_ext
Recognise Netscape Certificate Type extension
2020-03-19 16:33:25 -07:00
toddouska
0c3667ba93 Merge pull request #2857 from SparkiDev/sp_null_check
SP fix check for NULL in EC point_new
2020-03-19 16:30:59 -07:00
toddouska
33b95b8ad7 Merge pull request #2854 from JacobBarthelmeh/Certs
add +1 for string null terminator
2020-03-19 16:24:42 -07:00
toddouska
f4a8430115 Merge pull request #2851 from JacobBarthelmeh/SanityChecks
add space for null terminator and check on header pointer
2020-03-19 16:00:57 -07:00
Sean Parkinson
1de07da61f Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign.
2020-03-20 08:59:41 +10:00
Sean Parkinson
62a593e72e Recognise Netscape Certificate Type extension
Checks the bit string is valid but doesn't store or use value.
(Some certificates have this extension as critical)
2020-03-19 12:43:03 +10:00
Sean Parkinson
c776a4219a SP fix check for NULL in EC point_new 2020-03-19 08:56:52 +10:00
Jacob Barthelmeh
2bf39307f1 add +1 for string null terminator 2020-03-18 10:25:56 -06:00
toddouska
d0767164c8 Merge pull request #2846 from SparkiDev/sp_rsa_priv_fix
Fix SP RSA private op
2020-03-17 13:28:11 -07:00
JacobBarthelmeh
9fc8c8e0b6 add space for null terminator and check on header pointer 2020-03-16 15:14:29 -07:00
JacobBarthelmeh
74781a3d45 Merge pull request #2829 from cconlon/pkcs7multioctets
PKCS7/CMS EnvelopedData support for fragmented encrypted content
2020-03-16 13:12:23 -06:00
Jacob Barthelmeh
2d950f1ab4 sanity check on IV size 2020-03-15 18:46:11 -06:00
toddouska
bcc720ef68 Merge pull request #2773 from SKlimaRA/master
Coverity issues fixes.
2020-03-13 10:20:45 -07:00
Sean Parkinson
6321eabf86 Fix SP RSA private op
tmpa - tmpb can be less than -p.
Need to conditionally add p twice.
C and multiple platform fix.
2020-03-12 09:33:52 +10:00
toddouska
87ff2fa47d Merge pull request #2839 from ejohnstown/hmac-init
HMAC Init
2020-03-06 11:05:30 -08:00
Chris Conlon
4ad8a2bacb store wc_PKCS7_DecodeEnvelopedData encryptedContentTotalSz in existing variable instead of adding another 2020-03-06 10:50:00 -07:00
John Safranek
9fe2ddacf4 HMAC Init
1. wc_HmacSetKey() has a check against the hmac's type that assumes one
has called wc_HmacInit() on the object first. In FIPS Ready builds we
do not have wc_HmacInit() in the boundary. This change removes that check
and action when making a FIPS build. The free called doesn't do anything
in the FIPS build case.
2. Initialize the Hmac's macType to WC_HASH_TYPE_NONE. Check the macType
against that rather than 0. There are some build configs where none isn't
0.
2020-03-05 13:38:02 -08:00
toddouska
59b9483cde Merge pull request #2837 from SparkiDev/sp_x64_rsa_priv
Fix SP x64 RSA Private op
2020-03-05 08:33:11 -08:00
toddouska
f24622596f Merge pull request #2827 from kaleb-himes/ZD9976
Fix infinite loop with small sha1 inputs. Thanks to Peter W. on ZD997…
2020-03-05 08:32:14 -08:00
Sean Parkinson
3707eea2f3 Fix SP x64 RSA Private op
tmpa - tmpb can be less than -p.
Need to conditionally add p twice.
2020-03-04 15:54:17 +10:00
Chris Conlon
44d2fc55e6 scan-build fixes for wc_PKCS7_DecodeEnvelopedData() 2020-03-03 10:27:22 -07:00
Chris Conlon
d8eeefb4b7 initialize explicitOctet to 0 in pwc_PKCS7_DecodeEnvelopedData() 2020-03-02 09:13:11 -07:00
Chris Conlon
debb792690 fix PKCS7 encrypted content decoding for streaming API usage 2020-02-28 17:55:19 -07:00
toddouska
805034bca3 Merge pull request #2830 from SparkiDev/sp_ff_x86_64
Improve performance of RSA/DH ops on x64
2020-02-28 09:03:22 -08:00
Sean Parkinson
441027a502 Improve performance of RSA/DH ops on x64
Focus on 3072-bit ops but others improved as well.
2020-02-28 10:42:37 +10:00
Sean Parkinson
2c6eb7cb39 Add Curve448, X448, Ed448 implementations 2020-02-28 09:30:45 +10:00
Chris Conlon
d21e370822 add support for PKCS7/CMS EnvelopedData with fragmented encrypted content 2020-02-27 14:42:57 -07:00
toddouska
c7a2510d97 Merge pull request #2823 from SparkiDev/sp_div_fix
Fix for SP x64 div
2020-02-27 12:57:35 -08:00
toddouska
b7d0b81443 Merge pull request #2818 from dgarske/rsa_sha3only
RSA with SHA-3 only and RSA 4096-bit tests
2020-02-27 12:44:29 -08:00
toddouska
6dabe82c65 Merge pull request #2814 from SparkiDev/curve25519_x64_fix
Curve25519 x64 asm: Fix negate and add fe_sq_n
2020-02-27 12:21:53 -08:00
toddouska
ed7a5b17d8 Merge pull request #2808 from dgarske/mdk5
Fix for minor typos in the MDK5 examples
2020-02-27 12:06:50 -08:00
kaleb-himes
d9e221806b Fix infinite loop with small sha1 inputs. Thanks to Peter W. on ZD9976 for the report 2020-02-27 09:39:22 -07:00
Sean Parkinson
2a5d7a2ac3 Fix for SP x64 div
Check the top half of number being divided to see if it is greater than
or equal.
If it is then the first div_word may crash as the result is more than
64-bits. So subtract modulus from the top to keep value small.
2020-02-26 10:53:35 +10:00
David Garske
da882f3912 Added wolfCrypt RSA 4096-bit test support using USE_CERT_BUFFERS_4096 build option (./configure CFLAGS="-DUSE_CERT_BUFFERS_4096"). 2020-02-23 18:40:13 -08:00
David Garske
c8e618a817 Fix build for WOLFSSL_RSA_VERIFY_ONLY. 2020-02-23 15:58:28 -08:00
David Garske
e80c696d5f Fix for RSA with SHA3 only (resolves warning with unsed RsaMGF1. 2020-02-23 13:54:48 -08:00
Sean Parkinson
c9ce065f8a Curve25519 x64 asm: Fix negate and add fe_sq_n 2020-02-21 11:37:45 +10:00
Eric Blankenhorn
b74dac6171 Fix WIN test 2020-02-20 17:28:34 -06:00
Eric Blankenhorn
b4563e6af3 Fix CFB and OFB 2020-02-20 17:28:34 -06:00
Eric Blankenhorn
a64e1540ba Adding EVP support for SHA3 2020-02-20 17:28:34 -06:00
Eric Blankenhorn
95f973a5be Adding test and dox for ERR_print_errors_cb 2020-02-20 17:28:34 -06:00
Eric Blankenhorn
936312f77e Adding ERR_print_errors_cb 2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
a0ddb05a07 change evp with cfb1 expect input size in bytes 2020-02-20 17:28:33 -06:00
Eric Blankenhorn
1a96558b6e Adding macro and XTS support functions 2020-02-20 17:28:33 -06:00