Juliusz Sosinowicz
3494218d98
Implement missing functionality for OpenVPN 2.5
2021-02-02 12:06:11 +01: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
Daniel Pouzzner
fb82114866
sp_int.c: pay attention to the return value from sp_copy(), for general hygiene and to eliminate an inlining-related warning in sp_todecimal().
2021-01-12 14:58:29 -06:00
Elms
8fec1de07c
EVP: address CTR block size
2021-01-11 12:03:01 -08:00
Elms
a6535528f3
EVP: add tests for openssl block size (including RC4)
2021-01-11 12:03:01 -08:00
Elms
0cccf58fec
EVP: return proper cipher type for AES OFB
2021-01-11 12:03:01 -08:00
Hayden Roche
a3cc4110b0
Clamp the normalization value at the end of sp_mont_norm.
2021-01-11 09:59:11 -06:00
Juliusz Sosinowicz
a745947498
Code review changes
2021-01-08 15:27:30 +01:00
Juliusz Sosinowicz
23a4d64caf
wolfSSL_EVP_PKEY_set1_EC_KEY should generate PKCS8 internal DER buffer
...
This PKCS8 buffer should include both the private and the public parts of the key.
2021-01-08 15:27:30 +01:00
Juliusz Sosinowicz
cd4affddac
Set ecc_key.rng when using ECC_TIMING_RESISTANT
...
Set ecc_key.rng to either a local rng struct or the globalRNG object when using ECC_TIMING_RESISTANT
Add helpful logs to some ecc functions
2021-01-08 15:18:00 +01:00
Sean Parkinson
f955c92008
ECC gen z: convert blinding value to Montgomery form before using
2021-01-07 11:30:58 +10:00
John Safranek
d4e13796c2
M1 Support
...
We separate out 64-bit desktop support based on the Intel check. With
the advent of the new Apple chip, ARM can also be a desktop processor.
Detect it like we do the Intel 64-bit, and treat it similarly with
respect to fast and normal math.
2021-01-06 09:21:07 -08:00
Sean Parkinson
cd0670cbd7
RSA: verify only build fixes
...
configuration: --disable-ecc --disable-dh --disable-aes --disable-aesgcm
--disable-sha512 --disable-sha384 --disable-sha --disable-poly1305
--disable-chacha --disable-md5 --disable-sha3 --enable-cryptonly
--disable-inline --enable-rsavfy --disable-asn --disable-oaep
--disable-rng --disable-filesystem --enable-sp=rsa2048 --enable-sp-math
Fixes to make code build again.
2021-01-06 11:58:15 +10:00
Sean Parkinson
1b94309a6c
SP math all: doco fix and don't assign 0 to o
...
o is not used after that point so no need to zero it.
2021-01-05 10:40:34 +10:00
Sean Parkinson
2a2b194d71
SP arm64 MAC: non-ct mod inv not use so many registers
2021-01-05 10:23:14 +10:00