Home

Play · secrets and how they break

The Cipher Lab

Every secret on the internet rests on a few beautiful ideas. Play with each one, then try to break it. Everything runs in your browser with real cryptography, and nothing you type leaves this page.

Room 1 · about 2,000 years old

Secret messages

Julius Caesar moved every letter a few places along the alphabet. Turn the wheel and watch your message change.

Encrypted

Now break one

We intercepted this. We don't know the shift. But English uses E far more than Z, and a shift moves that pattern without hiding it.

letters in the message English, moved by the shift being tried

Room 2 · 1553 to 1863

The unbreakable cipher

Use a keyword, and every letter gets its own shift. The same letter comes out differently each time, so counting letters stops working. For three hundred years it was called le chiffre indéchiffrable.

Break it like Babbage and Kasiski

Two tricks. First, find how long the keyword is: split the message into columns, and when the guess is right, each column looks like English again. Then each column is just a Caesar cipher, broken as in Room 1.

Room 3 · 1976, and every website since

A secret, agreed in public

Both old ciphers need a key both sides already share. How do two strangers agree on one, when everything they say can be overheard? With paint.

Alice

Everyone (and Eve)

Bob

Now with real maths

On the internet the paint is a curve, and un-mixing is a problem no computer can solve in time. Your browser can do it for real: two key pairs, one shared secret, then a message only Bob can read.

Room 4 · inside SHA-256

The avalanche

A hash turns anything into a 256-bit fingerprint. Change one letter, and about half the bits flip. The old ciphers changed one letter for one letter; modern ones hide every trace.

0

of 256 bits changed

SHA-256

Caesar, for comparison

Room 5 · how websites keep passwords

How long would your password last?

Sites keep a hash of your password, not the password. When a site is breached, attackers guess and hash, billions of times a second. Unless the site used a slow hash. Try a password like yours (it never leaves this page).

    Who is guessingGuesses a secondTime to find it
    Your device, fast hash (SHA-256)measuring…
    A gaming graphics card, fast hashabout 20 billion
    The same card against bcrypt, a slow hash made for passwordsabout 1,500
    Your device against PBKDF2 at 600,000 rounds, as OWASP recommends

    Times are averages for a search of every password this strong; real attackers try common words first, which is why those count for little. Graphics-card speeds are rough figures from public hashcat benchmarks.

    Coming next

    More rooms are being built

    Bletchley Park

    Enigma

    A working Enigma machine with rotors that step, and the trick that broke it.

    The quantum threat

    After RSA

    Why a quantum computer breaks today's keys, and the lattice-based keys (ML-KEM) replacing them.

    Zero knowledge

    Prove it without telling

    Convince someone you know a secret without giving any of it away.

    Open now

    Break Jarvis

    Talk an AI out of a password, through five levels of defence. The kind of attack every AI product has to stop.

    Play →