Giter Site home page Giter Site logo

enigma's Introduction

enigma

An implementation of the Enigma Machine written in rust

The Enigma machine is a cipher device developed and used in the early- to mid-20th century to protect commercial, diplomatic, and military communication. It was employed extensively by Nazi Germany during World War II, in all branches of the German military. The Enigma machine was considered so secure that it was used to encipher the most top-secret messages.

Installation

  • Install Rust
  • run cargo install libenigma
  • run libenigma -h for usage instructions

Tests

run cargo test

Benchmarks

run cargo bench

Usage

  • -i Input file: Path to input text file
  • -c Config file: Path to config file. If a config file does not exist at this path, a config file will be generated a written to this path
  • -o Output file: Path to output ciphertext
  • -h Help: Help information- Output information on usage of CLI
  • -v Version: Output version information

enigma's People

Contributors

thatnerduknow avatar

Watchers

 avatar

enigma's Issues

TODO: Better CLI

The current state of main.rs doesn't allow user input. I need to look into allowing the user to configure the machine and pass a message through using the cli alone or possibly through a TUI

TODO: Implement plugboard

I need to implement the plugboard mechanism. I am thinking of defining a struct called Plug which is implemented as [char;2]. The plugs are then collected into a vec of length 0 >= && <= 10. The plugs are then used to build out a cipher string which should pass validation for the RotorCipher type.

TODO: modify prae verification for better error messages

Currently i'm using the ensure closure for the prae define! macro which only returns a boolean.
If I define a custom error enum and implement the Display trait on that enum I can instead use the verify closure on the define! macro which would enable better error messages and as a side benefit, would make the verification code easier to read

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.