Lion Cipher Lab
Build hash-based digital signatures from scratch (Lamport + Merkle)
- Foundations
- Advanced
- ~90 min
- Free · no account required
Why it matters
Every signature scheme guarding the internet today — RSA, ECDSA, EdDSA — is breakable by a large quantum computer running Shor's algorithm. Hash-based signatures are the one family we are confident survives, and they are already standardized (XMSS in RFC 8391, SPHINCS+ as NIST FIPS 205). Firmware and secure-boot roots being signed now must stay verifiable for 15-30 years, i.e. into the quantum era, so this is not academic. Building the scheme from 40 lines of Python — and forging one when it is misused — gives you the rare, durable understanding of WHY it works and exactly how it fails, which…
What you'll learn
- Hash-based signatures
- Lamport one-time signatures
- Merkle trees & authentication paths
- Post-quantum cryptography intuition
- Cryptographic failure analysis
Steps in this lab
- The one idea the whole lab rests on: a one-way function
- Build a Lamport one-time signature
- What you should see, and the size cost hiding in it
- Forge a signature — feel why it is ONE-time
- Read the forgery output — the deterministic proof
- Scale to many messages with a Merkle tree (the XMSS idea)
- Read the Merkle output — one root, many signatures
- Why this survives quantum — and the footgun that will bite you