Share your repls and programming experiences

← Back to all posts
The Enigma
[deleted]

The Enigma

What is the Enigma?

The Enigma machine is a cipher 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. The Germans believed, erroneously, that use of the Enigma machine enabled them to communicate securely and thus enjoy a huge advantage in World War II. The Enigma machine was considered to be so secure that even the most top-secret messages were enciphered on its electrical circuits.

Who invented the Enigma?

Arthur Scherbius

How does the Enigma work

Enigma has an electromechanical rotor mechanism that scrambles the 26 letters of the alphabet. In typical use, one person enters text on the Enigma's keyboard and another person writes down which of 26 lights above the keyboard lights up at each key press. If plain text is entered, the lit-up letters are the encoded ciphertext. Entering ciphertext transforms it back into readable plaintext. The rotor mechanism changes the electrical connections between the keys and the lights with each key press. The security of the system depends on a set of machine settings that were generally changed daily during the war, based on secret key lists distributed in advance, and on other settings that were changed for each message. The receiving station has to know and use the exact settings employed by the transmitting station to successfully decrypt a message.

More info here: The Enigma

Voters
ch1ck3n
DynamicSquid
Comments
hotnewtop
DynamicSquid

Nice!

Bunnytoes

this is cool but how did you do this in so little code

ch1ck3n

@Bunnytoes because he is good

[deleted]

@Bunnytoes the original code was actually really long, so i shortened it and i ended up with this