HomeCiphers › One-Time Pad

One-Time Pad

A fresh random shift for every letter, used once and destroyed. Unbreakable, and almost unusable.

Rail Fence

Press Run it to start the machine.
0 / 0
Result

How it works

Both of you hold the same pad of random numbers. Shift the first letter by the first number, the second by the second, and so on. Then cross that page out and never use it again.

  1. Take the next line of the pad.
  2. Shift each letter by its number.
  3. Destroy the line.

This is the only cipher that is provably unbreakable: with truly random numbers used once, the cipher text could decode to any message of the same length, so there is nothing to work out. The catch is enormous. Both people need the same pad, delivered by hand, and reusing a single line breaks everything.

The story

Moscow and Washington, 1945 onwards

The unbreakable cipher that broke

A one-time pad cannot be broken. Random numbers, used once, leave nothing to work out. Soviet intelligence used them — but during the war their factories printed some pages twice. American code-breakers spent decades on those repeats in a project called Venona, and the reused pages gave up names that changed history. The cipher was perfect. The paper was not.

Crack these

Use the pad above to read this.
And this one.
← Book Cipher All the ciphers Simple Substitution →

Take it off the screen

Print this page and you get a worksheet: how the cipher works, where it came from, and the puzzles to crack, with the machine and the menus left off.

Print this page as a worksheet Try the challenges

Read more elsewhere

Longer, harder and written for grown-ups. Worth a look when this page runs out.

One-time pad