Commit Graph

4091 Commits

Author SHA1 Message Date
David Garske
47d5f6f624 Merge pull request #3714 from SparkiDev/sp_int_rsavfy 2021-02-09 07:28:40 -08:00
Daniel Pouzzner
bdd4ceb445 aes.c: fix overwide code text in wc_AesCcmEncrypt(). 2021-02-08 21:50:29 -06:00
Sean Parkinson
763f388471 SP int: get rsavfy and rsapub working again 2021-02-09 09:58:23 +10:00
Daniel Pouzzner
7a583d5b4b aesccm_test(): test for (and require) BAD_FUNC_ARG when in or out pointer to wc_AesCcm{En,De}crypt() is null and inSz > 0. 2021-02-08 16:43:38 -06:00
Daniel Pouzzner
b8a019dedd AES-CCM: allow null payload buffers in wc_AesCcmEncrypt() and wc_AesCcmDecrypt() when inSz is zero, and add to aesccm_test() a test for this, tolerating early BAD_FUNC_ARG (for FIPS and arch-specific 3rd party code), and a test for the zero-length string, that must succeed. 2021-02-08 16:34:09 -06:00
David Garske
dda4c3b3c4 Merge pull request #3724 from embhorn/zd11646
Move var declaration to top
2021-02-08 11:09:28 -08:00
Sean Parkinson
36d124ed2f Merge pull request #3730 from guidovranken/zd11650
SP math: Better error propagation
2021-02-08 14:17:43 +10:00
Guido Vranken
358dbd5090 _sp_exptmod_base_2: Break out of loops on error 2021-02-08 00:09:29 +01:00
Sean Parkinson
2933db8915 Merge pull request #3729 from guidovranken/zd11649
SHA 256,512: Only write hash if no error has occurred
2021-02-08 08:47:51 +10:00
Guido Vranken
bc707d67c3 SP math: Better error propagation
ZD 11650
2021-02-06 09:09:41 +01:00
Guido Vranken
3fd2647383 SHA 256,512: Only write hash if no error has occurred
ZD 11649
2021-02-06 08:15:30 +01:00
David Garske
70b382e6cf Fix for PKCS11 not properly exporting the public key due to a missing key type field. This broke due to changes in PR #3687. Also resolved mismatch of enum types for the key type check. 2021-02-05 11:49:31 -08:00
Eric Blankenhorn
e4d79bf49e Move var declaration to top 2021-02-05 08:41:42 -06:00
Guido Vranken
f833d96ba3 Check the right size before freeing flatSignedAttribs in PKCS7_EncodeSigned 2021-02-02 10:15:00 -08: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
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
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
Guido Vranken
905f0b1f5a Fix wc_ecc_sign_hash memory leak. ZD 11556. 2021-01-22 09:55:30 +01:00
David Garske
07f459b8d7 Merge pull request #3650 from kojo1/RsaSetRNG
add wc_RsaSetRNG to doc
2021-01-21 16:21:00 -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
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
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
toddouska
1e9394d5a8 Merge pull request #3627 from elms/EVP/ofb_rc4_size
EVP: return proper cipher type and block size
2021-01-18 15:13:55 -08:00
toddouska
d514cc31b3 Merge pull request #3631 from SparkiDev/rsa_vfy_only_sp_fixes
RSA: verify only build fixes
2021-01-18 13:38:52 -08:00
toddouska
3bae6e2dc2 Merge pull request #3633 from SparkiDev/ecc_gen_z_fix
ECC gen z: convert blinding value to Montgomery form before using
2021-01-18 13:36:13 -08:00
Sean Parkinson
ac76ef8ee7 Curve25519: replace uint64_t with word64
Remove usages of stdint.h types
Added a sword type for signed words.
2021-01-18 17:30:36 +10:00
John Safranek
0ac43bb095 Merge pull request #3618 from haydenroche5/ocsp_self_signed_issue
Modify ParseCertRelative to ensure issuerKeyHash gets parsed and copi…
2021-01-14 14:22:06 -08:00
Takashi Kojo
e21fddf553 add wc_RsaSetRNG to doc 2021-01-14 10:42:49 +09:00
Daniel Pouzzner
1e49bc2e82 asn.c/asn.h: fix --disable-ecc --enable-dsa. 2021-01-13 13:55:06 -06:00
Daniel Pouzzner
f8013580df sp_int.c: fix 4 instances of "Value stored to 'o' is never read" found by LLVM9 scan-build. 2021-01-12 15:01:28 -06:00