Commit Graph

508 Commits

Author SHA1 Message Date
John Safranek e89b4cce4c Merge pull request #5045 from SparkiDev/wycheproof_armasm
Wycheproof testing of Aarch64 ASM
2022-04-15 11:23:45 -07:00
Daniel Pouzzner 096889927d wolfcrypt/src/port/devcrypto/devcrypto_aes.c: remove redundant "int ret" in wc_AesCtrEncrypt() (supersedes #5052). 2022-04-14 20:23:31 -05:00
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
Sean Parkinson 284ebacc57 Merge pull request #4916 from JacobBarthelmeh/hsm
Add SECO use and expand cryptodev
2022-04-07 10:21:32 +10:00
Hayden Roche f39bd5e02b Merge pull request #5014 from dgarske/kcapi_ecc_import 2022-04-04 14:08:29 -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
Chris Conlon b45cd921b6 Merge pull request #5005 from dgarske/renesas_spell 2022-03-31 17:44:04 -06: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 1abcd4b035 Reduce KCAPI ECC page memory allocation sizes. 2022-03-28 15:40:07 -07:00
David Garske 12349f39e6 Merge pull request #4974 from kareem-wolfssl/iotsafe
IOTSafe workarounds
2022-03-28 13:49:44 -07:00
Kareem be938ed197 IoTSafe Workarounds: Address code review feedback. 2022-03-25 16:17:53 -07:00
David Garske 6e550c8d75 Fix for KCAPI ECC KeyGen. Disable ECC consistency checks with KCAPI. Allow public AddSignature (used to be public). Fix KCAPI ECC SharedSecret output size. 2022-03-23 09:37:50 -07:00
David Garske 8bafa7f601 Fix for KCAPI ECC sign (was not returning the signature, since ret always 0). 2022-03-23 09:37:50 -07:00
David Garske c9e3094cb0 Fixes for KCAPI ECC verify. Cleanup of the pubkey_raw. Fix KCAPI AES possible used uninitialized. 2022-03-23 09:37:50 -07:00
David Garske 8d695f97c9 Fix for KCAPI KcapiEcc_LoadKey parameter to kcapi_kpp_keygen. Added option to release handle on load. Fixes for KCAPI sign output length. Added additional argument checking. 2022-03-23 09:37:50 -07:00
David Garske 318350f63b Fix for ecc_check_privkey_gen with KCAPI. Fix KCAPI ECDSA to ensure we don't leak handle for multiple sign/verify calls. 2022-03-23 09:37:50 -07:00
David Garske 9f2dc408a0 Fixes for KCAPI AES GCM. Add guards for algorithm macros on KCAPI. 2022-03-23 09:37:50 -07:00
Kareem af70edb99d Strip trailing zeroes from cert buffer when using IOTSAFE_NO_GETDATA. 2022-03-21 10:53:36 -07:00
JacobBarthelmeh 54477d1bea improvements around keystore key update 2022-03-17 12:04:52 -06:00
Jacob Barthelmeh 40c79b1134 add macro guards to handle build with QNX CAAM 2022-03-17 12:04:52 -06:00
Jacob Barthelmeh 9bf2962852 default to strict NVM operations with key generation 2022-03-17 12:04:52 -06:00
JacobBarthelmeh 55b42dd85a Add SECO use and expand cryptodev 2022-03-17 12:04:52 -06:00
John Safranek 0e0ac14bbf Merge pull request #4901 from SparkiDev/kcapi_ecdh_fixes
Fixes for KCAPI ECDH/DH and page alignment
2022-03-07 11:01:16 -08:00
Chris Conlon 2fc47fedee Merge pull request #4900 from miyazakh/esp_waituntil
Fix wait-until-done in rsa hw primitive acceleration of ESP-IDF port
2022-03-04 17:32:06 -07:00
David Garske 0c3b9c733f Fixes for KCAPI ECDH/DH and page alignment. ZD 13763 2022-03-04 15:06:16 -08:00
Kareem e6189a638c IOTSafe workarounds: Allow reading files with no GetSize command available, allow sign command response with no padding. 2022-03-04 14:03:47 -07:00
Hideki Miyazaki c3e7ff0e61 addressed code review 2022-03-02 07:09:33 +09:00
Hideki Miyazaki 4f4a509e8c fix wait until in rsa primitive 2022-02-26 09:52:14 +09:00
David Garske 9bdef1577b Fixes for hmac. 2022-02-25 15:19:52 -08:00
David Garske cc2eb0ab71 KCAPI Testing fixes. 2022-02-25 15:16:55 -08:00
John Safranek 4361d1bdd2 SILABS port: fix sizeof
A sizeof wasn't dereferencing a pointer using the sizeof the pointer and
not the actual struct. This is limited to setting the key for an AES
operation only when using SILABS SE2 acceleration.
2022-02-17 08:52:46 -08:00
David Garske ed1fc9fc51 Merge pull request #4833 from SparkiDev/sha3_arm_crypto
SHA-3, ARM64: add assembly support for crypto instructions
2022-02-08 11:05:35 -08:00
Sean Parkinson 0042a2594c SHA-3, ARM64: add assembly support for crypto instructions
Add ability to compile ARM assembly from inline C code.
2022-02-08 12:21:38 +10:00
Marco Oliverio b8635efda7 psa: add README.md and doxygen header 2022-02-04 21:45:38 +01:00
Marco Oliverio 0cb2cc1705 psa: support pk callbacks for ECDSA, ECDH, HKDF 2022-02-04 21:45:38 +01:00
Marco Oliverio 630b244cee psa: introduce global lock 2022-02-04 21:45:38 +01:00
Marco Oliverio a7165907da psa: support AES 2022-02-04 21:45:38 +01:00
Marco Oliverio 9ccfc81f26 psa: support PSA SHA1/SHA256/SHA224 2022-02-04 21:45:38 +01:00
Marco Oliverio 06915b6fa3 psa: support PSA random generator 2022-02-04 21:45:38 +01:00
Marco Oliverio 08fbcf5eae autoconf: add PSA options 2022-02-04 12:12:04 +01:00
Sean Parkinson a242424abe Generated files: fixes
Fixups from updating scripts that generate the files.
Include settings.h for ARM32 assembly.
ARM32 SHA-512 ASM has only one function, Transform_Sha512_Len(). The
implementation is dependent on defines.
2022-01-27 10:05:45 +10:00
Daniel Pouzzner 746c05ca44 AES: peer review: remove gating around sanity checks on aes->rounds in software wc_AesEncrypt() and wc_AesDecrypt();
use local variable crypto_cb_ret around WOLF_CRYPTO_CB calls for clarity;

fix line length.
2022-01-24 15:47:23 -06:00
Daniel Pouzzner 5ff1d98306 AES: fix linebreaks in newly overlong lines in aes.c and aes.h; add missing return code in armv8-aes.c wc_AesDecryptDirect(); add missing RESTORE_VECTOR_REGISTERS() in software wc_AesXtsEncrypt() (all pursuant to peer review in #4785 from Sean). 2022-01-24 12:32:25 -06:00
Daniel Pouzzner a718637c6f AES: harmonize wc_Aes{Encrypt,Decrypt} and wc_Aes{Encrypt,Decrypt}Direct implementations to return int; add return values to all static void functions in aes.c that can fail; add WARN_UNUSED_RESULT to all static functions in aes.c with return values; implement missing error percolation around AES block cipher implementations; bump FIPS version for v5-ready and v5-dev to 5.3 (v5-RC12 is 5.2). 2022-01-24 11:44:16 -06:00
Chris Conlon 989a4f096e Merge pull request #4728 from miyazakh/sce_aes128_cryonly 2022-01-17 10:28:57 -07:00
Sean Parkinson 3ddfb0f189 Aarch64 SHA512: fixup to work on Apple M1
Directive needed on Apple to indicate SHA3 extensions available.
Fixup C file as well - remove unused constants not avaiable and
prototype function that is extern elsewhere.
2022-01-12 12:56:39 +10:00