Secret Language - Cryptography & Secret Codes - Exploratorium
Secret Language - Cryptography & Secret Codes - Exploratorium
the plaintext). 2. The key used with the algorithm to allow the plaintext to be both enciphered and deciphered. 3. The period or time during which the key is valid.
By way of analogy, to get into your home you would put a key in a lock to open the door. This process (the use of a key and a lock) is the method or algorithm. Now this method only works if you have the proper key to stick in the lock, and your key will be valid only as long as you are the resident of the particular abode. The next resident will have the locks changed to a different key to make sure that you cannot enter even though you may know the method. The selection of the above three items - algorithm, key and period - depend on your needs. If you are in the battlefield and are receiving current tactical data, you want an algorithm that makes it easy to decipher the message in the heat of battle. On the other hand, you must also assume that your opponent has intercepted your enciphered message and is busy trying to break it. Therefore you must choose an algorithm (method) that is complicated enough so that by the time your opponent figures it out, the data will be worthless. The easier the algorithm you choose, the more often you will have to change the key that unlocks the code - if you want to keep your enemy in the dark.
www.exploratorium.edu/ronh/secret/secret.html 1/8
2/14/12
Ciphers are broken into two main categories; substitution ciphers and transposition ciphers. Substitution ciphers replace letters in the plaintext with other letters or symbols, keeping the order in which the symbols fall the same. Transposition ciphers keep all of the original letters intact, but mix up their order. The resulting text of either enciphering method is called the ciphertext. Of course, you can use both methods, one after the other, to further confuse an unintended receiver as well. To get a feel for these methods, let's take a look at some ciphers.
www.exploratorium.edu/ronh/secret/secret.html
2/8
2/14/12
Click here to download a copy of the cypher wheels (12k PDF). Copy and cut out the two wheels. Place the smaller wheel on top of the larger wheel and rotate them so your "key letter" on the small wheel is beneath the "A" of the large wheel. Now you can encipher your plaintext and pass it to your friend who knows the proper key letter. You could make your ciphertext a little tougher to decode if you threw 26 pieces of paper into a hat, each with a letter of the alphabet written on it, drew them out one at a time, and put them sideby-side under a normal alphabet. The result might look like this (I just used the order of the keys on my keyboard, so you might call this a "Qwerty" code):
Panetlte lit etr Cpet tlte ihre etr ABCDEFGHIJKLMNOPQRSTUVWXYZ QWERTYUIOPASDFGHJKLZXCVBNM
You can construct a secret message from the above table. Every time you see an "I" you would substitute the "O" beneath and so on for the other characters. The message "Meet me after school behind the gym," would read
The same secret message as above, using the line-shapes that surround each letter (and including a dot where needed) becomes:
Even though it looks like undecipherable outer-space alien text, this would take an arm-chair cryptologist only about 10 minutes or less to figure out. Why? Given enough ciphertext, certain patterns become obvious. Notice how often the empty four-sided box appears: six times out of a total of 29 characters or about 20% of the time. This would immediately indicate that the empty box was almost certainly the symbol for "E," the most frequently used letter in English. Other letters can also be determined by their frequency and by their association with other nearby characters
www.exploratorium.edu/ronh/secret/secret.html 3/8
2/14/12
(see "Frequencies"). Almost all substitution ciphers are open to this kind of analysis. Francis Bacon created one of the more interesting substitution ciphers. He used two different type faces slightly differing in weight (boldness). He broke up his ciphertext into 5 character groups, each of which would represent one character in his plaintext. Depending on which characters of the group were bold, one could determine the plaintext character using the following table (* stands for a plain character and B for a bold character)
A***G*B*M*B*SB**YB** =** =*B =B* =*B =B* B**BH*BBN*BBTB*BZB*B =** =*B =B* =*B =B* C***I***O*B*UBB* =*B =B* =BB =** D**BJ**BP*BBVBBB =*B =B* =BB =** E*B*K***QB**WBB* =** =BB =** =*B F*BBL**BRB*BXBBB =** =BB =** =*B
Our same secret message as above would appear thusly (Bacon's bold and plain characters were less obvious than those below):
T b o ntt b ta i teqeto. o e r o o e ht s h usin Wehr'i nbe i temn t hte ts olr n h id o sfe tesig adar so ufr h lns n ro f otaeu frueo t tk am urgos otn r o ae rs aantasao tobe adb gis e f ruls n opsn edte? poig n hm
To decipher, we just break the characters into groups of 5 and use the key above to find the plaintext message.
www.exploratorium.edu/ronh/secret/secret.html
4/8
2/14/12
Transposition ciphers
Going back to your school days, oo-day oo-yay emember-ray ig-pay atin-lay? Pig-latin is a form of transposition cipher where the original letters are kept intact (albeit with the addition of the suffix "ay"), but rearranged in some way. Going back way before your school days, to the 5th century B.C., the Spartans used an interesting transposition cipher called a scytale. The scytale utilized a cylinder with a ribbon wrapped helically around it from one end to the other. The message was written across the ribbons, and then unwrapped from the cylinder. Only someone with an identical diameter cylinder could re-wrap and read the message.
The scytale depended on a piece of hardware, the cylinder, which if captured by the enemy, compromised the whole system. Also, the receiver could lose or break the cylinder and therefore lose the ability to decipher any message. It would be better if the method were completely "intellectual" and could be remembered and used without resorting to a physical device. Since both the sender and receiver of a transposed ciphertext must agree on and remember this algorithm or method for enciphering and deciphering, something easy would be nice. Since geometrical figures are easy to remember, they serve as the basis for a whole class of transposition ciphers. Let's put our message into the shape of a box. Since there are 29 characters, we'll add a dummy ("O") to make 30 and write the message in a six by five box.
www.exploratorium.edu/ronh/secret/secret.html
5/8
2/14/12
Once you've put the text in the chosen form using one route, you can then encipher it by choosing a different route through the text. You and your partner just have to agree on the reading route, the transcription (enciphering) route, and the starting point to have yourselves a system. These systems are called route transcriptions.
Here's our message again. The reading route spirals counterclockwise inward, starting at the lower right corner (left diagram). The transcription route (right diagram) is zig-zag diagonal starting at the lower left corner. The ciphertext becomes: EAMTN FTDIE EHOTE RHMEM BYESC GLOHO To decipher, you fill the in box following the zig-zag route and read the message using the spiral route. Another type of transposition cipher uses a key word or phrase to mix up the columns. This is called columnar transposition. It works like this: First, think of a secret key word. Ours will be the word SECRET. Next, write it above the columns of letters in the square, and number the letters of the key word as they would fall if we placed them in alphabetical order. (If there are duplicate letters, like the "E", they are numbered from left to right.)
2/14/12
deciphering may become so complicated that it will remain a secret at the receiving end forever! Come to think of it, she never did meet me behind the gym...
Frequencies
Order of frequency of single letters: E T O A N I R S H D L C W U M F YG P B V K X Q J Z Order of frequency of digraphs (two letter combinations): th er on an re he in ed nd ha at en es of or nt ea ti to it st io le is ou ar as de rt ve Order of frequency of trigraphs: the and tha ent ion tio for nde has nce edt tis oft sth men Order of frequency of most common doubles: ss ee tt ff 11 mm oo Order of frequency of initial letters: TO AWBC DSFMRHIYEGLN PUJK Order of frequency of final letters: ESTDN RYFLO GHARMPUW One-letter words: a, I, 0. Most frequent two-letter words: of, to, in, it, is, be, as, at, so, we, he, by, or, on, do, if, me, my, up, an, go, no, us, am... Most frequent three-letter words: the, and, for, are, but, not, you, all, any, can, had, her, was, one, our, out, day, get, has, him, his, how, man, new, now, old, see, two, way, who, boy, did, its, let, put, say, she, too, use... Most frequent four-letter words: that, with, have, this, will, your, from, they, know, want, been, good, much, some, time, very, when, come, here, just, like, long, make, many, more, only, over, such, take, than, them, well, were...
Bibliography:
Gardner, Martin. Codes, Ciphers and Secret Writing. New York, NY: Dover Publications Inc., 1972. A wonderful, fun, and easy to read introduction to codes and ciphers. Smith, Laurence Dwight. Cryptography, the Science of Secret Writing. New York, NY: Dover Publications Inc., 1943.
www.exploratorium.edu/ronh/secret/secret.html 7/8
2/14/12
A good account of codes and ciphers with many historical examples. Konheim, Alan G. Cryptography: A Primer. New York, NY: John Wiley & Sons, 1981. A highly technical (and mathematical) book on more modern methods of code making and breaking. Gaines, Helen Fouch . Cryptanalysis: A Study of Ciphers and their Solution. New York, NY: Dover Publications Inc., 1956. The title says it all.
Internet Resources
FAQ from newsgroup SCI.CRYPT National Security Agency pointers National Cryptologic Museum NSA History NSA Kids' Page International Spy Museum in Washington D.C. Cryptology Pointers Cryptology ePrint Archive Frode Weierud's CryptoCellar: Cryptology and Its History Cryptology paper by Oliver Pell Navajo Code Talkers: World War II Fact Sheet Yahoo's Cryptology Page 1995, Ron Hipschman
www.exploratorium.edu/ronh/secret/secret.html
8/8