Skip to content

Commit 23f62bc

Browse files
committed
linuxkm/module_exports.c.template: add wolfssl/wolfcrypt/wc_slhdsa.h.
wolfcrypt/src/wc_slhdsa.c: * refactor SAVE_VECTOR_REGISTERS2() in slhdsakey_fors_sign() as CAN_SAVE_VECTOR_REGISTERS(), with local save-restore wrappers around the rest of the vector calls deeper in the call stack, to avoid failing GFP_ATOMIC allocations and long spans with interrupts disabled. * fix numerous bugprone-macro-parentheses and bugprone-signed-char-misuses. * use readUnalignedWord64() in SHAKE256_SET_SEED_HA_X4_*() and slhdsakey_shake256_set_seed_ha_x4() to avoid benign unaligned access warnings from sanitizers. wolfcrypt/test/test.c: * in TestDumpData(), use WOLFSSL_DEBUG_PRINTF(), not fprintf(stderr, ...), for portability. * in slhdsa_test_param() and slhdsa_test(), use WC_DECLARE_VAR() and friends for SlhDsaKey allocations, and use ERROR_OUT() and single-return-point refactors to fix error path memory leaks.
1 parent 39b3433 commit 23f62bc

3 files changed

Lines changed: 365 additions & 243 deletions

File tree

linuxkm/module_exports.c.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@
176176
#ifdef HAVE_DILITHIUM
177177
#include <wolfssl/wolfcrypt/dilithium.h>
178178
#endif
179+
#ifdef WOLFSSL_HAVE_SLHDSA
180+
#include <wolfssl/wolfcrypt/wc_slhdsa.h>
181+
#endif
179182

180183
#ifdef OPENSSL_EXTRA
181184
#ifndef WOLFCRYPT_ONLY

0 commit comments

Comments
 (0)