A Java simulator of the Enigma machine.
The program currently only supports Enigma I, with the following planned:
- Enigma M3 (3 additional rotors, which have two turnover points)
- Enigma M4 (M3 and Zusatzwalze, Beta & Gamma )
It does not provide a user interface, but a simple API for encrypting messages:
// Rotors: I, II, III with initIal setting of AAZ and ring setting of 2 for the left rotor
Rotor left = new Rotor( RotorProperty.I);
left.setRingSetting( 'B' );
Rotor middle = new Rotor( RotorProperty.II);
Rotor right = new Rotor( RotorProperty.III);
right.setPosition( 'Z' );
PlugBoard plugBoard = new PlugBoard( "EN IG MA" );
Enigma enigma = new Enigma( left, middle, right, plugBoard, Reflector.B );
String ciphertext = enigma.encrypt("HELLOWORLD"));
Questions? Bugs? Please open an issue.
EnigmaJ is open source and released under MIT license. See LICENSE file for more info.
The following resources have been invaluable in building and testing this project: