Back to all stories
Technical Blogs
Educational

Post-Quantum Signatures, Part 1: Understanding One-Time Signature

12/18/2025
Post-Quantum Signatures, Part 1: Understanding One-Time Signature

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
. The scheme is designed to sign a message of a fixed length, say
KaTeX can only parse string typed expression
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
-bit message:

  1. The signer generates
    KaTeX can only parse string typed expression
    random secret values (secret key), each of length
    KaTeX can only parse string typed expression
    (e.g.,
    KaTeX can only parse string typed expression
    bits). This secret key,
    KaTeX can only parse string typed expression
    , is structured as two sets of
    KaTeX can only parse string typed expression
    values:
    KaTeX can only parse string typed expression
    .
  2. The public key,
    KaTeX can only parse string typed expression
    , is derived by applying the hash function
    KaTeX can only parse string typed expression
    to each secret value:
    KaTeX can only parse string typed expression
    where
    KaTeX can only parse string typed expression
    for
    KaTeX can only parse string typed expression
    .

The public key is published, while the secret key is kept private.

Signature Generation

To sign an

KaTeX can only parse string typed expression
-bit message
KaTeX can only parse string typed expression
:

  1. For each bit
    KaTeX can only parse string typed expression
    of the message, the signer selects the corresponding secret value from the key pair.
  2. The signature
    KaTeX can only parse string typed expression
    is the concatenation of these
    KaTeX can only parse string typed expression
    selected values:
    KaTeX can only parse string typed expression
    where
    KaTeX can only parse string typed expression
    .

Message 1

Signature Verification

Given the public key

KaTeX can only parse string typed expression
, a message
KaTeX can only parse string typed expression
, and a signature
KaTeX can only parse string typed expression
:

  1. The verifier rederives the message bits
    KaTeX can only parse string typed expression
    .
  2. For each component
    KaTeX can only parse string typed expression
    of the signature, the verifier applies the hash function
    KaTeX can only parse string typed expression
    .
  3. The signature is valid if for every
    KaTeX can only parse string typed expression
    from 1 to
    KaTeX can only parse string typed expression
    , the computed hash matches the corresponding public key element, conditioned on the message bit:
    KaTeX can only parse string typed expression

Message 2

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
. An adversary possessing
KaTeX can only parse string typed expression
cannot compute any of the
KaTeX can only parse string typed expression
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
, 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
, an adversary could observe the revealed secrets for both signatures. For any bit position
KaTeX can only parse string typed expression
where
KaTeX can only parse string typed expression
, the adversary would learn both
KaTeX can only parse string typed expression
and
KaTeX can only parse string typed expression
.

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
bits for the public key, and
KaTeX can only parse string typed expression
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
on a value
KaTeX can only parse string typed expression
is the sequence
KaTeX can only parse string typed expression
, where
KaTeX can only parse string typed expression
and the chain progresses via iterative hashing:
KaTeX can only parse string typed expression
for
KaTeX can only parse string typed expression
.

The W-OTS scheme is parameterized by a security parameter

KaTeX can only parse string typed expression
(the output bit size of the hash function) and a Winternitz parameter
KaTeX can only parse string typed expression
, which is a power of 2 (e.g.,
KaTeX can only parse string typed expression
).

Key Generation

  1. The message length (typically length of hash digest) and the parameter
    KaTeX can only parse string typed expression
    determine the number of required hash chains,
    KaTeX can only parse string typed expression
    .
  2. The secret key consists of
    KaTeX can only parse string typed expression
    random
    KaTeX can only parse string typed expression
    -bit seeds:
    KaTeX can only parse string typed expression
    .
  3. The public key is the set of the endpoints of
    KaTeX can only parse string typed expression
    hash chains, each of length
    KaTeX can only parse string typed expression
    , starting from the secret key seeds (initial layer):
    KaTeX can only parse string typed expression
    where
    KaTeX can only parse string typed expression
    .

H1

Signature Generation

  1. The message digest
    KaTeX can only parse string typed expression
    is converted into a base-
    KaTeX can only parse string typed expression
    representation, yielding a sequence of chunks
    KaTeX can only parse string typed expression
    , such that
    KaTeX can only parse string typed expression
    where each
    KaTeX can only parse string typed expression
    is an integer in
    KaTeX can only parse string typed expression
    . This sequence typically includes message chunks and checksum chunks.

Message Digest

  1. Crucially, a checksum
    KaTeX can only parse string typed expression
    is computed as the sum of the "un-traversed" chain lengths for the message part:
    KaTeX can only parse string typed expression
    .
  2. This checksum
    KaTeX can only parse string typed expression
    is then also converted into a base-
    KaTeX can only parse string typed expression
    representation, yielding
    KaTeX can only parse string typed expression
    checksum chunks
    KaTeX can only parse string typed expression
    such that
    KaTeX can only parse string typed expression
    where each
    KaTeX can only parse string typed expression
    is an integer in
    KaTeX can only parse string typed expression
    . The concatenation of message and checksum chunks forms the final codeword, which means
    KaTeX can only parse string typed expression
    , with a length
    KaTeX can only parse string typed expression
    .
  3. To sign the chunk
    KaTeX can only parse string typed expression
    (e.g.,
    KaTeX can only parse string typed expression
    -th chunk of the final codeword
    KaTeX can only parse string typed expression
    ), the signer reveals an intermediate value from the
    KaTeX can only parse string typed expression
    -th hash chain by hashing the secret
    KaTeX can only parse string typed expression
    exactly
    KaTeX can only parse string typed expression
    times:
    KaTeX can only parse string typed expression
    .
  4. The full signature
    KaTeX can only parse string typed expression
    is the concatenation of these
    KaTeX can only parse string typed expression
    intermediate hash values.

Messages

Signature Verification

  1. The verifier recomputes the chunks
    KaTeX can only parse string typed expression
    from the message.
  2. For each signature part
    KaTeX can only parse string typed expression
    , 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
    .
  3. The signature is valid if, for all
    KaTeX can only parse string typed expression
    , this computation reaches the corresponding public key element:
    KaTeX can only parse string typed expression
    . This holds because
    KaTeX can only parse string typed expression
    .

W-OTS offers a trade-off: a larger

KaTeX can only parse string typed expression
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
. From this, they can easily compute any subsequent values on the chain, such as
KaTeX can only parse string typed expression
. This means an adversary could slightly change a message chunk
KaTeX can only parse string typed expression
to a larger value
KaTeX can only parse string typed expression
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
to
KaTeX can only parse string typed expression
, the sum of un-traversed lengths for the message part,
KaTeX can only parse string typed expression
, will decrease. This causes the checksum
KaTeX can only parse string typed expression
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

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
, each step in the chain is "tweaked" with a unique public value.

Let

KaTeX can only parse string typed expression
be a cryptographic hash function and
KaTeX can only parse string typed expression
be a set of public bitmasks. The W-OTS+ chain function is defined as:

KaTeX can only parse string typed expression
,
KaTeX can only parse string typed expression
.

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
, 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.

Equation

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
with the robust, tweaked version
KaTeX can only parse string typed expression
. For example, verification becomes:

KaTeX can only parse string typed expression

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
    ) 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

  1. Leslie Lamport, 1979: Constructing Digital Signatures from a One Way Function
  2. Andreas
    KaTeX can only parse string typed expression
    , 2013: W-OTS+–Shorter Signatures for Hash-based Signature Schemes.
  3. Daniel J. Bernstein, Daira Hopwood, Andreas
    KaTeX can only parse string typed expression
    , Tanja Lange, Ruben Niederhagen, Louiza Papachristodoulou, Michael Schneider, Peter Schwabe, and Zooko Wilcox-O’Hearn, 2015: SPHINCS: Practical Stateless Hash-Based Signatures.
  4. National Institute of Standards and Technology, (SPHINCS+/SLH-DSA), 2024: FIPS 205: Stateless Hash-Based Digital Signature Standard.
  5. Srivastava, Vikas, Anubhab Baksi and Sumit Kumar Debnath, 2023. An Overview of Hash Based Signatures.
  6. Andreas Huelsing, Denis Butin, Stefan-Lukas Gazdag, Joost Rijneveld, Aziz Mohaisen, 2018:RFC 8391, XMSS: eXtended Merkle Signature Scheme.