Sean Parkinson
6a5e29e21d
Merge pull request #9477 from douzzer/20251125-linuxkm-arm-fips-tweaks
...
20251125-linuxkm-arm-fips-tweaks
2025-11-27 09:03:36 +10:00
Daniel Pouzzner
be1f916028
wolfcrypt/src/aes.c: in the WOLFSSL_ARMASM && GCM_SMALL && !__aarch64__ static C implementation of GCM_gmult_len(), rename to GCM_gmult_len_armasm_C() (incompatible with other implementations);
...
wolfcrypt/src/aes.c: move FREESCALE_MMCAU implementations later (minimum precedence) for wc_AesEncrypt(), wc_AesDecrypt(), wc_AesSetKeyLocal(), wc_AesSetKey(), and wc_AesSetKeyDirect() (fixes ZD#20862).
2025-11-25 23:01:05 -06:00
Daniel Pouzzner
f5543f6b95
wolfcrypt/test/test.c: in wolfcrypt_test_main(), install myFipsCb if applicable, and save failed wolfCrypt retvals to args.return_code to assure error exit. fixes FIPS integrity failure message with wolfEntropy.
2025-11-25 20:21:37 -06:00
Daniel Pouzzner
4fda0883a4
globally rename WC_PIE_RELOC_TABLES to WC_SYM_RELOC_TABLES;
...
globally replace defined(__PIE__) with defined(WC_CONTAINERIZE_THIS) to decouple containerization from -fPIE;
configure.ac:
* add --enable-kernel-reloc-tables as an alias for --enable-linuxkm-pie;
* always activate ENABLED_ENTROPY_MEMUSE_DEFAULT when KERNEL_MODE_DEFAULTS and not RDSEED/RDRAND, regardless of FIPS presence/version;
linuxkm/Kbuild:
* add -DWC_CONTAINERIZE_THIS to PIE_FLAGS;
* add support for NO_PIE_FLAG, which inhibits -fPIE on ENABLED_LINUXKM_PIE builds, and adds -DWC_NO_PIE_FLAG to PIE_FLAGS;
linuxkm/linuxkm_wc_port.h: add setup for WC_LINUXKM_WOLFENTROPY_IN_GLUE_LAYER;
linuxkm/module_hooks.c: add wc_linuxkm_GenerateSeed_wolfEntropy().
2025-11-25 18:01:25 -06:00
David Garske
0aaa31c438
Merge pull request #9459 from JacobBarthelmeh/async
...
fix small stack define and warnings for g++ build with async
2025-11-25 14:22:24 -08:00
David Garske
6fc99ac6d8
Merge pull request #9431 from Pushyanth-Infineon/psoc6_aes_support
...
Enable hardware acceleration for AES on PSoC6.
2025-11-25 13:31:23 -08:00
Sean Parkinson
0afbc1ef08
Merge pull request #9471 from douzzer/20251124-memory_test-wolfSSL_Atomic_Ptr_CompareExchange
...
20251124-memory_test-wolfSSL_Atomic_Ptr_CompareExchange
2025-11-25 19:22:22 +10:00
JacobBarthelmeh
a83fb4fc42
revert 6bda10a forcing small stack with async
2025-11-25 00:43:04 -07:00
Daniel Pouzzner
e459b21744
wolfcrypt/src/wc_port.c and wolfssl/wolfcrypt/wc_port.h: add volatile attribute to wolfSSL_Atomic_Uint_CompareExchange() first arg, for pedantic accuracy;
...
wolfssl/internal.h and src/ssl.c: add volatile attribute to WOLFSSL_CTX.privateKeyPKey pointer, for pedantic accuracy;
wolfcrypt/test/test.c: in memory_test(), use compatible pointers for all operands in the wolfSSL_Atomic_Ptr_CompareExchange() test, to avoid undefined behavior.
2025-11-24 18:21:09 -06:00
Sean Parkinson
ea0793f0af
Merge pull request #9428 from dgarske/qat_v5.8.4
...
Migrate wolfAsyncCrypt repo into wolfSSL proper
2025-11-25 09:33:31 +10:00
Sean Parkinson
9c467a916a
Merge pull request #9437 from rlm2002/coverity
...
20251114 Coverity change
2025-11-25 09:26:17 +10:00
Sean Parkinson
86789f92c0
Merge pull request #9446 from dgarske/stm32_castwarn
...
Fix stm32.c type warnings
2025-11-25 09:22:58 +10:00
Sean Parkinson
76fec60754
Merge pull request #9448 from anhu/p7_unknownExt
...
unknown extension support in wc_PKCS7_EcdsaVerify
2025-11-25 09:21:47 +10:00
Sean Parkinson
c6ecafced2
Merge pull request #9451 from kaleb-himes/ESV-DRBG-Decouple
...
Esv drbg decouple
2025-11-25 09:19:52 +10:00
David Garske
4ccad17a39
Merge pull request #9465 from SparkiDev/aesgcm_small_armasm
...
AES-GCM small ARM asm: add back implementation
2025-11-24 15:06:49 -08:00
David Garske
0786aa2585
Merge pull request #9464 from SparkiDev/sp_384_sub_fix
...
SP Thumb2/ARM32: P-384 sub not needed for small builds
2025-11-24 15:05:43 -08:00
Joseph Chen
7752df3340
Correct SHA256 final endianness on MMCAU platforms
2025-11-24 16:48:35 +08:00
Sean Parkinson
ba47f7f333
AES-GCM small ARM asm: add back implementation
...
Implementation of GCM mult with length for ARM asm and small GCM was
added to armv8-aes.c but got lost when code pulled back to aes.c.
2025-11-24 11:08:18 +10:00
Sean Parkinson
46c704f51f
SP Thumb2/ARM32: P-384 sub not needed for small builds
...
Don't have an implementation of sp_384_sub when building for small code
size.
2025-11-24 10:45:36 +10:00
kaleb-himes
4da42ffae9
Fix typo in header include (capital E)
2025-11-20 09:38:13 -07:00
kaleb-himes
dc6fa0ad4e
De-couple ESV from DRBG
2025-11-20 09:38:13 -07:00
JacobBarthelmeh
b6adf12f83
Merge pull request #9438 from douzzer/20251113-linuxkm-aarch64-fips-tweaks
...
20251113-linuxkm-aarch64-fips-tweaks
2025-11-19 17:42:45 -07:00
Daniel Pouzzner
06d3d6d3df
linuxkm/Kbuild and linuxkm/module_hooks.c: refactor wc_linuxkm_pie_reloc_tab to include ground truth segment tag from ELF metadata.
...
tweaks for ARM32: recognize R_ARM_* relocations, and add -fno-unwind-tables to PIE_FLAGS.
linuxkm/linuxkm_wc_port.h:
* __PIE__: don't declare static pmd_to_page() unless USE_SPLIT_PMD_PTLOCKS.
* add wc_lkm_refcount_to_int() helper with -Wnested-externs suppressed.
wolfcrypt/src/fe_operations.c: in fe_frombytes() and fe_sq2(), use explicit XMEMSET()s to initialize working vars, rather than implicit, to avoid implicit (unshimmable) memset() calls.
wolfcrypt/src/ge_operations.c: fix gate on _wc_curve25519_dummy() to require CURVED25519_ASM.
2025-11-19 17:21:29 -06:00
JacobBarthelmeh
23a6edcc89
adjust test case to account for AES-GCM key size support with Xilinx afalg
2025-11-19 23:00:13 +00:00
JacobBarthelmeh
96dde5b4a8
Merge pull request #9392 from philljj/bsdkm
...
bsdkm: initial wolfcrypt FreeBSD kernel module support.
2025-11-19 15:25:21 -07:00
Anthony Hu
668602016c
Allow user to prevent wc_PKCS7_EcdsaVerify from erroring out due to extentions we do not know about
2025-11-19 14:36:04 -05:00
JacobBarthelmeh
8d357de6d8
Merge pull request #9444 from dgarske/macros_explicit
...
Fix issue with poorly written macros
2025-11-18 17:28:12 -07:00
David Garske
64c03fa9ee
Fix stm32.c type warnings
2025-11-18 14:33:11 -08:00
David Garske
658ea305d1
Fix issue with poorly written macros
2025-11-18 14:15:22 -08:00
jordan
0458fba394
bsdkm: add atomic_fcmpset_ptr.
2025-11-18 10:12:28 -06:00
jordan
551f90414c
bsdkm: review cleanup.
2025-11-18 09:02:45 -06:00
Sean Parkinson
da0e4f59ec
LMS - check sum fix for SHA-256-192
...
Only 8 bits needed of checksum whem doing 192-bit hashes with Winternitz
of 1 (9 for 256-bit hashes).
Cleanup code around checksum.
2025-11-18 21:20:02 +10:00
jordan
28e4fe3b6c
bsdkm: initial wolfcrypt FreeBSD kernel module support.
2025-11-18 01:28:08 -06:00
JacobBarthelmeh
8e38e3bb5e
Merge pull request #9433 from holtrop/rust-conditional-compilation
...
Rust wrapper: enable conditional compilation based on C library build options
2025-11-17 15:03:17 -07:00
Sean Parkinson
074a3dbcc1
ML-KEM: derive secret fix
...
Fixes for deriving secret for ML-KEM.
2025-11-17 10:01:19 +10:00
Kamatham Pushyanth
9bc259ae6f
Enable hardware acceleration for AES on PSoC6.
...
- Implemented AES ECB, CBC, CFB, and GCM modes with hardware acceleration.
- Ensured proper mutex locking for concurrent access to hardware resources during
- Adjusted the aes.h header to include PSoC6 specific definitions and structures.
- Updated README for PSoC6 port.
2025-11-16 00:12:09 +05:30
David Garske
46a2234c61
Merge pull request #9425 from JacobBarthelmeh/pkcs7_stream
...
with decode enveloped data track total encrypted content size
2025-11-14 12:59:09 -08:00
Ruby Martin
59800d8bb7
additional index checks, handle when j is 0 or 1
2025-11-14 12:19:58 -07:00
David Garske
a071426bc8
Migrate wolfAsyncCrypt repo into wolfSSL proper
2025-11-14 09:43:59 -08:00
David Garske
4e1b719236
Improve wc_HmacUpdate to return early if input length == 0. Fixes QAT issue with HKDF test.
2025-11-14 09:40:56 -08:00
Josh Holtrop
c61ac22e89
Rust wrapper: enable conditional compilation based on C library build options
2025-11-14 10:44:25 -05:00
Daniel Pouzzner
135bb66352
wolfssl/wolfcrypt/wc_port.h and wolfcrypt/src/wc_port.c: use stdatomic.h implementation as C default when available, as before, for proper type annotation in objects.
2025-11-14 07:54:14 -06:00
Daniel Pouzzner
7916db78e8
wolfcrypt/src/wc_port.c and wolfssl/wolfcrypt/wc_port.h: change precedence of atomic implementations, and don't use the stdatomic.h in C++ builds (not compatible);
...
fix the name of the wolfSSL_Atomic_Ptr_CompareExchange() implementation in the _MSC_VER code path.
2025-11-13 17:28:19 -06:00
Daniel Pouzzner
c430cc75ea
src/ssl.c and wolfssl/ssl.h: fix signature on wolfSSL_CTX_get0_privatekey() -- ctx is not const;
...
wolfcrypt/src/wc_port.c and wolfssl/wolfcrypt/wc_port.h: tweak gates on atomic implementations to maximize availability within currently supported targets;
fix some whitespace.
2025-11-13 17:11:52 -06:00
Daniel Pouzzner
26ba6344f2
add wolfSSL_Atomic_Ptr_CompareExchange(); mitigate race on ctx->privateKeyPKey in wolfSSL_CTX_get0_privatekey().
2025-11-13 16:25:49 -06:00
JacobBarthelmeh
c63ca04228
convert to type int for return value
2025-11-13 12:17:04 -07:00
JacobBarthelmeh
d06221c16e
with decode enveloped data track total encrypted content size
2025-11-13 12:08:46 -07:00
David Garske
4f3586fe58
Merge pull request #9421 from SparkiDev/mlkem_to_bytes_fix
...
ML-KEM to bytes C: not reducing all values
2025-11-13 08:57:31 -08:00
Sean Parkinson
6c30186168
ECC sign hash: only allow up to max digest size
...
Validate that the hash passed in is of an appropriate length - not
greater than the maximum digest size.
2025-11-13 11:53:51 +10:00
Sean Parkinson
b272f784ec
ML-KEM to bytes C: not reducing all values
...
Call to mlkem_csubq_c was only called on first array.
Fixed to do it for all.
2025-11-13 10:42:07 +10:00