Enigma I / M3 simulator


Enigma Home Page

Introduction

My Enigma I / M3 simulator works in text mode. It is written in Python language. The Python interpreter must be installed.

My simulator uses simple files to memorize the connection of the rotors. This makes it very easy to add more.

Using example

This example came from Linux, but it is the same on Windows 10:

Remark: the "$" character is the prompt of Unix Shell. The Windows cmd.exe prompt is (for example): "C:\>".

1) Download the software
$ curl -O http://www.jfbouch.fr/crypto/enigma/simu/m3.tar

2) Extract the software from the TAR archive.
Remark: the m3 directory is created
$ tar -xf m3.tar
$ cd m3

3) Print the syntax of the command
$ python M3.py
syntaxe: enigmaM3.py UKW LEFT MIDDLE RIGHT STECKS RING GRUND [Debug]

4) Cipher a text (from a file)
$ more tobe.txt
TOBEORNOTTOBE

$ python M3.py B II I IV AB:CD:EF XEF ABC < tobe.txt
OBQUMVYZUVSKB

5) keep the cryptogram in a file
$ python M3.py B II I IV AB:CD:EF XEF ABC < tobe.txt > tobe.cry
$ more tobe.cry
OBQUMVYZUVSKB

6) Decipher a text from the keyboard
$ echo OBQUMVYZUVSKB |python M3.py B II I IV AB:CD:EF XEF ABC
TOBEORNOTTOBE

7) Print a rotor file (it is easy to add more)
$ more rotors/IV.rot     # In Windows:  more rotors\IV.rot
ESOVPZJAYQUIRHXLNFTGKDCMWB
J
======= ROTOR IV =========
   

Dowload the M3 simulator

M3