Sean Parkinson
6cc91c8f9b
Wycheproof testing of Aarch64 ASM
...
Fix which bytes are incremented for AES-GCM - only 4 bytes are counter.
Fix Curve25519 to reduce to below modulus at end.
2022-04-12 11:45:14 +10:00
Jacob Barthelmeh
83ad0b7010
fix for function rename
2022-04-08 15:05:08 -06:00
David Garske
c84c465fc6
Merge pull request #5035 from douzzer/20220408-fuzz-6262033210802176
...
oss-fuzz 6262033210802176
2022-04-08 08:34:16 -07:00
David Garske
6a21a90f41
Merge pull request #5034 from SparkiDev/sp_wycheproof_fixes
...
SP fixes from Whycheproof tests
2022-04-08 08:20:56 -07:00
Daniel Pouzzner
1c570fae3b
wolfcrypt/src/asn.c GetLength_ex(): test for overlong length spec before using length as shift operand.
2022-04-08 08:15:02 -05:00
Sean Parkinson
ed7e1f9770
SP fixes from Whycheproof tests
...
EC point add is a double if affine ordinates are the same.
Fix AVX2 implementation of mod inv to do conversion from 26 bits in
32-bit registers to 64 bits in 64-bit registers. Also handle negative
value.
RSA OAEP: loop down to last byte. Must have a separator.
Div for x86_64: fix to have all 1s when high word equals divisor.
2022-04-08 15:01:06 +10:00
Daniel Pouzzner
28cefb0d1a
fix clang-analyzer-core.NonNullParamChecker.
2022-04-07 08:01:00 -05:00
Daniel Pouzzner
4efd06fdc1
fix readability-inconsistent-declaration-parameter-name.
2022-04-07 07:59:59 -05:00
Sean Parkinson
284ebacc57
Merge pull request #4916 from JacobBarthelmeh/hsm
...
Add SECO use and expand cryptodev
2022-04-07 10:21:32 +10:00
Sean Parkinson
87dc197284
Merge pull request #5028 from douzzer/20220406-cppcheck
...
fixes to mollify cppcheck (sizeofDivisionMemfunc, zerodivcond, shiftTooManyBits, signConversionCond)
2022-04-07 08:45:24 +10:00
Jacob Barthelmeh
e9aae8b571
use hash grow function with cmac
2022-04-06 15:08:19 -06:00
Daniel Pouzzner
9b2d927de7
Merge pull request #5026 from danielinux/fix_unititialized_var
...
Fixed unused variable in asn.c
2022-04-06 13:03:47 -05:00
David Garske
1b5af2fdd9
Merge pull request #5022 from SparkiDev/wycheproof_fixes
...
Wycheproof fixes/changes
2022-04-06 10:29:17 -07:00
JacobBarthelmeh
2a0b726c15
add AES init functions to ECB test case
2022-04-06 09:42:38 -07:00
Daniel Pouzzner
4e8c180290
fixes to mollify cppcheck (sizeofDivisionMemfunc, zerodivcond, shiftTooManyBits, signConversionCond).
2022-04-06 11:36:01 -05:00
JacobBarthelmeh
91d883d99f
macro guard on ECB test case and use realloc for hash
2022-04-06 07:04:17 -07:00
Daniele Lacamera
3d9a1647d4
Fixed unused variable in asn.c
2022-04-06 15:35:28 +02:00
Sean Parkinson
e9187f5f00
Wycheproof fixes/changes
...
Allow Chachac20-Poly1305 to take an empty msg.
Allow AES-SIV to have an empty nonce.
Don't allow the length to be malleable. Must use the smallest number of
bytes to represent value.
ECDSA and DSA signature values are positive.
Add Sha512-224 and Sha512-256 OIDs.
ASN template - ensure the ECDSA/DSA signature uses all data.
Curve25519/Curve448 - WOLFSSL_ECDHX_SHARED_NOT_ZERO means shared secret
can't be 0.
Curve25519/Curve448 - check public value is less than order.
ECC - x or y may be zero but not both.
Ed25519/Ed448 - check S is less than order.
Ed448 - ge_p3_dbl can be simplified for ASM.
Prime check (integer.c/tfm.c/sp_int.c): Don't allow negative values and
make sure random candidate doesn't have bits higher than those in a set
when bits not a multiple of 8.
RSA: support Sha512-224 and Sha512-256.
RSA: Fix check for invalid in decryption. Affects plaintexts 256 bytes
and longer.
RSA: Don't allow base be larger than modulus.
RSA: Check small ciphertext (1 or 0) on decrypt when not using OAEP.
RSA: WOLFSSL_RSA_DECRYPT_TO_0_LEN allows decrypted value to be 0.
SP math all: fix div to handle large a and d when checking size of
remainder.
SP math all: set sign of result in sp_mod_2d()
2022-04-06 15:35:01 +10:00
JacobBarthelmeh
a338b4c933
refactor SHA grew function, revert benchmark devid, increase SHA_CTX size, add AES ECB cryptocb test
2022-04-05 14:45:18 -07:00
David Garske
4f5aa81031
Merge pull request #5000 from ejohnstown/tls13-wctest
...
Add TLSv1.3 KDF to wolfCrypt Test
2022-04-05 10:45:35 -07:00
David Garske
6a3f98627e
Merge pull request #5013 from anhu/wc_CheckCertSigPubKey
...
Add new public API wc_CheckCertSigPubKey()
2022-04-05 09:48:08 -07:00
John Safranek
eefc0f2f57
Add TLSv1.3 KDF to wolfCrypt Test
...
Added a test for the TLSv1.3 KDF to the wolfcrypt test. It uses 6
different test cases from the CAVP tests. A set of 8 session keys are
generated using multiple exporters.
2022-04-05 08:56:15 -07:00
Daniel Pouzzner
b2a2a8af4a
fix whitespace.
2022-04-05 08:09:48 -05:00
Sean Parkinson
df9335ee0a
Merge pull request #4988 from tmael/sp_loop
...
Fixes for Diab C89 and armclang
2022-04-05 08:20:47 +10:00
Sean Parkinson
8dd07bbb73
Merge pull request #5011 from dgarske/ecc_key_decode
...
Fix to check if `wc_EccPublicKeyToDer` has enough output buffer space
2022-04-05 08:03:03 +10:00
Sean Parkinson
c3a9520eb5
Merge pull request #5016 from dgarske/async_fixes
...
Fixes for async in wolfCrypt test
2022-04-05 07:56:08 +10:00
Hayden Roche
f39bd5e02b
Merge pull request #5014 from dgarske/kcapi_ecc_import
2022-04-04 14:08:29 -07:00
David Garske
9b5ad6f218
Merge pull request #4968 from miyazakh/cryptonly
...
add WOLF_CRYPTO_CB_ONLY_RSA and WOLF_CRYPTO_CB_ONLY_ECC
2022-04-04 08:31:41 -07:00
David Garske
757c93c6d5
Merge pull request #4945 from kaleb-himes/ZD13795
...
Fix for ZD13795 and also remove all-caps parameter
2022-04-04 08:25:10 -07:00
Hideki Miyazaki
8e4abb0011
addressed code review comment
2022-04-02 09:18:28 +09:00
Daniel Pouzzner
ae3996fd0e
fix codebase for -Wvla -Wdeclaration-after-statement; fix some whitespace.
2022-04-01 14:44:10 -05:00
David Garske
bd0e222fec
Merge pull request #5012 from julek-wolfssl/evp-enc-dec-block
...
Implement `EVP_EncodeBlock` and `EVP_DecodeBlock`
2022-04-01 12:24:23 -07:00
David Garske
6ec0c22a28
Fixes for async in wolfCrypt test.
2022-04-01 12:04:31 -07:00
David Garske
ded168f238
Add check for buffer space in wc_EccPublicKeyToDer. Refactor SetEccPublicKey to put public key directly into output buffer and eliminate small stack. Fixes ZD 13904.
2022-04-01 11:46:27 -07:00
David Garske
9c572efa40
Disable the public key check in import private key for KCAPI. Fix type warning in KCAPI AES.
2022-04-01 11:27:17 -07:00
Anthony Hu
edea6428d9
Add new public API wc_CheckCertSigPubKey()
2022-04-01 11:40:25 -04:00
Juliusz Sosinowicz
6dffa8a13d
Implement EVP_EncodeBlock and EVP_DecodeBlock
2022-04-01 13:29:40 +02:00
Tesfa Mael
4db45cea4e
Fixes to build with diab and armclang
2022-03-31 20:48:28 -07:00
David Garske
99af84f1e2
Whitespace cleanups.
2022-04-01 09:36:53 +09:00
Hideki Miyazaki
d3a379adac
add WOLF_CRYPTO_CB_ONLY_RSA and WOLF_CRYPTO_CB_ONLY_ECC
2022-04-01 09:36:52 +09:00
Chris Conlon
b45cd921b6
Merge pull request #5005 from dgarske/renesas_spell
2022-03-31 17:44:04 -06:00
Sean Parkinson
7b21cd8cf0
Merge pull request #5001 from dgarske/kcapi_ecc
...
KCAPI ECC/AES optimizations to further reduce page memory use
2022-04-01 08:36:23 +10:00
Sean Parkinson
79444fdb56
Merge pull request #4997 from dgarske/qat_eckg
...
Support for Intel QuickAssist ECC KeyGen acceleration
2022-04-01 08:32:21 +10:00
David Garske
61f6b5e29c
Peer review feedback.
2022-03-31 10:04:23 -07:00
David Garske
064888bb2a
Add KCAPI ECC support for using a private key id.
2022-03-31 09:05:03 -07:00
David Garske
f8007b2d8f
Further KCAPI AES/ECC memory optimizations. Adds KCAPI_USE_XMALLOC option for AES and ECC to reduce page memory use in certain KCAPI cases that allow it.
2022-03-31 08:58:22 -07:00
David Garske
1993851274
Renesas spelling, code formatting and whitespace fixes.
2022-03-31 08:02:00 -07:00
David Garske
1de5165dcc
KCAPI ECC optimization to further reduce page memory use.
2022-03-30 15:01:01 -07:00
David Garske
c905c613e9
Support for Intel QuickAssist ECC KeyGen acceleration.
2022-03-30 13:07:47 -07:00
Sean Parkinson
d9df00cdfb
Merge pull request #4994 from dgarske/kcapi
...
KCAPI ECC memory optimizations and KCAPI AES build fix
2022-03-30 11:50:39 +10:00