Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
de15791
Add support for LMS and XMSS
padelsbach May 22, 2026
bb6cc10
Fix busted rebase
padelsbach Jun 1, 2026
a6e74cb
Apply WH_NVM_FLAGS_NONEXPORTABLE to prevent export of lms/xmss priv key
padelsbach Jun 16, 2026
a3546cd
Block import of a private LMS/XMSS key
padelsbach Jun 16, 2026
5285fcd
Add public key export via wh_Client_KeyExportPublic with WH_KEY_ALGO_…
padelsbach Jun 16, 2026
e72d251
Add public key import via wh_Client_LmsImportPubKey and wh_Client_Xms…
padelsbach Jun 16, 2026
172db4b
Convert LMS/XMSS docs to doxygen in wh_client_crypto.h
padelsbach Jun 16, 2026
a55c64b
Enforce write-through on LMS/XMSS keygen, update docs
padelsbach Jun 17, 2026
b4fefb8
Remove stale documentation reference
padelsbach Jun 17, 2026
c426453
Update SigsLeft routines to return boolean to follow wolfssl, update …
padelsbach Jun 17, 2026
85aebf3
Remove WOLFSSL_WC_LMS and WOLFSSL_WC_XMSS
padelsbach Jun 17, 2026
1978b60
Surface errors from POST for LMS/XMSS
padelsbach Jun 18, 2026
b5b0e06
Redesign LMS/XMSS MakeKey callbacks to perform the NVM write
padelsbach Jun 18, 2026
516d5d3
Add whCryptoStatefulSigHeader in place of fixed offsets, add check fo…
padelsbach Jun 19, 2026
6601aeb
Remove "post-patch" comment
padelsbach Jun 19, 2026
4935746
Add req_len checks in LMS/XMSS SigsLeft routines
padelsbach Jun 19, 2026
1a5ef03
Increase WOLFHSM_CFG_SERVER_KEYCACHE_BIG_BUFSIZE when LMS or XMSS is …
padelsbach Jun 19, 2026
d9bdb8e
Add NVM lock/unlock in LMS/XMSS
padelsbach Jun 19, 2026
50a127e
Fail build when WOLFSSL_WC_LMS_SERIALIZE_STATE is defined
padelsbach Jun 19, 2026
8c45517
Add comment explaining duplicate copy possibility in wh_Crypto_LmsDes…
padelsbach Jun 19, 2026
bde9641
Rename StatefulSig Bridge to Context for consistency with the rest of…
padelsbach Jun 19, 2026
f521086
Redesign LMS/XMSS MakeKey per review discussion
padelsbach Jun 19, 2026
1c479a1
Add precompiler checks for VERIFY_ONLY and CFG_DMA
padelsbach Jun 19, 2026
df6d498
Add LMS/XMSS VERIFY_ONLY matrix entry in CI
padelsbach Jun 20, 2026
8a041f8
Add LMS/XMSS test cases to test-refactor. Coverage is equivalent with…
padelsbach Jun 20, 2026
c0e3937
Add testing for LMX/XMSS direct DMA keygen for coverage
padelsbach Jun 22, 2026
4ed2c8a
Rework LMS MakeKey writeCb to look like XMSS, per review
padelsbach Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build-and-test-refactor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ jobs:
- name: Build and test refactor DMA ASAN
run: cd test-refactor/posix && make clean && make -j DMA=1 ASAN=1 WOLFSSL_DIR=../../wolfssl && make run

# Build and test with LMS and XMSS both in verify-only mode
- name: Build and test refactor DMA ASAN LMS/XMSS verify-only
run: cd test-refactor/posix && make clean && make -j DMA=1 ASAN=1 LMS_VERIFY_ONLY=1 XMSS_VERIFY_ONLY=1 WOLFSSL_DIR=../../wolfssl && make run

# Build and test mixed: LMS verify-only, XMSS full (exercises shared gating)
- name: Build and test refactor DMA ASAN LMS verify-only XMSS full
run: cd test-refactor/posix && make clean && make -j DMA=1 ASAN=1 LMS_VERIFY_ONLY=1 WOLFSSL_DIR=../../wolfssl && make run

# Build and test ASAN build, with wolfCrypt tests enabled.
- name: Build and test refactor ASAN TESTWOLFCRYPT
run: cd test-refactor/posix && make clean && make -j ASAN=1 TESTWOLFCRYPT=1 WOLFSSL_DIR=../../wolfssl && make run
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ jobs:
- name: Build and test DMA ASAN
run: cd test && make clean && make -j DMA=1 ASAN=1 WOLFSSL_DIR=../wolfssl && make run

# Build and test with LMS and XMSS both in verify-only mode
- name: Build and test DMA ASAN LMS/XMSS verify-only
run: cd test && make clean && make -j DMA=1 ASAN=1 LMS_VERIFY_ONLY=1 XMSS_VERIFY_ONLY=1 WOLFSSL_DIR=../wolfssl && make run

# Build and test mixed: LMS verify-only, XMSS full (exercises shared gating)
- name: Build and test DMA ASAN LMS verify-only XMSS full
run: cd test && make clean && make -j DMA=1 ASAN=1 LMS_VERIFY_ONLY=1 WOLFSSL_DIR=../wolfssl && make run

# Build and test ASAN build, with wolfCrypt tests enabled.
- name: Build and test ASAN TESTWOLFCRYPT
run: cd test && make clean && make -j ASAN=1 TESTWOLFCRYPT=1 WOLFSSL_DIR=../wolfssl && make run
Expand Down
2 changes: 2 additions & 0 deletions docs/src/5-Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ wolfHSM ships with two reference flash drivers usable on host platforms and in t

Vendor-supplied flash drivers ship with the platform ports under `port/<vendor>/`. New platforms are integrated into wolfHSM by implementing the `whFlashCb` callback set against the device's flash controller; nothing in the NVM library above this layer needs to change.

**Write-through requirement (port maintainers).** wolfHSM's power-loss guarantees assume the port's `Program` and `Verify` callbacks are write-through to the physical medium: `Program` must make the data durable before it returns, and `Verify` must read back from the medium rather than from any volatile write cache. A backend that buffers writes in a cache that can be lost on power failure breaks this assumption — on the next boot a committed object can roll back to a prior value. For stateless key material this is only a durability concern, but for **stateful or monotonic objects it is a security issue**: a rolled-back LMS or XMSS private key reuses a one-time signature index, enabling forgery, and a rolled-back monotonic counter defeats anti-rollback and replay protection. wolfHSM cannot detect or enforce this property, so a port whose flash controller caches writes must either disable that caching or issue an explicit flush before `Program`/`Verify` return.

### Optional NVM Backing

The NVM subsystem described above is **optional**. A server can be initialized with `whServerConfig.nvm == NULL`, in which case it runs with no persistent object store at all. This suits clients and cores that only need cached-key cryptography and have no flash available for an NVM partition — at the cost of a reduced feature set, since everything that depends on persistent storage becomes unavailable.
Expand Down
Loading
Loading