# The Black Chamber

When you read about cryptography (the science of secrecy), you will encounter lots of jargon, as well as different words that all seem to mean roughly the same thing. This short, rather boring section is supposed to clarify some of the jargon.

Definitions

Code: A system for hiding the meaning of a message by replacing each word or phrase in the original message with another character or set of characters. The list of replacements is contained within a so-called codebook. A code has no built in flexibility, other than re-writing the codebook. (An alternative definition of a code is any form of encryption which has no built in flexibility.) To protect a message in this way is called encoding.

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.

Encrypt: A term that covers encoding and enciphering.

Encicode: The process of encoding a message followed by enciphering. The application of multiple layers of encryption is also known as superencipherment.

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 can not read each other’s messages.

The Enigma Cipher

To put some of the definitions into context, let's use the Enigma cipher machine (pictured above with Simon Singh) as an example. It is definitely a cipher, because it encrypts at the level of letters and the algorithm depends on a flexible key that is chosen by the sender.
The key is the set-up of the machine - rotor orientations, plug selections, etc. all determine the encipherment. The receiver must have an Enigma machine, but must also know the key in order to decipher the message.

The More Keys The Better

A secure cipher system must have a wide range of potential keys. For example, if the sender uses the pigpen cipher to encrypt a message, then encryption is very weak because there is only 1 potential key, given by the pigpen grid. From the enemy's point of view, if they intercept the message and suspect that the pigpen cipher is being used, then they merely have to use the grid to decode the message. Let us look at the number of keys used in other methods of encryption.

The Caesar Cipher: The alphabet can be shifted up to 25 places, but shifting a letter 26 places takes it back to its original position, and shifting it 27 places is the same as shifting it 1 place. So there are 25 keys.

The Kama-Sutra Cipher: This is a much stronger cipher. To construct the cipher alphabet, the letter A could be paired with any of the remaining 25 letters. Another letter could be paired with any of the remaining 23 letters. This continues until there is only 1 letter left. The number of keys is therefore 25 x 23 x ... x 1 = 7,905,853,580,625.

General Monoalphabetic Cipher:To construct the cipher alphabet, the letter A could be represented as any of the 26 letters. The letter B could be represented as any of the remaining 25 letters, C could be represented as any of the remaining 24 letters, and so on until the entire cipher alphabet has been formed. The total number of keys is therefore 26 x 25 x 24 x ... x 1 = 403,291,461,126,605,635,584,000,000.