Lion Cipher Lab

Build hash-based digital signatures from scratch (Lamport + Merkle)

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

Steps in this lab

  1. The one idea the whole lab rests on: a one-way function
  2. Build a Lamport one-time signature
  3. What you should see, and the size cost hiding in it
  4. Forge a signature — feel why it is ONE-time
  5. Read the forgery output — the deterministic proof
  6. Scale to many messages with a Merkle tree (the XMSS idea)
  7. Read the Merkle output — one root, many signatures
  8. Why this survives quantum — and the footgun that will bite you

Open the full interactive lab →