CODES
THERE IS DANGER MAY COME VERY SOON
HOW DO YOU HIDE SOMETHING in plain sight? By using a code or a cipher.
 
You can make the simplest forms of code by lining up 26 letters in alphabetical order in one row, then starting a second row beneath it that begins somewhere else in the alphabet (see Fig. 1).
 
Suppose you want to send the message SEND HELP SOON. To encrypt this message, just take each letter and replace it with the one in the row beneath it. So SEND HELP SOON becomes FRAQ URYC FBBA.
 
This secret code is called a Caesar cipher, because Julius Caesar had his generals shift their messages back to him by three letters, so A became D. A cipher (like this and the substitution cipher below) is a code in which you scramble the individual letters of each word. There’s one obvious problem with this: There are only 26 possible Caesar ciphers, depending on where in the alphabet you start the second row of the table, so if your enemy knows you are using a Caesar cipher, he can try to decrypt your message using each of the 26 tables in turn. He’ll be able to tell when he gets to the table that you used, because the decrypted message will make sense—decrypting using the wrong table will give gobbledygook.
 
You get many more possible ciphers if you don’t write the letters of the alphabet in order when you make the second row of the table. You can just write all 26 letters in any mixed-up order you want … and there are 403,291,461,126,605,635,584 ,000,000 ways of doing this! When you scramble letters in this way, you are using a substitution cipher.
 
Somehow, of course, the friend you are sending your secret message to will have to know which scrambling of the alphabet you are using. You can either agree beforehand on a scrambling, or you can have a trusted messenger take the key to your code to your friend. (Just make sure the messenger isn’t a spy!)
e9781429937030_i0058.jpg
But there are other forms of codes, too, where you replace entire words with other words. Commanders of submarines and ships used to have large codebooks that would tell them what words should be used to stand for others in coded radio messages. If the codebook said that SEND = HORSE, HELP = CHEESE, and SOON = MOSS, then SEND HELP SOON would turn into HORSE CHEESE MOSS. But again, everyone using the code would have to have the same codebooks with them. During wartime, capturing an enemy’s codebook was one of the best things you could do—which is why naval codebooks were sometimes lined with lead, so that a sailor who was about to be captured could throw his codebook overboard and be sure it would sink to Davy Jones’s locker.
 
In the story The Valley of Fear, the great (fictional) detective Sherlock Holmes was faced with a problem. An accomplice of the evil Dr. Moriarty, who wanted to betray him and warn Holmes of impending danger, mailed Holmes a coded message. But before he could send a second note explaining how to decode the first note, he was frightened by the sudden appearance of Dr. Moriarty himself. Holmes was left with the problem of decoding the secret message without knowing the key. The message began:
 
534 C2 13 127 36 31 4 17 21 41
 
Holmes tried out the idea that 534 might be a page number in a book—thus, a long book. If so, “C2” suggests “second column.” Only a few kinds of books, almanacs, say, come in double columns and are common enough that Holmes would have them. Holmes and his companion Watson searched around, found the right almanac, and counted through the words on the page to find the ones given in the message:”There is danger may come very soon.” And that is the fun part of codes—finding the secret message.
 
If you want to send a secret message to a friend and you haven’t already agreed on a code or cipher, don’t give up hope! You can always do what some ancient Greeks did: Find a trusted messenger. Shave the hair off his head. Write your message on his scalp. Wait for his hair to grow back. And then send him off to visit your friend. It’s as easy as that! (But you should warn the messenger with the secret on his scalp to be very careful: Such extremely valorous emissaries need to evade enemy notice!)