Jump to content

The One Time Pad Cipher System


Recommended Posts

 

Well, I thought I'd decide to share this with all of you guys.

 

 

Today I'll be discussing the One Time Pad.

 

So let's get into it shall we?

 

 

What is the one time pad?

 

In short, it is the one cipher system that cannot, and will not be broken by the FBI, NSA, or anyone else for that matter. This is due to the fact that the key used for encryption is completely random (meaning you make it, not a pseudo-random computer generated key), and it is only used once (hence the name).

 

What are the uses of the one time pad?

 

Secure Communication. With this system, you can encrypt your messages and sleep soundly knowing that nobody but your intended recipient will be able to decipher your message.

 

And now, on to the tutorial.

 

Creating a Key

 

Alright, before we can create a key, we must first lay out a conversion chart.

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

 

Alright, now we must create a key. Get a pencil and some paper ready.

 

Begin by writing down some letters, in any order you want. For added randomness, flip a coin or role a die every 5 letters to decide your next letter. The longer you make your key, the longer you can make your message.

 

NOTE: The key must be AT LEAST AS LONG as your message, meaning that it cannot be shorter than your message, but it can be longer (having left over bits of the key does not mean you can use those for a new message. Once you send a message with that key, regardless of if you have some of the key left, it is finished and cannot be used ever again).

 

Alright, so for this tutorial I have made my key GKALDKNFQXWOLAMFLBPWMK.

 

Now, take your key that you created before and break it up into chunks of two letters. This makes converting much easier.

 

So, my key would now look like this:

 

GK AL DK NF QX WO LA MF LB PW MK

 

And now, we convert the key into numbers using the conversion chart above. (GK would convert to 0711 because G = 07 and K = 11. Do this for all the letters)

 

After conversion, my key would now be:

 

0711 0112 0411 1406 1724 2315 1201 1306 1202 1623 1311

 

For each block you use to encrypt a message, be sure to strike it out to make sure that you only use that block once. In this tutorial, I will signify striking out a block (a group of 4 digits) by placing #### underneath it.

 

0711 0112 0411 1406 1724 2315 1201 1306 1202 1623 1311

####

 

The first block after all of the blocks that have been blacked out is known as the pointer block, and signifies where in the key your recipient is to start when decrypting your message. This means that the pointer block in my key would be 0112.

 

IMPORTANT: Make sure your intended recipient has the key before you give them the message, to avoid full interception. Your encrypted message is entirely useless without the key, and your key is entirely useless without a message.

 

Alright, now that we have created our key, we can encrypt our message.

 

Formatting Your Message

 

Alright, so say your message is "Hello Everybody".

 

You would go about converting "Hello Everybody" to numbers using the conversion chart above in the same way you did with your key.

 

HE LL OE VE RY BO DY would convert to

 

0805 1212 1505 2205 1825 0215 0425

 

Rules for Messages:

 

1. Spell out all numbers in full. For example, 3509 would be THREE FIVE ZERO NINE.

 

2. Negatives - Always add emphasis to the word NOT in your message. For example: "HE WILL NOT RPT NOT BE ABLE TO ATTEND THE MEETING TODAY"

RPT = Repeat

 

3. Punctuation - Use an X as a period in your message.

Example: INFO RECEIVEDX SEND MORE WHEN READYX

All other punctuation must be spelled out in full.

Example: COMMA, QUESTION MARK, EXCLAMATION POINT, etc.

 

4. Termination - End your message with XX. If necessary, add junk characters after XX to frustrate cryptanalysis and to also make sure you end on a doublet (four digits)

 

Always be sure to use a pointer block at the start of your message so that the recipient can know how to decrypt the message.

 

Encrypting Your Message

 

Remember earlier we made a key? Time to use it.

 

My key looks like this:

 

0711 0112 0411 1406 1724 2315 1201 1306 1202 1623 1311

####

 

And my message looks like this:

 

0805 1212 1505 2205 1825 0215 0425

 

After adding the pointer block to my message, it now looks like this:

 

0112 0805 1212 1505 2205 1825 0215 0425

 

And now we can encrypt the message. To do this, we use Fibonicci Addition. This means that we do no carrying. For example, 8 + 5 would result in 3 not 13 and 9 + 9 would result in 8 and not 18.

 

Plaintext: 0112 0805 1212 1505 2205 1825 0215 0425

Key: --------- 0411 1406 1724 2315 1201 1306 1202 1623 1311

Ciphertext: 0112 0216 1618 1229 4510 2026 1411 1627

 

And now, the encrypted message 0112 0216 1618 1229 4510 2026 1411 1627 is ready to be sent to whomever our intended recipient is.

 

Decrypting a Message

 

To decrypt a message, all the recipient needs to do is reverse the calculations.

 

To do this, we use Fibbonici subtraction. This means that there are no negative numbers. For example, 7 - 9 would be 8. We add 10 to the number being subtracted from when necessary in order to prevent negative numbers.

 

So, when encrypting we added the plaintext and the key together to get the ciphertext. Therefore, decrypting will be subtracting the key from the ciphertext to get the plaintext.

 

 

Ciphertext: 0112 0216 1618 1229 4510 2026 1411 1627

Key: 0112 0411 1406 1724 2315 1201 1306 1202 1623 1311

Plaintext: ---- 0805 1212 1505 2205 1825 0215 0425

 

Now that you have the plaintext, you can use the conversion chart from all the way at the start of this tutorial to conver 0805 1212 1505 2205 1825 0215 0425 into HELLO EVERYBODY.

 

Congratulations! You now know how to use a one time pad for secure communications.

 

And now, to test you on what you've just learned I will provide you with some ciphertext and the key required to decrypt it.

 

Ciphertext: 0119 2110 3521 2739 2026 0113 1414 1527 2231.

Key: 0916 0305 2521 2113 0119 0605 1413 2024 0806 0518 1306 0602

1710 2022 0410 0804 2301 2116 1512.

 

Thank you for reading this tutorial, it took me a couple hours on and off to write this, so be sure to show your gratitude below and leave any feedback that you may have.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...