Skip to content

This project is a simple implementation of the Enigma machine in Rust. It allows users to input a message, configure the rotor and reflector settings, and encrypt or decrypt the message.

License

Notifications You must be signed in to change notification settings

Gausix/Enigmify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enigma Simulator in Rust

This project is a simple implementation of the Enigma machine in Rust. It allows users to input a message, configure the rotor and reflector settings, and encrypt or decrypt the message.

Installation

Ensure you have Rust installed on your system. If not, install it using rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

After installing Rust, install the crate:

cargo install enigmify

Usage

Run the program:

enigmify

The program will prompt you to enter:

  1. The message to encrypt.
  2. The wiring configuration for rotor 1.
  3. The wiring configuration for rotor 2.
  4. The wiring configuration for the reflector.

Example input:

Enter the message to encrypt:
HELLO
Enter rotor 1 wiring:
EKMFLGDQVZNTOWYHXUSPAIBRCJ
Enter rotor 2 wiring:
AJDKSIRUXBLHWTMCQGZNPYFVOE
Enter reflector wiring:
YRUHQSLDPXNGOKMIEBFZCWVJAT

Example output:

Encrypted: ZEBBW
Decrypted: HELLO

How It Works

  • The rotors shift characters based on predefined wiring and rotate with each encryption step.
  • The reflector substitutes letters in a symmetric manner.
  • The encryption process is reversible, meaning decrypting an encrypted message with the same settings will return the original message.

License

This project is licensed under the MIT License.

About

This project is a simple implementation of the Enigma machine in Rust. It allows users to input a message, configure the rotor and reflector settings, and encrypt or decrypt the message.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages