ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
PreparedbyD Almeida
School of Mathematics and Statistics (SoMaS)
Vigen¨¨re ciphers
PreparedbyD Almeida
What is a Vigen¨¨re cipher?
? Consider this sentence:-
? Mathematics is the engine of all science. It enables physical phenomena to
be modelled in a structured way. The model enables scientists to make
predictions about the phenomena.
? In a Vigen¨¨re cipher a key word (generally larger than 3 letters) is used to
scramble a message. We will use the key word surd.
? The word surd is repeated above the given message (with no spaces) thus:
? surdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsur
? MathematicsistheengineofallscienceItenablesphysicalphenomenato
PreparedbyD Almeida
What is a Vigen¨¨re cipher?
The key surd defines by how much each letter in the message is translated.
This means a Vigen¨¨re code is variable Caesar code.
0 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
1 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 A
2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
25 Z 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
This table tells us that
A letter corresponding to D is translated by 3:
e.g. A ?D, B ?E, C ?F, ¡­
A letter corresponding to R is translated by 17:
e.g. A ?R, B ?S, C ?T, ¡­
A letter corresponding to S is translated by 18:
e.g. A ?S, B ?T, C ?U, ¡­
A letter corresponding to U is translated by 20:
e.g. A ?U, B ?V, C ?W, ¡­
According to these rules our message becomes
the last line below:
surd surd surd surd surd surd surd surd surd surd surd surd surd surd surd su
math emat icsi sthe engi neof alls cien ceit enab lesp hysi calp heno mena to
eukk wgrw awjl knyh whxl fyfi sfcv ucvq uyzw whre dyjs zsjl uucs zyer eyed li
? The rules for translation are given by this table
m corresponds
to s, so it is
translated by
18 to e
PreparedbyD Almeida
Objective
We will break this Vigenere cipher presented in blocks of 5 letters:
ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL
JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV
MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX
FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG
AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN
FSTUS STYVG YS
The key aim is to find how many letters were used in the key word used to code
the original message.
This does not mean the key word has 5 letters!
PreparedbyD Almeida
1. Find repeating blocks of groups of three or more letters
2. Find the gaps n between repeating blocks of groups of letters
3. Find the non-trivial factors of n (so exclude 1 and n)
4. We must find the common factor (larger than 3) with the highest frequency.
Call this N
5. Group the ciphered text in blocks of N letters.
6. Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the first place in each
block; repeat for the second place, third place, ¡­.Nth place
7. Compare the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the first place with
the expected frequencies of the 26 letters: observation and judgement will imply a
Caesar shift of the letters. Replace the ciphered letter in each of the first places
with the unciphered one. Repeat for other places, etc. using common sense and
comparative frequencies for the other places.
8. Partition to reveal message.
The key steps in cracking such ciphers is given below and the steps will
be illustrated by applying it to our ciphered text:
Generally the key word will have more than 3 letters but for practice identifying blocks we include 3
PreparedbyD Almeida
Step 1. Finding repeating blocks of groups of 3 or more
letters.
Use MS Word ¡®find¡¯ to highlight the letters A, B, ¡­.
ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL
JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV
MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX
FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG
AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN
FSTUS STYVG YS
There are no repeating groups of 3 or more letters beginning with A.
So we keep going.
PreparedbyD Almeida
Step 1 (continued) Finding repeating blocks of groups
of 3 or more letters.
Use MS Word ¡®find¡¯ to highlight the letters A, B, ¡­.
ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL
JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV
MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX
FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG
AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN
FSTUS STYVG YS
By (careful) observation we identify the groups GHP and GEE.
PreparedbyD Almeida
Step 1 (continued) Finding repeating blocks of groups
of 3 or more letters.
The groups GHP and GEE:
ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL
JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV
MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX
FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG
AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN
FSTUS STYVG YS
And here¡¯s the group LEEBMMTG:
ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL
JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV
MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX
FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG
AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN
FSTUS STYVG YS
PreparedbyD Almeida
Step 2 Finding the gaps n between repeating blocks of
groups of letters
ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL
JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV
MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX
FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG
AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN
FSTUS STYVG YS
By (careful) counting the gap between the two GHP¡¯s = 198
and the gap between the two GEE¡¯s = 108
Important: the gap between the AMB¡¯s in:
AMBCV GUYPG LPRCT MAMBD is 16 (count between the A¡¯s and add 1)
15
15 + 1
PreparedbyD Almeida
Step 3 Finding the non-trivial factors of n exclude 1 and n)
After examining the repeating groups of letters we will have this table:
Group Gap Factors
GHP 198 2, 3, 6, 9, 11, 18, 22, 33, 66, 99
GEE 108 2, 3, 4, 6, 9, 12, 18, 27, 36, 54
LEEBMMTG 114 2, 3, 6, 19, 38, 57
SEZM 84 2, 3, 4, 6, 7, 12, 14, 21, 28, 42
STY 274 1, 2, 137, 274
YVGYS 280 2, 4, 5, 7, 8, 10, 14, 20, 28, 35,
40, 56, 70, 140
ZMX 48 2, 3, 4, 6, 8, 12, 16, 24
ZUDLJK 96 2, 3, 4, 6, 8, 12, 16, 24, 32, 48
PreparedbyD Almeida
Step 4 Finding the common factor N (larger than 3) with the
highest frequency.
So N = 6
Factor > 3 Frequency
4 5
6 6
7, 8, 9, 14, 16 2
12 4
Others 1
? Highest frequency
PreparedbyD Almeida
Step 5 Group the ciphered text in blocks of N = 6 letters.
ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE
ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP
GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX
SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE
AWTNSE ZMOECS SVMRSL JMLEEB MMTGAY VIYGHP EMYFAR WAOAEL
UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS
PreparedbyD Almeida
Step 6 Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in
the first place in each block;
The first place letters:
ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE
ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP
GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX
SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE
AWTNSE ZMOECS SVMRSL JMLEEB MMTGAY VIYGHP EMYFAR WAOAEL
UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS
Frequency table:
A B C D E F G H I J K L M
2 0 0 0 1 0 2 3 0 6 3 3 3
N O P Q R S T U V W X Y Z
0 0 0 0 0 6 1 5 2 5 0 2 4
PreparedbyD Almeida
The second place letters:
ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE
ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP
GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX
SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE
AWTNSE ZMOECS SVMRSL JMLEEB MMTGA YVIYGHP EMYFAR WAOAEL
UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS
Now construct frequency table:
A B C D E F . . . . . .
4 2 1 0 0 . . . . .
Step 6 Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in
the other places in each block;
PreparedbyD Almeida
1st 2nd 3rd 4th 5th 6th
a 2 4 0 1 4 2
b 0 2 1 1 2 2
c 0 1 0 0 3 3
d 0 0 0 0 1 4
e 1 0 2 6 9 4
f 0 0 0 4 1 1
g 2 0 5 4 1 0
h 3 0 1 1 2 0
i 0 1 1 0 3 0
j 6 3 0 1 0 1
k 3 1 10 0 0 0
l 3 2 2 0 2 4
m 3 10 2 0 0 1
n 0 2 2 5 3 1
o 0 0 2 2 0 0
p 0 3 1 1 0 8
q 0 3 0 2 0 0
r 0 0 1 5 3 2
s 6 0 1 2 6 2
t 1 4 5 1 0 4
u 5 1 2 3 3 0
v 2 3 2 2 0 0
w 5 4 0 0 0 0
x 0 2 2 0 0 3
y 2 1 4 2 3 5
z 4 1 2 4 0 0
Step 6 Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in
the 6 places in each block;
This is the completed table of
frequencies of the letters in the
1st, 2nd, 3rd, 4th, 5th and 6th places
PreparedbyD Almeida
1st 2nd 3rd 4th 5th 6th
Normal relative
frequency of letters
a 2 4 0 1 4 2 8.17%
b 0 2 1 1 2 2 1.49%
c 0 1 0 0 3 3 2.78%
d 0 0 0 0 1 4 4.25%
e 1 0 2 6 9 4 12.70%
f 0 0 0 4 1 1 2.23%
g 2 0 5 4 1 0 2.02%
h 3 0 1 1 2 0 6.09%
i 0 1 1 0 3 0 6.97%
j 6 3 0 1 0 1 0.15%
k 3 1 10 0 0 0 0.77%
l 3 2 2 0 2 4 4.03%
m 3 10 2 0 0 1 2.41%
n 0 2 2 5 3 1 6.75%
o 0 0 2 2 0 0 7.51%
p 0 3 1 1 0 8 1.93%
q 0 3 0 2 0 0 0.10%
r 0 0 1 5 3 2 5.99%
s 6 0 1 2 6 2 6.33%
t 1 4 5 1 0 4 9.06%
u 5 1 2 3 3 0 2.76%
v 2 3 2 2 0 0 0.98%
w 5 4 0 0 0 0 2.36%
x 0 2 2 0 0 3 0.15%
y 2 1 4 2 3 5 1.97%
z 4 1 2 4 0 0 0.07%
Step 7 Compare the frequencies of the 26 letters a, b, c,¡­.., x, y,
z in the first place with the expected frequencies of the 26
letters: observation will imply a Caesar shift of the letters
Comparison of 1st place frequency with that
of expected frequency implies a Caesar shift
of 8.
That is
8 0 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
8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
PreparedbyD Almeida
Step 7 Replace the ciphered letter in each of the first places
with the unciphered one.
INYVGY ATYNRP TWHRDT SXRNYP DQTGHP PZKFEY CMUSAY EVKZYE
HMEZUD TJKTUL RLKQBJ CQVUEC SBNRCT PPKESX UAZOEN AXGOLP
ONLEEB UMTGCS AVMRSE HMXHLP SJEJHT CPZUED EKNNNR EAGEEX
ALKZUD TJKFIX PTKPIA HMXFAC ECTQID CWBRRL BTKVNA RWVBRE
IWTNSE HMOECS AVMRSL RMLEEB UMTGAY DIYGHP MMYFAR EAOAEL
CPIUAY GMGEEM RQKSFC OUGYBP RBPZYP RASNNF ATUSST GVGYS
ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE
ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP
GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX
SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE
AWTNSE ZMOECS SVMRSL JMLEEB MMTGAY VIYGHP EMYFAR WAOAEL
UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS
0 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
8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
This rule for 1st place letters
PreparedbyD Almeida
1st 2nd 3rd 4th 5th 6th
Normal relative
frequency of letters
a 2 4 0 1 4 2 8.17%
b 0 2 1 1 2 2 1.49%
c 0 1 0 0 3 3 2.78%
d 0 0 0 0 1 4 4.25%
e 1 0 2 6 9 4 12.70%
f 0 0 0 4 1 1 2.23%
g 2 0 5 4 1 0 2.02%
h 3 0 1 1 2 0 6.09%
i 0 1 1 0 3 0 6.97%
j 6 3 0 1 0 1 0.15%
k 3 1 10 0 0 0 0.77%
l 3 2 2 0 2 4 4.03%
m 3 10 2 0 0 1 2.41%
n 0 2 2 5 3 1 6.75%
o 0 0 2 2 0 0 7.51%
p 0 3 1 1 0 8 1.93%
q 0 3 0 2 0 0 0.10%
r 0 0 1 5 3 2 5.99%
s 6 0 1 2 6 2 6.33%
t 1 4 5 1 0 4 9.06%
u 5 1 2 3 3 0 2.76%
v 2 3 2 2 0 0 0.98%
w 5 4 0 0 0 0 2.36%
x 0 2 2 0 0 3 0.15%
y 2 1 4 2 3 5 1.97%
z 4 1 2 4 0 0 0.07%
Step 7 Compare the frequencies of the 26 letters a, b, c,¡­.., x, y,
z in the second place with the expected frequencies of the 26
letters: observation will imply a Caesar shift of the letters
Comparison of 2nd place frequency with that
of expected frequency implies a Caesar shift
of 18:
i.e.
18
0 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
18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
PreparedbyD Almeida
Step 7 Replace the ciphered letter in each of the second places
with the unciphered one.
INYVGY ATYNRP TWHRDT SXRNYP DQTGHP PZKFEY CMUSAY EVKZYE
HMEZUD TJKTUL RLKQBJ CQVUEC SBNRCT PPKESX UAZOEN AXGOLP
ONLEEB UMTGCS AVMRSE HMXHLP SJEJHT CPZUED EKNNNR EAGEEX
ALKZUD TJKFIX PTKPIA HMXFAC ECTQID CWBRRL BTKVNA RWVBRE
IWTNSE HMOECS AVMRSL RMLEEB UMTGAY DIYGHP MMYFAR EAOAEL
CPIUAY GMGEEM RQKSFC OUGYBP RBPZYP RASNNF ATUSST GVGYS
0 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
18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
IFYVGY ALYNRP TOHRDT SPRNYP DITGHP PRKFEY CEUSAY ENKZYE
HEEZUD TBKTUL RDKQBJ CIVUEC STNRCT PHKESX USZOEN APGOLP
OFLEEB UETGCS ANMRSE HEXHLP SBEJHT CHZUED ECNNNR ESGEEX
ADKZUD TBKFIX PLKPIA HEXFAC EUTQID COBRRL BLKVNA ROVBRE
IOTNSE HEOECS ANMRSL RELEEB UETGAY DAYGHP MEYFAR ESOAEL
CHIUAY GEGEEM RIKSFC OMGYBP RTPZYP RSSNNF ALUSST GNGYS
This rule for 2nd place letters
PreparedbyD Almeida
Step 7 Use common sense and/or comparative frequencies for
the other place letters.
IFYVGY ALYNRP TOHRDT SPRNYP DITGHP PRKFEY CEUSAY ENKZYE
HEEZUD TBKTUL RDKQBJ CIVUEC STNRCT PHKESX USZOEN APGOLP
OFLEEB UETGCS ANMRSE HEXHLP SBEJHT CHZUED ECNNNR ESGEEX
ADKZUD LBKFIX PLKPIA HEXFAC EUTQID COBRRL BLKVNA ROVBRE
IOTNSE HEOECS ANMRSL RELEEB UETGAY DAYGHP MEYFAR ESOAEL
CHIUAY GEGEEM RIKSFC OMGYBP RTPZYP RSSNNF ALUSST GNGYS
This E before HE suggests E is a T: a Caesar shift of 15 in the 6th place
0 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
15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT
HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE
OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM
ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT
IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA
CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS
PreparedbyD Almeida
Step 7 Use common sense and/or comparative frequencies for
the other place letters.
IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT
HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE
OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM
ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT
IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA
CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS
5th
Normal
frequency
a 4 8.17%
b 2 1.49%
c 3 2.78%
d 1 4.25%
e 9 12.70%
f 1 2.23%
g 1 2.02%
h 2 6.09%
i 3 6.97%
j 0 0.15%
k 0 0.77%
l 2 4.03%
m 0 2.41%
n 3 6.75%
o 0 7.51%
p 0 1.93%
q 0 0.10%
r 3 5.99%
s 6 6.33%
t 0 9.06%
u 3 2.76%
v 0 0.98%
w 0 2.36%
x 0 0.15%
y 3 1.97%
z 0 0.07%
This block of letters and the comparative frequency of 5th place
letters suggest¡­¡­¡­..
IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT
HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE
OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM
ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT
IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA
CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS
There is no shift for 5th place letters
PreparedbyD Almeida
Step 7 Use common sense and/or comparative frequencies for
the other place letters.
IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT
HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE
OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM
ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT
IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA
CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS
This G and the HE suggests that G should be a T: a Caesar shift of 13
for the 4th place letters
0 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
13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
IFYIGN ALYARE TOHEDI SPRAYE DITTHE PRKSEN CEUFAN ENKMYT
HEEMUS TBKGUA RDKDBY CIVHER STNECI PHKRSM USZBEC APGBLE
OFLREQ UETTCH ANMEST HEXULE SBEWHI CHZHES ECNANG ESGREM
ADKMUS TBKSIM PLKCIP HEXSAR EUTDIS COBERA BLKINP ROVORT
IOTAST HEORCH ANMESA RELREQ UETTAN DAYTHE MEYSAG ESONEA
CHIHAN GEGREB RIKFFR OMGLBE RTPMYE RSSANU ALUFSI GNGLS
PreparedbyD Almeida
Step 7 Use common sense and/or comparative frequencies for
the other place letters.
IFYIGN ALYARE TOHEDI SPRAYE DITTHE PRKSEN CEUFAN ENKMYT
HEEMUS TBKGUA RDKDBY CIVHER STNECI PHKRSM USZBEC APGBLE
OFLREQ UETTCH ANMEST HEXULE SBEWHI CHZHES ECNANG ESGREM
ADKMUS TBKSIM PLKCIP HEXSAR EUTDIS COBERA BLKINP ROVORT
IOTAST HEORCH ANMESA RELREQ UETTAN DAYTHE MEYSAG ESONEA
CHIHAN GEGREB RIKFFR OMGLBE RTPLYE RSSANU ALUFSI GNGLS
3rd
Normal freq
a 0 8.17%
b 1 1.49%
c 0 2.78%
d 0 4.25%
e 2 12.70%
f 0 2.23%
g 5 2.02%
h 1 6.09%
i 1 6.97%
j 0 0.15%
k 10 0.77%
l 2 4.03%
m 2 2.41%
n 2 6.75%
o 2 7.51%
p 1 1.93%
q 0 0.10%
r 1 5.99%
s 1 6.33%
t 5 9.06%
u 2 2.76%
v 2 0.98%
w 0 2.36%
x 2 0.15%
y 4 1.97%
z 2 0.07%
Comparative high frequency of K¡¯s in 5th place suggest K must be an
E: a Caesar shift 0f 20.
IFSIGN ALSARE TOBEDI SPLAYE DINTHE PRESEN CEOFAN ENEMYT
HEYMUS TBEGUA RDEDBY CIPHER STHECI PHERSM USTBEC APABLE
OFFREQ UENTCH ANGEST HERULE SBYWHI CHTHES ECHANG ESAREM
ADEMUS TBESIM PLECIP HERSAR EUNDIS COVERA BLEINP ROPORT
IONAST HEIRCH ANGESA REFREQ UENTAN DASTHE MESSAG ESINEA
CHCHAN GEAREB RIEFFR OMALBE RTJMYE RSMANU ALOFSI GNALS
0 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
20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
PreparedbyD Almeida
Step 8 Partition to reveal message.
IF|SIGNALS|ARE|TO|BE|DISPLAYED|IN|THE|PRESENCE|OF|AN|ENEMY|
THEY|MUST|BE|GUARDED|BY|CIPHERS|THE|CIPHERS|MUST|BE|
CAPABLE|OF|FREQUENT|CHANGES|THE|RULES|BY|WHICH|THESE|
CHANGES|ARE|MADE|MUST|BE|SIMPLE|CIPHERS|ARE|UNDISCOVERABLE|
IN|PROPORTION|AS|THEIR|CHANGES|ARE|FREQUENT|AND|AS|THE|
MESSAGES|IN|EACH|CHANGE|ARE|BRIEF|FROM|ALBERTJMYERS|MANUAL|
OF|SIGNALS|
IFSIGN ALSARE TOBEDI SPLAYE DINTHE PRESEN CEOFAN ENEMYT
HEYMUS TBEGUA RDEDBY CIPHER STHECI PHERSM USTBEC APABLE
OFFREQ UENTCH ANGEST HERULE SBYWHI CHTHES ECHANG ESAREM
ADEMUS TBESIM PLECIP HERSAR EUNDIS COVERA BLEINP ROPORT
IONAST HEIRCH ANGESA REFREQ UENTAN DASTHE MESSAG ESINEA
CHCHAN GEAREB RIEFFR OMALBE RTJMYE RSMANU ALOFSI GNALS

More Related Content

How to decode a Vigenere code

  • 1. PreparedbyD Almeida School of Mathematics and Statistics (SoMaS) Vigen¨¨re ciphers
  • 2. PreparedbyD Almeida What is a Vigen¨¨re cipher? ? Consider this sentence:- ? Mathematics is the engine of all science. It enables physical phenomena to be modelled in a structured way. The model enables scientists to make predictions about the phenomena. ? In a Vigen¨¨re cipher a key word (generally larger than 3 letters) is used to scramble a message. We will use the key word surd. ? The word surd is repeated above the given message (with no spaces) thus: ? surdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsurdsur ? MathematicsistheengineofallscienceItenablesphysicalphenomenato
  • 3. PreparedbyD Almeida What is a Vigen¨¨re cipher? The key surd defines by how much each letter in the message is translated. This means a Vigen¨¨re code is variable Caesar code. 0 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 1 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 A 2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B 3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C 4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z 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 This table tells us that A letter corresponding to D is translated by 3: e.g. A ?D, B ?E, C ?F, ¡­ A letter corresponding to R is translated by 17: e.g. A ?R, B ?S, C ?T, ¡­ A letter corresponding to S is translated by 18: e.g. A ?S, B ?T, C ?U, ¡­ A letter corresponding to U is translated by 20: e.g. A ?U, B ?V, C ?W, ¡­ According to these rules our message becomes the last line below: surd surd surd surd surd surd surd surd surd surd surd surd surd surd surd su math emat icsi sthe engi neof alls cien ceit enab lesp hysi calp heno mena to eukk wgrw awjl knyh whxl fyfi sfcv ucvq uyzw whre dyjs zsjl uucs zyer eyed li ? The rules for translation are given by this table m corresponds to s, so it is translated by 18 to e
  • 4. PreparedbyD Almeida Objective We will break this Vigenere cipher presented in blocks of 5 letters: ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN FSTUS STYVG YS The key aim is to find how many letters were used in the key word used to code the original message. This does not mean the key word has 5 letters!
  • 5. PreparedbyD Almeida 1. Find repeating blocks of groups of three or more letters 2. Find the gaps n between repeating blocks of groups of letters 3. Find the non-trivial factors of n (so exclude 1 and n) 4. We must find the common factor (larger than 3) with the highest frequency. Call this N 5. Group the ciphered text in blocks of N letters. 6. Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the first place in each block; repeat for the second place, third place, ¡­.Nth place 7. Compare the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the first place with the expected frequencies of the 26 letters: observation and judgement will imply a Caesar shift of the letters. Replace the ciphered letter in each of the first places with the unciphered one. Repeat for other places, etc. using common sense and comparative frequencies for the other places. 8. Partition to reveal message. The key steps in cracking such ciphers is given below and the steps will be illustrated by applying it to our ciphered text: Generally the key word will have more than 3 letters but for practice identifying blocks we include 3
  • 6. PreparedbyD Almeida Step 1. Finding repeating blocks of groups of 3 or more letters. Use MS Word ¡®find¡¯ to highlight the letters A, B, ¡­. ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN FSTUS STYVG YS There are no repeating groups of 3 or more letters beginning with A. So we keep going.
  • 7. PreparedbyD Almeida Step 1 (continued) Finding repeating blocks of groups of 3 or more letters. Use MS Word ¡®find¡¯ to highlight the letters A, B, ¡­. ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN FSTUS STYVG YS By (careful) observation we identify the groups GHP and GEE.
  • 8. PreparedbyD Almeida Step 1 (continued) Finding repeating blocks of groups of 3 or more letters. The groups GHP and GEE: ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN FSTUS STYVG YS And here¡¯s the group LEEBMMTG: ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN FSTUS STYVG YS
  • 9. PreparedbyD Almeida Step 2 Finding the gaps n between repeating blocks of groups of letters ANYVG YSTYN RPLWH RDTKX RNYPV QTGHP HZKFE YUMUS AYWVK ZYEZM EZUDL JKTUL JLKQB JUQVU ECKBN RCTHP KESXM AZOEN SXGOL PGNLE EBMMT GCSSV MRSEZ MXHLP KJEJH TUPZU EDWKN NNRWA GEEXS LKZUD LJKFI XHTKP IAZMX FACWC TQIDU WBRRL TTKVN AJWVB REAWT NSEZM OECSS VMRSL JMLEE BMMTG AYVIY GHPEM YFARW AOAEL UPIUA YYMGE EMJQK SFCGU GYBPJ BPZYP JASNN FSTUS STYVG YS By (careful) counting the gap between the two GHP¡¯s = 198 and the gap between the two GEE¡¯s = 108 Important: the gap between the AMB¡¯s in: AMBCV GUYPG LPRCT MAMBD is 16 (count between the A¡¯s and add 1) 15 15 + 1
  • 10. PreparedbyD Almeida Step 3 Finding the non-trivial factors of n exclude 1 and n) After examining the repeating groups of letters we will have this table: Group Gap Factors GHP 198 2, 3, 6, 9, 11, 18, 22, 33, 66, 99 GEE 108 2, 3, 4, 6, 9, 12, 18, 27, 36, 54 LEEBMMTG 114 2, 3, 6, 19, 38, 57 SEZM 84 2, 3, 4, 6, 7, 12, 14, 21, 28, 42 STY 274 1, 2, 137, 274 YVGYS 280 2, 4, 5, 7, 8, 10, 14, 20, 28, 35, 40, 56, 70, 140 ZMX 48 2, 3, 4, 6, 8, 12, 16, 24 ZUDLJK 96 2, 3, 4, 6, 8, 12, 16, 24, 32, 48
  • 11. PreparedbyD Almeida Step 4 Finding the common factor N (larger than 3) with the highest frequency. So N = 6 Factor > 3 Frequency 4 5 6 6 7, 8, 9, 14, 16 2 12 4 Others 1 ? Highest frequency
  • 12. PreparedbyD Almeida Step 5 Group the ciphered text in blocks of N = 6 letters. ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE AWTNSE ZMOECS SVMRSL JMLEEB MMTGAY VIYGHP EMYFAR WAOAEL UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS
  • 13. PreparedbyD Almeida Step 6 Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the first place in each block; The first place letters: ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE AWTNSE ZMOECS SVMRSL JMLEEB MMTGAY VIYGHP EMYFAR WAOAEL UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS Frequency table: A B C D E F G H I J K L M 2 0 0 0 1 0 2 3 0 6 3 3 3 N O P Q R S T U V W X Y Z 0 0 0 0 0 6 1 5 2 5 0 2 4
  • 14. PreparedbyD Almeida The second place letters: ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE AWTNSE ZMOECS SVMRSL JMLEEB MMTGA YVIYGHP EMYFAR WAOAEL UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS Now construct frequency table: A B C D E F . . . . . . 4 2 1 0 0 . . . . . Step 6 Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the other places in each block;
  • 15. PreparedbyD Almeida 1st 2nd 3rd 4th 5th 6th a 2 4 0 1 4 2 b 0 2 1 1 2 2 c 0 1 0 0 3 3 d 0 0 0 0 1 4 e 1 0 2 6 9 4 f 0 0 0 4 1 1 g 2 0 5 4 1 0 h 3 0 1 1 2 0 i 0 1 1 0 3 0 j 6 3 0 1 0 1 k 3 1 10 0 0 0 l 3 2 2 0 2 4 m 3 10 2 0 0 1 n 0 2 2 5 3 1 o 0 0 2 2 0 0 p 0 3 1 1 0 8 q 0 3 0 2 0 0 r 0 0 1 5 3 2 s 6 0 1 2 6 2 t 1 4 5 1 0 4 u 5 1 2 3 3 0 v 2 3 2 2 0 0 w 5 4 0 0 0 0 x 0 2 2 0 0 3 y 2 1 4 2 3 5 z 4 1 2 4 0 0 Step 6 Find the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the 6 places in each block; This is the completed table of frequencies of the letters in the 1st, 2nd, 3rd, 4th, 5th and 6th places
  • 16. PreparedbyD Almeida 1st 2nd 3rd 4th 5th 6th Normal relative frequency of letters a 2 4 0 1 4 2 8.17% b 0 2 1 1 2 2 1.49% c 0 1 0 0 3 3 2.78% d 0 0 0 0 1 4 4.25% e 1 0 2 6 9 4 12.70% f 0 0 0 4 1 1 2.23% g 2 0 5 4 1 0 2.02% h 3 0 1 1 2 0 6.09% i 0 1 1 0 3 0 6.97% j 6 3 0 1 0 1 0.15% k 3 1 10 0 0 0 0.77% l 3 2 2 0 2 4 4.03% m 3 10 2 0 0 1 2.41% n 0 2 2 5 3 1 6.75% o 0 0 2 2 0 0 7.51% p 0 3 1 1 0 8 1.93% q 0 3 0 2 0 0 0.10% r 0 0 1 5 3 2 5.99% s 6 0 1 2 6 2 6.33% t 1 4 5 1 0 4 9.06% u 5 1 2 3 3 0 2.76% v 2 3 2 2 0 0 0.98% w 5 4 0 0 0 0 2.36% x 0 2 2 0 0 3 0.15% y 2 1 4 2 3 5 1.97% z 4 1 2 4 0 0 0.07% Step 7 Compare the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the first place with the expected frequencies of the 26 letters: observation will imply a Caesar shift of the letters Comparison of 1st place frequency with that of expected frequency implies a Caesar shift of 8. That is 8 0 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 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
  • 17. PreparedbyD Almeida Step 7 Replace the ciphered letter in each of the first places with the unciphered one. INYVGY ATYNRP TWHRDT SXRNYP DQTGHP PZKFEY CMUSAY EVKZYE HMEZUD TJKTUL RLKQBJ CQVUEC SBNRCT PPKESX UAZOEN AXGOLP ONLEEB UMTGCS AVMRSE HMXHLP SJEJHT CPZUED EKNNNR EAGEEX ALKZUD TJKFIX PTKPIA HMXFAC ECTQID CWBRRL BTKVNA RWVBRE IWTNSE HMOECS AVMRSL RMLEEB UMTGAY DIYGHP MMYFAR EAOAEL CPIUAY GMGEEM RQKSFC OUGYBP RBPZYP RASNNF ATUSST GVGYS ANYVGY STYNRP LWHRDT KXRNYP VQTGHP HZKFEY UMUSAY WVKZYE ZMEZUD LJKTUL JLKQBJ UQVUEC KBNRCT HPKESX MAZOEN SXGOLP GNLEEB MMTGCS SVMRSE ZMXHLP KJEJHT UPZUED WKNNNR WAGEEX SLKZUD LJKFIX HTKPIA ZMXFAC WCTQID UWBRRL TTKVNA JWVBRE AWTNSE ZMOECS SVMRSL JMLEEB MMTGAY VIYGHP EMYFAR WAOAEL UPIUAY YMGEEM JQKSFC GUGYBP JBPZYP JASNNF STUSST YVGYS 0 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 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H This rule for 1st place letters
  • 18. PreparedbyD Almeida 1st 2nd 3rd 4th 5th 6th Normal relative frequency of letters a 2 4 0 1 4 2 8.17% b 0 2 1 1 2 2 1.49% c 0 1 0 0 3 3 2.78% d 0 0 0 0 1 4 4.25% e 1 0 2 6 9 4 12.70% f 0 0 0 4 1 1 2.23% g 2 0 5 4 1 0 2.02% h 3 0 1 1 2 0 6.09% i 0 1 1 0 3 0 6.97% j 6 3 0 1 0 1 0.15% k 3 1 10 0 0 0 0.77% l 3 2 2 0 2 4 4.03% m 3 10 2 0 0 1 2.41% n 0 2 2 5 3 1 6.75% o 0 0 2 2 0 0 7.51% p 0 3 1 1 0 8 1.93% q 0 3 0 2 0 0 0.10% r 0 0 1 5 3 2 5.99% s 6 0 1 2 6 2 6.33% t 1 4 5 1 0 4 9.06% u 5 1 2 3 3 0 2.76% v 2 3 2 2 0 0 0.98% w 5 4 0 0 0 0 2.36% x 0 2 2 0 0 3 0.15% y 2 1 4 2 3 5 1.97% z 4 1 2 4 0 0 0.07% Step 7 Compare the frequencies of the 26 letters a, b, c,¡­.., x, y, z in the second place with the expected frequencies of the 26 letters: observation will imply a Caesar shift of the letters Comparison of 2nd place frequency with that of expected frequency implies a Caesar shift of 18: i.e. 18 0 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 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
  • 19. PreparedbyD Almeida Step 7 Replace the ciphered letter in each of the second places with the unciphered one. INYVGY ATYNRP TWHRDT SXRNYP DQTGHP PZKFEY CMUSAY EVKZYE HMEZUD TJKTUL RLKQBJ CQVUEC SBNRCT PPKESX UAZOEN AXGOLP ONLEEB UMTGCS AVMRSE HMXHLP SJEJHT CPZUED EKNNNR EAGEEX ALKZUD TJKFIX PTKPIA HMXFAC ECTQID CWBRRL BTKVNA RWVBRE IWTNSE HMOECS AVMRSL RMLEEB UMTGAY DIYGHP MMYFAR EAOAEL CPIUAY GMGEEM RQKSFC OUGYBP RBPZYP RASNNF ATUSST GVGYS 0 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 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R IFYVGY ALYNRP TOHRDT SPRNYP DITGHP PRKFEY CEUSAY ENKZYE HEEZUD TBKTUL RDKQBJ CIVUEC STNRCT PHKESX USZOEN APGOLP OFLEEB UETGCS ANMRSE HEXHLP SBEJHT CHZUED ECNNNR ESGEEX ADKZUD TBKFIX PLKPIA HEXFAC EUTQID COBRRL BLKVNA ROVBRE IOTNSE HEOECS ANMRSL RELEEB UETGAY DAYGHP MEYFAR ESOAEL CHIUAY GEGEEM RIKSFC OMGYBP RTPZYP RSSNNF ALUSST GNGYS This rule for 2nd place letters
  • 20. PreparedbyD Almeida Step 7 Use common sense and/or comparative frequencies for the other place letters. IFYVGY ALYNRP TOHRDT SPRNYP DITGHP PRKFEY CEUSAY ENKZYE HEEZUD TBKTUL RDKQBJ CIVUEC STNRCT PHKESX USZOEN APGOLP OFLEEB UETGCS ANMRSE HEXHLP SBEJHT CHZUED ECNNNR ESGEEX ADKZUD LBKFIX PLKPIA HEXFAC EUTQID COBRRL BLKVNA ROVBRE IOTNSE HEOECS ANMRSL RELEEB UETGAY DAYGHP MEYFAR ESOAEL CHIUAY GEGEEM RIKSFC OMGYBP RTPZYP RSSNNF ALUSST GNGYS This E before HE suggests E is a T: a Caesar shift of 15 in the 6th place 0 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 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS
  • 21. PreparedbyD Almeida Step 7 Use common sense and/or comparative frequencies for the other place letters. IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS 5th Normal frequency a 4 8.17% b 2 1.49% c 3 2.78% d 1 4.25% e 9 12.70% f 1 2.23% g 1 2.02% h 2 6.09% i 3 6.97% j 0 0.15% k 0 0.77% l 2 4.03% m 0 2.41% n 3 6.75% o 0 7.51% p 0 1.93% q 0 0.10% r 3 5.99% s 6 6.33% t 0 9.06% u 3 2.76% v 0 0.98% w 0 2.36% x 0 0.15% y 3 1.97% z 0 0.07% This block of letters and the comparative frequency of 5th place letters suggest¡­¡­¡­.. IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS There is no shift for 5th place letters
  • 22. PreparedbyD Almeida Step 7 Use common sense and/or comparative frequencies for the other place letters. IFYVGN ALYNRE TOHRDI SPRNYE DITGHE PRKFEN CEUSAN ENKZYT HEEZUS TBKTUA RDKQBY CIVUER STNRCI PHKESM USZOEC APGOLE OFLEEQ UETGCH ANMRST HEXHLE SBEJHI CHZUES ECNNNG ESGEEM ADKZUS TBKFIM PLKPIP HEXFAR EUTQIS COBRRA BLKVNP ROVBRT IOTNST HEOECH ANMRSA RELEEQ UETGAN DAYGHE MEYFAG ESOAEA CHIUAN GEGEEB RIKSFR OMGYBE RTPZYE RSSNNU ALUSSI GNGYS This G and the HE suggests that G should be a T: a Caesar shift of 13 for the 4th place letters 0 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 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M IFYIGN ALYARE TOHEDI SPRAYE DITTHE PRKSEN CEUFAN ENKMYT HEEMUS TBKGUA RDKDBY CIVHER STNECI PHKRSM USZBEC APGBLE OFLREQ UETTCH ANMEST HEXULE SBEWHI CHZHES ECNANG ESGREM ADKMUS TBKSIM PLKCIP HEXSAR EUTDIS COBERA BLKINP ROVORT IOTAST HEORCH ANMESA RELREQ UETTAN DAYTHE MEYSAG ESONEA CHIHAN GEGREB RIKFFR OMGLBE RTPMYE RSSANU ALUFSI GNGLS
  • 23. PreparedbyD Almeida Step 7 Use common sense and/or comparative frequencies for the other place letters. IFYIGN ALYARE TOHEDI SPRAYE DITTHE PRKSEN CEUFAN ENKMYT HEEMUS TBKGUA RDKDBY CIVHER STNECI PHKRSM USZBEC APGBLE OFLREQ UETTCH ANMEST HEXULE SBEWHI CHZHES ECNANG ESGREM ADKMUS TBKSIM PLKCIP HEXSAR EUTDIS COBERA BLKINP ROVORT IOTAST HEORCH ANMESA RELREQ UETTAN DAYTHE MEYSAG ESONEA CHIHAN GEGREB RIKFFR OMGLBE RTPLYE RSSANU ALUFSI GNGLS 3rd Normal freq a 0 8.17% b 1 1.49% c 0 2.78% d 0 4.25% e 2 12.70% f 0 2.23% g 5 2.02% h 1 6.09% i 1 6.97% j 0 0.15% k 10 0.77% l 2 4.03% m 2 2.41% n 2 6.75% o 2 7.51% p 1 1.93% q 0 0.10% r 1 5.99% s 1 6.33% t 5 9.06% u 2 2.76% v 2 0.98% w 0 2.36% x 2 0.15% y 4 1.97% z 2 0.07% Comparative high frequency of K¡¯s in 5th place suggest K must be an E: a Caesar shift 0f 20. IFSIGN ALSARE TOBEDI SPLAYE DINTHE PRESEN CEOFAN ENEMYT HEYMUS TBEGUA RDEDBY CIPHER STHECI PHERSM USTBEC APABLE OFFREQ UENTCH ANGEST HERULE SBYWHI CHTHES ECHANG ESAREM ADEMUS TBESIM PLECIP HERSAR EUNDIS COVERA BLEINP ROPORT IONAST HEIRCH ANGESA REFREQ UENTAN DASTHE MESSAG ESINEA CHCHAN GEAREB RIEFFR OMALBE RTJMYE RSMANU ALOFSI GNALS 0 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 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
  • 24. PreparedbyD Almeida Step 8 Partition to reveal message. IF|SIGNALS|ARE|TO|BE|DISPLAYED|IN|THE|PRESENCE|OF|AN|ENEMY| THEY|MUST|BE|GUARDED|BY|CIPHERS|THE|CIPHERS|MUST|BE| CAPABLE|OF|FREQUENT|CHANGES|THE|RULES|BY|WHICH|THESE| CHANGES|ARE|MADE|MUST|BE|SIMPLE|CIPHERS|ARE|UNDISCOVERABLE| IN|PROPORTION|AS|THEIR|CHANGES|ARE|FREQUENT|AND|AS|THE| MESSAGES|IN|EACH|CHANGE|ARE|BRIEF|FROM|ALBERTJMYERS|MANUAL| OF|SIGNALS| IFSIGN ALSARE TOBEDI SPLAYE DINTHE PRESEN CEOFAN ENEMYT HEYMUS TBEGUA RDEDBY CIPHER STHECI PHERSM USTBEC APABLE OFFREQ UENTCH ANGEST HERULE SBYWHI CHTHES ECHANG ESAREM ADEMUS TBESIM PLECIP HERSAR EUNDIS COVERA BLEINP ROPORT IONAST HEIRCH ANGESA REFREQ UENTAN DASTHE MESSAG ESINEA CHCHAN GEAREB RIEFFR OMALBE RTJMYE RSMANU ALOFSI GNALS