Skip to content

One of the mot famous encryption devices in this console application

License

Notifications You must be signed in to change notification settings

LanguidBasil/Enigma-Machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enigma-Machine

What it is

Enigma_(crittografia)_-_Museo_scienza_e_tecnologia_Milano

The Enigma machine is a cipher device developed in 1923 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. The Enigma machine was considered so secure that it was used to encipher the most top-secret messages.

How it works

LSie41jlw4-449px-enigmamachinelabeled

Crucial parts of Enigma are rotors and reflector. When a key is pressed signal goes through first rotor, becoming any other letter, then second and third, reflecting of the reflector and going through all 3 rotors again. When signal has reached destination one ot many rotors rotate, and next character will be processed by different path. Adding to complexity, army version of Enigma had a plugboard. On that plugboard you could wire together two letters, when a signal goes to one, it goes through wire and outputs as the other. In total Enigma machine has 158,962,555,217,826,360,000 different settings which, at the time, seemed impossible to break.

Is it unbreakable?

No, it is breakable. Bomba is a Polish decipher machine that was invented in January 1933 by Marian Rejewski and later enhanced by Alan Turing against newer versions of Enigma.

This program

I've created a 3 rotor military Enigma machine with up to 10 plugs. For three rotor positions there are 8 rotors to choose from, any of 26 letters can be set as starting and ring changing. For reflector there are 5 configurations. You can set your enigma manually to decrypt a message, or randomly for a quick start. D__Projects_Enigma-Machine_bin_Win32_Release_EnigmaMachine exe 29_01_2022 10_54_18 (3)

Want to play? Here is a crypted message and configuration, go ahead and break it ;)

Message: HUFRC GXOIZ EHEKJ DSRUV CCKTJ CCAQW XBPFA FQICK OR

Rotor 1: conf - ESOVPZJAYQUIRHXLNFTGKDCMWB current letter - C ring letter - J
Rotor 2: conf - EKMFLGDQVZNTOWYHXUSPAIBRCJ current letter - Q ring letter - N
Rotor 3: conf - JPGVOUMFYQBENHZRDKASXLICTW current letter - U ring letter - Z
Reflector configuration: ENKQAUYWJICOPBLMDXZVFTHRGS
Plugboard configuration: GW XK HY OF TQ JI ZN LU SE MR

Sources to learn more

Articles on wikipedia and brilliant.

Videos from Jared Owen, Code Bullet and Numberphile.

About

One of the mot famous encryption devices in this console application

Topics

Resources

License

Stars

Watchers

Forks

Languages