Updated README.
This commit is contained in:
33
README.md
33
README.md
@@ -1,10 +1,39 @@
|
||||
# Enigma Machine
|
||||
Recreates the functionality of the Enigma Machine from World War II. Mainly just an exercise in Python.
|
||||
I still sort of remember being a kid and discovering that you could make a map of letters and from that have a simple
|
||||
encoding mechanism.
|
||||
|
||||
For example (in the table shown below), the letter A would be encoded as M, B as N, C as O, and so on.
|
||||
|
||||
| Letter | Encoding |
|
||||
|--------|----------|
|
||||
| A | M |
|
||||
| B | N |
|
||||
| C | O |
|
||||
| ... | ... |
|
||||
| Z | L |
|
||||
|
||||
This is a [substitution cipher](https://en.wikipedia.org/wiki/Substitution_cipher) and is pretty simplistic by modern standards, but as a kid I thought it was cool [AF](https://www.howtogeek.com/711826/what-does-af-mean/).
|
||||
|
||||
One evening I was watching a video on YouTube about the Enigma Machine. It piqued my interest and I decided to make
|
||||
something in Python to recreate the functionality.
|
||||
|
||||
## History
|
||||
> 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 Enigma machine was considered so secure that it was used to encipher the most
|
||||
> top-secret messages.
|
||||
>
|
||||
> The 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 the 26 lights above the keyboard
|
||||
> illuminated at each key press. If plaintext is entered, the illuminated letters are the ciphertext. Entering
|
||||
> ciphertext transforms it back into readable plaintext. The rotor mechanism changes the electrical connections between
|
||||
> the keys and the lights with each keypress.
|
||||
>
|
||||
> -- [Wikipedia](https://en.wikipedia.org/wiki/Enigma_machine)
|
||||
|
||||
## Usage
|
||||
`uv run main.py "[message]" e|d [int]`
|
||||
|
||||
|
||||
Where:
|
||||
- __"[message]"__ is the message to be encrypted/decrypted. Should be in quotes.
|
||||
- __e|d__ is the direction of the message (encrypt or decrypt).
|
||||
|
||||
Reference in New Issue
Block a user