Skip to content

namoumita/Investigation_Enigma_Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Investigation: Enigma Cipher Machine

A mathematical investigation and simulation of the World War II Enigma cipher machine, implemented in SageMath using permutation-based cipher logic.

Overview

The Enigma machine was a rotor-based electromechanical cipher device used by Nazi Germany during WWII. This project investigates its mathematical underpinnings and implements a working 3-rotor simulation from scratch.

What's Implemented

  • Full 3-rotor Enigma machine simulation using permutation group theory
  • Rotor wiring, stepping mechanism, and reflector logic
  • Plugboard (Steckerbrett) configuration
  • Encryption and decryption demonstration

Tech Stack

  • SageMath — permutation groups and mathematical cipher logic
  • Jupyter Notebook — documentation and walkthrough
  • GitHub — version control

Files

File Description
Enigma.sws Original SageMath worksheet (run in SageMath environment)
Enigma.ipynb Jupyter notebook version for viewing on GitHub

Running the Code

The .sws file requires a SageMath environment to execute. The .ipynb file can be viewed directly on GitHub and contains the full mathematical explanation alongside the code.

Key Concepts

  • Permutation-based substitution ciphers
  • Rotor stepping and double-stepping mechanism
  • Symmetric encryption via reflector design
  • Historical cryptanalysis context

Context

Completed as part of the Master of Data Science programme at La Trobe University (April – May 2025).

Releases

No releases published

Packages

 
 
 

Contributors