Encryption

Let's say that the message you want to send is "HELLO". Here are the steps you'd go through:
Break open a tamper-resistant container, and remove the one time pad. Verify that the serial on the outside of the tube matches the serial of the pad inside of it.
Tear off the first page of the pad.
The first 5 letter grouping on your page is "AFWXH". Write that down as the first 5 letter grouping of the ciphertext. This will allow your recipient to decrypt using the right page of his copy of the pad. Otherwise he'll just get gibberish!
The next 5 letter grouping is "VYLLW". Since our message is only 5 letters long, this is all we'll need. Write our message ("HELLO") down if you haven't already, and "VYLLW" underneath it, so you have 5 pairs of letters.
Next we're going to add the pairs of letters together, using the table below to turn the letters into numbers. Every letter in our Plaintext will get added to the letter below it (the key).
A=01 B=02 C=03 D=04 E=05 F=06 G=07
H=08 I=09 J=10 K=11 L=12 M=13 N=14
O=15 P=16 Q=17 R=18 S=19 T=20 U=21
V=22 W=23 X=24 Y=25 Z=26
Ok, so let's translate each letter of the plaintext and key into numbers, and add them together. If the result is greater than 26, subtract 26 from it.
Then, once you've done that, turn all the numbers back into letters using the same chart. In our case, the numbers are 4,4,24,24,12. That translates into "DDXXL". That's the rest of the ciphertext, so write it down next to the "AFWXH" you wrote down earlier.
The final encrypted string you'll send to your friend is "AFWXH DDXXL". Send it via email, phone call, IM, whatever you want. Immediately after you do, you need to destroy the entire page that you used to encrypt your message. You can shred it...
... but why do that, when it's possible (however unlikely) that someone would root around in your trash and scotch tape the whole thing back together? Better burn it instead.
As for the rest of the roll, you're going to either have to acquire a new tamper-resistant container to put it back into, or else just burn the whole thing.

Decryption

Decryption works just like encryption, except you subtract instead of adding. Let's say you received a message "AFWXH DDXXL" in your email, and you happen to know that the next pad you're supposed to use is the one with serial "EFXIAKBHAT". Here's the letter conversion table from above, for convenience.
A=01 B=02 C=03 D=04 E=05 F=06 G=07
H=08 I=09 J=10 K=11 L=12 M=13 N=14
O=15 P=16 Q=17 R=18 S=19 T=20 U=21
V=22 W=23 X=24 Y=25 Z=26
  1. First, pop open the container marked EFXIAKBHAT and verify that the pad inside has the same serial.
  2. Find the page in your pad that starts with "AFWXH".
  3. D-V=H, D-Y=E, X-L=L, X-L=L, L-W=O.
  4. The full recovered message is "HELLO".
  5. Rip out and burn the entire page you were using, even if you didn't use the whole thing.
But, remember, I said there was a catch, right? Next we will talk about that...

This guide was first published on Aug 15, 2013. It was last updated on Mar 08, 2024.

This page (Encryption and Decryption) was last updated on Aug 14, 2013.

Text editor powered by tinymce.