linclark / ultra

Cryptanalysis of the Enigma in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ultra Build Status crates.io docs.rs License

Cryptanalysis of the Enigma in Rust.

Installation

ultra can be installed from crates.io using Cargo:

$ cargo install ultra

Usage

Encrypt a message with rotors 1-4-2, key setting DOG, and ring setting CAT:

$ ultra --rotor=142 --key=DOG --ring=CAT ${message}

Encrypt a message using random Enigma settings:

$ ultra --randomize ${message}

Attempt to decrypt a given piece of ciphertext:

$ ultra --decrypt ${message}

Note: Decryption relies on quadgram frequencies to infer the original Enigma machine settings; as a result, it is very likely that short messages will be decrypted incorrectly. Additionally, decryption will not work for messages that were encrypted with any plugboard plugs active.

References

This project's quadgram data and decryption algorithm is based on James Lyons' articles about the Enigma machine.

License

ultra is licensed under the MIT License.

About

Cryptanalysis of the Enigma in Rust.

License:MIT License


Languages

Language:Rust 99.5%Language:Makefile 0.5%