---
title: "Intercepts: Break Classical and Post-Quantum Ciphers"
description: "Break 19 coded messages in this browser game, from ciphers that a pencil can break to the one-time pad, quantum keys, and locks built to resist quantum attack."
url: https://tadams.net/quantum/intercepts
---

[Quantum demos](https://tadams.net/quantum)

# Intercepts

Break 19 coded messages that Eve, a spy, recorded: from ciphers that a pencil can break to new locks that no known quantum method breaks.

New to qubits: start with the short guide, [Quantum basics](https://tadams.net/quantum#q-basics-title).

## Part 1: Classical ciphers

Eve is a spy who listens in on Alice and Bob. She recorded these messages from an ordinary line, with no quantum key to protect it. Each one uses a classical cipher. The messages open in order, and some of them give you a new tool. When a tool decodes the message, the message opens by itself.

## Part 2: The quantum line

The key that cannot be broken, where quantum keys come from, and what a quantum computer does to the codes in use today. You can start here: each message opens now and brings its own tool.

## What this shows

Every cipher here hides a message with a rule and a short key. The rule leaves patterns. Some letters are more common than others, and words repeat. A patient person with a pencil can find those patterns and work back to the key.

A quantum key does not depend on a math problem that is only hard to solve, which better tools might one day solve. Alice and Bob make a fresh random key, as long as the message, and a spy who tries to read it on the way leaves errors that they can see. The [Eavesdropper](https://tadams.net/quantum/eavesdropper) demo shows how.

Eve keeps every message that nobody can read yet. A message that is safe today can be read later, when better tools come. People call this harvest now, decrypt later. It is one reason that the change to new kinds of keys has started before large quantum computers exist.

Part 2 follows that change. A pad of random letters, used one time, cannot be broken, but used two times it falls apart. BB84, the method in Eavesdropper, gives Alice and Bob the random key. Then they compare whether small groups of their bits add up to an even or an odd number. Where a group differs, a bit in it is wrong, and they fix it. This finds the errors that a spy or a noisy line leaves.

Most locks on the internet today, such as RSA, rest on math that ordinary computers find too slow to undo. A large quantum computer could undo it. It could also guess keys faster, but only so much faster: a search that takes a million tries would still take about a thousand steps, one after another, and each step on a real machine is slow. So keys of 256 bits stay safe. The new locks hide their secret inside equations with small, deliberate errors, and no quantum trick is known to get past them.

Shift, substitution, Vigenère, and columnar transposition ciphers all keep statistics of the plaintext. A substitution keeps the letter frequencies, so the index of coincidence stays near 0.066. A polyalphabetic key flattens it toward 0.038, but each column of period n is a plain shift, so the average column index finds n (the Friedman test). Repeats a multiple of n apart give the same result (the Kasiski test). A transposition keeps the letter frequencies exactly.

A one-time pad, with a uniformly random key as long as the message and used only once, has perfect secrecy. The hard part is to share that key. QKD protocols such as BB84 share it over an untrusted channel and detect interception from the error rate.

The public-key systems that protect key exchange today, RSA and elliptic curves, depend on factoring and discrete logarithms. Shor's algorithm solves both in polynomial time on a large fault-tolerant quantum computer. Recorded traffic is therefore at risk later, which drives the move to post-quantum standards such as ML-KEM.

Part 2 works through this in small numbers. Pad reuse gives C₁ − C₂ = P₁ − P₂, which crib dragging separates. Sifting keeps about half of the BB84 rounds. Block parities with a binary search correct errors, and compression removes what the parities and the tap leaked, as in privacy amplification. The factoring message uses N = 3233 and a simulated period finder with Q = 4096. The search message runs Grover's algorithm over all 26³ keys as a state vector. The last message is a three-variable LWE instance mod 29.

## The tools

| Tool | From | What it does |
| --- | --- | --- |
| Caesar wheel | Message 1 | Moves every letter the same number of steps along the alphabet. |
| Letter count | Message 2 | Compares the letter counts with ordinary English, to find a shift or to show that several alphabets were used. |
| Substitution | Message 3 | Lets you choose which plain letter each cipher letter stands for. |
| Vigenère | Message 5 | Undoes a key of several letters. Each letter of the key is its own shift. |
| Keyed alphabet | Message 7 | Makes a mixed alphabet from a keyword. |
| Columns | Message 9 | Puts letters that were only moved back in order. |
| Layers | Message 11 | Keeps track when a message has one cipher on top of another. |
| Pad book | Message 13 | Subtracts a sheet of random key letters, and shows that any text has a pad that gives it. |
| Crib drag | Message 14 | Slides a guessed word, called a crib, along two messages that share a pad, to pull them apart. |
| Sifting | Message 15 | Keeps the BB84 qubits where the two bases match, and turns the bits into key letters. |
| Error correction | Message 16 | Finds wrong key bits by checking whether groups of bits add up to an even or an odd number, called a parity check, then shrinks the key. |
| Period finder | Message 17 | Simulates the quantum step of Shor’s algorithm, a method to break RSA, then finds the two numbers that multiply to make the public key. |
| Grover search | Message 18 | Simulates a quantum search over all 17,576 keys of three letters. |
| Equations | Message 19 | Solves public equations, with and without the small errors that protect the new keys. |

## Other demos

- [Bloch sphere golf](https://tadams.net/quantum/bloch-golf)
- [Circuit puzzle](https://tadams.net/quantum/circuit)
- [The bomb tester](https://tadams.net/quantum/bomb-tester)
- [Entanglement games](https://tadams.net/quantum/chsh)
- [Teleportation](https://tadams.net/quantum/teleportation)
- [Eavesdropper](https://tadams.net/quantum/eavesdropper)
- [Keep it alive](https://tadams.net/quantum/error-correction)

Explain
