← Back to section · Research & Analysis

Experiment Design: Demonstrating How State Reuse Forges a Stateful Signature

Every security warning about XMSS and LMS points at one fact: use a one-time key twice and things break. This teaching experiment walks the full chain at toy parameters — from two signatures under a reused WOTS+ state to an actual forgery — turning the warning from a slogan into experience.

Published 22 November 2026 · 5 min read · PQ Frontier

Experiment Design: Demonstrating How State Reuse Forges a Stateful Signature
AI-generated site artwork
Video explainer · Experimental Research: Reproducible Designs

The research question: turn a slogan into a chain

SP 800-208’s requirements for stateful hash-based signatures are nearly severe: state must never roll back, and a one-time signing key must never be reused. Operators reading such sentences easily file them as conservative compliance boilerplate — until they watch, step by step, how a forgery is assembled after just two uses. This experiment’s purpose is to walk that entire chain in a controlled setting: sign two different messages with the same WOTS+ one-time key, then, from those two public signatures alone, construct a valid signature on a third message.

The question has two layers. The qualitative layer: can every step of the forgery chain be carried through, and where does it snag? The quantitative layer: after k signatures under one key, roughly what fraction of random new messages is forgeable, and how does that fraction grow with k? The first layer proves “possible”; the second explains why even the second use is already dangerous — because the forgeable fraction does not start creeping up from the second use, it jumps to a substantial magnitude at the first reuse.

Setup: toy parameters, deliberately insecure

Parameters must be toy-grade: a small Winternitz parameter for WOTS+ (w equal to 4 or 16, say), a few dozen chains accordingly, and a message digest truncated to a length matching the chain count. Toy parameters serve two purposes: the computation is small enough to rerun freely on a laptop, and the security margin is compressed to zero so forgeries necessarily appear within a reachable number of trials. At specification parameters (w of 16 or 256, dozens of chains, 256-bit digests) the forgery principle is identical, but the message search space is too large to finish within a lab session — the demonstration’s validity does not depend on parameter scale, and that justification belongs in the experiment record.

Key and state management should mimic the real protocol: generate a small-height XMSS tree or a single LMS leaf, maintain a state counter, and increment it after each signature in the normal flow. The reuse is triggered through an experimental switch: roll the counter back to an already-used position and sign a second message. The two messages should be constructed so their digests differ in most digits — generate randomly and record the per-digit distribution of the digests, avoiding a pair that happens to agree in many positions, which would make forgery look harder than it is.

The forgery construction: digit-wise assembly

A WOTS+ signature is essentially a set of intermediate points on hash chains: each chain starts from a secret element and advances along the chain, with the step count set by the corresponding digit of the message digest; verification continues from the signature point to the chain’s end. The key observation: when the same key signs a second message, wherever the second digest’s digit is larger, the second signature exposes a point further along that chain — and since verification only needs to walk from the signature point to the end, a third message whose every digit is at most the digit-wise maximum of the two existing signatures can be signed by picking, digit by digit, the suitable starting point from the two signatures, assembling a complete valid signature.

The forgery program is therefore a loop of digit-wise selection plus verification: generate a candidate message, compute its digest, check whether every digit is covered by the digit-wise maximum of the two existing signatures; if covered, assemble the signature and confirm it with the genuine verification function; if not, move to the next candidate. Record how many candidates it takes until the first success — that number is itself a direct estimate of the forgeable fraction. Then raise the reuse count from 2 to 3, 4, 5 and repeat the whole procedure: the curve of forgeable fraction against reuse count emerges, with the expected shape of rapid growth quickly approaching one — after a few extra uses, almost any message can be forged.

Interpretation: from experimental numbers back to operational conclusions

Keep the two layers separate when interpreting. At the mechanism level, the forgery relies on no weakness of the hash function — no stronger hash can rescue it; the failure is structural, not a cryptanalytic advance, so countermeasures can only live in state management, not in algorithm swaps. At the probability level, toy-parameter forgeable fractions cannot be quoted as specification-parameter values, but the qualitative conclusion about the growth shape does transfer: the first reuse already causes a qualitative change, and risk does not accumulate linearly. Write both points into the experiment’s conclusions and the operational rule “state must never roll back” gains citable experimental backing.

The experiment should also demonstrate what correct engineering defences look like: state counters written to non-rollback storage, signing services that make state advancement and signature generation atomic, and key backup/restore procedures where state may only move forward. Attack first, defences second — then the experiment closes the loop.

Common pitfalls and safety discipline

First, discipline: this experiment runs only at toy parameters with experiment-dedicated keys; the material must never touch any real system’s keys, and all experimental keys and intermediates are destroyed afterwards, with the destruction recorded. Second, quoting toy-parameter success rates externally as real-parameter risk probabilities: the magnitudes differ — the shape transfers, the numbers do not. Third, biased candidate generation: if candidate digests’ digit distribution differs from real messages (all small digits, say), the forgeable fraction is overestimated; candidates must use the same digest distribution as the real scenario. Fourth, demonstrating only the two-use case: the growth curve is the evidence that convinces operators, while a single demonstration is easily dismissed as an edge case. Fifth, skipping independent verification after a successful forgery: the assembled signature must be checked by an unmodified verification implementation — a self-written verifier accepting a self-written forgery proves nothing.

Tags: XMSSLMSStateful SignaturesTeaching Lab