Close

Who needs pad addresses?

A project log for Hackaday Cipher Utility

Web based tool to automate ciphering/deciphering using hackaday one time pad

gannongannon 10/07/2014 at 19:060 Comments

While trying to figure out the cipher posted in http://hackaday.com/2014/10/06/hackaday-10th-anniversary-1o57-and-the-art-of-encryption/ I decided that maybe either the pad address was wrong or it was double enciphered with a second pass somehow. While I was working on figuring this out Brian came forth mentioning he had actually just made a typo in the address.

My method of trying to decipher the message was simple. Brute force it! There are only 18400 pad starting addresses after all. After working out some bugs in my JavaScript code I was able to get it to work...although it would return hundreds of results as I only checked to make sure the first word in the sentence was a real word.

When I have some time I will work on cleaning this code up and getting it into a better working state. My proposed method for brute forcing the message deciphering is as follows.

1. Split the message up into words

2. Decipher the first ciphered word starting with each of the 18400 pad addresses

3. For each result that is a known word continue deciphering the message

4. Sort messages based on ratio of known words to unknown words

Is this method slow? Currently in JavaScript, a bit. Also I seem to be hitting an issue where I can't process all of the data at once. I am unsure if this is an issue with memory consumption or something else yet. That is my main reason for not simply deciphering the entire message 18400 times. I will probably break the problem up into a more efficient method later.

Discussions