Introduction: Imperative for Quantum-Resistant Signatures
Digital signatures are a cornerstone of modern information security, providing authenticity, integrity, and non-repudiation for digital communications. The security of prevalent schemes such as RSA, DSA, and ECDSA is predicated on the computational hardness of number-theoretic problems—specifically, integer factorization and the discrete logarithm problem. However, the advent of large-scale quantum computers threatens to render these foundations obsolete. Shor's algorithm, a quantum algorithm, can solve both problems in polynomial time, effectively breaking the cryptographic security of a significant portion of our current digital infrastructure.
This imminent threat has catalyzed the field of Post-Quantum Cryptography (PQC), a discipline focused on developing cryptographic systems secure against both classical and quantum adversaries. Among the various families of PQC candidates (lattice-based, code-based, isogeny-based, etc.), Hash-Based Signature (HBS) schemes occupy a unique and trusted position. First conceived in the late 1970s, their security relies not on structured mathematical problems, but on the minimal and well-understood properties of cryptographic hash functions, such as preimage resistance. Given that Grover's quantum search algorithm offers only a quadratic speedup for finding preimages, the security of hash functions is believed to degrade far more gracefully under quantum attacks than that of their number-theoretic counterparts. This property makes HBS a prime candidate for Ethereum's post-quantum roadmap, despite the challenge that it lacks the algebraic structure needed for native BLS-style aggregation.
This reliance on a single, symmetric-key primitive makes HBS schemes particularly attractive from a security assurance perspective. They are built from the ground up on a foundation we understand deeply and trust immensely. The entire edifice of HBS begins with a fundamental, yet seemingly restrictive, concept: One-Time Signature (OTS). Understanding the OTS principle is not merely an academic exercise; it is essential for comprehending the design of nearly all modern hash-based schemes, including the stateful XMSS (eXtended Merkle Signature Scheme) variants relevant to Ethereum's post-quantum roadmap, and the stateless SPHINCS+ standard selected by NIST. In this first post of our series, we will delve into the foundations of OTS: Lamport OTS and Winternitz OTS.
Lamport One-Time Signature Scheme
The Lamport OTS, introduced by Leslie Lamport in 1979, is the archetypal hash-based signature. It provides a direct construction of a signature scheme from any one-way function, which is instantiated in practice with a cryptographic hash function KaTeX can only parse string typed expression
H. The scheme is designed to sign a message of a fixed length, say KaTeX can only parse string typed expression
n bits.
Protocol Description
A Lamport OTS scheme consists of three algorithms.
Key Generation
To generate a key pair for an KaTeX can only parse string typed expression
n-bit message:
- The signer generates
KaTeX can only parse string typed expression
n×2 random secret values (secret key), each of length KaTeX can only parse string typed expression
k (e.g., KaTeX can only parse string typed expression
k=256 bits). This secret key, KaTeX can only parse string typed expression
sk, is structured as two sets of KaTeX can only parse string typed expression
n values: KaTeX can only parse string typed expression
sk={(ski,0,ski,1)}i=1n.
- The public key,
KaTeX can only parse string typed expression
pk, is derived by applying the hash function KaTeX can only parse string typed expression
H to each secret value: KaTeX can only parse string typed expression
pk={(pki,0,pki,1)}i=1n where KaTeX can only parse string typed expression
pki,b=H(ski,b) for KaTeX can only parse string typed expression
b∈{0,1}.
The public key is published, while the secret key is kept private.
Signature Generation
To sign an KaTeX can only parse string typed expression
n-bit message KaTeX can only parse string typed expression
m=m1m2…mn:
- For each bit
KaTeX can only parse string typed expression
mi of the message, the signer selects the corresponding secret value from the key pair.
- The signature
KaTeX can only parse string typed expression
σ is the concatenation of these KaTeX can only parse string typed expression
n selected values: KaTeX can only parse string typed expression
σ=(σ1,σ2,…,σn) where KaTeX can only parse string typed expression
σi=ski,mi.

Signature Verification
Given the public key KaTeX can only parse string typed expression
pk, a message KaTeX can only parse string typed expression
m, and a signature KaTeX can only parse string typed expression
σ:
- The verifier rederives the message bits
KaTeX can only parse string typed expression
m1m2…mn.
- For each component
KaTeX can only parse string typed expression
σi of the signature, the verifier applies the hash function KaTeX can only parse string typed expression
H.
- The signature is valid if for every
KaTeX can only parse string typed expression
i from 1 to KaTeX can only parse string typed expression
n, the computed hash matches the corresponding public key element, conditioned on the message bit: KaTeX can only parse string typed expression
∀i∈{1,…,n}:H(σi)=pki,mi

Security and Limitations
The security of Lamport OTS is directly reducible to the preimage resistance of the hash function KaTeX can only parse string typed expression
H. An adversary possessing KaTeX can only parse string typed expression
pk cannot compute any of the KaTeX can only parse string typed expression
ski,b values, and thus cannot forge a signature for any bit.
The critical limitation is that each key pair is strictly one-time use. After signing a message KaTeX can only parse string typed expression
m, the signer reveals half of their secret key. If the same key pair were used to sign a different message KaTeX can only parse string typed expression
m′, an adversary could observe the revealed secrets for both signatures. For any bit position KaTeX can only parse string typed expression
i where KaTeX can only parse string typed expression
mi=mi′, the adversary would learn both KaTeX can only parse string typed expression
ski,0 and KaTeX can only parse string typed expression
ski,1.
This knowledge would allow them to substitute either value at will in a future forgery, compromising the security of that bit position permanently. While conceptually foundational, the resulting large key and signature sizes (KaTeX can only parse string typed expression
2nk bits for the public key, and KaTeX can only parse string typed expression
nk bits for the signature) make the original Lamport scheme impractical.
Winternitz OTS
The impracticality of Lamport's scheme, primarily due to its large key and signature sizes, led to a crucial optimization by Robert Winternitz. The core innovation of the Winternitz One-Time Signature (W-OTS) is to trade bits for computation, significantly compacting the signature representation. Instead of a binary choice for each bit, W-OTS processes the message in larger chunks using the elegant mechanism of hash chains.
Core Idea: Signing with Hash Chains
A hash chain of length KaTeX can only parse string typed expression
k on a value KaTeX can only parse string typed expression
x is the sequence KaTeX can only parse string typed expression
(H0(x),H1(x),…,Hk(x)), where KaTeX can only parse string typed expression
H0(x)=x and the chain progresses via iterative hashing: KaTeX can only parse string typed expression
Hj(x)=H(Hj−1(x)) for KaTeX can only parse string typed expression
j>0.
The W-OTS scheme is parameterized by a security parameter KaTeX can only parse string typed expression
n (the output bit size of the hash function) and a Winternitz parameter KaTeX can only parse string typed expression
w, which is a power of 2 (e.g., KaTeX can only parse string typed expression
w=4,16,256).
Key Generation
- The message length (typically length of hash digest) and the parameter
KaTeX can only parse string typed expression
w determine the number of required hash chains, KaTeX can only parse string typed expression
l.
- The secret key consists of
KaTeX can only parse string typed expression
l random KaTeX can only parse string typed expression
n-bit seeds: KaTeX can only parse string typed expression
sk=(sk1,sk2,…,skl).
- The public key is the set of the endpoints of
KaTeX can only parse string typed expression
l hash chains, each of length KaTeX can only parse string typed expression
w−1, starting from the secret key seeds (initial layer): KaTeX can only parse string typed expression
pk=(pk1,pk2,…,pkl) where KaTeX can only parse string typed expression
pki=Hw−1(ski).

Signature Generation
- The message digest
KaTeX can only parse string typed expression
m is converted into a base-KaTeX can only parse string typed expression
w representation, yielding a sequence of chunks KaTeX can only parse string typed expression
(m1,…,ml1), such that KaTeX can only parse string typed expression
m=∑i=1l1mi∗wi−1 where each KaTeX can only parse string typed expression
mi is an integer in KaTeX can only parse string typed expression
{0,…,w−1}. This sequence typically includes message chunks and checksum chunks.

- Crucially, a checksum
KaTeX can only parse string typed expression
C is computed as the sum of the "un-traversed" chain lengths for the message part: KaTeX can only parse string typed expression
C=∑i=1l1(w−1−mi).
- This checksum
KaTeX can only parse string typed expression
C is then also converted into a base-KaTeX can only parse string typed expression
w representation, yielding KaTeX can only parse string typed expression
l2 checksum chunks KaTeX can only parse string typed expression
(c1,…,cl2) such that KaTeX can only parse string typed expression
C=∑i=1l2ci∗wi−1 where each KaTeX can only parse string typed expression
ci is an integer in KaTeX can only parse string typed expression
{0,…,w−1}. The concatenation of message and checksum chunks forms the final codeword, which means KaTeX can only parse string typed expression
b=M∣∣C, with a length KaTeX can only parse string typed expression
l=l1+l2.
- To sign the chunk
KaTeX can only parse string typed expression
bi(e.g., KaTeX can only parse string typed expression
i-th chunk of the final codeword KaTeX can only parse string typed expression
b), the signer reveals an intermediate value from the KaTeX can only parse string typed expression
i-th hash chain by hashing the secret KaTeX can only parse string typed expression
si exactly KaTeX can only parse string typed expression
bi times: KaTeX can only parse string typed expression
σi=Hbi(ski).
- The full signature
KaTeX can only parse string typed expression
σ is the concatenation of these KaTeX can only parse string typed expression
l intermediate hash values.

Signature Verification
- The verifier recomputes the chunks
KaTeX can only parse string typed expression
(b1,…,bl) from the message.
- For each signature part
KaTeX can only parse string typed expression
σi, the verifier continues the hash chain by applying the hash function the remaining number of times, which is KaTeX can only parse string typed expression
w−1−bi.
- The signature is valid if, for all
KaTeX can only parse string typed expression
i, this computation reaches the corresponding public key element: KaTeX can only parse string typed expression
Hw−1−bi(σi)=?pki. This holds because KaTeX can only parse string typed expression
Hw−1−bi(Hbi(ski))=Hw−1(ski)=pki.
W-OTS offers a trade-off: a larger KaTeX can only parse string typed expression
w leads to fewer, but longer, hash chains. This reduces key and signature sizes but increases computational cost. However, the one-time-use constraint remains absolute due to the one-way nature of the chains.
Why Is Checksum Necessary?
The checksum is the component that prevents forgery. After a signature is published, an adversary learns the intermediate value KaTeX can only parse string typed expression
σi=Hbi(ski). From this, they can easily compute any subsequent values on the chain, such as KaTeX can only parse string typed expression
Hbi+1(ski). This means an adversary could slightly change a message chunk KaTeX can only parse string typed expression
bi to a larger value KaTeX can only parse string typed expression
bi′>bi and forge the corresponding signature part.
The checksum defeats this attack. If an adversary attempts to increase a message chunk KaTeX can only parse string typed expression
bi to KaTeX can only parse string typed expression
bi′, the sum of un-traversed lengths for the message part, KaTeX can only parse string typed expression
∑(w−1−bj), will decrease. This causes the checksum KaTeX can only parse string typed expression
C to decrease. To forge a signature for a smaller checksum value, the adversary would need to reverse one of the checksum's hash chains, which is computationally infeasible due to the preimage resistance of the hash function. Thus, the checksum binds all parts of the signature together, ensuring that no part can be altered without invalidating the whole. This mechanism, however, does not change the scheme's fundamental one-time-use nature.
W-OTS+: Modern Refinement for Stronger Security
While the core idea of W-OTS is powerful, its original formulation had specific security weaknesses. The modern variant used in nearly all contemporary HBS schemes is W-OTS+, introduced by Andreas KaTeX can only parse string typed expression
Hu¨lsing in 2013. It strengthens the original design to achieve provable security against stronger adversaries.
The most significant modification in W-OTS+ is the introduction of a family of chain functions through randomized hashing. Instead of a single, simple hash iteration KaTeX can only parse string typed expression
H(⋅), each step in the chain is "tweaked" with a unique public value.
Let KaTeX can only parse string typed expression
F be a cryptographic hash function and KaTeX can only parse string typed expression
r=(r1,r2,…,rw−1) be a set of public bitmasks. The W-OTS+ chain function is defined as:
KaTeX can only parse string typed expression
H0(x,r)=x, KaTeX can only parse string typed expression
Hi(x,r)=F(Hi−1(x,r)⊕ri)fori>0.
Here, KaTeX can only parse string typed expression
⊕ denotes the bitwise XOR operation. Each hashing step is masked with a unique value KaTeX can only parse string typed expression
ri, effectively creating a different hash function for each step in the chain. This prevents attacks that exploit the simple iterative structure of the original W-OTS, such as finding a single hash collision that could be leveraged at multiple points.

The protocol description for W-OTS+ follows the same structure as W-OTS, but replaces the simple chain function KaTeX can only parse string typed expression
Hk(x) with the robust, tweaked version KaTeX can only parse string typed expression
Hk(x,r). For example, verification becomes:
KaTeX can only parse string typed expression
Hw−1−bi(σi,(rbi+1,…,rw−1))=?pki
Because of its formal security proof of strong unforgeability under chosen-message attacks (SUF-CMA), W-OTS+ has become the de facto standard for the OTS layer in modern HBS constructions such as XMSS and SPHINCS+. It is this refined version that serves as the foundational building block in the systems we will explore.
OTS As Foundational Building Block
The "one-time" limitation of Lamport and Winternitz schemes makes them unsuitable for direct use in most applications. Their true power lies in their role as a fundamental building block for more complex, multi-use signature schemes.
- Merkle Signature Scheme (MSS): The classical solution to the one-time problem. It uses a Merkle tree to commit to a large number (
KaTeX can only parse string typed expression
2h) of OTS public keys. The public key of the MSS is the single root of the tree, and a signature consists of an OTS signature plus an authentication path that proves the OTS key used was part of the tree.
- XMSS and XMSS-MT: These are modern, standardized stateful HBS schemes that refine the MSS design by using W-OTS+ and incorporating optimizations to manage multiple trees (hypertree). They are highly relevant to systems like Ethereum that have an inherent state (e.g., block height or epoch number) that can be used to prevent key reuse.
- SPHINCS+: The stateless HBS scheme selected by NIST for standardization. It constructs a hypertree of trees, where lower-level trees' roots are signed by keys from higher-level trees. At the very bottom of this structure, a few-time signature scheme (FTS) is used, which itself is built from OTS principles.
Conclusion
One-Time Signatures represent the theoretical bedrock of hash-based cryptography. They provide a provably secure signature mechanism with post-quantum resilience, relying only on the minimal assumption of a one-way hash function. While their inherent one-time-use constraint is a significant practical limitation, it is this very limitation that more advanced schemes are designed to overcome. By understanding the elegant mechanics of OTS, we have prepared the ground for our next topic: exploring how Ralph Merkle's ingenious use of a hash tree transformed this disposable primitive into a powerful, multi-use signature scheme: XMSS (eXtended Merkle Signature Scheme).
References
- Leslie Lamport, 1979: Constructing Digital Signatures from a One Way Function
- Andreas
KaTeX can only parse string typed expression
Hu¨lsing, 2013: W-OTS+–Shorter Signatures for Hash-based Signature Schemes.
- Daniel J. Bernstein, Daira Hopwood, Andreas
KaTeX can only parse string typed expression
Hu¨lsing, Tanja Lange, Ruben Niederhagen, Louiza Papachristodoulou, Michael Schneider, Peter Schwabe, and Zooko Wilcox-O’Hearn, 2015: SPHINCS: Practical Stateless Hash-Based Signatures.
- National Institute of Standards and Technology, (SPHINCS+/SLH-DSA), 2024: FIPS 205: Stateless Hash-Based Digital Signature Standard.
- Srivastava, Vikas, Anubhab Baksi and Sumit Kumar Debnath, 2023. An Overview of Hash Based Signatures.
- Andreas Huelsing, Denis Butin, Stefan-Lukas Gazdag, Joost Rijneveld, Aziz Mohaisen, 2018:RFC 8391, XMSS: eXtended Merkle Signature Scheme.