Skip to content

SLH-DSA / SPHINCS+

Hash-based signatures Β· NIST FIPS 205

Generate a stateless post-quantum keypair, sign a message, and walk the SHA-256 Merkle trees, WOTS+ chains, FORS forests, and XMSS hypertree that build the signature.

Key terms in plain English (open before you start)
WOTS+
A one-time signature. One key signs exactly one message safely; sign a second time and an attacker can forge. You will break one yourself in step 2.
FORS
A few-time signature ("Forest Of Random Subsets"). Unlike WOTS+, it degrades gracefully when a key is reused β€” that is what lets SLH-DSA be stateless.
XMSS
A Merkle tree of many WOTS+ keys with one shared public root, so thousands of one-time keys hide behind a single short public key.
Hypertree
XMSS trees stacked in d layers β€” each tree's root is signed by a leaf of the tree above it. The very top root is the SLH-DSA public key.
Authentication path
The list of sibling hashes you combine, level by level, to climb from one leaf to the root and prove the leaf belongs to the tree.
Nibble
Half a byte β€” 4 bits, a value 0–15. WOTS+ signs the message hash one nibble at a time.
base_2b
The FIPS 205 routine that slices the message digest into the integer indices that pick which FORS leaf each tree reveals.

Generate & Sign

Verify

After signing, verify the signature to confirm authenticity.

Tamper Test

Flip a single byte to see verification fail.