David Garske
c5e63b84ca
Merge pull request #8840 from douzzer/20250605-linuxkm-DRBG-multithread-round-1
...
20250605-linuxkm-DRBG-multithread-round-1
2025-06-12 13:17:54 -07:00
JacobBarthelmeh
47cf634965
add a way to restore previous pid behavior
2025-06-10 16:12:09 -06:00
JacobBarthelmeh
31490ab813
add sanity checks on pid with RNG
2025-06-10 14:37:11 -06:00
Daniel Pouzzner
ae15693fa8
linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_generate() and wc_linuxkm_drbg_seed(), check retval from wc_LockMutex().
...
wolfcrypt/src/random.c: in Hash_DRBG_Generate(), restore smallstack path for digest[], but use non-smallstack path for WOLFSSL_LINUXKM.
2025-06-07 07:07:20 +04:00
Daniel Pouzzner
dbc34352c7
linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_seed(), prefix the supplied seed with the CPU ID of each DRBG, to avoid duplicate states;
...
wolfcrypt/src/random.c: in Hash_DRBG_Generate(), always put digest[] on the stack even in WOLFSSL_SMALL_STACK configuration (it's only 32 bytes);
configure.ac: default smallstackcache on when linuxkm-defaults.
2025-06-05 16:31:46 +04:00
David Garske
d04ab3757e
New build option WIN_REUSE_CRYPT_HANDLE to allow reuse of the windows crypt provider handle. Seeding happens on any new RNG or after WC_RESEED_INTERVAL. If using threads make sure wolfSSL_Init() or wolfCrypt_Init() is called before spinning up threads. ZD 19754. Fixed minor implicit cast warnings in internal.c. Add missing hpke.c to wolfssl VS project.
2025-05-06 14:38:02 -07:00
Sean Parkinson
a34284e0a2
Entropy MemUse: support for custom hi res time
...
Call the custom high resolution time function when
CUSTOM_ENTROPY_TIMEHIRES is defined with the function name.
2025-04-17 09:30:29 +10:00
Sean Parkinson
b1aa11d42e
Entropy MemUse: fix for when block size less than update bits
...
When the block size is less than the number of update bits, adding the
update value will make the index larger than ENTROPY_NUM_WORDS.
The update bits, ENTROPY_NUM_UPDATES_BITS, should be less than or equal
to ENTROPY_BLOCK_SZ but is not practical.
Add extra elements to the entropy state to accomadate this.
2025-04-16 10:30:37 +10:00
Daniel Pouzzner
ed5d8f8e6b
update several files in wolfcrypt/src/port/arm to include libwolfssl_sources.h;
...
update wolfcrypt/src/port/af_alg, wolfcrypt/src/port/devcrypto, and wolfcrypt/src/port/kcapi to include libwolfssl_sources.h;
remove a slew of includes across lib sources made redundant by libwolfssl_sources.h.
2025-04-11 13:57:23 -05:00
Daniel Pouzzner
c401f5caf2
move the newly added wolfcrypt/src/wolfssl_sources.h to wolfssl/wolfcrypt/libwolfssl_sources.h, and likewise for wolfssl_sources_asm.h; revert changes to IDE/ project files.
2025-04-04 18:44:12 -05:00
Daniel Pouzzner
217440c885
Add wolfcrypt/src/wolfssl_sources.h and wolfcrypt/src/wolfssl_sources_asm.h,
...
which force on BUILDING_WOLFSSL and do boilerplate includes, and update library
sources to include them at the top.
wolfssl_sources.h includes types.h, error-crypt.h, and logging.h, and
conditionally, config.h. settings.h and wc_port.h are unconditionally
included at the top of types.h.
wolfssl_sources_asm.h includes settings.h, and conditionally, config.h.
Add wolfssl_sources*.h to wolfcrypt/src/include.am, and to several IDE/ project
files.
Also added a TEST_WOLFSSL_SOURCES_INCLUSION_SEQUENCE clause in
wolfssl/wolfcrypt/settings.h to allow coverage testing.
In wolfcrypt/src/misc.c, retain existing ad hoc boilerplate includes, and use
them if WOLFSSL_VIS_FOR_TESTS, otherwise include the new wolfssl_sources.h.
Define WOLFSSL_VIS_FOR_TESTS at top of wolfcrypt/test/test.c.
Also renamed WOLFSSL_NEED_LINUX_CURRENT to WOLFSSL_LINUXKM_NEED_LINUX_CURRENT,
for clarity.
2025-04-04 16:51:04 -05:00
JacobBarthelmeh
25dc3f08e9
random implementation does not require PIC32 build macro
2025-03-27 15:53:39 -06:00
res0nance
c697f87bda
random: correct debug messages
2025-03-17 21:12:51 +08:00
Jiri Malak
d066e6b9a5
correct comment for _WINSOCKAPI_ macro manipulation
...
The issue is with MINGW winsock2.h header file which is not compatible
with Miscrosoft version and handle _WINSOCKAPI_ macro differently
2025-02-23 11:15:38 +01:00
Daniel Pouzzner
1e17d737c8
"#undef _WINSOCKAPI_" after defining it to "block inclusion of winsock.h header file", to fix #warning in /usr/x86_64-w64-mingw32/usr/include/winsock2.h.
2025-02-06 18:41:20 -06:00
David Garske
60c5a0ac7f
Peer review feedback. Thank you @jmalak
2025-02-04 14:32:24 -08:00
David Garske
345c969164
Fixes for Watcom compiler and new CI test
...
* Correct cmake script to support Open Watcom toolchain (#8167 )
* Fix thread start callback prototype for Open Watcom toolchain (#8175 )
* Added GitHub CI action for Windows/Linux/OS2
* Improvements for C89 compliance.
Thank you @jmalak for your contributions.
2025-02-04 12:38:52 -08:00
JacobBarthelmeh
edd8355576
Merge pull request #8326 from gasbytes/patch-rng-health-test-heap-hint
...
Fix missing heap hint in RNG health test XMALLOC call
2025-01-27 13:49:53 -08:00
JacobBarthelmeh
2c24291ed5
update copyright date
2025-01-21 09:55:03 -07:00
Sean Parkinson
6e383547dd
Entropy Apple: change time function called
...
Use clock_gettime_nsec_np and get the raw monotonic counter.
2025-01-16 04:14:55 +10:00
Reda Chouk
d491e54c98
Fix heap hint usage in wc_RNG_HealthTest
...
Pass provided heap hint to XMALLOC instead of NULL in RNG health test
function to ensure proper memory allocation with custom heap.
2025-01-10 19:13:53 +01:00
Daniel Pouzzner
122502e2b1
wolfCrypt -Wconversion expansion: fix numerous warnings, all benign, from -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion.
2024-12-18 11:51:06 -06:00
Andrew Hutchings
1d2c78e3be
Add support for Raspberry Pi Pico
...
This adds improved support for the Raspberry Pi Pico range of
microcontrollers.
Benchmark now compiles, and added support for the RNG functions of the
Pico SDK. This gives a ~2x RNG performance improvement on the RP2040 and
over 3x improvement on the RP2350.
The accelerated SHA256 in the RP2350 unfortunately cannot be used with
wolfSSL.
2024-11-07 17:26:51 +00:00
Anthony Hu
54dc8320d2
added a missing %d
2024-10-30 14:53:21 -04:00
JacobBarthelmeh
45b88048c2
make macro unique to wolfSSL
2024-09-25 15:59:57 -06:00
JacobBarthelmeh
d72c0b372c
Merge pull request #7990 from buchstabenwurst/master
...
Add support for (DevkitPro)libnds
2024-09-25 15:52:34 -06:00
night1rider
1cb324affa
Expanding mutexing and Adding in AES Callbacks for HW
2024-09-20 09:42:53 -06:00
night1rider
fe7987f241
Adding SHA-384/512 support, Null Checks, RNG Health Test for HW, and MAA call update for MAX3266X Port.
2024-09-20 09:42:52 -06:00
msi-debian
2e8cf39feb
Initial PR for MAX32665 and MAX32666 TPU HW Support
2024-09-20 09:42:52 -06:00
Joshua Okeleke
337456cc1e
Add support for (DevkitPro)libnds
2024-09-18 21:27:53 +02:00
David Garske
294362a0b7
Fixes for building x86 in Visual Studio for non-windows OS.
2024-08-19 13:00:41 -07:00
Daniel Pouzzner
b40913e80c
wolfcrypt/src/random.c: restore outer cast in array_add() to avoid -Wconversion added in b28e22aef0, itself a fix for a defect added in ed11669f3c (root cause of warning is implicit type promotion).
2024-07-25 15:25:32 -05:00
JacobBarthelmeh
b28e22aef0
fix for casting with add
2024-07-25 09:16:05 -06:00
JacobBarthelmeh
31a6a2bf59
update copyright to 2024
2024-07-19 13:15:05 -06:00
David Garske
2b4acf5027
Revert built-in wc_GenerateSeed support for RX TSIP removed in #6851 .
2024-07-15 10:10:38 -07:00
Daniel Pouzzner
b3e8f0ad24
add --enable-debug-trace-errcodes, WOLFSSL_DEBUG_TRACE_ERROR_CODES, WC_ERR_TRACE(), WC_NO_ERR_TRACE(), support/gen-debug-trace-error-codes.sh. also add numerous deployments of WC_NO_ERR_TRACE() to inhibit frivolous/misleading errcode traces when -DWOLFSSL_DEBUG_TRACE_ERROR_CODES.
2024-06-08 16:39:53 -05:00
Juliusz Sosinowicz
7ed5e0b3ba
zephyr no malloc
...
- cert gen
- csr gen
- pkcs12
- Compiles for Zephyr 3.4.0 and 2.7.4
- Add support for CONFIG_POSIX_API
2024-05-07 10:38:01 +02:00
kaleb-himes
e45867bbc3
WIN fips section refactor / wolfEntropy API syntax adjustment
2024-04-09 09:48:33 -06:00
kaleb_himes
81f5ac7f6c
SRTP-KDF FS Preview
2024-04-09 09:48:33 -06:00
David Garske
83dc3dfac1
Add support for the Infineon/Cypress HAL TRNG.
2024-03-28 13:57:26 -07:00
gojimmypi
e40eb3c774
Update Arduino examples; add wolfcrypt breadcrumbs.
2024-03-06 15:13:37 -08:00
Daniel Pouzzner
dfbde4514b
global refactor of static mutex initialization to use WOLFSSL_MUTEX_INITIALIZER, and adjustment of WOLFSSL_MUTEX_INITIALIZER macro to take an argument, for Linux kernel compatibility.
2024-02-29 02:11:32 -06:00
Brett Nicholas
55421a11b9
review: removed WOLFSSL_ABI from and refactored args for wc_rng_new_ex, updated tests
2024-02-27 10:17:24 -07:00
Brett Nicholas
1a5064cf8c
add full support to wolfcrypt tests for random.c cryptocbs
2024-02-23 13:02:05 -07:00
David Garske
815c290293
Merge pull request #7231 from anhu/maxqrng
...
Use the MAXQ1065/1080 rng when available.
2024-02-16 09:43:46 -08:00
David Garske
6f88ed0901
Merge pull request #7177 from gojimmypi/PR-Arduino-Update
...
Improved Arduino Support: ESP32, Due
2024-02-13 09:43:42 -08:00
gojimmypi
bf29066d70
Add wolfSSL debug messages
2024-02-08 17:22:36 -08:00
Anthony Hu
16c74a31b2
Use the MAXQ1065/1080 rng when available.
2024-02-08 16:10:36 -05:00
gojimmypi
ee0e25de5f
Improved Arduino Support, ESP32, Due; (+ code review x2)
2024-02-01 08:31:00 -08:00
JacobBarthelmeh
3f10496757
add weak source of entropy on microblaze to test with
2024-01-03 13:35:00 -08:00