QianHeng乾珩 PQC Docs Hub量子文档 ✦ Ask AI✦ 问问文档 ⚐ Scan⚐ 扫一扫

Hash-Based Signatures

Hash-based signatures are the most conservative post-quantum option. Their security relies on nothing more than the properties of a cryptographic hash function — no new number-theoretic assumptions. That makes them the safest long-term bet for signing, at the cost of larger signatures and, for some variants, careful state management.

Security From a Hash Alone

Most signature schemes rest on a hard mathematical problem (factoring, discrete log, lattices). Hash-based signatures rest only on the preimage and collision resistance of a hash function — properties that are extremely well studied and slow to erode. Even against quantum computers, only Grover's algorithm applies: for an ideal hash function, Grover's search roughly halves the security strength of a preimage search, which can be compensated by increasing the hash output length. There is no quantum analogue of Shor's algorithm that breaks them. Note that the hash-based family provides signatures only (there is no standardized hash-based KEM).

Building Blocks

Hash-based signatures are assembled from a few classic components:

  • One-time signatures (WOTS+ / W-OTS) — a key pair that can safely sign exactly one message. Reusing it leaks the private key.
  • Few-time signatures (FORS) — a forest of random subsets that can sign a small number of messages, used inside the stateless construction.
  • Merkle trees — hash a large set of one-time public keys into a single root, so one short root authenticates many keys.
  • XMSS multitree — layers of Merkle trees that extend the number of signatures a single key can produce without an impractically tall tree.

Stateful vs Stateless

The central design tension is whether the signer must remember which one-time keys have been used.

AspectStateful (LMS, XMSS)Stateless (SLH-DSA / SPHINCS+)
StateMust track key index; never reuseNo state to manage
Signature sizeSmallerLarger
SpeedFastSlower signing
RiskCatastrophic if state is lost/cloned and a key is reusedNo reuse risk
Best forControlled environments (firmware signing)General-purpose signing
Warning
Stateful schemes (LMS, XMSS) are devastating to misuse: if a backup restore, VM snapshot, or clustering bug causes a one-time key to sign twice, the private key can be recovered. Use them only where state can be rigorously guaranteed, and never on systems that may be cloned.

Where They Are Standardized

  • SLH-DSA (SPHINCS+) — stateless, FIPS 205. NIST's deliberately non-lattice signature for cryptographic diversity.
  • LMS and XMSS — stateful, specified in NIST SP 800-208, well suited to firmware and software signing where the signing environment is controlled.

Because their security model is the simplest and most conservative of any PQC family, hash-based signatures are an ideal hedge against a future break of lattice mathematics.

Standards & references

哈希基签名

哈希基签名是最保守的后量子选项。其安全性仅依赖密码哈希函数的性质,不引入任何新的数论假设。这使其成为最稳妥的长期签名选择,代价是签名较大,且某些变体需要谨慎管理状态。

仅凭哈希的安全性

多数签名方案依赖某个困难数学问题(大整数分解、离散对数、格)。哈希基签名只依赖哈希函数的原像与抗碰撞性——这些性质研究极为透彻,且不易被削弱。即便面对量子计算机,也只有 Grover 算法适用:对理想哈希函数,Grover 搜索会把原像搜索的安全强度约减半,因此可通过增大哈希输出长度来补偿。不存在像 Shor 算法那样能攻破它们的量子手段。需注意,哈希无法构造密钥封装机制,该家族仅用于签名。

构件

哈希基签名由若干经典构件拼装而成:

  • 一次性签名 WOTS+ / W-OTS——一对密钥只能安全地签署一条消息,重复使用会泄露私钥。
  • 少次签名 FORS——由随机子集构成的森林,可签署少量消息,用于无状态构造内部。
  • Merkle 树——将大量一次性公钥哈希为单一根,用一个短根即可认证众多密钥。
  • XMSS 多树——多层 Merkle 树,在无需构造高得不切实际的单棵树的前提下,扩展单个密钥可产生的签名数量。

有状态与无状态

核心的设计张力在于:签名方是否必须记住哪些一次性密钥已被使用。

方面有状态 LMS XMSS无状态 SLH-DSA / SPHINCS+
状态必须追踪密钥索引,绝不重用无需管理状态
签名体积较小较大
速度签名较慢
风险若状态丢失或被克隆导致密钥重用,后果灾难性无重用风险
适用场景受控环境、固件签名通用签名
警告
有状态方案(LMS、XMSS)一旦误用极具破坏性:若备份恢复、虚拟机快照或集群缺陷导致某个一次性密钥签署两次,私钥即可被恢复。仅在能严格保证状态的场合使用,切勿用于可能被克隆的系统。

标准化情况

  • SLH-DSA(SPHINCS+)——无状态,FIPS 205。NIST 为密码多样性而有意选用的非格签名。
  • LMS 与 XMSS——有状态,规范见 NIST SP 800-208,非常适合签名环境受控的固件与软件签名。

由于其安全模型在所有 PQC 家族中最简单、最保守,哈希基签名是应对格数学未来被攻破的理想对冲手段。

标准与参考

⚑ Report an error⚑ 纠错与校正