🎲

One-Time Pad

Theoretically unbreakable random key cipher

polyalphabetic
Definition

The One-Time Pad (OTP) is a theoretically unbreakable encryption technique where each character of the plaintext is combined with a random key character. The key must be truly random, at least as long as the message, used only once, and kept secret.

History

Invented by Frank Miller in 1882 and reinvented by Gilbert Vernam in 1917. Claude Shannon proved its perfect secrecy in 1949. Used for the Moscow-Washington hotline during the Cold War and by various intelligence agencies for top-secret communications.

Real-World Usage

Due to practical difficulties (key distribution and length), OTP is mainly used for extremely sensitive diplomatic and intelligence communications. The key must be physically transported and destroyed after use, making it impractical for most applications.

Weaknesses

The OTP has no mathematical weaknesses - its security is information-theoretic. However, practical issues include: key must be truly random (not pseudo-random), key distribution is challenging, key must be at least as long as message, and key reuse completely breaks security (as happened with the VENONA project).

Step-by-Step Visualization

Watch how each character combines with its random key character

Plaintext

H
E
L
L
O

One-Time Pad Key

X
M
C
K
L
Interactive Playground