Files
wolfssl/wolfcrypt/src
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-06-10 11:36:29 +02:00
2026-07-08 09:33:47 +10:00
2026-07-30 10:50:52 +10:00
2026-07-30 10:50:52 +10:00
2026-08-01 13:11:52 +02:00
2026-08-05 13:53:47 -05:00
2026-07-30 10:50:52 +10:00
2026-08-05 13:53:47 -05:00
2026-08-06 22:19:42 +02:00
2026-08-03 16:30:31 -07:00
2026-07-29 14:59:47 +10:00
2026-07-02 22:23:52 +09:00
2026-07-30 10:50:52 +10:00
2026-07-30 10:50:52 +10:00
2026-05-30 15:11:36 -05:00
2026-08-05 14:08:25 +10:00
2026-07-08 09:33:47 +10:00
2026-07-30 10:50:52 +10:00