Skip to content

erictreacy/Enigma-Machine

Repository files navigation

🔐 Enigma Machine Simulator

A historically accurate recreation of the German Enigma M3 cipher machine used during World War II. This interactive web application allows you to experience the complexity and ingenuity of one of history's most famous encryption devices.

Deployed on Vercel Built with v0

🎯 Features

Authentic Historical Recreation

  • Accurate Rotor Mechanics: Implements the exact wiring patterns of historical rotors I-V
  • Reflector B Configuration: Uses the most common reflector used by German forces
  • Double-Stepping Mechanism: Includes the famous rotor stepping anomaly
  • Plugboard System: Full 26-letter plugboard with visual cable connections
  • German Interface: Authentic German labels and terminology

Interactive Experience

  • Visual Feedback: Watch rotors turn and lamps light up in real-time
  • Realistic Design: Styled to look like the actual machine
  • Responsive Controls: Click keyboard keys and see immediate encryption
  • Historical Accuracy: Operates exactly like the original machine

Educational Content

  • Comprehensive Instructions: Bilingual German/English operating manual
  • Historical Context: Learn about WWII cryptography and code-breaking
  • Step-by-Step Tutorial: Guided examples for beginners
  • Security Analysis: Understand why Enigma was eventually broken

🚀 Quick Start

  1. Visit the Live Demo: https://vercel.com/eric-treacys-projects/v0-enigma-machine

  2. Basic Setup for Testing:

    • Set rotors to I-II-III
    • Set all positions to A-A-A
    • Leave plugboard empty
    • Start typing!
  3. Try the Example:

    • Type "HELLO" → Get "GCBLA"
    • Reset to A-A-A and type "GCBLA" → Get "HELLO" back!

🎮 How to Use

1. Configure the Machine

  • Rotors: Select 3 different rotors (I-V) and set their positions
  • Plugboard: Connect letter pairs using the quick-connect buttons
  • Ring Settings: Adjust internal wiring offsets (advanced)

2. Encrypt Messages

  • Click keyboard keys to input your message
  • Watch the lamp board light up with encrypted letters
  • Rotors automatically advance after each letter

3. Decrypt Messages

  • Use the same settings as encryption
  • Type the encrypted message to get the original back
  • Enigma is a reciprocal cipher - encryption = decryption

🏛️ Historical Significance

The Enigma machine was Nazi Germany's primary encryption device during WWII, used to secure military communications across all branches of the Wehrmacht. Breaking the Enigma code was one of the greatest cryptographic achievements in history, involving brilliant minds like Alan Turing at Bletchley Park.

Key Historical Facts:

  • Used by: German military, navy, and intelligence services
  • Period: 1930s-1945
  • Complexity: 158,962,555,217,826,360,000 possible settings
  • Broken by: Allied cryptanalysts using mathematical analysis and early computers
  • Impact: Shortened WWII by an estimated 2-4 years

🔧 Technical Implementation

Cryptographic Accuracy

  • Implements authentic rotor wiring patterns from historical documents
  • Correct stepping mechanism including the double-stepping anomaly
  • Accurate plugboard substitution cipher
  • Proper reflector implementation (Reflector B)

Modern Web Technologies

  • React/Next.js: Modern component-based architecture
  • TypeScript: Type-safe implementation
  • Tailwind CSS: Responsive, authentic styling
  • Vercel: Fast, reliable deployment

📚 Educational Value

This simulator serves as:

  • Historical Education: Learn about WWII cryptography
  • Computer Science: Understand cipher mechanics and cryptanalysis
  • Mathematics: Explore permutations and substitution ciphers
  • Engineering: Appreciate mechanical computing ingenuity

🎓 Learning Resources

The application includes:

  • Operating Manual: Complete bilingual instructions
  • Historical Context: Background on Enigma's development and use
  • Security Analysis: Why and how Enigma was broken
  • Practical Examples: Step-by-step encryption/decryption demos

🔗 Links

🤝 Contributing

This project was built using v0.dev's AI-powered development platform. To contribute or modify:

  1. Visit the v0.dev project
  2. Make changes through the v0 interface
  3. Changes automatically sync to this repository
  4. Vercel deploys updates automatically

📜 License

This educational project is open source. The Enigma machine design is historical and in the public domain.

🙏 Acknowledgments

  • Alan Turing and the Bletchley Park codebreakers
  • Historical documentation from cryptographic archives
  • v0.dev for the development platform
  • Vercel for hosting and deployment

"The Enigma machine is a reminder that even the most sophisticated security can be broken through mathematical insight, persistent effort, and collaborative intelligence."

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •