Classroom Activity : Codes & Codebreaking

"Cryptography" is the science of secret writing. The word has Greek origins: kryptos (secret) and graphos (writing). In simple terms, cryptography is the art of sending messages in such a way that the real meaning is hidden from everyone but the sender and the recipient.

One way of doing this is by sending a message in code. A code is like a dictionary in which all the words and phrases are replaced by codewords or codenumbers. To read a code it is necessary to have a copy of the codebook. This created problems in times of war as the codebook might fall into the hands of the enemy.

One of the first examples of a cipher being used was by Lysander of Sparta in 405 BC. The general had a spy in the camp of the Darius II, the King of Persia. At the time they were allies but Lysander did not trust him. A man arrived with a letter. However, this was a deception. The real message was written in code on the man's belt. The message said that Lysander was just about to be attacked by Pharnabazus of Persia.

The Romans used ciphers. Julius Caesar sent messages to his fellow commanders in a code that they had agreed before the battle took place. Suetonius tells us that Caesar simply replaced each letter in the message with the letter that is three places further down the alphabet. Therefore the word CAESAR was written FDHVDU. Although this was a very simple system it was a very effective way of keeping messages secret. The reason for this was that cryptanalysis, the science of solving ciphers, had not been invented.

Primary Sources
Alan Turing
(Source 1) Julius Caesar (c. 50 BC)

(Source 2) Simon Singh, The Code Book: The Secret History of Codes & Code-Breaking (2000)

Another form of transposition is embodied in the first ever military cryptographic device, the Spartan scytale, dating back to the fifth century BC. The scytale is a wooden staff around which a strip of leather or parchment is wound. The sender writes the message along the length of the scytale, and then unwinds the strip, which now appears to carry a list of meaningless letters. The message has been scrambled. The messenger would take the leather strip, and, as a steganographic twist, he would sometimes disguise it as a belt with the letters hidden on the inside. To recover the message, the receiver simply wraps the leather strip around a scytale of the same diameter as the one used by the sender. In 404 BC Lysander of Sparta was confronted by a messenger, bloody and battered, one of only five to have survived the arduous journey from Persia. The messenger handed his belt to Lysander, who wound it around his scytale to learn that Pharnabazus of Persia was planning to attack him. Thanks to the scytale, Lysander was prepared for the attack and repulsed it.

(Source 3) Bruce Norman, Secret Warfare: The Battle of the Cyphers (1973)

As Lysander pondered what to do, a slave arrived with a message. Lysander read it, asked for the slave's belt and then dismissed him. The letter was a blind; it was the belt that Lysander was waiting for. Written along the length of the belt was a meaningless jumble of letters. Lysander took out his skytale, a cylindrical baton, something like a policeman's truncheon, and wound the slave's belt spirally round it. As he did so, the meaningless letters were transposed and brought into a new association with one another to spell out a message.

Alan Turing
(Source 4) A Greek Scytale and a message on a belt
 

(Source 5) Suetonius, The Twelve Caesars (c. AD 110)

There are also letters of his (Julius Caesar) to Cicero, as well as to his intimates on private affairs, and in the latter, if he had anything confidential to say, he wrote it in cipher, that is, by so changing the order of the letters of the alphabet, that not a word could be made out. If anyone wishes to decipher these, and get at their meaning, he must substitute the fourth letter of the alphabet, namely D, for A, and so with the others.

(Source 6) Julius Caesar code (c. 50 BC)

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

Questions for Students

Question 1: Read the introduction. Explain the meaning of "cryptography".

Question 2: Study sources 2, 3 and 4. Describe the method used by Lysander of Sparta and his spies to send secret messages in 405 BC.

Question 3: Read the introduction and source 5 and explain Julius Caesar's secret code.

Question 4: Use the Julius Caesar code (source 6) to translate this famous quotation by the Roman leader.

DV WKH VDLORU DYRLGV WKH URFN, VR VKRXOG WKH KLVWRULDQ DYRLG WKH ZRUG WKDW LV REVROHWH RU UDUB

Question 5: Cryptanalysts use several methods to break a code like the one used by Julius Caesar. One is to look at the frequency of the letters that appear in the message. For example, the commonest letter in English is "e". This does not always work in short messages but is an excellent way to help break the code of a long message. Another way is to look at repeating words. The message above includes the word "WKH" three times. It would not take an experienced codebreaker long to realise that "WKH" represents "the". The codebreaker could then use this clue to work out the relationship between these letters (the letter is being replaced by the letter three places further down the alphabet). Another three letter word that often comes up in messages and is often worth investigating is "and".

Another common method used by cryptanalysts is to look for a word that is likely to appear in the message. This is true for this message sent by Julius Caesar to his calvary commander during a war against German tribes. Can you break this code?

ZGGZXP GSV XILDW LU DLNVM ZMW XSROWIVM RM GSV TVINZM XZNK

Answer Commentary

A commentary on these questions can be found here: