Files
wolfssl/tests
Tobias Frauenschläger af0eb33fff Invalidate LMS key when private key write fails
wc_LmsKey_Sign computes the signature with the one-time key at the
current leaf and only afterwards advances the leaf index and writes it
to non-volatile storage. When that write failed the signature was erased
but the key state was left as OK, so the same in-memory key could sign
again while storage still recorded the already consumed leaf. A restart
followed by wc_LmsKey_Reload would then resume from that leaf and sign a
second message with the same LM-OTS private key.

Set the key state to bad before signing and only restore it to OK once
the advanced private key has been committed to storage, matching what
wc_xmsskey_signupdate already does for XMSS. Exhausted keys keep their
existing NOSIGS state.

Fixes F-7411.
2026-08-07 08:11:23 +02:00
..
2026-08-07 09:30:56 +10:00
2026-02-18 09:52:21 -07:00
2026-02-25 15:19:13 +01:00
2026-02-25 15:19:13 +01:00
2026-08-05 13:53:47 -05:00
2026-02-18 09:52:21 -07:00

Before creating any new configure files (.conf) read the CONF_FILES_README.md