Commit Graph

8088 Commits

Author SHA1 Message Date
Daniel Pouzzner
75bd1af110 Merge pull request #7179 from philljj/fix_ext_xmss_sigsleft
Fix ext_xmss SigsLeft.
2024-01-31 14:33:18 -05:00
Daniel Pouzzner
3d3c07944e wolfcrypt/src/ecc.c: fix logic around WOLF_CRYPTO_CB_ONLY_ECC in wc_ecc_shared_secret(), _ecc_make_key_ex(), wc_ecc_sign_hash(), and wc_ecc_verify_hash() (defects reported by -Wreturn-type, -Wmaybe-uninitialized around err, and a failure of ecc_onlycb_test()). 2024-01-29 22:30:33 -06:00
Daniel Pouzzner
67bbe1e1bb wolfcrypt/src/rsa.c: in wc_RsaFunction_ex(), if defined(WOLF_CRYPTO_CB_ONLY_RSA), add clause to return NO_VALID_DEVID if key->devId == INVALID_DEVID. fixes "control reaches end of non-void function" in PRB-single-flag.txt. 2024-01-29 22:00:20 -06:00
David Garske
de91add3d9 Merge pull request #7182 from SparkiDev/armv8_32_align_chacha20_asm
ARMv8 32 bit ChaCha20 ASM: loading from in/out
2024-01-29 14:59:56 -08:00
David Garske
de4a6f9e00 Merge pull request #7167 from SparkiDev/rsa_dec_check_d
RSA Decryption: check private value after decryption
2024-01-29 14:01:27 -08:00
David Garske
a6326bd80a Merge pull request #7183 from SparkiDev/regression_fixes_9
Regression testing fixes
2024-01-29 07:42:34 -08:00
David Garske
60de159707 Merge pull request #7176 from danielinux/iotsafe-sha384
IoT-Safe sha384+sha512 support
2024-01-29 07:35:50 -08:00
Sean Parkinson
13591dcae8 Regression testing fixes
internal.c: NO_CERT, privateKeySz not used.
./configure --disable-shared --disable-asn --disable-rsa --disable-ecc
--enable-psk

sp_int.c: fix when sp_gcm is available
./configure --disable-shared  --disable-shared --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 --disable-sp-asm
--enable-sp-math
2024-01-29 23:05:46 +10:00
Sean Parkinson
4585c6d508 ARMv8 32 bit ChaCha20 ASM: loading from in/out
Input and output buffers come from the application and are not
necessarily alighed.
Use instructions that allow unaligned access to these buffers.
2024-01-29 11:03:40 +10:00
jordan
947528ee16 Fix ext_xmss SigsLeft. 2024-01-26 17:07:43 -06:00
JacobBarthelmeh
3db58af4f8 Merge pull request #7173 from gojimmypi/PR-Espressif-SHA-updates
Improved Espressif SHA HW/SW selection
2024-01-26 11:51:15 -07:00
Daniele Lacamera
72e34a829a Fixed wrong define 2024-01-26 16:35:08 +01:00
JacobBarthelmeh
db3873ff40 Merge pull request #7172 from bandi13/fixUninitVar
Fix compilation errors about uninitialized variables
2024-01-26 08:32:41 -07:00
Daniele Lacamera
6dab75368d [IoT-Safe] Add support sha384 + sha512 2024-01-26 10:20:03 +01:00
gojimmypi
ac6181d7ae Improved Espressif SHA HW/SW selection 2024-01-25 15:23:58 -08:00
JacobBarthelmeh
4c7f038149 Merge pull request #7161 from SparkiDev/xmss
XMSS implementation
2024-01-25 08:41:13 -08:00
Andras Fekete
4971b9a567 Fix compilation errors about uninitialized variables
When compiling with '--enable-all CFLAGS=-Og' there were a ton of errors that needed fixing.
2024-01-25 09:49:30 -05:00
Sean Parkinson
a5961907b0 XMSS implementation
Supporting code for wolfSSL C implementation of XMSS.
2024-01-25 11:21:39 +10:00
Sean Parkinson
999f84518c RSA Decryption: check private value after decryption 2024-01-24 16:09:15 +10:00
JacobBarthelmeh
478c0633e7 Merge pull request #7159 from dgarske/features_20240122
Add PK Callback CMake support. Document `wc_RsaDirect`
2024-01-23 13:08:03 -08:00
David Garske
fa87e227b4 Restore useful comments above wc_RsaDirect in the .c file. 2024-01-23 08:39:35 -08:00
JacobBarthelmeh
78f7454043 Merge pull request #7154 from anhu/EccKeyParamCopy_error
Fix missing heap hint in `EccKeyParamCopy`
2024-01-23 08:11:35 -08:00
David Garske
3b20f49544 Merge pull request #7139 from douzzer/20230118-fix-_sp_mont_red-WOLFSSL_NO_CT_OPS
20230118-fix-_sp_mont_red-WOLFSSL_NO_CT_OPS
2024-01-23 07:18:25 -08:00
David Garske
3d62896137 Add documentation for wc_RsaDirect. 2024-01-22 13:41:25 -08:00
David Garske
dcc946575b Fix missing heap hint in EccKeyParamCopy. The XFREE is required or it will leak memory allocated in ASNToHexString. This only applies to WOLFSSL_CUSTOM_CURVES && !WOLFSSL_ASN_TEMPLATE. 2024-01-22 13:18:24 -08:00
Sean Parkinson
b0de0a1c95 Merge pull request #7143 from julek-wolfssl/zd/17303
EVP_Cipher: correct parameter checking
2024-01-23 07:15:20 +10:00
Andras Fekete
5c75ca539e Check NULL input 2024-01-22 12:45:42 -05:00
Anthony Hu
ccbb726859 Remove dead code in EccKeyParamCopy
Found with:

./configure --enable-ecccustcurves --enable-asn=original CFLAGS=-DWOLFSSL_ECC_CURVE_STATIC
2024-01-22 10:27:59 -05:00
Juliusz Sosinowicz
fc7143a8f4 Code review 2024-01-22 16:08:06 +01:00
David Garske
6b8280f663 Merge pull request #7144 from bandi13/20240119-codesonar
20240119 codesonar
2024-01-19 09:35:02 -08:00
David Garske
a3a7012c81 Merge pull request #7136 from jpbland1/x509-new-ex
add heap hint support for a few of the x509 functions
2024-01-19 09:29:47 -08:00
Andras Fekete
dbc209d8ea Always initialize 'decryptedKey'
Warning 750167.5627928
2024-01-19 10:58:29 -05:00
Andras Fekete
2c162ffb97 Make sure aes->rounds is initialized
Warning 684346.5627323
2024-01-19 10:39:33 -05:00
Andras Fekete
726e7026cb Uninitialized variable because we don't check return value
Warning 544870.5627882
2024-01-19 10:31:20 -05:00
Juliusz Sosinowicz
e438131a3b EVP_Cipher: correct parameter checking
EVP_Cipher(ctx, NULL, NULL, 0) is a valid call for all algorithms. For none-AEAD it results in a no-op.
2024-01-19 12:32:17 +01:00
David Garske
ac81d9d29c Merge pull request #7110 from Frauschi/pq_secure_element
PQC: add CryptoCb support for PQC algorithms
2024-01-18 13:29:28 -08:00
Anthony Hu
9be390250d Adding support for dual key/signature certificates. (#7112)
Adding support for dual key/signature certificates with X9.146. Enabled with `--enable-dual-alg-certs` or `WOLFSSL_DUAL_ALG_CERTS`.
2024-01-18 13:20:57 -08:00
Tobias Frauenschläger
4d259da60a PQC: CryptoCb support for KEM algorithm Kyber
Add support for crypto callback and device id for all three Kyber PQC KEM
function calls.

Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
2024-01-18 17:02:49 +01:00
Tobias Frauenschläger
8e6d151403 PQC: CryptoCb support for signature algorithms
Add initial support of the crypto callback API to the two PQC signature
algorithms Dilithium and Falcon. This ultimatelly enables the usage of
external hardware modules (e.g. secure elements) for these algorithms.

Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
2024-01-18 17:02:38 +01:00
Daniel Pouzzner
9d56de200e wolfcrypt/src/sp_int.c: in _sp_mont_red(), gate calls to ctMaskIntGTE() on !WOLFSSL_NO_CT_OPS. 2024-01-18 00:36:52 -06:00
John Bland
41ea1109ec update uses of wolfSSL_X509_new and wolfSSL_X509_d2i
where heap doesn't require a new ex function or struct field to avoid size increase
2024-01-17 18:46:24 -05:00
David Garske
4f8fd98d0d Merge pull request #7109 from Frauschi/falcon_compat
PQC: Update Falcon support to match OQS
2024-01-17 14:18:32 -08:00
David Garske
5ef6ed56dc Merge pull request #7135 from lealem47/returnParity
Return correct error code in TEMPLATE DecodeECC_DSA_Sig_Ex
2024-01-17 12:34:52 -08:00
Tobias Frauenschläger
b2888a9467 Update Falcon support to match OQS
Update the OIDs and related variables to match the current OQS values.

Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
2024-01-17 16:54:26 +01:00
Lealem Amedie
cbc8e98876 Return correct error code in TEMPLATE DecodeECC_DSA_Sig_Ex 2024-01-17 08:49:09 -07:00
David Garske
11029127df Merge pull request #7119 from JacobBarthelmeh/crl
support for RSA-PSS signatures with CRL
2024-01-16 15:23:16 -08:00
David Garske
7a77d64d56 Merge pull request #7059 from bigbrett/cryptocb-oneshot-cmac
Add cryptoCb hook to one-shot CMAC functions
2024-01-16 12:17:05 -08:00
Brett Nicholas
abbf9f2b77 Add cryptoCb hooks to one-shot CMAC functions; add CMAC coverage to cryptoCb tests; add context argument to CMAC generate_ex 2024-01-15 11:52:17 -07:00
JacobBarthelmeh
5fc71161e9 add crl rsa pss for asn=original 2024-01-11 16:50:16 -07:00
Sean Parkinson
8c6de41eb9 Merge pull request #7051 from JacobBarthelmeh/mb
fix and enhancement for AES-GCM use with Xilsecure
2024-01-12 03:44:43 +10:00