One Time Pad (OTP)

Adapted from Perfect EnCryption - Old Style!, by Cliff. Published in 2600 (Summer, 2013 - 30:2)

This is a brief description of an unbreakable encryption method. It is used between two people who share the same key, called a one time pad (OTP), which is a string of randomly-generated numbers. We will use ten-sided dice for true randomness because even extremely fancy computers aren't perfect at creating these. Each digit in the pad is used only once- the lack of repetition makes the key more secure. The only weakness of this method is if an attacker gets her hands on the key.

This is just one example of a way to create a one time pad. The encoding process is clever and simplifies the encryption process. This method is lifted entirely from Perfect Encryption - Old Style! by Cliff.

Before moving on, there are a few terms you may need to know:

plain text or clear text
the normal message that you intend to send - written in plain English and readable by anyone
ciphertext
the encrypted version of your message that is only readable by someone who has the encryption key
key
the code that allows you to encrypt and decrypt your messages- both the sender and receiver of the message need to have copies of the same key when using a OTP
attacker
anyone trying to decrypt your message without the key
cracking
figuring out a way to decrypt a message without the key - e.g. sometimes if an attacker gets their hands on an encrypted message and its corresponding plaintext, they can figure out how to decrypt other messages that use the same encryption
perfect secrecy
when an encrypted message gives no information about the original message - one time pads offer perfect secrecy! A OTP is uncrackable even for someone with unlimited computational power.

Assign values to letters

Straddling Checkerboard

The 'straddling checkerboard' allows you to encode the plaintext message before you encrypt it. This makes the encryption process easier and offers an extra layer of security. The checkerboard uses the most common letters in the English language as the first line (which spells out three words to make it easier to memorize: 'at one sir'). The remaining letters of the alphabet are entered in the next two lines in alphabetical order. Since there are two spaces between the three words (columns 2 and 6), the second and third lines of the checkerboard are assigned those values. Thus, each letter is given a coordinate (e.g. Q = 6:1, or 61; H = 2:5 or 25; and T = 1). The structure of the checkerboard makes it easy to decrypt later- as we'll soon see.

  0 1 2 3 4 5 6 7 8 9
  A T - O N E - S I R
2 B C D F G H J K L M
6 P Q U V W X Y Z . #

Encode 'computer hacker' as:

21 3 29 60 62 1 5 9 25 0 21 27 5 9

Remove the spaces and group for readability:

21329 60621 59250 21275 9

Side note- numbers:

Use '#' (69) to signify the beginning and end of a number and repeat each digit three times. 2600 would be encoded as:
69222 66600 00006 9

Create a one time pad (random set of values):

This is where you'll break out the 10-sided dice you have laying around...

51187 69890 33159 87236 25955 46669

Encryption Process:

Grab your encoded message and your key and follow the rules below to encrypt the message.

Basic rules

  1. Subtract the key from the encoded message (cleartext)
  2. Carry the one for subtraction- 2 - 8 becomes 4 (12 - 8 = 4).
Encoded plain text: 2 1 3 2 9 6 0 6 2 1 5 9 2 5 0 2 1 2 7 5 9 0 0 0 0
- - - - - - - - - - - - - - - - - - - - - - - - -
OTP: 5 1 1 8 7 6 9 8 9 0 3 4 1 5 9 8 7 2 3 6 2 5 9 5 5
Ciphertext: 7 0 2 4 2 0 1 8 3 1 2 5 1 0 1 4 4 0 4 9 7 5 1 5 5

OTP Strength

The encrypted text can now be shared openly- only the two people who have the OTP keys can make the ciphertext readable. Even if an attacker were to get their hands on the decrypted text, the encrypted text, and even the key for that message- future messages are secure. Since the numbers are generated at random (and do not repeat), there is no way to use ciphertext, known-plaintext, chosen-plaintext or adaptive-chosen-plaintext attacks. The only way to break this system is to get the entire OPT key. The only way to mess up the method itself is to not use actually random numbers.

Decryption Process:

Basic rules

  1. Add the key to the ciphertext
  2. Do not carry- 7 + 7 becomes 4 (drop the 1).
Ciphertext: 7 0 2 4 2 0 1 8 3 1 2 5 1 0 1 4 4 0 4 9 7 5 1 5 5
+ + + + + + + + + + + + + + + + + + + + + + + + +
OTP: 5 1 1 8 7 6 9 8 9 0 3 4 1 5 9 8 7 2 3 6 2 5 9 5 5
Encoded plain text: 2 1 3 2 9 6 0 6 2 1 5 9 2 5 0 2 1 2 7 5 9 0 0 0 0

Decoding the plain text:

The checkerboard only allows for certain numbers to exist- break up the encoded string following these rules:

  1. Numbers are only one or two-digit
  2. Two-digit numbers can only start with 2 or 6
  3. If a number starts with 2 or 6, it is double-digit
  4. If a number doesn't start with 2 or 6, it is single-digit
21329 60621 59250 21275 9

Thus we get our encoded message:

21 3 29 60 62 1 5 9 25 0 21 27 5 9

Which decodes to:

COMPUTERHACKER

Figure out the spaces on your own!


What else can you encrypt?

Try some of the following: