Skip to content

hoefler02/enigma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Enigma Machine in Python

A full Enigma implememtation in Python.

Example

#!/usr/bin/env python3

from enigma import *

rf = Reflector('EJMZALYXVBWFCRQUONTSPIKHGD')

r1 = Rotor('EKMFLGDQVZNTOWYHXUSPAIBRCJ', 13, 3)
r2 = Rotor('AJDKSIRUXBLHWTMCQGZNPYFVOE', 10, 9)
r3 = Rotor('BDFHJLCPRTXVZNYEIWGAKMUSQO', 24, 5)

machine = EnigmaMachine([r1, r2, r3], rf)

message = 'JFMKWTXUUQ'

print(machine.decrypt(message)) # HELLOWORLD

About

an enigma implementation in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages