Math · Intermediate · Lesson 3 of 7
The One-Time Pad
A provably unbreakable code
An interactive lesson with 6 steps, about 5 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.
What you’ll learn
- A one-time pad combines the message with a random key of equal length (e.g. by XOR).
- It has perfect secrecy, proved by Shannon.
- Reusing the key destroys its security.
Steps
- A key as long as the message
- XOR by hand
- Why it’s unbreakable
- Two-time pad
- Any message fits
- Key material