Coder Social home page Coder Social logo

enigma-python's Introduction

Enigma Python library

About

Welcome to enigmapython, a Python package designed to emulate the legendary Enigma cryptographic machine used during World War II. enigmapython provides a faithful implementation of the Enigma machine, allowing users to explore and understand the workings of this historic device.

Key Features

  • Flexible Configuration: enigmapython allows customization of the Enigma machine configuration, enabling users to experiment with different rotor settings, reflectors, and ring positions.
  • Easy Extension: enigmapython is designed to be easily extensible, allowing developers to add new features or enhance the existing implementation.
  • Simple yet faithful: don't be fooled by its simplicity; enigmapython implements 100% the algorithms of many Enigma machine models, allowing to decode a message that has been encoded by a real Enigma machine and also the contrary.

Machines implementations

The following Enigma machine models (along with their rotors, reflectors and plugboards) have been implemented:

Enigma I

Scrambler Wiring Notch Implemented
Plugboard (passthrough+swappable) N/A N/A
ETW (passthrough) abcdefghijklmnopqrstuvwxyz N/A
Rotor I ekmflgdqvzntowyhxuspaibrcj q
Rotor II ajdksiruxblhwtmcqgznpyfvoe e
Rotor III bdfhjlcprtxvznyeiwgakmusqo v
Reflector A ejmzalyxvbwfcrquontspikhgd N/A
Reflector B yruhqsldpxngokmiebfzcwvjat N/A
Reflector C fvpjiaoyedrzxwgctkuqsbnmhl N/A

Enigma I Norway (Norenigma)

Scrambler Wiring Notch Implemented
Plugboard (passthrough+swappable) N/A N/A
ETW (passthrough) abcdefghijklmnopqrstuvwxyz N/A
Rotor I wtokasuyvrbxjhqcpzefmdinlg q
Rotor II gjlpubswemctqvhxaofzdrkyni e
Rotor III jwfmhnbpusdytixvzgrqlaoekc v
Rotor IV fgzjmvxepbwshqtliudykcnrao j
Rotor V hejxqotzbvfdascilwpgynmurk z
Reflector UKW mowjypuxndsraibfvlkzgqchet N/A

Enigma I Sondermaschine (special machine)

Scrambler Wiring Notch Implemented
Plugboard (passthrough+swappable) N/A N/A
ETW (passthrough) abcdefghijklmnopqrstuvwxyz N/A
Rotor I veosirzujdqckgwypnxaflthmb q
Rotor II uemoatqlshpkcyfwjzbgvxidnr e
Rotor III tzhxmbsipnurjfdkeqvcwglaoy v
Reflector UKW ciagsndrbytpzfulvhekoqxwjm N/A

Enigma M3

Scrambler Wiring Notch Implemented
Plugboard (passthrough+swappable) N/A N/A
ETW (passthrough) abcdefghijklmnopqrstuvwxyz N/A
Rotor I ekmflgdqvzntowyhxuspaibrcj q
Rotor II ajdksiruxblhwtmcqgznpyfvoe e
Rotor III bdfhjlcprtxvznyeiwgakmusqo v
Rotor IV esovpzjayquirhxlnftgkdcmwb j
Rotor V vzbrgityupsdnhlxawmjqofeck z
Rotor VI jpgvoumfyqbenhzrdkasxlictw m, z
Rotor VII nzjhgrcxmyswboufaivlpekqdt m, z
Rotor VIII fkqhtlxocbjspdzramewniuygv m, z
Reflector B yruhqsldpxngokmiebfzcwvjat N/A
Reflector C fvpjiaoyedrzxwgctkuqsbnmhl N/A

Enigma M4

Scrambler Wiring Notch Implemented
Plugboard (passthrough+swappable) N/A N/A
ETW (passthrough) abcdefghijklmnopqrstuvwxyz N/A
Rotor I ekmflgdqvzntowyhxuspaibrcj q
Rotor II ajdksiruxblhwtmcqgznpyfvoe e
Rotor III bdfhjlcprtxvznyeiwgakmusqo v
Rotor IV esovpzjayquirhxlnftgkdcmwb j
Rotor V vzbrgityupsdnhlxawmjqofeck z
Rotor VI jpgvoumfyqbenhzrdkasxlictw m, z
Rotor VII nzjhgrcxmyswboufaivlpekqdt m, z
Rotor VIII fkqhtlxocbjspdzramewniuygv m, z
Beta leyjvcnixwpbqmdrtakzgfuhos N/A
Gamma fsokanuerhmbtiycwlqpzxvgjd N/A
Reflector B Thin enkqauywjicopblmdxzvfthrgs N/A
Reflector C Thin rdobjntkvehmlfcwzaxgyipsuq N/A

Prerequisites

  • Python 3.11
  • Clone this repo, checkout the desired branch/tag and install requirements (pip install -r requirements.txt) or directly from PyPI using pip install enigmapython

Getting started

Please have a look of the examples folder

Documentation

TBD, for now... code (and comments) are the documentation

Credits/references

enigma-python's People

Contributors

denismaggior8 avatar

Stargazers

Andrea Carratta avatar Marco avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.