Skip to content

Ben-Ramchandani/cracking_the_Enigma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Enigma cracker

A C program that attempts to find the wheel settings for the Military Enigma by a similar method to the Bombe machine.

The Enigma machine

The Enigma cipher machine was widely adopted by the German Military during World War II. There were many different versions, but the basic Military Enigma consisted of three removable rotors, each with 26 connectors on each side, one reflector and a plugboard mounted on a typewriter like device.

More information can be found on the Wikipedia page.

The Bombe

The Bombe was an electro-mechanical device used by the allies to break the Enigma cipher. The basic idea behind it is to start with some cipher-text and a 'crib' (guessed plain-text) and test every combination of rotor positions to see if could plausibly have produced this output. This program acts in a similar manner to the Bombe in its attempt to find possible rotor positions.

The code

The interesting part is is in src/plug_break.c - it contains the code that actually loops through the possibilities, it's called from main.c.
src/crack_commercial.c contains code to find the rotor positions for a machine without a plugboard (a Commercial Enigma) and is left here, but not used.

Installation and use

Navigate to the /src folder and make. The program can then be run as ./enigma.
The text, rotors and position used can be adjusted in plug_break.c.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published