Coder Social home page Coder Social logo

urocyonf / enigma_simulator Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 674 KB

This project is a school project. The goal is to create a program that can encrypt and decrypt a message like the Enigma machine did.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
enigma enigma-machine enigma-simulator python python3 tkinter tkinter-python python-3

enigma_simulator's Introduction

Enigma simulator - 2021 / 2022

Table of contents

  1. General Information
  2. Technologies
  3. Files Organisation
  4. How to use

General Informations

This project is a school project. The goal is to create a program that can encrypt and decrypt a message like the Enigma machine did. The program must be able to encrypt and decrypt a message using the following parameters:

  • The message to encrypt or decrypt,
  • The choice of rotors,
  • The position of the rotors,
  • The choice of reflector,
  • The number of plugboards,
  • The position of the plugboards.

The parameters can be entered manually or by using a QR code. And all the display of the program must be done using tkinter.

The main screen will able the user to see the current state of the machine, the message to encrypt or decrypt, the current position of the rotors, the current position of the reflector and the current position of the plugboards.

The option screen will allow the user to choose the different parameters of the Enigma machine. It will also allow the user to choose if he wants to enter the parameters manually or by using a QR code.


Technologies

A list of technologies used within the project:


Files Organisation

The project is organised as follow:

├── main.py
├── files
│   ├── EnigmComputAuto.py
│   ├── EnigmFonctionAuto.py
│   └── EnigmInputAuto.py
├── images
│   └──  enigma.ico
├── QRcode
│   ├── QRCparametre.png
╵   └── QRCparametre1.png

This file is the main file of the project. It contains the main loop of the program. It also contains the function that allows to create the window of the program, it will call the other files to create the different windows of the program and compute the encryption or decryption of the message.

This file contains the function that will compute the encryption or decryption of the message step by step.

This file contains the different functions that will be used in the program, mostly used for the display of the different parts of the program.

This file contains the function that will allow the user to enter the different parameters of the Enigma machine, manually or by using a QR code. It will also check if the parameters entered are valid.

This file is the icon to be used by tkinter to display the icon of the program.

This folder contains the QR codes that can be used to enter the parameters of the Enigma machine. There is already two exemples of QR code provided in the folder.


How to use

Main screen

The main screen of the program look like this:

Main Screen The different parts of the screen are:

  • In the left panel :
    • The current position of the reflector,
    • The current position of the three rotors,
    • The current position of the plugboards.
  • In the right panel :
    • The message to encrypt or decrypt,
    • The button to encrypt or decrypt the message,
    • The button to go to the option screen,
    • The button to apply again the last parameters entered,
    • The encrypted or decrypted message.

Option screen

The option screen of the program look like this:

Option Screen The different parts of the screen are:

  • The two top button :
    • The button to randomize the parameters,
    • The button to enter the parameters with a QR code.
  • The four parameters :
    • The choice of the letters linked by the plugboards,
    • The choice of the rotors,
    • The choice of the position of the rotors,
    • The choice of the reflector.
  • The three bottom button :
    • The button to go back to the main screen,
    • The button to save the parameters as a QR code,
    • The button to apply the parameters.

Use step by step

  1. Go to the option screen and choose the parameters of the machine if you want to.

  2. Enter the message to encrypt in the main screen.

  3. Click on the button to encrypt the message.

  4. The encrypted message will appear in the right part of the screen.

  5. If you want to decrypt the message, enter the encrypted message in the right part of the screen (you should copy the encrypted message).

  6. Click on the button to apply the last parameters entered.

  7. Click on the button to decrypt the message.

  8. The decrypted message will appear in the right part of the screen again.

enigma_simulator's People

Contributors

urocyonf avatar

Stargazers

 avatar  avatar  avatar  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.