Skip to main content

One-Time Pad

v1.0.1

Encrypt and decrypt messages using the only mathematically unbreakable cipher — the One-Time Pad (Vernam cipher).

Encrypt and decrypt messages using the One-Time Pad — the only mathematically unbreakable cipher when used correctly (truly random key, same length as the message, used only once).

How to use
  • Enter your plaintext message; the tool generates a cryptographically random key of the same length.
  • Save the key securely — without it, the ciphertext is unrecoverable.
  • To decrypt, paste both the ciphertext and the original key.
Output format
This is an educational tool. The pad is generated in your browser using Web Crypto CSPRNG — never transmit the pad over the same channel as the ciphertext.
PAD (HEX)
PLAINTEXT
CIPHERTEXT

Pad Reuse Demonstration

If you reuse the same pad for two messages, an attacker can XOR the two ciphertexts to cancel out the pad and reveal the XOR of the two plaintexts — completely breaking the encryption.