Young codebreakers' zoneCodes and ciphersPeople have always kept secrets from one another, and to make it difficult for spying eyes to read their private letters and messages they have used secret codes or ciphers. A CODE is when you swap a whole word or phrase with a different word, symbol or number. It's usually used for very short messages or to represent a particular event or concept. ![]() For example, the Allied invasion of Hitler's Europe in 1944 was given the code "Overlord". The Normandy beach landings phase was encoded as "Neptune", and the day of the invasion was encoded as "D-Day". On the other hand, a spy might use a code such as "734" to represent the word "midnight", for example. He might code "midday" as "124". The important thing is that only those people who know the codes will understand the meaning of any message that might contain them. On the other hand, a CIPHER is when you change the individual letters in a message, either by jumbling them up, or by swapping them for other letters or symbols. A really simple cipher would be to write the words of a message backwards. For example, "World War Two" written backwards is "dlroW raW owT". But that's a bit too easy to break. Below are a few different ciphers from different periods of history, starting with the simplest and leading up to the most complex. The original message (before being enciphered) is called plaintext. The enciphered message is called ciphertext. A Roman CipherOne of the first ciphers that we know about is Caesar's Cipher (so-called because Julius Caesar used it to communicate with his generals!). Just by moving each letter in your message forward or back by some number, say 3 for example, you can turn a finely crafted piece of literature into complete gobbledygook! However, it won't be gobbledygook to you and your friends because you have the 'key' to decipher it! (In this example, the key is the number 3.) Pushing each letter forward by 3 places in "The rain in Spain" turns it into "Wkh udlq lq Vsdlq"! To turn it back into something intelligible all you need to do is subtract the key that you initially added to the phrase to encipher it. Easy when you have the key! Down the years, new ways of enciphering had to be continually invented as code breakers became more sophisticated. After any new cipher was invented, someone always eventually came up with a way to break it! The problem with relying on Caesar's Cipher is that there are only 25 different ways of encoding the message. (The 26th way is the plaintext message itself!!) Simply by trying each way you are guaranteed to unravel the cipher sooner or later, and this would not take long to do for the first few words of any secret message! It was a secure method in its day, but we're a lot more sophisticated than we were 2000 years ago. A Pig of a CipherAn advance on the simple shift of Caesar's Cipher was when ciphers were invented where letters are replaced by other letters (not all shifted by the same amount but jumbled up!!), or where letters are replaced by symbols of some kind. How many ways of jumbling up the alphabet are there? The trial of Mary Queen of Scots relied heavily on the evidence of her correspondence, which contained a cipher using special symbols, that we now call the Babington cipher. Also in the 16th Century, the Freemasons used a cipher system called Pig Pen to keep their letters private, again using symbols in place of normal letters. You can download a copy of the Pig Pen cipher here and try it out. If you don't have the key, it's possible to crack these kinds of ciphers by counting the number of times each symbol appears in the encrypted text. Because some letters appear more commonly than others in any passage of writing, the frequency of a symbol's occurrence in a secret message is a clue to its true identity. The most common letter in the English language is the letter 'e', with a typical frequency of occurrence around 12.7%, followed by 't' with 9.1% occurrence. So, it's likely that the most common symbol in ciphertext of this kind will correspond to the letter 'e' in plaintext. The next common symbol will probably correspond to 't'. This codebreaking approach is called frequency analysis. After identifying the most common letters, guesswork can then be used to fill in the gaps so the entire message can be read by the code breaker. For example, a common three-letter word with both 't' and 'e' in it is "the"! These ciphers are most difficult to break when the message is very short, in which case frequency analysis is not at all accurate. Because each plaintext letter is substituted for another letter or a symbol, this type of cipher is called a Substitution Cipher. And because each letter is substituted by only one other letter or symbol, it is called a Monoalphabetic Substitution Cipher. Caesar's Cipher gets a Lot HarderThe basic idea behind Caesar's Cipher is really simple. Its downfall is that there are only 26 ways to write any message, including the plaintext. But, by introducing a keyword, it's possible to make it a lot, lot harder to crack. This cipher was devised by a French diplomat named Vigenère in the 16th century, based on the ideas of earlier Italian and German intellectuals, and is known as Vigenère's Cipher. Vigenère's ploy was to write the alphabet out on 26 lines, one for each Caesar shift, one underneath the other, starting with a shift of +1: 'BCD...' On each new line, the alphabet is shifted 1 place to the right compared to the line above it. If you do that 26 times, you'll end up with a square of 26 x 26 letters called Vigenère's Square. The letters of a secret keyword that you choose then determines which Caesar Cipher (which row of the square in other words) you use for each letter of your message. Yes, that's right - the shift changes from letter to letter in your message. This is a Polyalphabetic Substitution Cipher. A keyword with four letters in it would mean that four shifted alphabets are used over and over through the message. You can try out an example here. Why is it so difficult to break? Well, from the code breaker's point of view, you cannot break the code by trying 26 different shifts because each letter has a different shift from its neighbour. The message will always appear to be jumbled up. If instead we try to use frequency analysis as we would for the Pig Pen or any other simple substitution cipher, then we will probably also draw a blank because the frequencies are more evenly distributed amongst the alphabet - it's difficult to tell which letters are which. In ciphertext where the keyword is three letters long, for example, there are three letters that could represent the plaintext letter 'e' at different places in the message. So the frequency of occurrence of a ciphertext letter in the message is in fact a mixture of three frequencies. It's even harder to break if you do not know how long the keyword is. The breakthrough in cracking the Vigenère Cipher was not made until the mid-19th century, by Charles Babbage, an Englishman who, by the bye, is also known as the Father of Computing - he came up with the logical basis of the modern computer! His solution involved finding repeated combinations of 3 or more letters in the ciphertext and seeing how often they recur in the message. The most common repeat spacing tells you how many letters there are in the keyword. The ciphertext is then broken up into a group of letters for each letter of the keyword. Thus, letters with the same Caesar shift are grouped together. A frequency analysis is then performed on the letters in each group and compared to the analysis for the plaintext alphabet. This allows the shift to be determined for each letter of the keyword relative to the plaintext alphabet (and identifies the keyword) so that the message can be deciphered. An Electric Code That's Really a CipherSoon after electricity was discovered, people found a way of sending messages rapidly over long distances using electric currents in wires. And to do so, they used a cipher called Morse Code, which you might already know about. Morse Code used a key (matching each letter with a pattern of dots & dashes) that everyone knew or could learn, so messages could be exchanged freely. Of course, some people didn't like the idea that anyone could read their messages. So, before being enciphered in Morse, they sometimes enciphered their message using another technique (maybe using a Caesar's Cipher!). Although lots of people could turn the dots (dit) and dashes (dah) back into letters, only the recipient who had the special key could decipher the message completely and read what was in it! Electric signals can also be sent without wires by using radio waves. One of the first uses of Morse Code in the form of radio waves was when the famous ocean liner Titanic sent out its SOS distress signal (ditditdit dahdahdah ditditdit) on 14 Apr 1912. An Enigmatic CipherThe Enigma Machine was originally invented in 1915 and was refined a number of times before eventually being adopted by the German armed forces between 1926 and 1935. This machine used adjustable electric circuits and rotating wheels to jumble the letters in a message, and was so complicated that the Germans thought that the ciphers it generated were unbreakable. From then until the end of WWII, they sent Morse Code versions of their enciphered messages freely by radio! Have a go! Try out a virtual Enigma Machine. Sure, the cipher was fiendishly difficult to crack, but it was possible to break it. In Britain we listened to their secret radio messages and, at Bletchley Park, throughout the war we often routinely broke the ciphers and read their most secret communications. Eventually, machines called Bombes were used to break these ciphers. More Enigmatic Than EnigmaThe German High Command used another machine called Lorenz to encipher messages. It was even more difficult to break than Enigma, but break it we did, this time using the world's first programmable electronic computer, called Colossus. Read more about Enigma, the Bombes, Lorenz & Colossus here. Your Very Own Enigma MachinePocket Enigma is one of the most popular items available in our shop. It's a little cipher machine in a compact disk case that scrambles and unscrambles your messages, using many of the same principles as the real Enigma Machine used by the Germans during WWII. You can have hours of fun creating secret messages, and sending them to your friends, or family members. Adults can join in the fun but only if they can discover the correct key to break the ciphers! For older cryptologists there is an electronic version of Enigma, called the Enigma-E, which you can build yourself! Both the Pocket Enigma and the Enigma-E are available to buy via mail order or online. Visit the Bletchley Park shop for more information. Codebreaking GamesIf all this talk of codebreaking is making you excited then why not try these simple games for young code breakers? Play the memory game (Macromedia Flash required) Play the code machine (Macromedia Flash required) |