https://github.com/blaknite/enigma
German Enigma implemented in Ruby
https://github.com/blaknite/enigma
enigma history ruby ww2
Last synced: 3 months ago
JSON representation
German Enigma implemented in Ruby
- Host: GitHub
- URL: https://github.com/blaknite/enigma
- Owner: blaknite
- License: mit
- Created: 2015-04-07T03:37:41.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T18:55:00.000Z (9 months ago)
- Last Synced: 2025-04-12T07:53:33.068Z (3 months ago)
- Topics: enigma, history, ruby, ww2
- Language: Ruby
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Enigma
[](https://buildkite.com/blaknite/enigma)
German Enigma implemented in Ruby
Usage: `bin/run.rb`
The first two words of the message are always the unique key and message key. The enigma cypher
only encodes letters of the alphabet and remove all spaces and punctuation.You can find out more about how the Enigma works here: http://users.telenet.be/d.rijmenants/en/enigmatech.htm
## Example Usage
Rotors: `I II III`
Ring settings: `13 04 21`
Reflector: `B`
Plug pairs: `AH CP RB IL KX WO`
Unique Key: `OMG`
Message Key: `WTF`
Message: `Jahwohl````
$ bin/run.rb
Select the rotors [I II III]:
Provide the ring settings [01 01 01]: 13 04 21
Select the reflector [B]:
Provide the plug pairs: AH CP RB IL KX WO
Encode or decode? [encode]:
Enter the unique key: OMG
Enter the message key: WTF
Enter the message: JahwohlOMG BKK PPSQA UE
``````
$ bin/run.rb
Select the rotors [I II III]:
Provide the ring settings [01 01 01]: 13 04 21
Select the reflector [B]:
Provide the plug pairs: AH CP RB IL KX WO
Encode or decode? [encode]: decode
Enter the unique key: OMG
Enter the message key: BKK
Enter the message: PPSQA UEOMG WTF JAHWO HL
```