3658 Commits

Author SHA1 Message Date
toddouska
f742693062
Merge pull request #2867 from SparkiDev/aes-ccm-aesni
For CCM using AES-NI, do 4 blocks at a time if possible
2020-04-07 13:03:23 -07:00
Sean Parkinson
9c67bc2864 For CCM using AES-NI, do 4 blocks at a time if possible 2020-04-06 11:11:28 +10:00
toddouska
8128a269f3
Merge pull request #2876 from SparkiDev/sp_arm64
Improve speed of AArch64 assembly
2020-04-02 14:26:48 -07:00
toddouska
86adb7f9c5
Merge pull request #2873 from SparkiDev/aes_small
Smaller table version of the AES encrypt/decrypt
2020-04-02 09:50:58 -07:00
toddouska
5df5ab5931
Merge pull request #2862 from dgarske/iar_ropi
Support for IAR with position independent code (ROPI)
2020-04-02 09:49:00 -07:00
toddouska
06442c410d
Merge pull request #2861 from dgarske/zynqmp
Fixes for Xilinx SDK and Zynq UltraScale+ MPSoC
2020-04-02 09:46:48 -07:00
Sean Parkinson
df1819b79f Improve speed of AArch64 assembly
Improve point_dbl and point_dbl_n for all platforms.
2020-04-01 15:06:50 +10:00
David Garske
47d1cb8415 Changes to support IAR with position independent code (ROPI). Updated example wolfSSL IAR project to use "ropi" (Position indipendance for code and read-only data). 2020-03-31 08:17:09 -07:00
Sean Parkinson
9339808ea1 Smaller table version of the AES encrypt/decrypt
Use WOLFSSL_AES_SMALL_TABLES.
Much slower. Decrypt much slower then encrypt.
2020-03-27 15:53:01 +10:00
toddouska
ddb4b5eb89
Merge pull request #2872 from SparkiDev/rsa_pub_fix
Fix performance of RSA public key ops with TFM
2020-03-26 11:56:23 -07:00
toddouska
16fa1a4747
Merge pull request #2855 from JacobBarthelmeh/PKCS12
maintenance to PKCS12 create for outputting encrypted bundles
2020-03-26 10:41:04 -07:00
Sean Parkinson
c82531a41a Fix performance of RSA public key ops with TFM
Have a constant and non-constant time modular exponentation available in
tfm.c.
Call the non-constant time version explicitly when performing RSA public
key mod exp.
2020-03-26 17:33:07 +10:00
David Garske
a6034a38c7 Fix for building with WOLFSSL_SMALL_STACK_CACHE only (no WOLFSSL_SMALL_STACK). 2020-03-25 16:04:45 -07:00
David Garske
70773f3b3e Added "WOLFSSL_ARMASM" ifdef checks on ARMv8 port files. 2020-03-25 12:54:40 -07:00
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
David Garske
2706d6d48a Improve the benchmark to use snprintf then printf. Resolve issue showing results with xil_printf. 2020-03-20 12:34:08 -07:00
David Garske
3127a7e9e5 Fixes for building with bare-metal on Xilinx SDK with zynqmp. Added Zynqmp benchmark timer support. 2020-03-20 12:22:47 -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
Jacob Barthelmeh
ce6aeebdb4 fixes for static analysis checks 2020-03-19 16:34:02 -06: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
09dedfbe17 maintenance to PKCS12 create for outputting encrypted bundles 2020-03-18 12:00:57 -06: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