Skip to content

ashwin003/ng-enigma-cipher

Repository files navigation

Enigma Cipher

The Enigma machine is an encryption device developed and used in the early- to mid-20th century to protect commercial, diplomatic and military communication. It was employed extensively by Nazi Germany during World War II, in all branches of the German military

More Info

Rotors and Reflectors

Rotors and Reflectors are what makes the Enigma cipher work. They are essentially circular disks with contact pins arranged on one face; the other side housing the corresponding number of circular plates electrical contacts. Each of the contact pins has internal wirings which "maps" one alphabet from the left side to another one on the right side.

Configurations

Number of possible configurations for the enigma machine made this the most paranoid machine ever created.

The basic 3-rotor Enigma has 26x26x26 = 17,576 possible rotor states for each of 6 wheel orders giving 6x17,576 = 105,456 machine states.

For each of these the plugboard (with ten pairs of letters connected) can be in 150,738,274,937,250 possible states.

The total number of combinations is thus (even for the simplest military Enigma) of the order of 150,000,000,000,000,000,000, (158,962,555,217,826,360,000, to be precise) and then there is the ring-setting complication on top of this.

The task facing anyone trying to decipher a particular message is to find which one of these 15 billion billion settings has been used.

The Germans considered the task to be impossible, and certainly even a modern computer might take a year to work through this number of machine settings, if it simply tried them out in turn.

More Info