Enigma Cipher - Searisal/Cryptography-Implementation GitHub Wiki

The enigma cipher is perhaps one of the most well known and well analyzed ciphers ever made. Originally developed in the form of a rotor machine, and used used extensively throughout the second world war by German forces, the cracking of the enigma expedited the downfall of the nazi regime and saved countless lives. The system works using a system of superenciphered substitution ciphers, some of which change with each keystroke and others which stay the same. This mix of static and changing ciphers make any form of cryptanalysis incredibly difficult, and it was thought to be unbreakable for much of its existence. The main function of the enigma works as follows: the system contains a number of cipher wheels, each of which represents a simple substitution cipher. With every keystroke, one wheel is moved forward one position, and once it has undergone a full rotation, the next wheel moves one position and the former wheel begins rotating again. Thus, for 3 wheels with n spokes, there are n^3 possible mappings. Likewise, there exists a "relflector", a specifically symmetrical substitution cipher which reroutes the plaintext back through the inverted rotor wheels after being enciphered, and a final symmetric encipherment known as the plugboard. This setup allows for the enigma cipher itself to be symmetric, making it both easy to use while also incredibly secure.