Lion Cipher Lab

Build a Merkle transparency log from scratch (inclusion proofs, consistency proofs, and the split-view attack)

Why it matters

Every piece of software you install arrives with an implicit promise: that the thing you downloaded is the thing the publisher meant to publish. A signature is how that promise is usually kept, and a signature is genuinely good -- it proves an artifact came from a holder of a particular key. What a signature cannot tell you is whether that key ever signed anything ELSE. If an attacker steals the signing key, or coerces the publisher, or the publisher simply decides to ship one poisoned build to one target, every signature involved is perfectly valid and nobody outside the room ever finds out.…

What you'll learn

Steps in this lab

  1. What you are about to build -- and the two labs this is NOT
  2. Open a terminal and check Python (zero-assumption setup)
  3. Write mlog.py -- the whole log, in one file
  4. Prove it is right -- against PUBLISHED vectors, not against itself
  5. Write attacks.py -- seven measured demonstrations
  6. (A) Why a hash chain is not enough -- measured
  7. (B) The named failure mode: drop the domain-separation prefixes and forge a proof
  8. (C) Inclusion proofs -- O(log n) hashes instead of O(n) entries
  9. (D) The log rewrites history -- and the inclusion-only client never notices
  10. (E) The split-view attack -- and why gossip is the only cure
  11. (F) Signed checkpoints, and the freshness failure no proof can catch
  12. (G) When NOT to use one: a transparency log is public by construction
  13. Why this, not that: a signature, a transparency log, or a blockchain
  14. How a pro does it differently
  15. What to do on Monday: verify a real log's proofs with the official tooling

Open the full interactive lab →