Skip Channel4 main Navigation

|Powered By Google


The Science of Secrecy  
 

Walsingham

The Babington plot
Steganography
The substitution cipher

 

The substitution cipher

The correspondence between Mary Queen of Scots and Anthony Babington was encrypted with a substitution cipher.

This type of cipher substitutes each letter of the alphabet with a different letter, or with a number, or (as in Mary's case) with a symbol.

For example, the cipher below substitutes each letter of the standard alphabet with the letter listed in the given cipher alphabet (here based on the arrangement of letters on a keyboard).

Plain alphabet

a

b

c

d

e

f

g

h

i

j

k l m

Cipher alphabet

Q

W

E

R

T

Y

U

I

O

P

A S D

Plain alphabet

n

o

p

q

r

s

t

u

v

w

x

y

z

Cipher alphabet

F

G

H

J

K

L

Z

X

C

V

B

N

M

So the word 'hello' would be encrypted as 'ITSSG'.

However, the ninth-century Arab codebreaker al-Kindi realised that there is an effective way of cracking the substitution cipher. Every letter in a language appears with a certain average frequency, so that in English, for example, 'e' accounts for 13% of all letters, whereas 'z' accounts for less than 1%. Whichever letter is substituted for the original letter will take on the original frequency. So by analysing the frequency of the different letters in a code you can work out which letter each substituted letter represents.

Walsingham's codebreaker used this technique to decipher the letters of Mary Queen of Scots. The letters were used as evidence against her, and she was found guilty of treason and executed in 1587.

Top Top