enigma meghan emilio advisor: professor ralph morelli april 2004
Post on 22-Dec-2015
222 views
TRANSCRIPT
Objective
There are two main objectives of this project First, to create a working simulation of an
Engima machine that is as faithful as possible. Second, to create a program which will “break”
Engima. That is, decrypt messages even if little or no information about the original settings is known.
What is Enigma?
Electrical enciphering machine widely used by the German Military during WWII.
Three rotating rotors. Breaking Enigma a
turning point of the war.
Rotors First rotor rotates
each time a character is input.
The second rotor rotates once each time the first rotor makes one full turn.
The third rotor rotates once each time the second rotor has rotated completely.
Plug Board
Swaps pairs of letters, automatically, both before and after each character passes through the rotors.
Major difference between commercial and military Enigma.
Accomplished
Created an Enigma Simulation Input English/Encrypted text and
output Encrypted text/English Java Applet Faithful to rotor wirings and
reflectors used during WWII
Accomplished
Created an Analyzer Input encrypted text and output original English text No other input information is needed Assumes possession of an Enigma machine Assumes text was encrypted without a plug board Searches through possible decryptions and choosing
the best one Uses Index of Coincidence (IC) as a scoring function
What is Index of Coincidence?
Index of Coincidence (IC) is defined to be the probability that two randomly selected letters will be identical.
It was introduced by William Friedman in The Index of Coincidence and its Applications in Cryptography (1920).
IC is a statistical measure which distinguishes text encrypted with a polyalphabetic substitution cipher from text encrypted with a monoalphabetic substitution cipher.
Calculating the IC
The formula used to calculate IC:
Σ(fi * (fi-1))
N(N-1) where 0 > i > 25, fi is the frequency in the sample of the ith letter of
the alphabet, and N is the total number of letters in the sample Every language has such an IC, for example:
English: 0.0667 German: 0.0762 Spanish: 0.0775
The IC for random text (even distribution of letters) is 0.0385
Why IC?
Text encrypted by Enigma is polyalphabetic, so IC can distinguish easily between encrypted text and English.
Allows for a heuristic algorithm Instead of searching all possible decryptions, take
the first one that comes close to 0.0667 Effective on larger sample sizes (comparable to
exhaustive search) More efficient (comparable to rotor setting)
Problems with IC The effectiveness of IC depends on the
size of the sample:
50 Characters
0.03
0.04
0.05
0.06
0.07
300 Characters
0.03
0.04
0.05
0.06
0.07
Actual Distribution
0.03
0.04
0.05
0.06
0.07
Results
Effectiveness
0
20
40
60
80
100
120
50 100 200 300
Sample Size (Characters)
Per
cent
age
Cor
rect
Iterative Search
Heuristic Search
Efficiency
0
5
10
15
20
25
30
50 chars 100 chars 200 chars 300 chars
Sample Size (Characters)
Tim
e (H
ours
) Iterative Search
Heuristic Search 1
Heuristic Serach 2
Future Work
Plug BoardSimple Substitution Analyzer
ImprovementsDistributed Computing Better Heuristic Algorithm
References History of the Enigma Machine. <http://
www.ugrad.cs.jhu.edu/~russell/classes/enigma/history.html>. Cryptography -- Enigma Cipher. <http://www.trincoll.edu/depts/cpsc/cryptography/enigma.html>. The German Enigma Cipher Machine – History of Solving. <http://
home.us.net/~encore/Enigma/text.html>. Hodges, Andrew. Alan Turing the Enigma. New York: Simon & Schuster,
Inc., 1983. Carlson, Andy. Simulating the Engima.
<http://homepages.tesco.net/~andycarlson/enigma/simulating_enigma.html>.
Pictures © 1995, Morton Swimming, <http://www.swimmer.org/morton/enigma.html>.