Ron Hipschman
When you were a kid, did you have a "Captain Midnight" decoder ring? With it, you could send messages to a friends that no one else could read. Or perhaps you remember using special symbols to write notes to your "squeeze" in class. If the note was intercepted , your teacher, could learn nothing about your romance.
In more serious uses, codes and ciphers are used by our military and diplomatic forces to keep confidential information from unauthorized eyes. Businesses also send data that has been encoded to try and protect trade secrets and back-room deals. After all, you wouldn't want your competitor to know that you were about to acquire their company with a leveraged buy-out.
The study of enciphering and encoding (on the sending end), and deciphering and decoding (on the receiving end) is called cryptography from the Greek (kryptos), or hidden and (graphia), or writing. If you don't know Greek (and not many of us do) the above letters could be a form of code themselves! Although the distinction is fuzzy, ciphers are different from codes. When you substitute one word for another word or sentence, like using a foreign language dictionary, you are using a code. When you mix up or substitute existing letters, you are using a cipher. (I told you the difference was fuzzy, and you can combine codes and ciphers by substituting one word for another and then mixing up the result.) We'll concentrate on ciphers.
For a cipher to be useful, several things must be known at both the sending and receiving ends.
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.
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.
The Captain Midnight decoder ring (which is an "encoder" ring as well) allows you to do a simple substitution cipher. It usually has two concentric wheels of letters, A through Z. You rotate the outside ring and substitute the letters in your message found on the outside ring with the letters directly below on the inside ring (see diagram). Here, the algorithm is to offset the alphabet and the key is the number of characters to offset it. Julius Caesar used this simple scheme, offsetting by 3 characters (He would have put the "A" on the outer ring of letters over the "D" on the inner ring if he had owned a Captain Midnight decoder ring.) The word "EXPLORATORIUM" thus becomes "HASORUDWRULXP." Such a scheme was easily broken and showed a certain level of naivete on Caesar's part concerning the enemy's intelligence.
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 side-by-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):
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
Word lengths - especially the short words - give great clues as to the nature of the code (see frequency charts). To help conceal your message, ignore the spaces and break the message up into equal-sized chunks. Five letters are customary in the spy biz, so your message comes out like this (Note that an extra "dummy" character "M" is added at the end to make it come out with a 5-letter group. Your recipient should have no trouble with the extra character.):
Another popular system called a diagrammatic cipher, used by many children in school, substitutes symbols for letters instead of other letters. This system is, in essence, the same as the letter substitution system, but it's easier to remember than 26 randomly picked letters. It uses the tic-tac-toe boards and two X's as shown below.
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 (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)
Our same secret message as above would appear thusly (Bacon's bold and plain characters were less obvious than those below):
To decipher, we just break the characters into groups of 5 and use the key above to find the plaintext message.
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.
We can now transcribe the message by moving down the columns instead of across the rows. Once again we'll break the characters into groups of five to give no clues about word sizes. The result looks like this :
The real variety begins when you realize that you don't have to write your plaintext into the box row by row. Instead, you can follow a pattern that zig-zags horizontally, vertically or diagonally, or one that spirals in or spirals out (clockwise or counterclockwise), or many other variations (see diagram below).
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:
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.)
Now write the columns down in the order indicated by the numbers. The resulting ciphertext looking like this:
As you can see, this is just a different arrangement of the previous ciphertext, but at least it isn't in some regular pattern. We could have easily made it a little more difficult by filling the square following a more complicated path. We could also use a geometric shape other than a rectangle and combine substitution and transposition. The only problem that might occur is that the 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...
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: T O A W B C D S F M R H I Y E G L N P U J K
Order of frequency of final letters: E S T D N R Y F L O G H A R M P U W
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...
Smith, Laurence Dwight. Cryptography, the Science of Secret Writing. New York, NY: Dover Publications Inc., 1943. 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.
Continued here:
Secret Language: Cryptography & Secret Codes | Exploratorium
- To Foil NSA Spies, Encrypt Everything [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- What is cryptography? - A Word Definition From the ... [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- cryptography: Definition from Answers.com [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- Cryptography - Wikipedia, the free encyclopedia [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- Cryptography - CISSP Domain 07 - Video [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- Cryptography Advanced Encryption Standard AES Tutorial,fips 197 - Video [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- Faraday Project for Network Security and Cryptography - Video [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- An Overview of Cryptography - Gary C. Kessler [Last Updated On: January 23rd, 2014] [Originally Added On: January 23rd, 2014]
- An Open Letter from US Researchers in Cryptography and ... [Last Updated On: January 24th, 2014] [Originally Added On: January 24th, 2014]
- Gambling with Secrets Part 4 8 Private Key Cryptography - Video [Last Updated On: January 24th, 2014] [Originally Added On: January 24th, 2014]
- Gambling with Secrets Part 1 8 What is Cryptography - Video [Last Updated On: January 24th, 2014] [Originally Added On: January 24th, 2014]
- Public Key Cryptography RSA Encryption Algorithm - Video [Last Updated On: January 24th, 2014] [Originally Added On: January 24th, 2014]
- Public Key Cryptography Diffie Hellman Key Exchange - Video [Last Updated On: January 24th, 2014] [Originally Added On: January 24th, 2014]
- Intro to Cryptography - Video [Last Updated On: January 24th, 2014] [Originally Added On: January 24th, 2014]
- Caesar Cipher Ancient Cryptography - Video [Last Updated On: January 24th, 2014] [Originally Added On: January 24th, 2014]
- 50 top US cyber security experts write open letter calling for end to NSA 'snoop-ops' [Last Updated On: January 26th, 2014] [Originally Added On: January 26th, 2014]
- Prominent cryptography and security researchers deplore NSA's surveillance activities [Last Updated On: January 27th, 2014] [Originally Added On: January 27th, 2014]
- Obama Stays Silent on Reform of NSA's Crypto Subversion [Last Updated On: January 30th, 2014] [Originally Added On: January 30th, 2014]
- Cryptography experts sign open letter against NSA surveillance [Last Updated On: January 30th, 2014] [Originally Added On: January 30th, 2014]
- US crypto researchers to NSA: If you must track, track responsibly [Last Updated On: January 30th, 2014] [Originally Added On: January 30th, 2014]
- Java Cryptography Architecture (JCA) Overview - Video [Last Updated On: January 30th, 2014] [Originally Added On: January 30th, 2014]
- Cryptography - Part 1 - Video [Last Updated On: January 30th, 2014] [Originally Added On: January 30th, 2014]
- Cryptography - Part 2 - Video [Last Updated On: January 30th, 2014] [Originally Added On: January 30th, 2014]
- International Journal on Cryptography and Information Security ( IJCIS) - Video [Last Updated On: January 30th, 2014] [Originally Added On: January 30th, 2014]
- Bitcoin Lowdown: Block Chain Cryptography Trumps Human Trust, Deal With It - Video [Last Updated On: January 31st, 2014] [Originally Added On: January 31st, 2014]
- Bitcoin Lowdown: Block Chain Cryptography Trumps Human Trust - Video [Last Updated On: January 31st, 2014] [Originally Added On: January 31st, 2014]
- NSA and GCHQ spoofed LinkedIn to hack Belgian cryptography professor [Last Updated On: February 1st, 2014] [Originally Added On: February 1st, 2014]
- Lecture 17: Elliptic Curve Cryptography (ECC) - Video [Last Updated On: February 1st, 2014] [Originally Added On: February 1st, 2014]
- Cryptography event - Pravega 2014 - Video [Last Updated On: February 3rd, 2014] [Originally Added On: February 3rd, 2014]
- Lecture 1: Introduction to Cryptography - Video [Last Updated On: February 3rd, 2014] [Originally Added On: February 3rd, 2014]
- US and UK spy agencies accused of swoop on Belgian cryptography expert [Last Updated On: February 4th, 2014] [Originally Added On: February 4th, 2014]
- Conceal: Facebook's new Java APIs for cryptography on Android [Last Updated On: February 4th, 2014] [Originally Added On: February 4th, 2014]
- Cryptography Apps: How To Keep Your Personal Info Private [Last Updated On: February 4th, 2014] [Originally Added On: February 4th, 2014]
- Cryptography Breakthrough Could Make Software Unhackable [Last Updated On: February 4th, 2014] [Originally Added On: February 4th, 2014]
- Oi, Android devs! Facebook wants your apps to be more secure [Last Updated On: February 5th, 2014] [Originally Added On: February 5th, 2014]
- Lecture 19: Elgamal Digital Signature - Video [Last Updated On: February 5th, 2014] [Originally Added On: February 5th, 2014]
- Lecture 18: Digital Signatures and Security Services - Video [Last Updated On: February 5th, 2014] [Originally Added On: February 5th, 2014]
- Cryptography 1. List some of the attacks on the Diffie ... [Last Updated On: February 6th, 2014] [Originally Added On: February 6th, 2014]
- Cryptography Breakthrough Could Make Software Unhackable ... [Last Updated On: February 6th, 2014] [Originally Added On: February 6th, 2014]
- Cryptography: Secret Coding, Spying, and E-Commerce - Video [Last Updated On: February 6th, 2014] [Originally Added On: February 6th, 2014]
- Cryptography - Video [Last Updated On: February 9th, 2014] [Originally Added On: February 9th, 2014]
- Public Key Cryptography: RSA Encryption Algorithm - Video [Last Updated On: February 10th, 2014] [Originally Added On: February 10th, 2014]
- Is Bitcoin Anonymous? Arvind Narayanan | Princeton University | Real World Cryptography Workshop - Video [Last Updated On: February 10th, 2014] [Originally Added On: February 10th, 2014]
- A Competitive Study of Cryptography Techniques over Block Cipher - Video [Last Updated On: February 14th, 2014] [Originally Added On: February 14th, 2014]
- How Quantum Computing Will Change Cryptography [Last Updated On: February 15th, 2014] [Originally Added On: February 15th, 2014]
- REALITY LOST - EXCERPT SIX (QUANTUM CRYPTOGRAPHY) - Video [Last Updated On: February 15th, 2014] [Originally Added On: February 15th, 2014]
- Introduction to Cryptography of Bitcoin, Explained! - Video [Last Updated On: February 18th, 2014] [Originally Added On: February 18th, 2014]
- [FOSDEM 2014] USE OTR or how we learned to start worrying and love cryptography - Video [Last Updated On: February 18th, 2014] [Originally Added On: February 18th, 2014]
- Reshif's Cryptography Challenge Solution/Walkthrough - Video [Last Updated On: February 20th, 2014] [Originally Added On: February 20th, 2014]
- [DEFCON 19] Steganography and Cryptography 101 - Video [Last Updated On: February 22nd, 2014] [Originally Added On: February 22nd, 2014]
- A Brief Rundown Of The Spying Questions Intel's CEO Won't Answer [Last Updated On: February 25th, 2014] [Originally Added On: February 25th, 2014]
- DEF CON 8 - Jon Erickson - Number Theory Complexity, Theory, Cryptography, and Quantum Computing. - Video [Last Updated On: February 26th, 2014] [Originally Added On: February 26th, 2014]
- Was YOUR iPhone at risk of being hacked? Bug in Apple update left mobiles open to identity theft for up to 18 months ... [Last Updated On: February 27th, 2014] [Originally Added On: February 27th, 2014]
- Security researchers urge tech companies to explain their cryptographic choices [Last Updated On: February 27th, 2014] [Originally Added On: February 27th, 2014]
- Apple reveals algorithm behind 'encrypted' iMessages [Last Updated On: February 28th, 2014] [Originally Added On: February 28th, 2014]
- Wiliest Ways to Keep the NSA at Bay [Last Updated On: March 1st, 2014] [Originally Added On: March 1st, 2014]
- How to Pronounce Cryptography - Video [Last Updated On: March 1st, 2014] [Originally Added On: March 1st, 2014]
- cryptography in DNS - Video [Last Updated On: March 3rd, 2014] [Originally Added On: March 3rd, 2014]
- Who is the reclusive billionaire creator of Bitcoin? [Last Updated On: March 4th, 2014] [Originally Added On: March 4th, 2014]
- How to say cryptography in Italian - Video [Last Updated On: March 4th, 2014] [Originally Added On: March 4th, 2014]
- Massive Linux security flaw dwarfs Appleās cryptography problems of just last week [Last Updated On: March 5th, 2014] [Originally Added On: March 5th, 2014]
- Security lessons from RSA [Last Updated On: March 5th, 2014] [Originally Added On: March 5th, 2014]
- Visual Cryptography - Video [Last Updated On: March 5th, 2014] [Originally Added On: March 5th, 2014]
- Classical Computing Embraces Quantum Ideas [Last Updated On: March 6th, 2014] [Originally Added On: March 6th, 2014]
- Quantum Cryptography Conquers Noise Problem [Last Updated On: March 6th, 2014] [Originally Added On: March 6th, 2014]
- REALITY LOST Bonus scene 4. Quantum cryptography Founding Fathers. - Video [Last Updated On: March 7th, 2014] [Originally Added On: March 7th, 2014]
- Quantum Cryptography: From Theory to Practice - Video [Last Updated On: March 9th, 2014] [Originally Added On: March 9th, 2014]
- Forcing Trust: Nonlocal Games and Untrusted-device Cryptography - Video [Last Updated On: March 9th, 2014] [Originally Added On: March 9th, 2014]
- TrustyCon 2014 - New Frontiers in Cryptography - Video [Last Updated On: March 9th, 2014] [Originally Added On: March 9th, 2014]
- REALITY LOST Bonus scene 3. Christian Kurtsiefer on hacking quantum cryptography. - Video [Last Updated On: March 9th, 2014] [Originally Added On: March 9th, 2014]
- Nerlens Noel Tweets Date for Potential NBA Debut [Last Updated On: March 9th, 2014] [Originally Added On: March 9th, 2014]
- CISSP SG Cryptography - Video [Last Updated On: March 10th, 2014] [Originally Added On: March 10th, 2014]
- More secure communications thanks to quantum physics [Last Updated On: March 13th, 2014] [Originally Added On: March 13th, 2014]
- New Cryptography Scheme Secured By Quantum Physics [Last Updated On: March 13th, 2014] [Originally Added On: March 13th, 2014]
- History Of Cryptography - Video [Last Updated On: March 14th, 2014] [Originally Added On: March 14th, 2014]
- avc 19 Cryptography x264 - Video [Last Updated On: March 15th, 2014] [Originally Added On: March 15th, 2014]
- Edward Snowden Speaks at SXSW [Last Updated On: April 10th, 2017] [Originally Added On: March 15th, 2014]
- Tor is building an anonymous instant messenger [Last Updated On: April 10th, 2017] [Originally Added On: March 15th, 2014]
- learn cryptography learn the following pkcs refrences - Video [Last Updated On: March 16th, 2014] [Originally Added On: March 16th, 2014]
- [Lec-2][Part-2] Shift Cipher - Symmetric ciphers - Video [Last Updated On: March 16th, 2014] [Originally Added On: March 16th, 2014]