˙˙00˙ ˙00˙01˙03˙01The Keys to Encryption˙00 ˙01˙The day mankind found trust in secrecy was the day a veil was put not to cover a face but to disguise life˙ ˙00 ˙ ˙ ˙03˙02PUH / AGONY ˙02˙01˙01˙00˙˙ ˙01Please notice that this article is based upon what I have learned during my encryption lessons at the Signal Protection Department of Norrlands Signalkår. I have not done any deeper research, nor am I a specialist on mathematics or encryption theory. Accordingly, see this article as an attempt to, not a study of, the history of encryption. ˙˙02˙The Early Years˙ ˙00 ˙˙01In the beginning, there was nothing; people trusted each other just about enough to write plain text, and those who didn't, either hid their messages under their saddles or wrote so called Holmgren theorems; both parts had a special book, in which was written that, say,"Sara is five years old tomorrow" means that "Attack tomorrow at dawn", or something similar. None of these methods were that good, or rather, they were good, but it was very easy to get hold of the keys to solve the problems. The guy with the secret message under his saddle could be captured and tortured, and if someone laid his hands on that Sara book, the whole thing would crack up like a mirror. It is said that Caesar, the emperor you know, was the first one to use real encryption, and as far as I am concerned, he WAS the first one. Anyway, the Caesar method was a revolution, at least for Caesar; suddenly, only those who Caesar wanted to contact understood his texts. The emperor's enemies were unable to understand anything of what they got their hands on, and for a short period of time, say a year or two, everything was peaceful. What Caesar really did was to turn the alphabet with a certain number, 3. Suppose you have the beginning of the alphabet, ABCDEFGH..., and that you feel like encrypt those letters. Consequently, you begin with A, walk 3 steps in the alphabet and, why, you end up with a D instead! The B turns in to an E and the C into an F, amazing but true. ˙02˙02 OEPIR RISTI RHSLU ULPWL ˙00˙01 Now, this does not seem like a solution that would last, but as no one actually had thought about encryption before, it actually took quite a long time before anyone understood how to deal with those things. By then, Caesar had realized that his secrets were unsafe, and he changed his magic 3 to 6, 9 and 12, but as the word was out, it did not really matter which number he used; the Caesar code was forever broken. The Caesar method is nowadays referred to as being a substitution method because of ones simply substituting one letter with another. If you want to make a code that will last for, say, fifteen minutes, this is actually a good one, but, as you understand, it is not used in real life where great security demands are set. In order to improve this method, you can give the space, i.e. the " ", a letter of its own, or you can simply write the whole message without any spaces at all, JUSTLIKETHIS. If you are to break a code like this, your chance lies in commonly used letters. Suppose you know that the original message is written in English, and that S and T are commonly used in the English language. If you then run across a lot of W and O in the encrypted text, then you might actually break the code after a while. Say that a normal English text contains of 23 percent A, 8 percent B and on. It is liable that your encrypted text matches quite well with normal English, i.e. if you find 22 percent W, well, then that just might be an S. This is easily seen if you put the whole thing out statistically. Another way to solve the encryption is to use the Method of Liable Words. For example, most letters start with "Dear ...", and if you manage to get just one single letter, i.e. if you find out by which number the alphabet is turned, why, then you have solved it! ˙˙02˙The Sequel˙ ˙00 ˙˙01In the 15th and 16th century (by which does not mean 1500 and 1600!), this Caesar thing went kind of out of hand. At most border lines, moist was use to dissolve sealed envelopes and the letters could be read through, something that proved very useful when investigating diplomat letters. Nobody wanted to reveal their own state secrets, but there just were no new methods to code the stuff. Suddenly, Viginere from France came up with a bright idea... ˙02˙02 1. Pick or invent a word, the longer the better. BAD 2. Choose text to encrypt TALENT 3. Write the encryption word on a line and the text you want to encrypt on the next BAD TALENT 4. Write the encryption word as many times as it takes to cover the word(s) below. BADBAD TALENT 5. Now use the method of Caesar, i.e. check out the first line: it says BADBAD. The line below says TALENT. The first letter in BADBAD is B, the second letter of the alphabet. Consequently, you turn the letter below two times, and the T turns into a V. The second letter in BADBAD is A, the first letter of the alphabet, and consequently you turn the letter below this A one time; the A in TALENT turns into a B. BADBAD TALENT becomes BADBAD VBPGOX ˙01˙00What's so unique here? Well, we have two T in TALENT, but the two T are not encrypted into one and the same letter, as did Caesar's encryption, but into a V and an X. It is easy to understand that this was revolutionary; nobody could decrypt it for a long, long time; you simply had to have the encryption word, at least that was what one thought... Many years later, one started to think about solving Viginere's invention. One began to think, "How long might that encryption word be? Five letters maybe? Eight? Cause if it is, well, then you just might see which letters that are most common, and if you do, then you can sort them out with statistics..." If you write BADBADBADBADBAD, the whole thing will sooner or later go around a few times, try for yourself. This requires some 600 letters of encrypted text, though. ˙˙02˙We Are Moving...˙ ˙00 ˙˙01In the 19th century, one realized that any word, no matter how long, goes around too fast, and that it would be much better to use for example the sentences of a novel... ˙02˙02 THE SUN ROSE AT DAWN MEE TME ATTH EH OTEL (meet me at the hotel) TKO GYF HLHF GR NFCJ (the encrypted text, not correct here) ˙01˙00 If you do not know the first line, this encryption is impossible to solve. Sure, a Cray would be able to test all existing sentences out, and it would even spit out MEET ME AT THE HOTEL sooner or later, but as any sentence means any solution, it would also produce MEET ME AT THE CAFE, DON'T MEET ME AT ALL and THE ELEPHANTS ARE DEAD, i.e. the encryption is unsolvable. Good, or? Well, if you are to sent long messages during a long time, it's worthless; soldiers can, for example, not carry around a lot of heavy books in the field. It is, however, possible to find out what the encrypted text goes like, even though it takes some time. If you get hold of some encrypted text from say a fisherman, you can guess that he is a alcohol smuggler, and that he uses the word VODKA is his text, and that he as a matter of fact uses it as the first word... ˙02˙00 VODKA (the wild guess) YZEGK (actual encryption text) This would generate (according to Caesar) CKAYJ (or whatever) VODKA YZEGK ˙01˙00 If it is VODKA there in the second line, then the original book text would have been CKAYJ, and what fucking book contains CKAYJ? No, it must be something else, Whiskey perhaps? If you managed to get hold of one, just one word, from the book, then you could start guessing there too. ONCE is for example often followed by UPON A TIME... As you can see, it is possible, however not funny, to "solve"... ˙˙02˙The Endless Book˙ ˙00 ˙˙01In early 20th century, one figured out that it would be a good idea to, instead of using an already existing book, "invent" one, i.e. one began to randomize the letters. Suppose you wanted to encrypt THE INVASION WILL TAKE PLACE... ˙02˙02 EDDHWUASDHYFDKTGGDFG (randomized letters) THEINVASIONWILLTAKEPLACE (text to encrypt) ˙01˙00 The first letter in THE INVASION is T, and above the T there is an E, the fifth letter of the alphabet. Accordingly, you turn the T five times and end up with a Y. The T is followed by a H, over which there is a D, the fourth letter of the alphabet =) you turn the H four times and get L instead. ˙02˙02 JFDIUHFUKSDHGUEJFIDSHJFJK (randomized text) THEINVASIONWILLTAKEPLACE (text to encrypt) SDFUHDUIFGHUIDFHGUIUDFG (the result, not correct here) ˙01˙00 This encryption method is actually very, very good; it is, as a matter of fact, unsolvable. As the encryption letters are all randomized (i.e. the first line), it will generate a encryption text in which no letter is more common than another, i.e. you can't use statistic methods. You can't guess words, either: Even if you guessed right, even if you guess that the message starts with THEINVASION, what you will you get? Well, you don't get the first chapter of the Bible, you get a line of letters with seemingly no connection whatsoever, and you have no possibility to check out if that's the correct line of randomized letters... In theory, you could think something like, "the first letter in the text, what can it be? Well, I have some 26 possibilities for the first one, 26 for the next, 26 for the next..." Even if you made a program that would try every solution, what would it come up with if not every solution? YELLOWSTRAWBERRIESAREGOOD? This encryption method is, as I said, good as long as you only use the same randomized text once. If you don't, it is possible however not easy to put a crack in the mirror with the help of some heavy statistics. ˙˙02˙Into Secrecy˙ ˙00 ˙˙01When the world went digital, and even before that, those who were into the encryption business realized that it just might be a good idea to use numbers instead of letters within the same encryption theories. Say that the access code to OepirRisti.S is 011110101, and that we want to send the source code via the Internet to Talent in Norway (they could use a good start...), and that we wanted to encrypt just those numbers so that nobody would get the required access. ˙02˙02 110101011 (randomly chosen numbers) 011110101 (the access code) ˙00˙01 If you take the first number in our access code 001110101, which is 0, and add the number above it, 1, you get 1; if you take the second number of the access code, 1, and add the number above it, 1, you get 0 as defined by digital praxis; well, you do get the point, don't you? ˙02˙02 110101011 (randomly chosen numbers) 011110101 (the access code) 101010100 (the encrypted numbers) ˙00˙01 This is, as is the method of randomly chosen letters, unsolvable. The same disadvantage as with the letters is, however, present here too; you simply have to carry around as many a randomized number as the number of the numbers you want to encrypt (hmm...). The hard thing is to make a program that creates randomly chosen numbers; in this case, we can't trust the human mind at all to carry out such a task. If you take a look at those "programs" (functions) of your pocket calculator, you will find that the numbers regenerate themselves every say 1000th time, and that simply isn't good enough . The demands set for a "randomizer device" are pretty high: it must produce a series of number that must look like it is randomized, and it must be impossible, or at least tremendously hard to out of any chosen part of the series estimate the following numbers. As if this weren't enough, there must be a lot of (well, a million is far from enough, if you know what I mean) start values in order not to produce (i.e. choose) same numbers twice, because that is, as we have seen, fatal for secrecy. Well, what more can I say? What more can I understand, and have I understood what I have talked about? Cryptic questions, those, but what we can establish is the fact that what we have taken part of is the basic theory of the encryption machines of today. No matter how complex (they ARE complex these days), they all have their roots here. Quite fascinating, is it not? ˙01