The one-time pad (OTP) is a theoretically unbreakable cipher. However, in practice it is of limited usability because it requires a pre-shared key of at least the same length as the message. Generating truly random keys and pre-sharing them securely are challenging problems. This tool helps you encode or decode one-time pads if you have the key.
- The one-time pad is theoretically 100% secure. It is also an easy cipher to perform manually.
- It was first described by Frank Miller in 1882, and then reinvented in 1917. It is built on modular addition, similar to the Vigenère cipher, but without repeating the key.
- In 1919, a variant of the one-time pad, the Vernam cipher, was patented by Gilbert S Vernam. It was built on the XOR operation instead of modular addition.
For the cipher to be 100% secure, the following requirements apply:
- The key must be truly random
- The key must be at least as long as the plaintext
- The key must never be reused (not even a part of it)
- The key must be kept completely secret
- The one-time pad has been used historically by KGB officers and various spy organizations. It is still in use today in digital versions.
- There are historical examples of when one-time pads have been broken. These cases have been possible because of mistakes, such as not using true random keys or reusing the same key.
The ciphertext above represents "ONE TIME PAD" encrypted using the key PERFECTSECRECY.
See also: Code-Breaking overview | Adfgvx cipher | Adfgx cipher | Affine cipher | Atbash cipher | Baconian cipher | Beaufort cipher | Bifid cipher | Caesar cipher | Columnar transposition | Cryptogram | Double transposition | Enigma machine | Four-square cipher | Gronsfeld cipher | Keyed caesar cipher | Pigpen cipher | Playfair cipher | Rail fence cipher | Rot13 | Route transposition | Trifid cipher | Variant beaufort cipher | Vigenere cipher