← Back to section · Post-Quantum Cryptography

Winternitz Signatures: Trading Hash Chains for Size

How Winternitz one-time signatures use hash chains to encode several bits at once: the parameter w sliding between signature size and computation, why the checksum is indispensable, and the WOTS+ refinement.

Published 22 November 2026 · 5 min read · PQ Frontier

Winternitz Signatures: Trading Hash Chains for Size
AI-generated site artwork
Video explainer · Hash-based signatures

The arithmetic of Lamport signatures is simple and expensive: as many pairs of secrets as the digest has bits, as many preimages revealed in every signature — roughly 8 KB of signature for a 256-bit digest. Robert Winternitz proposed trading computation for size (the idea was published in Merkle’s writings): if hashing can be iterated into chains, why not let a position on a chain stand for several bits at once? The result is the Winternitz one-time signature (WOTS), today the shared one-time component of XMSS, LMS and SPHINCS+.

Hash chains: one chain, one digit

At key generation, the signer picks a set of random starting values and iterates each one through 2^w − 1 hash applications to reach a chain end. The chain ends form the public key; the starting values form the private key. To sign, split the message digest into digits in base 2^w (each digit between 0 and 2^w − 1); if digit j equals d, reveal the value d steps along chain j. The verifier takes each revealed value and hashes it the remaining 2^w − 1 − d steps, which necessarily lands on the chain end, and compares against the public key.

One-wayness enforces direction: walking from a revealed value toward the chain end is public computation anyone can do; walking backward to forge a smaller digit would require inverting the hash. A signature reveals positions, never free-floating secrets that could be rearranged at will.

A minimal example builds the intuition: let w = 2, so each chain has 3 steps (positions 0 to 3). If the digit carried by some chain is 1, the signature reveals the value at step 1; the verifier hashes it twice more to reach the chain end and matches it against the public key. To change that digit to 0, an attacker would need the preimage of step 0 — blocked by one-wayness; to change it to 2 or 3, the attacker merely hashes once or twice more — which is precisely the direction the checksum of the next section exists to seal. Enlarging w lengthens the chains and the digits, but the “free to increase” direction never disappears; the checksum’s necessity does not depend on the parameters.

The parameter w: an exchange rate between size and computation

The parameter w is the soul of the scheme. At w = 1, each chain encodes a single bit and the scheme degenerates toward Lamport’s shape — many chains, each very short. At w = 4, one chain carries 4 bits, the number of chains drops to a quarter and signatures shrink, but each chain may need up to 15 steps. At w = 8 or 16, chains keep getting fewer while the longest chain climbs to 255 or 65,535 steps. In other words, w makes “how many hash values go into a signature” and “how many hashes signing and verification must compute” two sides of an adjustable trade. Practical implementations pick mid-range values balancing size against speed — the standardized parameter sets of XMSS and LMS, and the parameter tables of SPHINCS+, are all points chosen on this curve. The choice should also weigh where verification compute lives: if firmware verification runs on a feeble microcontroller, pushing w too high slows every boot; if signing and verifying both happen on servers, computation can be traded for size far more aggressively. The same parameter has no single optimum across deployment shapes, and the standards offer multiple parameter tiers precisely so deployers can pick a point for their own compute terrain instead of accepting one global compromise.

Now count the computation. When signing, each chain advances on average about half its length; verification completes on average the other half — the hash counts for signing and verifying are broadly comparable, both growing with 2^w and shrinking with the number of chains. The public side offers a small extra saving: all chain ends can be hashed together into a single value for publication, so the verifier, after completing each chain, checks the chain end and then the compressed value — the public key shrinks to the length of one hash, which is one of the preconditions for Merkle trees later gathering these keys into leaves in bulk. A Lamport public key, with its 512 separate hash values, admits no such compression; on component size alone, Winternitz already wins more than one round.

The checksum: closing the ‘forward only’ loophole

Message chains alone are not enough. Suppose a digest digit is 5 and the signature reveals the value 5 steps along the chain; an attacker pushes that value one step further and obtains a perfectly valid signature component for digit 6. Any forgery that only needs to increase digits can be had for free this way: an unprotected Winternitz chain lets messages be mauled in the digit-wise non-decreasing direction.

The fix is a checksum: sum, over all message digits, the difference between each digit and its maximum, encode that sum in the same base, and sign it with additional chains. Increasing any message digit necessarily decreases the checksum, and decreasing a checksum digit means walking a chain backward — a preimage problem. Increase and decrease are locked into a contradiction by the checksum: altering the message demands breaking both directions at once, and one of them is sealed by one-wayness. It is a classic move in hash-based design, and it explains why every WOTS signature drags along a seemingly redundant set of checksum chains.

WOTS+: a tighter reduction

What standards actually use is not the original WOTS but Hülsing’s WOTS+. Its key change: at each step of a chain, the current value is XORed with a keyed, position-dependent random mask before being hashed. The security reduction then no longer needs to model the hash function as an ideal random permutation; the assumption drops to weaker, more realistic properties, and chain lengths and output sizes can be chosen more leanly. In the parameter systems of SP 800-208 and FIPS 205, WOTS+ is the default one-time component — it is exactly what SLH-DSA uses internally (our slh-dsa subcategory dissects its place inside SPHINCS+; this article treats it as the general-purpose component it is).

Closing

Winternitz signatures upgrade Lamport’s “one pair of secrets per bit” to “one chain per digit”, exchanging size against computation through the dial w and sealing the forgery direction with a checksum. The scheme is still one-time, but its signatures have shrunk to a size that Merkle trees can gather in bulk. Because WOTS+ is small and solid enough, XMSS and LMS can mount it in trees to build practical stateful systems, and SPHINCS+ can mount it in a hypertree to build a stateless one — a single component carrying both great branches of the family.

Tags: WinternitzWOTS+hash chainsone-time signatures