1589 Commits

Author SHA1 Message Date
JacobBarthelmeh
6945093221
Merge pull request #6935 from SparkiDev/ssl_crypto_extract
ssl.c: Move out crypto compat APIs
2023-11-16 11:58:14 -07:00
Daniel Pouzzner
6a3451ca54 wolfcrypt/test/test.c: add WC_MAYBE_UNUSED attribute to declaration of max_relative_stack, to accommodate compilation settings when subsumed within testsuite. 2023-11-15 00:09:22 -06:00
Sean Parkinson
c4677927bc AES GCM ARM64: Replace hardware crypto assembly with generated code
Optimized assembly of AES GCM for ARM64 using hardware crypto
instructions.
Code replaced between "START..." and "END...".
2023-11-14 09:24:05 +10:00
JacobBarthelmeh
c903a8c4a6
Merge pull request #6854 from SparkiDev/aes_bit_sliced
AES bitsliced implementation added
2023-11-10 17:10:19 -07:00
Sean Parkinson
54f2d56300 ssl.c: Move out crypto compat APIs
ssl_crypto.c contains OpenSSL compatibility APIS for:
 - MD4, MD5, SHA/SHA-1, SHA2, SHA3
 - HMAC, CMAC
 - DES, DES3, AES, RC4
API implementations reworked.
Tests added for coverage.
TODOs for future enhancements.
2023-11-08 19:43:18 +10:00
Daniel Pouzzner
9cb6243357 wolfcrypt/test/test.c: add all initializers in wolfcrypt_test_main() for args for C++ legality (C-style initializer added in e58fafcf3d). 2023-11-07 19:33:18 -06:00
JacobBarthelmeh
d751029c07
Merge pull request #6945 from gojimmypi/PR-goto-alternate
introduce WARNING_OUT, when goto is not a hard error during tests
2023-11-07 10:17:53 -07:00
JacobBarthelmeh
8921a720a1
Merge pull request #6888 from SparkiDev/srtp_kdf
SRTP/SRTCP KDF: add implementation
2023-11-07 10:11:43 -07:00
gojimmypi
e58fafcf3d introduce WARNING_OUT, optional WOLFSSL_ESPIDF_ERROR_PAUSE 2023-11-07 08:52:34 +01:00
Sean Parkinson
8c3e1dbf48 SRTP/SRTCP KDF: add implementation
Add implementation of SRTP KDF and SRTCP KDF.
One shot APIs compatible with SP 800-135 and ACVP testing.
Tests added to test.c.
Benchmarking added.
Doxygen added.
2023-11-07 10:33:14 +10:00
Sean Parkinson
5b863dcb12 AES bitsliced implementation added
AES bitsliced implementation that is cache attack safe.
Configure with:
  --enable-aes-bitslice
or define:
  WC_AES_BITSLICE
  HAVE_AES_ECB
  HAVE_AES_DIRECT
Very slow for CBC, CFB, OFB and any mode that uses a previous encrypt
block to calculate current.
CTR, GCM, XTS can parallelize the data and be much faster.

Added AES-ECB test to test.c.
2023-11-03 14:19:58 +10:00
David Garske
33e12e3537 Support for the STM32WL55 and PKA improvements for ECC parameters. Fixes #6386 and Fixes #6396. 2023-11-01 13:55:31 -07:00
JacobBarthelmeh
d35112064b
Merge pull request #6840 from philljj/xmss_hooks_support
Add XMSS/XMSSMT wolfCrypt hooks.
2023-10-16 10:58:12 -06:00
jordan
46b1a030a7 XMSS/XMSSMT hooks support: fix g++ warnings, and small cleanup for review. 2023-10-13 18:01:07 -05:00
JacobBarthelmeh
79a6e1eb04
Merge pull request #6808 from SparkiDev/sp_sm2
SP updates for SM2
2023-10-13 10:17:17 -06:00
Sean Parkinson
0cc21a42f3 SP updates for SM2
Allow wolfSSL to build with SP implementations of SM2.
Updates to SP implementation of other code.
2023-10-13 08:14:15 +10:00
Daniel Pouzzner
3a195563f7 wolfcrypt/src/aes.c: fix zerodivcond and -Wconversion in wc_AesXtsEncryptConsecutiveSectors() and wc_AesXtsDecryptConsecutiveSectors().
wolfcrypt/test/test.c: add missing FIPS gating around AES-XTS testing.
2023-10-12 12:08:16 -05:00
Lealem Amedie
a27b49882d Add XTS API's required for VeraCrypt 2023-10-10 15:09:35 -06:00
Chris Conlon
210fff5569
Merge pull request #6849 from miyazakh/rnd_gen_updates
Update random generation on RZ RSIP
2023-10-10 08:52:22 -06:00
Daniel Pouzzner
61371d403a minor fixes for AES-EAX implementation and test routines. 2023-10-08 18:02:52 -05:00
Hideki Miyazaki
8d5df6fec2 change to use custom random generation func 2023-10-08 16:42:36 +09:00
JacobBarthelmeh
fd2d098566
Merge pull request #6821 from bigbrett/aes-eax
AES EAX mode
2023-10-06 14:14:28 -06:00
Brett Nicholas
fafb9e81c0 Add support for AES EAX mode, as described in https://eprint.iacr.org/2003/069 2023-10-06 11:10:06 -06:00
Sean Parkinson
862a98abe0 Aarch64 and ARM32 AES XTS with crypto instructions
Optimised assembly of AES-XTS for Aarch64 and ARM32 using hardware
crypto instructions.
Aarch64 has loop unrolling.
Update aes.c to not have AES-XTS implementation when assembly
compilable.
Update test of AES-XTS to check expected cipher text of partial block
encryption.
2023-10-06 12:39:31 +10:00
jordan
33d4b331fb Add XMSS/XMSSMT wolfCrypt hooks. 2023-10-05 09:18:50 -05:00
Daniel Pouzzner
45b613ee55 wolfcrypt/test/test.c: fix error codes in hpke_test_single(), hpke_test(), and ecc521_test_deterministic_k(). 2023-10-03 22:44:11 -05:00
JacobBarthelmeh
1a3bf5e932
Merge pull request #6822 from douzzer/20230930-aes-xts-test-gate
20230930-aes-xts-test-gate
2023-10-02 17:57:17 -06:00
Chris Conlon
ecf666a121
Merge pull request #6819 from miyazakh/renesas_rz_opt
Update usage of sha acceleration on RSIP
2023-10-02 09:22:06 -06:00
Daniel Pouzzner
3e7f4c5f2d wolfcrypt/test/test.c: in aes_xts_128_test(), fix gate on LARGE_XTS_SZ test added in 3ea0fb30dd (disable for AF_ALG and pre-5.3 FIPS). 2023-09-30 12:07:56 -05:00
Hideki Miyazaki
e092c57675 change sha h/w acceleration implementation 2023-09-29 16:22:16 +09:00
Sean Parkinson
3ea0fb30dd AES XTS x64 ASM: add AVX1 and AESNI implementations
Adding AES-XTS AVX1 and AESNI implementations.
Fix name in comment at top of x64 assembly files.
2023-09-28 14:44:23 -05:00
Hideki Miyazaki
8f9c3716ed fix ra6m4 port 2023-09-20 09:00:22 +09:00
Hideki Miyazaki
5e97b9fde8 addressed review comments 2023-09-15 13:22:35 +09:00
Hideki Miyazaki
1c9afb8b12 initial commit for RZN2L board Support 2023-09-13 09:22:55 +09:00
JacobBarthelmeh
cd02d5140f
Merge pull request #6738 from philljj/wolfcrypt_lms_verify_only
Wolfcrypt LMS verify-only support
2023-09-01 13:25:31 -06:00
jordan
b36c312ef3 LMS verify-only support: fix clang warning, rename define. 2023-08-31 21:46:00 -05:00
Sean Parkinson
41d6afcfa1 ECIES: add support for other KDFs 2023-08-30 10:37:57 +10:00
jordan
8662312ecf LMS verify only support. 2023-08-29 15:46:18 -05:00
John Safranek
e48b7ef3d7
FIPS Degraded Mode
1. Add error code for entering FIPS degraded mode.
2. Add string for the error code.
2023-08-24 16:27:23 -07:00
Sean Parkinson
36b92a4cef Thumb2 ASM, Curve25519
Add support for compiling ASM for Thumb2
Add Curve25519 ASM for Thumb2
Limit assembly code compiled when Ed25519 not required.
Rework all assembly implementations to replace ge_*() functions instead
of having fe_ge_*() versions that take many parameters.
Get ARM32 inline asm working.
2023-08-24 17:43:03 +10:00
Andras Fekete
b31e485dc9 Remove 'HAVE_FIPS_VERSION < 2' blocks 2023-08-02 17:08:03 -04:00
billphipps
10adca1a45
Add CryptoCb features (#6636)
* Update to support invoking cryptocb during un/register.
2023-07-27 13:16:43 -07:00
JacobBarthelmeh
1285ae7816
Merge pull request #6506 from DimitriPapadopoulos/codespell
Fix typos found by codespell
2023-07-24 10:34:29 -06:00
JacobBarthelmeh
8065ba18f9
Merge pull request #6620 from douzzer/20230714-WC_DO_NOTHING
20230714-WC_DO_NOTHING
2023-07-18 17:04:02 -06:00
JacobBarthelmeh
a026d843cf
Merge pull request #6564 from philljj/add_lms_hooks
Add LMS/HSS wolfCrypt hooks.
2023-07-14 14:33:25 -06:00
jordan
a747e7773c LMS: comments, SMALL_STACK, cleanup, etc. 2023-07-14 11:27:59 -05:00
Daniel Pouzzner
f6f8d2eda3 add WC_DO_NOTHING macro to wolfssl/wolfcrypt/types.h, with default expansion "do {} while (0)", and globally refactor to use the macro where appropriate, annotating intended-null macros-with-args with "/* null expansion */";
tweak several #includes of settings.h to include types.h instead (all of these are for clarity, as types.h is indirectly included by later #includes), and add #include <wolfssl/wolfcrypt/types.h> where missing;

remove trailing semicolons from PRAGMA*() macro invocations as they are unneeded and can be harmful (inducing frivolous -Wdeclaration-after-statement etc.).
2023-07-14 09:50:01 -05:00
JacobBarthelmeh
4bf642283c
Merge pull request #6597 from SparkiDev/mp_test_div_fix
test.c: fix protection around calling mp_test_div
2023-07-13 13:37:27 -06:00
Sean Parkinson
2c9609039d Type conversion fixes: make explicit
Changed to types and casting so that there are no implcit conversion
warnings (gcc -Wconversion) in these files.
2023-07-13 08:36:02 +10:00
Sean Parkinson
8e89e31f70 test.c: fix protection around calling mp_test_div
Caller of mp_test_div() had different #ifdef protection declaration.
Made them the same.
2023-07-12 10:55:50 +10:00