Wednesday, August 13, 2008

Spies - Codes and Ciphers

Spies usually use what they call "ciphers" or "codes" to send messages to their partners. "Code" And "ciphers" are sometimes used as if they mean the same thing. They do not. A code is a subsitution for some words, while a cipher are scrambled messages, not a secret language.

Here are some classic 'ciphers':

1. The Cesar Shift Cipher - this is a simple alphabet cipher -but tricky to break without the key. Each letter is moved along by a number - say four. A becomes E, J becomes N, Z becomes D and so on. The number is the key to the cypher here

example: "The dog is sick" becomes 'WKH GRJ LV VLFN" with the number three as they key.

2. Numbers. A=1, B=2, C-3 etc. all the way to Z=26. Messages can be written using those numbers. This cipher is probably too simple to use on its own; however, if you combine it with a Cesar code number, it can suddenly become very tricky indeed.

In the basic method, "The dog is better" would be "20 8 5-4 15 7- 9 19- 2 5 20 20 5 18," which looks difficult but isn't. Add a Cesar cipher of 3, however, and the message becomes "3 23 11 8 - 7 18 10- 12 22- 5 8 23 8 21," which should overheat the brain.

3. Alphabet Ciphers. There are any number of these. Most of them depend on the way the alphabet is written out - agreed beforehand between the spies.

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

With this sequence, "How are you?" would become "UBJ NER LBH?"

4. Morse Code is the most famous substitution cipher ever invented. It was thought up by inventor Samuel F. B. MOrse.

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 --..


Source: Hal Iggulden, "The Dangerous Book For Boys." New York: Harper Collins Publisher, 2006, pp. 64-68.

No comments: