Skip to main content

Package for decrypting messages with an enigma machine

Project description

De(s)cription

This is a python package for enrypting messages with the historic enigma machine. I spent quite some time trying to find a suitable existing project and ended up implementing it myself.

This library answers the question no one asked:

"How can I annoy my surroundings by sending them trivial encrypted messages and make them go through the process of deciphering?"

No dependecies to other python packages necessary to decrypt messages and free for use and further adaption (MIT license).

Usage

from enigmator import (ROTOR_I, ROTOR_II, ROTOR_III, ROTOR_IV, ROTOR_V,
                       REFLECTOR_A, REFLECTOR_B, REFLECTOR_C,
                       Enigma,
                       Plugboard)

EnigmaMachine = Enigma(reflector=REFLECTOR_B, 
                       left_rotor=ROTOR_III, 
                       middle_rotor=ROTOR_II, 
                       right_rotor=ROTOR_I, 
                       rotor_positions="16 10 1",
                       ring_positions="3 1 17",
                       plugboard=Plugboard("CE KL FP MD")
                       )

x=EnigmaMachine.encipher('Jeder Mensch sollte wissen, wie man Enigma-Maschine verwendet.')

print('Result is:')
print(x)

Result is:

LVUBS FKTKJZ EXDYQP XFYEHV, AZS BVR WBGXXW-CTYXLRDK LMTLDALNQ.

To decipher back to plain text, just pass the decypted text back into the EnigmaMachine:

EnigmaMachine.encipher('LVUBS FKTKJZ EXDYQP XFYEHV, AZS BVR WBGXXW-CTYXLRDK LMTLDALNQ.')

Resources & Acknowledgment:

https://web.archive.org/web/20060720040135/http://members.fortunecity.com/jpeschel/gillog1.htm

http://www.softdoc.de/mr/de/downloads/files/EnigmaTechnischeDetails.pdf

https://www.youtube.com/watch?v=RzWB5jL5RX0

https://github.com/mikepound/enigma

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enigmator-1.0.4.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enigmator-1.0.4-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file enigmator-1.0.4.tar.gz.

File metadata

  • Download URL: enigmator-1.0.4.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.7

File hashes

Hashes for enigmator-1.0.4.tar.gz
Algorithm Hash digest
SHA256 e6227ba814cbeee6973a4913e61c56391d22859ed5dcfddbdac29642b24082a1
MD5 2f5a6e49dffd158bf617384930ce6943
BLAKE2b-256 7648a0d7947d2bbf795c11a668a3de195305a01c066e269a7c7c434faad43e7b

See more details on using hashes here.

File details

Details for the file enigmator-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: enigmator-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.7

File hashes

Hashes for enigmator-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a7d53539054b1fefbcc24e5a3cc1a83b3bd3d0a961f2df5289b03c1b625b2260
MD5 6be0980625c7fdc82fdde31de773bf24
BLAKE2b-256 5e7a5293371a4ad6b692a04fbde374e50bd6b1417c04fcdb2ab64ede5168b3f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page