The Code Room

code gif

Man has been creating secret messages for nearly as long as man has been writing. I became interested in cryptography and hidden messages as a teenager and went on to find ways of encrypting messages in my music. Many of the pages which analyse my pieces will refer to encryption methods. This page will help explain some of the terminology used.

Famous ciphers are listed on the right but it is worth getting aquainted with some of the basic terms first.

Steganography = this is the art of writing hidden messages in such a way that no one apart from the intended recipient knows of the existence of the message. In other words, the existence of the message is not obvious to any interceptor. This is in complete contrast to cryptography where the fact that a message has been made secret is obvious. The word "Steganography" is of Greek origin and means "covered, or hidden writing". Perhaps the simplest example would be using invisible ink to write a message. Its ancient origins can be traced back to 440 BC. Herodotus mentions two examples of Steganography in The Histories of Herodotus. Demeratus sent a warning about a forthcoming attack to Greece by writing it on a wooden panel and covering it in wax. Wax tablets were in common use then as re-usable writing surfaces, sometimes used for shorthand. The second ancient example is Histaeus who shaved the head of his most trusted slave and tattooed a message on his head. After his hair had grown the message was hidden. The purpose was to instigate a revolt against the Persians.

A simple and modern way of employing steganography can be done in school easily using an ink eraser. On a piece of paper, write a message using the white end of an ink eraser. Your writing should remain invisible. To view the message, scribble over it with a normal fountain pen.

Contained within this website are many examples of steganography - there are many hidden buttons and links which lead to secret pages etc.

code gif

Cryptography = unlike steganography, cryptography produces a result that is overtly secretive to any would be interceptor. There are two main types of cryptography: transposition & substitution.

Transposition Ciphers
In transposition ciphers, the order of letters is changed much in the same way as with an anagram. For example letters within words may be paired and then the order of each pair reversed.

"transposition" = "rtnapssotioixn" (the 'x' is added as a null to confuse cryptanalysts)

Substitution Ciphers
These involve substituting one letter for another (or something else). For example you could substitute 'A' for 'B', 'B' for 'C' etc.

code gif

Glossary:

Cipher text = the encrypted version of the plaintext (usually written in upper case)

Cryptographer = someone who encrypts messages

cryptanalyst = someone who attempts to decode messages

Cipher = Any general system for hiding the meaning of a message by replacing each letter in the original message with another letter. To protect a message in this way is called enciphering. Each cipher can be split into two halves – the algorithm and the key. The key gives a cipher some built in flexibility.

Code = possible the most misused word as lay people believe it to mean cipher. In cryptography, however, "code" traditionally had a specific meaning. A "code" was a procedure which replaced a unit (such as a whole word or sentence) with a code word. For example the message: "get out it is too dangerous" could be replaced with the code word "sheep".

Decryption = the process of converting a cipher text to a plaintext.

Encryption = the process of converting a plaintext to a cipher text.

Frequency Analysis = In cryptanalysis, frequency analysis is the study of the frequency of letters or groups of letters in a ciphertext. The method is used as an aid to breaking substitution ciphers. Frequency analysis is based on the fact that, in any given stretch of written language, certain letters and combinations of letters occur with varying frequencies. Moreover, there is a characteristic distribution of letters that is roughly the same for almost all samples of that language. For instance, given a section of English language, E tends to be very common, while X is very rare. Likewise, ST, NG, TH, and QU are common pairs of letters (termed bigrams or digraphs), while NZ and QJ are rare. Click here for more information. On Simon Singh's website he gives information on frequency analysis and provides a tool for implementing it in cracking ciphers. When you have followed the link and read his information on frequency analysis, use the menu on the left of his page to navigate to the substitution cracking tool.


Key = The flexible component of a cipher. The cipher is a general algorithm that is specified by the key. For example, substitution is a general algorithm that is specified by a key, which is the substitution for each letter. Rival groups can use the same substitution cipher, but they will choose different keys so that they cannot read each other’s messages.

Monoalphabetic substitution - involves replacing each letter of the alphabet with a different letter. A monoalphabetic cipher uses fixed substitution over the entire message for example 'A' in the plaintext will always result in 'N' (for example) in the cipher text. The following picture illustrates. Note that the two 'L's in HELLO both result in 'Y'.

example of a mono-alphbetic cipher

To play with some examples, click here

Nulls = letters (or anything else) added to the cipher text as red herrings.

Plaintext = the unencrypted message (usually written in lower case)

Polyalphabetic Cipher - multiple cipher alphabets are used. There maybe 26 separate substitution alphabets which are usually written out in a large table. A different alphabet can then be used for each character on the plaintext. For example, let us assume that there are 3 different alphabets (effectively 3 monoalphabetic ciphers) 1,2,3. If we wanted to encode the word 'hello', we could use substitution method 1 for the 'H', method 2 for the 'E', method 3 for the 'L' method 1 for the 'L' and method 2 for the 'O'.

Plaintext 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
Cipher 1 Z 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

Cipher 2

Y

Z A B C D E F G H I J K L M N O P Q R S T U V W X
Cipher 3 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W

'hello' would become = 'GCIKM'

Note that the double 'l' in the middle of the plaintext 'hello' is disguised.

code gif

Websites

Introduction to Cryptography

Bletchley Park

Enigma and the code breakers

How the Enigma Machine works

Virtual Enigma Machine

Downloadable Cipher Machines (Including Enigma)

Double Transposition

Code Breaking Software


 

 

picture of an enigma machine

Return Home
Return to Manor

 

Famous Ciphers & Codes

Morse Code

Transposition
Rail Fence Cipher
Latin Square
Other Examples

Substitution
Caesar Shift
Diagraph Cipher
Enigma Machines
Homophonic Cipher
Kama-Sutra Cipher
One-time pad
Pig-pen Cipher
Playfair Cipher
Vigenère Ciphernew gif logo

More to come!!!

Visit Simon Singh's The Black Chamber for loads more info.

 

Humour Room Dark Room