A Brief History of One Time Pads


The Vernam Cipher, or one-time pad, is a cipher that was first invented by Frank Miller in 1882, then later re-invented and patented by Gilbert Vernam in 1919.

How It Works

Each character of the message you wish to send (the "plaintext") is combined with one character from the pad (the "key") to produce one character of the coded message (the "ciphertext"). The cipher must also meet the following two conditions:
  1. Each new digit of the key is completely unpredictable.
  2. The key never repeats, in whole or in part.
Assuming those conditions are met, the Vernam Cipher is the only known cipher which enjoys Shannon Security... which means that no amount of computing power could brute force its way in and crack the code.

Why? Because the key is as long as the message, and all keys are equally likely. Therefore, if the ciphertext is "EQNVZ" then the key could be "XMCKL", which would mean that "HELLO" was the message. Or maybe the key was "TQURI", which would mean that "LATER" was the message. The message could be anything with the same number of characters, and there's no way to tell!

Perfect secrecy! Sound too good to be true? Well... it kind of is. There is a catch that makes this cipher very, very hard to perform in real life. Several, actually, some of which were exploited by this lady:

Her name was Gene Grabeel, and she was a Virginia schoolteacher before she went to work for the Army Signals Intelligence Service (the precursor to the NSA). Within weeks she had started the program that broke the codes which protected Soviet diplomatic messages.

But that's enough history for now, let's learn how to encrypt and decrypt using a one time pad...

This guide was first published on Aug 15, 2013. It was last updated on Aug 15, 2013. This page (A Brief History of One Time Pads) was last updated on Nov 16, 2019.