Properties of Cipher Texts - Trinity College Computer
Download
Report
Transcript Properties of Cipher Texts - Trinity College Computer
Expert System for
Analyzing Simple Ciphers:
Properties of Cipher Texts
Carolyn Rucci
Advisor: Ralph Morelli
1 year project
Overview
What are letter frequencies and index of coincidence.
What index of coincidence and patterns of letter
frequencies does each cipher follow?
Transposition
Caesar
Affine
Vigenère
Playfair
Summary
What next?
Review of Letter Frequencies and
Index of Coincidence
Letter Frequencies
abcdef ghijklmnopqrstuvwxyz
monographic frequency distribution of normal alphabet
Index of Coincidence
thisisatestoftheindexofcoincidenceinmessages
thisisatestoftheindexofcoincidenceinmessagesthi
5matches / 44letters ~ 11%
Transposition Cipher
Simply rearranges the letters same letters
present in cipher text as plain text
Reverse
text:
there once was a cat named fred
derf deman tac a saw ecno ereht
Conclusion: Frequency distribution will be the same.
Caesar
Each cipher letter corresponds to the plain
text letter three after it.
Plain Alphabet: 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
Caesar Alphabet: 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
the quick fox jumped
over the lazy dog
Shift
3
wkh txlfn ira mxpshg
ryhu wkh odcb grj
Conclusion: Frequency distribution will
match when shifted three spots.
Affine
Each cipher letter corresponds to exactly one plain text
letter.
C = (aP + b) mod 26
Ex: a=4 and b=5:
A = (4*1 + 5) mod 26
= 9 I
Conclusion:
Plain
remainder
Cipher
B
13
M
C
17
Q
D
21
U
E
25
Y
F
3
C
Same frequencies will be present but in a
random order.
Vigenère
Many cipher alphabets
created based on keyword.
Conclusion: No pattern to
letter frequencies.
Find identical sequences of
letters.
the frog jumping the fence…
dlc bffj tyklwej dlc bsefo…
Calculate interval bt/w
sequences
If interval between two
occurrences has common factor
length of keyword
ABCDEF…XYZ
C
I
P
H
E
R
ABCDEF…XYZ
BCDEFG…YZA
C D E F GH … Z A B
:
Y Z A B C D ... V W X
ZABCDE…WXY
ABC DEF…XYZ
K
E
Y
W
O
R
D
KLMNOP …HIJ
EFGHIJK…BCD
YZABCD …VWX
WXYZAB …UVW
OPQRST …LMN
RSTUVW …OPQ
DEFGH I …ABC
Playfair
Mixed alphabetic sequence of 25 letters is written into
a 5x5 square (J normally omitted).
D
C
Q
Z
L
B
O
Y
A
U
M
X
R
K
H
Conclusion:
W
G
F
T
M
I
E
S
P
V
Case1: 2corners replace
w/other corners
Case2: same row replace
w/letters to right
Case3: same column replace
w/letters below
No pattern of letter frequencies.
Summary of Findings
Index of
Coincidence
Frequency Distribution
(compared to normal)
Transposition
~6.6%
Same
Caesar
~6.6%
Will match if shifted 3 to right
Affine
~6.6%
Vigenère
~3.8%
Same frequencies present but in
different orders
Flat distribution
Playfair
~3.8%
Flat distribution
Review of Letter Frequencies and
Index of Coincidence
Letter Frequencies
abcdef ghijklmnopqrstuvwxyz
monographic frequency distribution of normal alphabet
Index of Coincidence
thisisatestoftheindexofcoincidenceinmessages
thisisatestoftheindexofcoincidenceinmessagesthi
5matches / 44letters ~ 11%
What Next?
Finalize criteria for distinguishing between
Vigenère and Playfair ciphers.
Create a Java program that:
1)
2)
Examines index of coincidence and patterns of
frequencies
Uses this information to determine which cipher
was used