Enigma Meghan Emilio Faculty Sponsor: Ralph Morelli (Computer Science)

Preview:

Citation preview

EnigmaMeghan Emilio

Faculty Sponsor: Ralph Morelli(Computer Science)

Objective

There are two main objectives of this project First, to create a working simulation of an Enigma

machine that is as faithful as possible. Second, to create an analyzer which will “break”

Enigma. 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.

Breaking Enigma a turning point of the war.

Has three rotating rotors, a plugboard and a reflector.

Rotors and Plugboard The rotors rotate in the following

sequence: 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.

The plugboard provides a customizable swapping of pairs letters both before and after a character passed through the rotors.

Putting It All Together

Rotor ISwap

Rotor IISwap

Rotor IIISwap

PlugboardSwap

Input Output

Reflector Swap

Simulation

Input English/Encrypted text and output Encrypted text/English

Java Applet Faithful to rotor wirings and reflectors

used during WWII

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 using

simulator and chooses the best one using Index of Coincidence (IC) as a scoring function

What is Index of Coincidence?

Index of Coincidence (IC) is the probability that two randomly selected letters will be identical.

IC is a statistical measure which distinguishes text encrypted polyalphabetically from text encrypted with a monoalphabetically.

Every language has a calculated IC. For instance: English: 0.0667 Random Text: 0.0385

Why IC?

Enigma encryptions are polyalphabetic This allows for a heuristic algorithm

Instead of searching all possible decryptions, take the first one that comes close to 0.0667, as there should be only one.

Effective on larger sample sizes (comparable to exhaustive search - see results)

More efficient (relative to rotor setting - see results)

Problems with IC

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)P

erce

ntag

e C

orre

ct

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

Conclusion

A computer program was made that was able to break Enigma messages both efficiently and effectively.

Modern day computers make it relatively easy to decrypt Enigma messages.

Thus, Enigma is an inadequate form of encryption for the present day.