Skip to content
This repository was archived by the owner on Oct 18, 2019. It is now read-only.

cernyd/gnunigma-python

Repository files navigation

gnunigma

Enigma logo

Basic information | Compatibility | Installation | Requirements | Platform differences | FAQ | License

Basic information

  • Gnunigma simulates the enigma encryption machine, which was used by the Germans in 20th century.
  • Language of choice - python
  • Graphical library - tkinter/Tkinter

How it looks

On Windows

  • Warning! This screenshot is old and some new GUI features were added in newer versions! (as you can see on the Ubuntu screenshot)

Gnunigma on Windows

On Ubuntu

Gnunigma on Ubuntu

Compatibility

  • Gnunigma was tested on Windows 10 and Ubuntu (16.04, 16.10, 17.04) and should be compatible

Installation

  1. Download the source
  2. If you are on Ubuntu and don't have Tkinter installed on python 3, run this command
sudo apt-get install python3-tk
  1. Run the runtime.py file with python 3

Requirements

  1. Python version 3.5 and newer (older python 3 versions might work as well but were not tested by me!)
    • tkinter library is included on Windows by default but must be installed on Ubuntu

Features missing in the Ubuntu version

  1. Sound - gnunigma on Windows is using the winsound library, which is not available on linux
  2. Icons - there were some issues with iconbitmaps on
  3. Styling - The gui does not looks as good as on Windows (scaling, weird colors)

How it works

  • Gnunigma has come a long way since the start of its developement, I tried to make it as "modular" as possible, this means:
    1. Objects derived from the BaseEnigma

Project hierarchy

Files

components

  • Enigma simulation classes (enigma machines, machine parts, additional devices)

cfg_handler

  • Used for loading raw data from YAML files

config

  • Global configuration (GUI settings, enigma settings saved by the user, unit test config)

data_handler

  • Handlers (for sound and configuration/data IO)

gui

  • All GUI classes (most of them represent a window, others some tkinter derived classes)

runtime

  • Launches the GUI version

Accomplishments of gnunigma

  • Gnunigma proved its historical accuracy by successfully deciphering original enigma messages

Barbarossa 1941

Reflector: B Wheel order: II IV V Ring positions: 02 21 12 Plug pairs: AV BS CG DL FU HZ IN KM OW RX

PART 1, msg key - BLA

Raw decrypted message

AUFKL X ABTEILUNG X VON X KURTINOWA X KURTINOWA X NORDWESTL X SEBEZ X SEBEZ X U AFFLIEGER STRASZERIQTUNG X DUBROWKI X DUBROWKI X OPOTSCHKA X OPOTSCHKA X UM X EINS AQT DREI NULL X UHR ANGETRETEN X ANGRIFF X INF X RGT X

Adjusted for german symbols

AUFKL ABTEILUNG VON KRUTINOWA KURTINOWA NORDWESTL SEBEZ SEBEZ U AFFLIEGER STRAßERICHTUNG DUBROWKI DUBROWKI OPOTSCHKA OPOTSCHKA OPOTSCHKA UM 18 30 UHR ANGETRETEN ANGRIFF INF RGT

PART 2, msg key - LSD

Raw decrypted message

DREI GEHT LANGSAM ABER SIQER VOR WAERTS X EINS SIEBEN NULL SEQS X UHR X ROEM X EINS X INFRGT X DREI X AUF FLIEGER STRASZE MIT ANFANG X EINS SEQS X KM X KM X OSTW X KAMENEC X K

Adjusted for german symbols

3 GEHT LANGSAM ABER SICHER VORWÄRST 17 06 UHR RÖM 1 IFRGT 3 AUF FLIEGERSTRAßE MIT ANFANG 16 KM KM OSTW KAMENEC K


Enigma Instruction Manual, 1930, msg key - ABL

Reflector: A Wheel order: II I III Ring positions: 24 13 22 Plug pairs: AM FI NV PS TU WZ

Raw decrypted message

FEINDLIQE INFANTERIEKOLONNE BEOBAQTET X ANFANG SEDD AUSGANG BAER WALDE X ENDE DREI KMOST WAERTS NEUSTADT

Adjusted for german symbols

FEINDLICHE INFANTERIEKOLONNE BEOBACHTET ANFANG SEDD AUSGANG BÄR WALDE ENDE 3 KMOST WÄRTS NEUSTADT


Scharnhorst (Konteradmiral Erdich Bey), 1943, msg key - UZV

Reflector: B Wheel order: III VI VIII Ring positions: 01 08 13 Plug pairs: AN EZ HK IJ LR MQ OT PV SW UX

Raw decrypted message

STEUERE J TANA FJORD J AN STAN DORT QU AAA CCC VIER NEUN NEUN ZWO FAHRT ZWO NUL SMXX SCHARNHORST HCO


FAQ

  • If you have any questions, visit the wiki first (mostly incomplete!) or PM me.

License

About

Enigma encryption machine emulation in Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •