Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Introduction to the Affine Cipher

Have you ever tried making a secret code? On this sheet, you will see how
to use maths to make a code. First, we have to replace all the letters by
numbers:
A
0

B
1

C
2

D
3

E
4

F
5

G
6

H
7

I
8

J
9

K
10

L
11

M
12

N
13

O
14

P
15

Q
16

R
17

S
18

T
19

U
20

V
21

W
22

X
23

Y
24

Z
25

Next, we can encode our message. Two examples of the Affine Cipher are
given
Example 1

(KEY: Add 3)

Plaintext:

Julius Caesar used codes

Numerical translation: 9,20,11,8,20,18,2,0,4,18,0,17,20,18,4,3,2,14,3,18


Transform (add 3): 12,23,14,11,23,21,5,3,7,21,3,20,23,21,7,6,5,17,6,21
Ciphertext: MXOLXVFDHVDUXVHGFRGV
Example 2 (KEY: Multiply by 5, Add 2)
Plaintext:

Look carefully

Numerical translation: 11,14,14,10,2,0,17,4,5,20,11,11,24


Transform: 5,20,20,
Ciphertext: FUU,
How does (11x5)+2=5 ? Or (14x5)+2=20 ?
HINT: When telling the time, whats 10am+4hrs ? How does this relate to
the alphabet?
Complete the rest of Example 2
The Affine Cipher, Sheet 1, Page 1

www.simonsingh.net

You might also like