Cryptology

    Cryptology is the study of encoded messages, like codes and ciphers, and how to solve them. Codes use a series of letters, symbols or sounds while ciphers rearrange or replace letters or words. When encoding a secret message, you first start with the plaintext, and then you apply the encryption to get the ciphertext.  Examples of codes in our everyday lives are bar codes on the things we buy, zip codes, and area codes used to call people. Codes have shaped our history, won wars and saved lives, all through the power the secrecy.

Here are a few examples of codes.

Caesar Cipher

Picture
   The Caesar Cipher is a simple form of encryption. The code was devised by Julius Caesar to secretly communicate with his generals fighting for more territory in Gaul. To encrypt a message using this method, you just shift the letters of the alphabet 3 places down to be represented by different letters. For example, a shift of three would make the A become a D, a B become an E and so on. When the end of the alphabet is reached, it cycles back to the beginning, so Z is represented by C. While the original cipher used a shift of three, the term can now refer to any encryption that uses a shift of the alphabet. The Caesar Cipher is easily broken and is usually incorporated into more complex forms of encryption. An ROT13 cipher is a version of the Caesar used commonly on the internet. This form of the Caesar Cipher shifts by thirteen, so it is its own inverse. In other words, an A becomes a N and an N becomes an A. It is used to hide the punch-lines of jokes or to hide potentially offensive material. See if you can solve the following cipher (hint: it uses a shift of 3):
fdhvdu duulyhv dw gdzq
(Answers at the bottom)


Navajo Code Talkers

Picture
During World War II, a code was needed to communicate with ships in the Pacific. Philip Johnston came up with the idea to use the Navajo language as a code. The Navajo code talkers directly helped win the battles at Guadalcanal, Iwu Jima, Tarawa, and Peleliu. Navajo is a Native American language that is spoken by less than 30 non-Navajos, none being Japanese, making it perfect for the U.S. Navy during WWII. The fact that the language had no written characters and was never written also contributed to its effectiveness as a code. Navajos were recruited into the military because they were among the few who could speak and understand this complex language. When sending messages, the code talkers would use an acronym-like system. For example, if they wanted to say "navy" they would say "tsah (needle) wol-la-chee (ant) ah-keh-di- glini (victor) tsah-ah-dzoh (yucca)." The Japanese were baffled by this "secret language" and even Navajo prisoners of war captured by the Japanese would only hear jumbled up words that didn't make sense together. It was the one of the only codes never broken during the war. In 1992, the Navajo code talkers were honored with a memorial in the Pentagon. To hear an example of how complex Navajo is to understand, and to get a short lesson in greetings, watch the video below.

Morse Code

Picture
Morse Code was invented by Samuel Morse, along with his partner, Alfred Vail, in 1840. Morse code was essential in the development of the telegraph, an invention that revolutionized communications. In this code, the letters of the alphabet, numbers zero through ten, and punctuation marks each have a symbol using dots and dashes. A dot is a short signal and a dash is a long signal. To devise the system, Vail visited a printing shop. There he discovered which letters were most commonly used and gave those letters shorter characters. So E, the most common letter, was given the simplest code, dot. When the system was first used, the transmissions would be translated by a machine onto a piece of paper. Then a technician would decode the dots and dashes on the paper. It was soon discovered that the electrical signal could be decoded just by listening to it. This made the process even quicker, eliminating the need for the paper. The system was soon used all over the world. To accommodate various accents and other phonetic marks, a Continental version of the code was introduced. Though the telegraph has been mostly replaced by newer technology, Morse code can be used over any channel in an emergency.
Here's a sample of Morse Code. Can you figure out the hidden meaning? (- means dash and . means dot; answers at the bottom- no peaking!)
...  .  -.-.  .-.  .  -.-.  -.--

Enciphering and Deciphering

Formulae

        By substituting numbers for letters, math can be applied to enciphering and deciphering codes. While it may seem more complicated to use numbers, when using more complex codes it makes it quicker. When using the alphabet, the letters are assigned the numbers 0 through 25. This way modulus 26 can be used to make numbers higher than 26 "cycle back" to the beginning of the alphabet.

a  b c  d  e  f   g   h   i   j   k   l    m   n   o   p   q    r    s    t    u    v    w   x    y   z
0 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

So, for a Caesar Cipher with a shift of 3 (see above for more about Caesar Ciphers), the enciphering formula would be C=(P+3) mod 26. In this formula, C stands for the ciphertext, or encrypted letter, and P is equivalent to the plaintext, or unencrypted letter. We add 3 to P to simulate the "shift of 3." The mod 26 is a little confusing at first, but it just means modulus 26 or the remainder of (P+3)/26. For example, take the letter x. After assigning each letter a number, x becomes 23. Plugging into the formula, we get:
C=(23+3) mod 26 = 26 mod 26 = 0
Since 0 is the equivalent of a in the code, x enciphers to a. The deciphering formula is basically the opposite. We use the formula P=(C-3) mod 26. So, to decipher the letter b (the equivalent of 1):
P=(1-3) mod 26 = -2 mod 26 = 24
Since 24 is the equivalent of y in the code, we've successfully deciphered the code. These formulas can be used for any shift by simply changing the 3: C=(P+s) mod 26.

Keys

Picture
 “Kerckhoff’s principle: The security of a cryptosystem must not depend on keeping the cryptographic algorithm secret. The security depends on keeping both keys secret.” (In Code by Sarah Flannery, pg 85). To understand this quote, you must first know what a key is. It is the principle applied to create the encryption and the principle that must be applied to decipher the code. For example, in a Caesar Cipher with a shift of 3, the key of encryption would equal 3, or the shift. The key of decryption would equal -3, or the negation of the shift. So, Kerckhoff's principle states that in order for a code to be truly secure, not only does the code have to be kept secret, but the key to its encryption, and most importantly, decryption must be kept secret.

Cryptanalysis

    Cryptanalysis is the study of breaking codes, or trying to find the key of encryption and decryption. Certain "tricks" are used to help decode messages. Patterns of language are often used. For example, knowing that E, T, A, O, and N are the most commonly used letters in the English language could help you find clues in a code. By noticing that one symbol or number occurs more frequently than any other, you can assume that this symbol or code is the E. This gives decoders a place to start when encrypting. If you'd like to try your hand at deciphering some cryptograms, click here.

Answers
Caesar Cipher- Caesar Arrives at Dawn
Morse Code- Secrecy

Sources
Images:
  • Julius Ceasar - Kelly Dougherty. Photograph. Bluewiki- First Empires. Web. 13 Apr. 2011. <http://bluewiki.wikispaces.com/First+Empires>.
  • Navajo Code Talkers Operate a Radio in This Undated Photo. Photograph. The Christian Science Monitor. 12 Nov. 2009. Web. 13 Apr. 2011. <http://www.csmonitor.com/USA/2009/1112/p90s01-usgn.html>.
  • Morse Code. Photograph. Braingle. Web. 13 Apr. 2011. <http://www.braingle.com/brainteasers/codes/morse.php>.
Websites:
  • "Telegraph." The Gale Encyclopedia of Science. Ed. K. Lee Lerner and Brenda Wilmoth Lerner. 4th ed. Detroit: Gale, 2008. Gale Science In Context. Web. 13 Apr. 2011.
  • "Morse code." World of Invention. Gale, 2006. Gale Science In Context. Web. 13 Apr. 2011.
  • "Navajo Code Talkers Cryptology." Naval History and Heritage Command. Web. 13 Apr. 2011. <http://www.history.navy.mil/faqs/faq61-2.htm>.
  • "Caesar Cipher." Wikipedia, the Free Encyclopedia. Web. 13 Apr. 2011. <http://en.wikipedia.org/wiki/Caesar_cipher>.
  • "ROT13." Wikipedia, the Free Encyclopedia. Web. 13 Apr. 2011. <http://en.wikipedia.org/wiki/ROT13>.
Books:
  • Flannery, Sarah, and David Flannery. In Code: a Mathematical Journey. New York: Workman Pub., 2001. Print.
  • Newton, David E. Encyclopedia of Cryptology. Santa Barbara, CA: ABC-CLIO, 1997. Print.
Video:
  • YouTube- Let's Speak Navajo - Episode 01. Perf. Terry Teller. YouTube- Broadcast Yourself. 23 Jan. 2010. Web. 13 Apr. 2011. <http://www.youtube.com/watch?v=nccsMkfDauo>.