Course contentsShow
← Security
Lesson 273 of 3,0526. Advanced and Emerging CryptographyFree lesson

Hash-Based Signatures: SPHINCS+ and Stateful Schemes

Understanding hash-based signature schemes including SPHINCS+ and stateful variants like XMSS.

Hash-Based Signatures: SPHINCS+ and Stateful Schemes

What you'll learn: How hash-based signature schemes provide quantum-resistant signatures using only secure hash functions.

The Core Idea

Unlike RSA or ECDSA, which rely on mathematical hardness assumptions (factoring, discrete logarithm), hash-based signatures depend only on the security of hash functions. Since quantum computers don't threaten hash functions the same way they threaten factoring, these schemes are naturally post-quantum secure.

Think of it like this: instead of using a complex mathematical lock, you're using a one-way shredder (hash function). Once something is shredded, you can't reconstruct it—that property alone creates a signature scheme.

Two Flavors

Stateful schemes (like XMSS and LMS) work like a checkbook with numbered checks. You sign messages using sequential private keys, and you must never reuse a key. Each signature "burns" one key from a finite set. Reusing a key catastrophically breaks security—attackers could forge signatures. These are extremely efficient but require careful state management.

Stateless schemes (like SPHINCS+) solve the state problem using randomness and a tree-of-trees structure. You can sign unlimited messages without tracking which keys you've used. The tradeoff? Larger signatures and slightly slower performance. SPHINCS+ is a NIST post-quantum standard specifically because it's stateless—no risk of accidentally reusing keys.

Practical Context

Hash-based signatures are ideal when:

  • Quantum resistance is critical
  • You can manage state carefully (stateful), or
  • You need unlimited signatures without state tracking (SPHINCS+)

They're already used in firmware signing and blockchain systems where long-term security matters more than signature size.

Key Takeaway: Hash-based signatures like SPHINCS+ and XMSS provide quantum-resistant signing using only hash functions—stateful variants are efficient but require careful key management, while SPHINCS+ trades size for stateless convenience.