Onetime pad (OTP) decoder and encoder
The onetime pad (OTP) is a theoretically unbreakable cipher. However, in practice it is of limited usability because it requires a preshared key of at least the same length as the message. Generating truly random keys and presharing them securely are challenging problems. This tool helps you encode or decode onetime pads if you have the key.
Onetime pad
Features
 The onetime 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 onetime 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 onetime 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 onetime pads have been broken. These cases have been possible because of mistakes, such as not using true random keys or reusing the same key.
Sample text
DRVXKFWRRH
The ciphertext above represents "ONE TIME PAD" encrypted using the key PERFECTSECRECY.
See also: CodeBreaking overview  Adfgvx cipher  Adfgx cipher  Affine cipher  Atbash cipher  Baconian cipher  Beaufort cipher  Bifid cipher  Caesar cipher  Columnar transposition  Cryptogram  Double transposition  Enigma machine  Foursquare cipher  Gronsfeld cipher  Keyed caesar cipher  Pigpen cipher  Playfair cipher  Rail fence cipher  Rot13  Trifid cipher  Variant beaufort cipher  Vigenere cipher