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
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
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
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
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
gojimmypi
ca920edbd0
Fix LMS C4146 unary minus warning in MSVC, new param check
2025-11-11 19:26:52 -08:00
JacobBarthelmeh
4da365214a
Merge pull request #9412 from SparkiDev/regression_fixes_21
...
Regression testing fixes
2025-11-11 09:32:43 -07:00
Sean Parkinson
d84564217c
Regression testing fixes
...
Fix #ifdef protection for AES tests.
2025-11-11 21:46:04 +10:00
Sean Parkinson
b7ade58c52
SP label noinline: function inlined even when asked not to
...
The label L_521_mont_reduce_9_nomask is therefore appearing more than
once in the compiled code.
Adding '%=' to the end of the label ensure it has a unique number
appended to it even when inlined.
2025-11-10 20:05:41 +10:00
David Garske
b45217db00
Merge pull request #9402 from anhu/stsafe_doc
...
Correction about how to get interface files.
2025-11-07 13:59:45 -08:00
Anthony Hu
22ab16df97
Correction about how to get interface files.
2025-11-07 16:53:30 -05:00
Sean Parkinson
f376c8d910
Merge pull request #9388 from lealem47/scan_build
...
Various fixes for nightly tests
2025-11-07 09:30:08 +10:00
Sean Parkinson
3416a0f70e
Merge pull request #9393 from rlm2002/zd20756
...
Integer overflow and dead code removal
2025-11-07 09:27:05 +10:00
JacobBarthelmeh
ca51fda3bb
Merge pull request #9372 from SparkiDev/curve25519_no_lshift_neg_val
...
Curve25519: lshift of a negative value is undefined in C
2025-11-06 15:22:38 -07:00
Ruby Martin
ec60d88f82
remove deadcode else statement when computing kid_type
2025-11-06 15:04:37 -07:00
Ruby Martin
9b2f7a371f
remove duplicate keylen check (deadcode)
...
wrap if statement in macro guard
2025-11-06 15:04:37 -07:00
Ruby Martin
78f2e65da6
add cast to int64_t
2025-11-06 14:58:37 -07:00
Lealem Amedie
2b8f83fd8d
Fixes for getrandom detection
2025-11-06 14:16:38 -07:00
Lealem Amedie
d3de6305e8
Exit wolfcrypt test if wolfCrypt_Init fails
2025-11-06 10:24:44 -07:00
Lealem Amedie
08db159c5d
Fixes for minor scan-build warnings
2025-11-05 21:27:06 -07:00
Sean Parkinson
b0a7f5938c
Merge pull request #9379 from holtrop/rust-wc-ed448
...
Rust wrapper: add wolfssl::wolfcrypt::ed448 module
2025-11-06 09:38:32 +10:00
Sean Parkinson
aa0b37a7e5
Merge pull request #9384 from night1rider/crypto-callback-return-fix
...
Reset Return to Success if fallback to software Copy Callbacks Sha
2025-11-06 08:50:00 +10:00
Daniel Pouzzner
3d99090bcb
Merge pull request #9374 from philljj/spelling_cleanup
...
wolfcrypt test: tiny spelling correction.
2025-11-05 13:44:44 -06:00
night1rider
572776e685
Reset return value to success when copy callback requests to use software function instead
2025-11-04 13:25:16 -07:00
Daniel Pouzzner
54dc060579
implement WC_MUTEX_OPS_INLINE and WC_RWLOCK_OPS_INLINE gates.
2025-11-04 12:01:58 -06:00
Daniel Pouzzner
abec842c59
wolfcrypt/src/asn.c: in wc_Ed25519PublicKeyToDer(), when old FIPS, cast "key" arg to wc_ed25519_export_public().
2025-11-04 09:38:50 -06:00
Josh Holtrop
b82cccce21
Rust wrapper: add wolfssl::wolfcrypt::ed448 module
2025-11-04 08:34:46 -05:00
Daniel Pouzzner
d47108c97f
Merge pull request #9368 from holtrop/rust-wc-ed25519
...
Rust wrapper: add wolfssl::wolfcrypt::ed25519 module
2025-11-03 22:40:43 -06:00
Sean Parkinson
e4d47fb5c7
Curve25519/448: lshift of negative is undefined in C
...
Change all left shifts to be of unsigned values.
In some cases the values were negative.
Changed 128-bit variable implementation of Curve25519. (generated)
Changed Ed25519 C implementation.
Changed Curve448 C implementation. (generated)
Changed Ed448 C implementation. (generated)
2025-11-04 10:40:23 +10:00
jordan
720b8e117c
wolfcrypt test: tiny spelling correction.
2025-11-03 10:06:47 -06:00
Sean Parkinson
574067e204
Curve25519: lshift of a negative value is undefined in C
...
Change all left shifts to be of unsigned values.
In some cases the values were negative.
Added macros to make the code easier to be consistent.
2025-11-03 22:08:52 +10:00