Commit Graph

4640 Commits

Author SHA1 Message Date
Sean Parkinson
c4afce76f7 test.c: don't check key NULL when not small stack 2021-02-05 14:57:00 +10:00
Guido Vranken
f833d96ba3 Check the right size before freeing flatSignedAttribs in PKCS7_EncodeSigned 2021-02-02 10:15:00 -08:00
David Garske
5577a2215f Merge pull request #3708 from JacobBarthelmeh/Testing 2021-02-01 10:11:16 -08:00
Jacob Barthelmeh
a7066a9be2 add stdint to test.c if using non blocking ecc test 2021-02-01 23:07:03 +07:00
Jacob Barthelmeh
fd01f79f86 add guard for rsa public only 2021-01-31 23:43:53 +07:00
Daniel Pouzzner
d14f4f8451 wolfcrypt/test/test.c: smallstack refactor of openssl test routines. 2021-01-30 00:01:15 -06:00
Daniel Pouzzner
d0b20f90d5 wolfcrypt/test/test.c: use HEAP_HINT, not NULL, for XREALLOC() too. 2021-01-29 20:16:51 -06:00
Daniel Pouzzner
8c0100e60e blake2b.c/blake2s.c: refactor so that smallstack code paths match performance of !smallstack path. 2021-01-29 17:19:42 -06:00
Daniel Pouzzner
a332cf36b5 add DYNAMIC_TYPE_AES and DYNAMIC_TYPE_CMAC to enum in types.h, and use these where appropriate;
in test.c: use use HEAP_HINT, not NULL in XMALLOC/XFREE calls;

fix a couple typos in aes_test() re WOLFSSL_ASYNC_CRYPT;

add various missing WOLFSSL_SMALL_STACK_STATIC qualifiers;

and streamline old smallstack refactor on-stack declarations declarations to use the much neater [1] construct.
2021-01-29 17:17:31 -06:00
Daniel Pouzzner
0f6ae330da wolfcrypt: smallstack refactors of AES code for lkm compatibility with --enable-aesgcm=table. 2021-01-28 22:51:28 -06:00
David Garske
2bd63d27bf Fixes for PKCS7 with crypto callback (deviceId), where it was not being used for RSA and RNG. ZD 11163. 2021-01-28 09:52:13 -08:00
toddouska
f91dcb950c Merge pull request #3670 from dgarske/keil
Fix for ARM Keil MDK compiler issue with `DECLARE_VAR_INIT`.
2021-01-25 14:57:05 -08:00
toddouska
f35f57c378 Merge pull request #3683 from SparkiDev/sp_int_mont_red_1
SP math all: fix 1 word Montgomery Reduce
2021-01-25 14:47:35 -08:00
toddouska
d201820e3a Merge pull request #3687 from guidovranken/x963-export-reject-invalid-keys
Reject undefined keys (eg. state is ECC_STATE_NONE) from X963 export …
2021-01-25 14:46:59 -08:00
toddouska
cf9e4f0caf Merge pull request #3518 from julek-wolfssl/openssh-fixes-v2
Fixes for openssh
2021-01-25 14:45:56 -08:00
David Garske
05e1ee1694 Cleanup to use fixed sizes from defines for DECLARE_VAR. Resolves issue with Visual Studio and using a variable (even const) to declare an array size. 2021-01-25 09:14:12 -08:00
Guido Vranken
29f7eebef7 Reject undefined keys (eg. state is ECC_STATE_NONE) from X963 export functions
Additionally, harmonize the failure conditions of wc_ecc_export_x963 and
wc_ecc_export_x963_compressed.
2021-01-25 16:22:21 +01:00
Sean Parkinson
4f0ed55232 SP math all: fix 1 word Montgomery Reduce
May have 3 words in partial result before shifting down.
2021-01-25 10:19:27 +10:00
David Garske
fb9836ed28 Merge pull request #3678 from guidovranken/zd11556
Fix wc_ecc_sign_hash memory leak. ZD 11556.
2021-01-22 18:06:56 -08:00
David Garske
46aee19de3 Fix for Visual Studio issue with non-cost in array declaration. 2021-01-22 10:44:38 -08:00
toddouska
920c443864 Merge pull request #3250 from JacobBarthelmeh/Benchmark
add brainpool benchmark
2021-01-22 10:08:21 -08:00
Jacob Barthelmeh
6fa1556daf guard -ecc-all with HAVE_SELFTEST macro 2021-01-22 16:13:31 +07:00
Guido Vranken
905f0b1f5a Fix wc_ecc_sign_hash memory leak. ZD 11556. 2021-01-22 09:55:30 +01:00
David Garske
1ee40ad7bd Fix to always init the variable (not just when from heap). Cleanup of the DECLARE_ uses to make sure all allocations succeeded. 2021-01-21 17:12:29 -08:00
David Garske
07f459b8d7 Merge pull request #3650 from kojo1/RsaSetRNG
add wc_RsaSetRNG to doc
2021-01-21 16:21:00 -08:00
David Garske
aa64a8e835 Merge pull request #3672 from embhorn/zd11547
Fix FIPS compile errors
2021-01-21 16:08:53 -08:00
toddouska
a8cfc23683 Merge pull request #3642 from SparkiDev/ecdsa_set_k_one_loop
ECDSA set k: WOLFSSL_ECDSA_SET_K_ONE_LOOP only tries k and fails when…
2021-01-21 15:56:36 -08:00
toddouska
5837d5e8de Merge pull request #3649 from dgarske/stm_aesgcm_perf
STM32 AES GCM crypto hardware performance improvements
2021-01-21 15:55:58 -08:00
toddouska
22e6d52b7b Merge pull request #3667 from SparkiDev/sp_fixes_4
SP int: fix _sp_mul_d inclusion checks
2021-01-21 15:49:03 -08:00
toddouska
b825e51d23 Merge pull request #3664 from SparkiDev/sp_math_all_ppc64
SP math all: Fixes for PPC64 compiler
2021-01-21 15:48:34 -08:00
toddouska
848ae3e514 Merge pull request #3668 from SparkiDev/jenkins_fixes_2
Compress: fix unused vars
2021-01-21 15:46:30 -08:00
Eric Blankenhorn
fd8527c15e Fix FIPS compile errors 2021-01-21 15:27:42 -06:00
Jacob Barthelmeh
b418936f72 account for FIPS and g++ builds 2021-01-22 04:21:23 +07:00
Jacob Barthelmeh
177f4aecb6 add all curves to benchmark 2021-01-22 03:20:41 +07:00
Jacob Barthelmeh
e3fa462d72 add brainpool benchmark of key generation 2021-01-22 02:55:26 +07:00
JacobBarthelmeh
fe37137f12 add brainpool benchmark 2021-01-22 02:44:11 +07:00
David Garske
17f101ef13 Fix for ARM Keil MDK compiler issue with DECLARE_VAR_INIT. 2021-01-20 16:57:30 -08:00
Sean Parkinson
55be60a63e Compress: fix unused vars
configure: C_EXTRA_FLAGS="-fdebug-types-section -g1" --disable-memory
--enable-mcapi --enable-ecc --enable-sha512 --with-libz
2021-01-20 13:09:43 +10:00
Sean Parkinson
e3182ff06e SP int: fix _sp_mul_d inclusion checks
configuration: --disable-asn --disable-filesystem --disable-shared --enable-cryptonly --enable-sp=smallrsa2048 --enable-sp-math --disable-dh --disable-ecc --disable-sha224 --enable-rsavfy --enable-rsapss
2021-01-20 12:38:10 +10:00
David Garske
9044f709c1 Add support for STM32_AESGCM_PARTIAL build option to speedup platforms that allow AAD header sizes that are not a multiple of 4 bytes. ZD 11364. 2021-01-19 13:54:53 -08:00
David Garske
ea5af87de3 Revert of uint32_t and uint8_t changes in PR #3658, which caused warnings. 2021-01-19 13:54:26 -08:00
David Garske
9ea5041d9d Benchmark for GMAC (AES GCM GHASH). 2021-01-19 13:42:25 -08:00
Sean Parkinson
523119289b SP math all: Fixes for PPC64 compiler 2021-01-19 21:30:36 +10:00
Sean Parkinson
7d869a43b4 ECDSA set k: WOLFSSL_ECDSA_SET_K_ONE_LOOP only tries k and fails when it fails 2021-01-19 14:07:03 +10:00
Sean Parkinson
949af909bf SP int: make sp_copy more available 2021-01-19 11:01:00 +10:00
Sean Parkinson
6a5e802cc4 Disable algs: fix code to compile with various algs off/on
benchmark.c: Only X25519/Ed25519/X448/Ed448 now compiles
asn.c/asn.h: Only DSA now compiles
2021-01-19 09:54:21 +10:00
toddouska
5b7e6ccc14 Merge pull request #3613 from SparkiDev/sp_rand_prime_len
SP rand_prime: fix length check
2021-01-18 15:23:15 -08:00
toddouska
267b00e0a2 Merge pull request #3620 from haydenroche5/zd11434
Clamp the normalization value at the end of sp_mont_norm.
2021-01-18 15:21:03 -08:00
toddouska
85faf974aa Merge pull request #3621 from SparkiDev/sp_mac_arm64
SP arm64 MAC: stop non-ct mod inv from using x29
2021-01-18 15:19:46 -08:00
toddouska
87a0ee5ef4 Merge pull request #3622 from SparkiDev/sp_int_fixes_2
SP math all: doco fix and don't assign 0 to o
2021-01-18 15:19:06 -08:00