The one-time pad is famous as being the *only completely unbreakable cipher*. Assuming that the secret pad is randomly generated, not-reused (hence "one-time pad"), and not leaked, it is impossible to learn a single bit of the plaintext of a message from a ciphertext.

The one-time-pad is one of the best cryptography protocols when the work must be done by hand, without the aid of a computer. This made it important in the pre-computer era, and is still useful in situations where possession of a computer is illegal or incriminating or where trustworthy computers are not available.

# Encryption and decryption with the One-Time Pad

Encryption with the one-time pad is based on the *exclusive-or* (XOR) operation. The exclusive-or of two identical bits (two zeros or two ones) produces a zero and the exclusive-or of two different bits (a zero and a one) produces a one.

The secret in one-time pad encryption is a secret of...