Repository navigation
Add support for for SLH-DSA - #512
padelsbach wants to merge 16 commits into
Conversation
aed3238 to
7fe4069
Compare
64514ae to
a9eb8a9
Compare
a9eb8a9 to
43e9f7f
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #512
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
Findings: 11
11 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #512
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
Findings: 7
7 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Frauschi
left a comment
There was a problem hiding this comment.
Went through the SLH-DSA callback support. Big addition, and the structure mirrors the ML-DSA paths closely enough to follow easily.
Comments inline. The ones I would most like to see addressed are the DMA READ_POST after a denied READ_PRE in _HandleSlhDsaVerifyDma, the unvalidated seedSz / 3 in both keygen handlers, and the seed left resident in the comm packet. The rest are smaller consistency points against the ML-DSA and ML-KEM siblings, and the last few are nits you can take or leave.
Nothing here is a blocker.
Frauschi
left a comment
There was a problem hiding this comment.
Two small follow-ups from the last round - neither is blocking, and the rest of what I raised looks good now.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Cache-mode flag handling, DER error reporting, and DMA cleanup can currently produce false success or leave unintended cached keys.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Adds end-to-end SLH-DSA support across wolfHSM, including key management, signing, verification, DMA, crypto callbacks, examples, and CI coverage.
Changes:
- Adds SLH-DSA wire protocols and client/server cryptographic operations.
- Supports cached, exported, seeded, non-DMA, DMA, and callback-only workflows.
- Extends configuration, tests, examples, and CI for SLH-DSA.
| File | Description |
|---|---|
wolfhsm/wh_settings.h |
Documents SLH-DSA buffer requirements. |
wolfhsm/wh_server_crypto.h |
Declares server cache helpers. |
wolfhsm/wh_message_crypto.h |
Defines SLH-DSA wire messages. |
wolfhsm/wh_crypto.h |
Declares DER serialization support. |
wolfhsm/wh_common.h |
Adds the SLH-DSA algorithm identifier. |
wolfhsm/wh_client_crypto.h |
Exposes client SLH-DSA APIs. |
test/wh_test_check_struct_padding.c |
Covers new message layouts. |
test/config/user_settings.h |
Enables SLH-DSA in tests. |
test-refactor/wh_test_list.c |
Registers SLH-DSA tests. |
test-refactor/posix/Makefile |
Adds verify-only configuration. |
test-refactor/misc/wh_test_check_struct_padding.c |
Covers refactored message layouts. |
src/wh_server_keystore.c |
Supports public-key export. |
src/wh_server_crypto.c |
Implements server operations and DMA handlers. |
src/wh_message_crypto.c |
Implements message translation. |
src/wh_crypto.c |
Implements SLH-DSA DER conversion. |
src/wh_client_cryptocb.c |
Integrates wolfCrypt callbacks. |
src/wh_client_crypto.c |
Implements client and DMA APIs. |
examples/posix/wh_posix_server/user_settings.h |
Enables server-side SLH-DSA. |
examples/posix/wh_posix_client/user_settings.h |
Enables client and callback-only modes. |
examples/posix/wh_posix_client/Makefile |
Adds callback-only build selection. |
examples/demo/client/wh_demo_client_crypto.h |
Declares the SLH-DSA demo. |
examples/demo/client/wh_demo_client_crypto.c |
Implements the SLH-DSA demo. |
examples/demo/client/wh_demo_client_all.c |
Runs the SLH-DSA demo. |
.github/workflows/build-and-test-refactor.yml |
Tests verify-only builds. |
.github/workflows/build-and-run-examples.yml |
Tests callback-only operation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| int ret; | ||
| SlhDsaKey key[1]; | ||
| whMessageCrypto_SlhDsaSignRequest req; | ||
| whMessageCrypto_SlhDsaSignResponse res; |
|
@padelsbach can you check the copilot comments and address if necessary, otherwise resolve and reassign me plz |
bbc5a63 to
aa14855
Compare
fe43259 to
9efa82f
Compare
…lag for cleanup, zero check on cleanup
…to match LMS/XMSS
d408125 to
7531b59
Compare


No description provided.