---
title: "Hash-Based Signatures — definition | Nuri Glossary"
description: "Signatures relying only on hash functions, which makes them a leading candidate for post-quantum security."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/hash-based-signatures"
---

# Hash-Based Signatures

Signatures relying only on hash functions, which makes them a leading candidate for post-quantum security.

## Basically

Hash-based signatures prove that you approved a message. They are designed to stay secure against quantum computers without relying on new mathematical assumptions.

## Key Takeaways

- Hash-based signatures derive their security entirely from hash functions. They need no assumptions beyond hash collision resistance, making them the most conservative approach to post-quantum cryptography.
- NIST has standardised two families. Stateful XMSS and LMS are approved in SP 800-208 for limited-use signing, while SLH-DSA, based on SPHINCS+, is standardised in FIPS 205 as a stateless alternative for general-purpose digital signatures.
- Signature size is the primary tradeoff. Even the smallest SLH-DSA signatures are roughly 7,856 bytes, over 100 times larger than the 64-byte Schnorr signatures Bitcoin uses today, creating significant challenges for blockchain adoption.

## What Are Hash-Based Signatures?

Hash-based signatures are digital signature schemes built only from cryptographic hash functions. Bitcoin's ECDSA and Schnorr signatures instead use elliptic curve cryptography, which relies on the difficulty of the discrete logarithm problem. Hash-based signatures rely solely on properties such as the preimage resistance and collision resistance of hash functions like SHA-256.
Shor's algorithm could break elliptic curve signatures in polynomial time on a sufficiently powerful quantum computer. Quantum attacks only weaken hash functions rather than break them. Grover's algorithm halves their effective security, so a 256-bit hash still provides 128-bit security against quantum adversaries, making hash-based signatures inherently quantum-resistant.
Leslie Lamport introduced the first one-time signature scheme built from hash functions in 1979. Decades of refinement have produced practical schemes. NIST has now standardised them as part of the Post-Quantum Cryptography initiative.

## How It Works

All hash-based signature schemes share the same foundation. They combine one-time signatures with Merkle trees to support multiple signings from a single public key.

## Lamport One-Time Signatures

The Lamport scheme is the conceptual building block. You generate a Lamport key pair to sign a 256-bit message hash.
Each Lamport key pair can sign exactly one message. Reusing a key for a second message reveals additional private key values, potentially allowing an attacker to forge signatures.

## Merkle Tree Construction

Ralph Merkle solved the one-time limitation in 1979 by combining many one-time key pairs into a Merkle tree. The tree's root serves as the single public key, and each leaf corresponds to one Lamport key pair.
A tree of height 20 supports 2^20 signatures, or about 1 million. The signer must track which leaves have been used, making this a stateful scheme.

## XMSS: Extended Merkle Signature Scheme

XMSS is specified in RFC 8391 and approved in NIST SP 800-208 from October 2020. It refines the Merkle tree approach with WOTS+, or Winternitz One-Time Signature Plus, a more efficient one-time signature variant that reduces signature sizes by encoding multiple message bits per chain. XMSS also supports multi-tree constructions, called XMSS^MT, for larger signing capacities.
Typical XMSS-SHA2_20_256 parameters produce signatures of roughly 2,500 bytes with a 68-byte public key. The multi-tree variant extends signing capacity by chaining multiple trees together.
XMSS is stateful, so the signer must maintain a counter of used one-time keys and never reuse a key. Lost, duplicated or rolled-back state, such as state restored from a backup, could cause the same one-time key to be used twice and break security. XMSS therefore suits controlled environments like firmware signing or certificate authorities, not general-purpose wallets.

## LMS and HSS

The Leighton-Micali Signature system, or LMS, is specified in RFC 8554 and is a second stateful scheme approved alongside XMSS in NIST SP 800-208. LMS uses a simpler design than XMSS, and its multi-tree variant, HSS or Hierarchical Signature System, chains multiple LMS trees for larger signing capacities. Both LMS and XMSS share the same stateful limitation: key reuse breaks security.

## SLH-DSA (SPHINCS+): The Stateless Alternative

SLH-DSA was standardised as FIPS 205 in August 2024 and eliminates statefulness entirely. SPHINCS+ uses a hypertree of many smaller trees instead of a single Merkle tree with a counter. The signer deterministically selects the tree and leaf through a pseudorandom function of the message and secret key, so the same key pair can sign an unlimited number of messages without tracking state.
Statelessness comes at the cost of larger signatures. FIPS 205 defines 12 parameter sets across three security levels. The s variants are optimised for smaller signatures, while the f variants are optimised for faster signing.
Bitcoin Schnorr signatures are 64 bytes, and ECDSA signatures are roughly 72 bytes. Even the smallest SLH-DSA signature is over 100 times larger.

## Why Hash-Based Signatures Are the Most Conservative PQC Approach

Post-quantum cryptography offers several algorithm families: lattice-based schemes such as ML-DSA, formerly Dilithium, code-based schemes such as Classic McEliece, and hash-based schemes. Hash-based signatures require the fewest and most well-understood cryptographic assumptions among these families.
Lattice-based schemes rely on the hardness of problems like Module Learning With Errors, or MLWE. These problems are believed to be quantum-resistant but have been studied for far less time than hash functions. Cryptographers have analysed hash functions like SHA-256 for decades and deeply understand their security properties.
SHA-256 must remain collision-resistant for hash-based signatures to remain secure, an assumption Bitcoin already depends on for proof of work, Merkle trees and address derivation. No additional mathematical structure is available for an attacker to exploit. Cryptographers often describe hash-based signatures as the safest long-term bet for post-quantum security because of this minimal-assumptions property.

## Firmware and Software Signing

Stateful schemes like XMSS and LMS are already approved for signing firmware updates, software packages and code. These environments have controlled signing infrastructure where state management is feasible, and signature size is less critical because signatures are verified once rather than stored on-chain. Long-term security matters because firmware may run for decades.

## Certificate Authorities and PKI

Root certificates and long-lived signing keys are prime candidates for hash-based signatures. A root CA that signs a limited number of intermediate certificates fits the stateful model well, and the large signature size is acceptable because certificates are verified infrequently.

## Bitcoin and Cryptocurrency

The Bitcoin community is actively researching post-quantum migration paths that could incorporate hash-based signatures. BIP-360, merged in February 2026, proposes Pay-to-Merkle-Root, or P2MR, as a quantum-safe output format, while BIP-361 outlines a structured sunset of legacy signature types vulnerable to quantum attacks. For a deeper analysis, see Post-Quantum Cryptography and Bitcoin.
Raw hash-based signatures face significant challenges for on-chain use because a 7,856-byte SLH-DSA signature would consume substantial block space, increasing transaction costs and reducing throughput. Researchers are exploring compressed variants. In March 2026, Blockstream engineers demonstrated a hash-based signature scheme called SHRINCS that compresses post-quantum proofs to roughly 324 bytes, potentially making on-chain use viable.
Layer 2 protocols like Spark and Lightning could benefit from hash-based signatures in different ways. Off-chain transactions have more flexibility with signature sizes because they do not compete for block space. Cooperative signing protocols could also integrate post-quantum primitives without the same on-chain size constraints.

## Long-Term Data Authentication

Documents, records and data that must remain verifiable for decades benefit from hash-based signatures, including legal contracts, medical records and government archives. The concern known as harvest now, decrypt later applies here: adversaries may store signed data today and attempt to forge signatures once quantum computers become available.

## Signature Size

Signature size is the most significant practical limitation. At 7,856 to 49,856 bytes, SLH-DSA signatures are orders of magnitude larger than ECDSA signatures at 72 bytes or Schnorr signatures at 64 bytes. Systems with constrained bandwidth, storage or block space face real engineering challenges, and even the stateful XMSS scheme produces signatures of roughly 2,500 bytes.

## Stateful Key Management

XMSS and LMS require signers to maintain state that tracks which one-time keys have been used. Lost or corrupted state, or state restored from an old backup, may cause the same one-time key to be reused and completely break security. Most consumer wallet scenarios therefore cannot use stateful schemes because backups, device migrations and recovery from seed phrases are standard practice.

## Signing Performance

SLH-DSA signing is computationally expensive compared with elliptic curve schemes. The s parameter sets for small signatures can take tens of milliseconds to sign on modern hardware, while the f variants trade larger signatures for faster signing. Verification is generally faster than signing but still slower than ECDSA or Schnorr verification, so the overhead could become a bottleneck for high-throughput applications like routing nodes processing thousands of transactions per second.

## Limited Signing Capacity (Stateful Schemes)

Stateful schemes place a hard cap on the number of signatures a key pair can produce, with an XMSS tree of height 20 supporting roughly one million signatures. That capacity is sufficient for firmware signing but inadequate for a Bitcoin wallet that might generate a new signature with every transaction over many years. Multi-tree variants such as XMSS^MT and HSS increase capacity but also increase signature sizes.

## Transition Complexity

Migrating existing systems to hash-based signatures is not a drop-in replacement because key sizes, signature formats and verification logic all change substantially. Bitcoin would require new address types, consensus rule changes and potentially years of ecosystem coordination for a post-quantum migration, as discussed in Bitcoin's Taproot quantum vulnerability analysis.
Nuri's glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
