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.