Crates.io | enigma_shark |
lib.rs | enigma_shark |
version | 0.1.0 |
source | src |
created_at | 2023-10-22 20:08:38.764039 |
updated_at | 2023-10-22 20:08:38.764039 |
description | UNIX friendly CLI Enigma |
homepage | |
repository | |
max_upload_size | |
id | 1010789 |
size | 256,215 |
A CLI Enigma tool named after the "Shark" Blackout of 1942, when the Kriegsmarine added a fourth rotor to their Enigma machines stymieing Bletchley Park's efforts to decipher Atlantic U-boat communications for nearly 10 months.
System wide:
$ curl -sSL https://github.com/mattlianje/shark/blob/main/install.sh | bash
# Checks system wide install was successful
$ enigma --help
Build source:
$ git clone https://github.com/mattlianje/shark.git
$ cd shark
$ cargo build --release
$ echo "HELLOWORLD" | ./target/release/enigma
# Will output
ZWMRGTTIIZ
# Chain enigma with other commands
$ echo "HELLO" | enigma | grep "FOO"
# Use your custom settings
$ cat config.json
{
"rotors": [
{"type_": "type_i", "position": "A", "ring_setting": "A"},
{"type_": "type_ii", "position": "B", "ring_setting": "A"},
{"type_": "type_iii", "position": "C", "ring_setting": "A"}
],
"reflector": "ukw_b",
"plugboard": [{"from": "A", "to": "B"}]
}
# Use these settings easily
$ enigma --input plaintext.txt --config config.json > encrypted.txt
shark
and making use of Rust's concurrency. Shark processes data in chunks, making it suitable for large datasets and > 50x faster on 5MB inputs than other C++ cli enigmas.Encryption times for 5MB of data:
Tool | Time (ms) |
---|---|
shark | 53 |
C++ cli | 2693 |