JacobBarthelmeh
602bd3b506
Merge pull request #6996 from SparkiDev/armv8_aes_gcm_init_stream_iv
...
ARMv8 AES-GCM streaming: check size of IV before storing
2023-11-27 09:39:46 -07:00
JacobBarthelmeh
9f06d337e3
Merge pull request #6992 from SparkiDev/heapmath_addmod_ct
...
Heap math: mp_add/submod_ct make work when c == d
2023-11-27 09:28:49 -07:00
JacobBarthelmeh
2e89e46c0b
Merge pull request #6990 from gojimmypi/PR-Espressif-C3-C6-S2-HW
...
Espressif ESP32-C3 ESP32-C6 ESP32-S2 Hardware Acceleration
2023-11-22 16:21:41 -07:00
JacobBarthelmeh
5b3f5496f8
Merge pull request #6430 from kareem-wolfssl/memcached
...
Add memcached support.
2023-11-22 16:20:28 -07:00
Sean Parkinson
b242b44b2c
ARMv8 AES-GCM streaming: check size of IV before storing
...
Only store IV in Init function if it will fit in reg field of Aes
object.
2023-11-23 08:01:20 +10:00
Sean Parkinson
416ce54276
Heap math: mp_add/submod_ct make work when c == d
...
mp_addmod_ct and mp_submod_ct expected c and d to be different pointers.
Change code to support this use case.
Fix whitespace.
2023-11-23 07:28:55 +10:00
gojimmypi
2da88115a6
Upstream merge + resolve conflict.
2023-11-22 13:17:14 -08:00
Eric Blankenhorn
7223b5a708
Fix spelling warnings
2023-11-22 12:34:56 -06:00
gojimmypi
9227020f8e
code review updates for ESP32 C3/C6/S2 HW Acceleration
2023-11-21 16:22:49 -08:00
JacobBarthelmeh
dda72dc19c
Merge pull request #6979 from SparkiDev/sp_arm64_noinline
...
SP ARM64 P-256: mark functions as SP_NOINLINE
2023-11-21 09:48:08 -07:00
JacobBarthelmeh
60909d5cba
Merge pull request #6971 from SparkiDev/iar_thumb2_asm
...
IAR Thumb2 ASM: fixes
2023-11-21 09:46:31 -07:00
gojimmypi
7e69030df1
Espressif ESP32-C3 ESP32-C6 ESP32-S2 Hardware Acceleration
2023-11-20 18:05:18 -08:00
Sean Parkinson
9ac3083e5d
Thumb2 ASM fixes
...
Make a separate AES for IAR that has AES_encrypt_block and
AES_decrypt_block inlined. Default code is relying on compiler to use
specific registers and not modify others.
Improve performance of small SP ASM code for RSA.
2023-11-21 11:58:10 +10:00
Sean Parkinson
e97e1b5847
SP ARM64 P-256: mark functions as SP_NOINLINE
...
iOS device compilations are inlining functions and causing P-256 to
fail.
Add SP_NOINLINE to key P-256 functions.
Add "cc" to more clobber lists.
2023-11-21 10:43:38 +10:00
JacobBarthelmeh
538ce14c62
Merge pull request #6953 from SKlimaRA/SKlimaRA/enable-ca-false
...
Enable encoding CA:FALSE with build flag
2023-11-20 15:03:14 -07:00
Kareem
ca61034d22
Add memcached support.
...
memcached support: add required functions/defines.
Fix running unit test when defining DEBUG_WOLFSSL_VERBOSE without OPENSSL_EXTRA.
Break out session_id_context APIs into separate option WOLFSSL_SESSION_ID_CTX, so they can be used without OPENSSL_EXTRA.
Make wolfSSL_ERR_get_error and wolfSSL_CTX_set_mode available for memcached.
Add --enable-memcached.
Include required defines for memcached.
Revert unit test fix, no longer needed.
Add Github actions test for memcached. Stop defining DEBUG_WOLFSSL_VERBOSE for memcached.
Add auto retry to writes.
Memcached CI: correct libevent package name.
Memcached CI: Add pkgconfig path for Github CI wolfSSL prefix.
memcached: Fix WOLFSSL_OP_NO_RENEGOTIATION going outside of int bounds, add LD_LIBRARY_PATH for memcached CI test.
memcached CI: Use correct path for wolfSSL
memcached: Add required perl dependency for SSL tests
memcached: Update to 1.6.22
memcached: actually test tls
memcached: Update wolfSSL_SSL_in_before to be side agnostic.
2023-11-20 10:10:34 -07:00
David Garske
7566328610
Implement proper wc_AesSetKeyLocal for NXP/Freescale MMCAU and LTC. This is required for AES CTR and AES Direct.
2023-11-20 08:15:50 -08:00
Anthony Hu
3fa612f49f
Fix build errors when defining FREESCALE_MMCAU
2023-11-20 08:15:45 -08:00
Sean Parkinson
9ed0018954
Merge pull request #6980 from gojimmypi/SM-cipher-type-PR
...
Fix evp SM cipherType check
2023-11-20 07:22:54 +10:00
gojimmypi
16dba37ae6
fix wolfSSL_EVP_CIPHER_CTX_ctrl() SM GCM/CCM type
2023-11-17 07:56:56 -08:00
Daniel Pouzzner
e395aad84b
Merge pull request #6958 from embhorn/zd16866
...
Add XGMTIME validation
2023-11-16 21:28:27 -05:00
JacobBarthelmeh
957a0ce300
Merge pull request #6964 from lealem47/zd16470
...
Parse explicit parameters in StoreEccKey()
2023-11-16 15:59:21 -07:00
gojimmypi
4c6c2942b1
Fix evp SM cipherType
2023-11-16 13:38:39 -08:00
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
Sean Parkinson
8c61b2cc5f
IAR Thumb2 ASM: fixes
...
Don't assign constants to registers with IAR.
Don't assume register usage in AES_set_encrypt_key.
2023-11-16 11:14:43 +10:00
JacobBarthelmeh
bb73c233fc
Merge pull request #6973 from douzzer/20231115-misc-fixits
...
20231115-misc-fixits
2023-11-15 15:27:25 -07:00
Daniel Pouzzner
748b058dde
wolfcrypt/src/aes.c: fix for -Wrestrict in wc_AesCbcDecrypt() when WOLFSSL_AESNI.
2023-11-15 00:51:21 -06:00
Sean Parkinson
26a9435f5c
ECC point double: when z ordinate is 0 point is infinity
...
Recognize z == 0 as infinity in result of double.
2023-11-15 16:43:06 +10:00
Daniel Pouzzner
7e99ccc782
wolfcrypt/src/wc_port.c, wolfssl/wolfcrypt/wc_port.h: refactor WOLFSSL_GMTIME gmtime() into gmtime_r(), and always define HAVE_GMTIME_R when defined(WOLFSSL_GMTIME).
2023-11-15 00:09:22 -06:00
Sean Parkinson
2213306386
ECC double point: SECP112R2 and SEC128R2 are Koblitz curves
...
SECP112r2 and SECP128R2 are Koblitz curves, so don't compile them in
unless HAVE_ECC_KOBLITZ is defined. This requires custom curves which
enables point doubling to support A != -3.
2023-11-15 13:30:45 +10: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
Lealem Amedie
04ea4da6fd
Parse explicit parameters in StoreEccKey()
2023-11-10 15:11:08 -07:00
Sean Parkinson
3ab0fc1ba4
SP C: support e up to 64-bits
...
SP C code only supported one digit worth of e which is less than 64 or
32.
Change is to support up to 64 bit of e using sp_uint64 to hold value.
2023-11-10 09:58:51 +10:00
Eric Blankenhorn
a4bf774e1c
Add XGMTIME validation
2023-11-09 16:06:37 -06:00
JacobBarthelmeh
49a219e0d1
Merge pull request #6930 from Frauschi/zephyr_fix
...
Fixes for the Zephyr port
2023-11-09 12:56:34 -07:00
JacobBarthelmeh
73d3277b74
Merge pull request #6947 from SparkiDev/sp_arm64_mont_red_4_fix
...
SP ARM64 asm: fix Montgomery reduction by 4
2023-11-09 08:39:52 -07:00
Tobias Frauenschläger
081b34919c
Zephyr: improve order of random seed sources
...
When using Zephyr, we also want to use the proper wc_GenerateSeed
method. However, if one of the defines is set (e.g., NO_STM32_RNG), the
Zephyr option is ignored, although it would work. Hence, we have to
change the order in which these settings for the source of a random seed
are evaluated.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-11-09 10:41:54 +01:00
Tobias Frauenschläger
182eaa0b63
Zephyr: add support for RTC time
...
For ASN date validation, the actual wall clock time is needed from an
RTC. This commit adds support to read the RTC time in case it is
available in the Zephyr system. If the RTC is not available or an error
occurs during the readout, we fallback to the old implementation which
only supports relative time since boot.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-11-09 10:41:54 +01:00
Tobias Frauenschläger
9d880fe161
Zephyr: Fix deprecation warning for rand32.h
...
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-11-09 10:41:54 +01:00
SKlimaRA
308346aa0d
one less memcpy
2023-11-09 09:40:58 +01:00
JacobBarthelmeh
3332b036d5
Merge pull request #6950 from SparkiDev/srtp_kdf_fix
...
SRTP KDF: Don't use i outside loop
2023-11-08 23:13:40 -07:00
Sean Parkinson
168747615c
SP Cortex-M: branch long explicitly for IAR
...
GCC doesn't like explicit wide branch instruction but will use
appropriate instruction implicitly.
IAR won't widen branch instruction unless explicitly told.
2023-11-09 08:27:42 +10:00
Stanislav Klima
a137847894
removed isCaSet from decoded cert
2023-11-08 12:24:29 +01:00
Stanislav Klima
1562106899
micro fix
2023-11-08 11:18:58 +01:00
Stanislav Klima
f518a8f7d5
new build flag WOLFSSL_ALLOW_ENCODING_CA_FALSE
2023-11-08 10:51:25 +01: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
Stanislav Klima
4bbb0e3876
drafted ca false
2023-11-08 10:23:46 +01:00
Sean Parkinson
716cb450aa
SRTP KDF: Don't use i outside loop
...
When shifting index down, first XOR outside loop isn't meant to use i.
2023-11-08 15:04:46 +10:00
David Garske
0fa47e9e28
Merge pull request #6943 from SparkiDev/iar_inline_asm_no_register
...
Thumb2 inline ASM: IAR doesn't do register variables
2023-11-07 14:23:44 -08:00