Enigma Meghan Emilio Advisor: Professor Ralph Morelli April 2004
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.
Putting It All Together Swap InputOutput Swap
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: Σ (f i * (f i -1)) N(N-1) where 0 > i > 25, f i is the frequency in the sample of the i th letter of the alphabet, and N is the total number of letters in the sample Every language has such an IC, for example: English: German: Spanish: The IC for random text (even distribution of letters) is
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 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:
Results
Future Work Plug Board Simple Substitution Analyzer Improvements Distributed Computing Better Heuristic Algorithm
References History of the Enigma Machine.. Cryptography -- Enigma Cipher.. The German Enigma Cipher Machine – History of Solving.. Hodges, Andrew. Alan Turing the Enigma. New York: Simon & Schuster, Inc., Carlson, Andy. Simulating the Engima.. Pictures © 1995, Morton Swimming,.
Questions?