# Thread: Unbreakable Code?

1. ## Unbreakable Code?

I was reading through the Eladrin's puzzle thread, and it reminded me of something I've worked on here and there for a while, now, and figured this would be a pretty good place to pose my theory. What I am suggesting is kind of out there, and a bit geeky (I guess), so if this isn't your cup of tea, stop reading now.

Casually doing research on ciphers and codes I saw that most (or all) substitutions ciphers can be cracked over time by simply exploiting the frequency of commonly used letter in a particular language to figure out the code. For example, if A=Z, B=Y, C=X, etc. You simply look for what letters are used the most and the least in the code, and you can figure out what letters they represent. A computer program designed to break codes can crack this sort of code fairly quickly.

Something which is done to further complicate the code is to use a sliding key. Meaning A = Z if it is in the first position (of the note), but A = Y in the second position in the note and so on. While this makes cracking it manually much more difficult, a computer program can usually crack this one as well.

While there are tons of other methods for encoding (or encrypting) data, once the method or type of cipher is known publicly, a program can be made to attempt to break the code using the various methods of encoding.

My understanding is that since computers are so fast, pretty much any code can be crunched millions/billions of different ways and when a result is obtained that makes sense (sometimes even a fuzzy result), it spits it out as a possible solution to the code.

So I got to thinking, is it possible to create an unbreakable code? In theory, my answer would be yes.

Assumption: The thought here would be a sender with an encoder, and the receiver with a decoder key. If the receiver's key is compromised, the jig is up. But, as long as the key is safe, anyone who wants to view the encoded message can, but they won't be able to break it.

With a background in Auditing and IT security (which includes statistics and probability), this is where I turned when trying to figure out how to do it.

My theory for an unbreakable code:

Using a sliding key, create a cipher where each position in the message has a different key AND each key has an equal chance of being represented by every other character (including punctuation marks). For example, in a message like "Go to war" the capital G in the first position may be coded as A, h, :, *, and so on. While the lower case "o" in the second position has a completely different key and may be represented by any other character, as well.

Since every space in the note has an equal opportunity of being represented by every character in the alphabet, having a computer crunch the data would be meaningless as every possible 9 character message would pop up.

If you are still with me, the how, while complicated to do, is not that difficult, theoretically. There are already standard character maps for fonts where text is represented by numbers ***(See note 1). Using an excel spreadsheet, you list out every possible character and its corresponding number in a worksheet. You then use the random number generator (included in excel) in a separate column, next to each character***(See note 2). You then resort the list of characters based on the randomly generated number, so they may fall in any order. You've got your first key. Repeating this process can generate as many keys as you need.

A final product would be a spreadsheet where anyone could download it, and (using a macro) hit a button which would generate the amount of keys specified (i.e. 50, 100, etc.). If your note has a length larger then the amount of keys, the encoder would simply go back to the first key after reaching the end. Anyways, once you have your key, you could give it to whomever you wanted. Possibly a decoder only file could be generated and saved. You then type or paste your note into a text box, which using cell references creates the code in another worksheet. Once done, you copy the coded text, put it in any email, and the receiver only needs to copy your text and paste it into their decoder spreadsheet, which decodes the message for them. Anyone intercepting the note would be unable to crack the code without the key.

Lastly, to further complicate the message and to disguise its length, non-sense characters could also be included. For example, every 3rd or 4th or 5th letter in the note would be non-sense and not used by the decoder. Figuring out how to choose what method of disguise would be used could be based on length. A simple example would be if the note has an odd number of total characters, every 3rd character would be non-sense, and if total characters is an even number, every 5th.

Maybe it is my paranoia of living overseas trying to send emails back home, wondering if big brother is watching. But, the thought first came to me when I changed the PIN on my ATM card and then forgot it.The new PIN was written in a letter sent to my house back home. Email and phones just seemed so unsecured to me. A simple program like this would have been great.

Lastly, this would simply be the first generation of simple ciphers. You could easily further complicate the code, and make it more user friendly, but I'll spare you my ideas on that, as I am mainly looking for a critique on my logic, here.

So, I ask all the brains out there. Does this make sense? Does it already exist (although I have looked for something like this without finding anything). Any questions about clarification?

Tell me what you think.

Note 1 *** You can list out the number 1 to I think it is 200 or 300 for Times New Roman, and there is a function which you can use to return it's corresponding text equivalent. You will have to remove a few numbers as there are duplicates, especially for spaces.

Note 2 *** You have to copy and "paste special" the "value only" of your randomly generated numbers or they keep changing when you sort them or cut and paste them.

2. 90 years late

http://en.wikipedia.org/wiki/One_time_pad

edit: Actually, this "A final product would be a spreadsheet where anyone could download it, and (using a macro) hit a button which would generate the amount of keys specified (i.e. 50, 100, etc.). If your note has a length larger then the amount of keys, the encoder would simply go back to the first key after reaching the end."

makes it breakable. In order to be secure, your key must be as long as your message.

edit2: The random number generator in excel isn't a random number generator. It's a pseudo-random number generator, and may also be subject to attack.

3. "Unbreakable" or "heavy" encryption can be done, to the point that all of the computing power in the world being used in a brute force attack would still require a few hundred/thousand/million years to crack...

...but it's illegal, because big brother doesn't want to hijack all of the world's computers to read your email to your grandmother.

4. Originally Posted by Strakeln
"Unbreakable" or "heavy" encryption can be done, to the point that all of the computing power in the world being used in a brute force attack would still require a few hundred/thousand/million years to crack...

...but it's illegal, because big brother doesn't want to hijack all of the world's computers to read your email to your grandmother.
It isn't illegal within the US.

edit: Also http://xckd.com/538/

5. Wow, thanks for the quick response. Well, at least the quote below tells me my thinking was in the right place.

"In cryptography, the one-time pad (OTP) is a type of encryption, and the only one which has been proven to be absolutely impossible to crack if used correctly."

Any idea if this has been put into a quick usable format (like a spreadsheet), yet?

6. Originally Posted by SimVerg
It isn't illegal within the US.

edit: Also http://xckd.com/538/
+1 rep!!! LOL

7. Originally Posted by Thailand_Dan
Wow, thanks for the quick response. Well, at least the quote below tells me my thinking was in the right place.

"In cryptography, the one-time pad (OTP) is a type of encryption, and the only one which has been proven to be absolutely impossible to crack if used correctly."

Any idea if this has been put into a quick usable format (like a spreadsheet), yet?
It was used(with some flaws) in WW2. It generally isn't widely used because distribution of the pads is problematic(the contents of the pads must be truly random, which means they must be generated once and then distributed to all recipients of the message).

8. Originally Posted by SimVerg
edit2: The random number generator in excel isn't a random number generator. It's a pseudo-random number generator, and may also be subject to attack.
What is a pseudo-random number generator? Unfamiliar with the difference. And how would it be subject to attack?

9. LoL I actually did try to come up with random things for Eladrin's puzzle with a One time pad cipher but wasn't getting anywhere with it cept I get the word Seen to appear in line too after making the pad be five over and over again.

10. Originally Posted by Thailand_Dan
What is a pseudo-random number generator? Unfamiliar with the difference. And how would it be subject to attack?
Computers can't just make up data. It's pseudo-random because it relies on a "seed" (usually a time stamp). Given the same seed, it will produce the same number every time.

Thus, if someone knew the exact time (down to the milisecond, I believe) that the number was generated, they could know the number.

Plus, it is easy to do unbreakable encryption if you are not concerned with retrieving the information. It's only a problem if you actually want to be able to have the information again some day.

11. Originally Posted by Montrose
Computers can't just make up data. It's pseudo-random because it relies on a "seed" (usually a time stamp). Given the same seed, it will produce the same number every time.
Actually with about \$5 worth of hardware, and how ever much software it would take to interface with it (I've never priced out driver writing code) computers could make up data pretty darn well.

Let me rephrase that to be home machines could be. A real good, top of the line one, who has very darn good control of power flow, emf, and fan rates would be harder to create such but could still do so with probably \$10-\$20 worth of hardware instead.

Now for front, this would be good for key generator only, but NOT something that could give you consistently flat value groupings.
*ponders*
emm.. but pared correctly with the pseudo generator... could possibly get flat values... emm.. I'll have to file that thought away for later.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

This form's session has expired. You need to reload the page.