Quantum demos

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.

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 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

      ToolFromWhat it does
      Caesar wheelMessage 1Moves every letter the same number of steps along the alphabet.
      Letter countMessage 2Compares the letter counts with ordinary English, to find a shift or to show that several alphabets were used.
      SubstitutionMessage 3Lets you choose which plain letter each cipher letter stands for.
      VigenèreMessage 5Undoes a key of several letters. Each letter of the key is its own shift.
      Keyed alphabetMessage 7Makes a mixed alphabet from a keyword.
      ColumnsMessage 9Puts letters that were only moved back in order.
      LayersMessage 11Keeps track when a message has one cipher on top of another.
      Pad bookMessage 13Subtracts a sheet of random key letters, and shows that any text has a pad that gives it.
      Crib dragMessage 14Slides a guessed word, called a crib, along two messages that share a pad, to pull them apart.
      SiftingMessage 15Keeps the BB84 qubits where the two bases match, and turns the bits into key letters.
      Error correctionMessage 16Finds 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 finderMessage 17Simulates 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 searchMessage 18Simulates a quantum search over all 17,576 keys of three letters.
      EquationsMessage 19Solves public equations, with and without the small errors that protect the new keys.
      Explain