Crate cipher_crypt [] [src]

A cryptographic tomb of ciphers forgotten by time.

Example usage

extern crate cipher_crypt;

use cipher_crypt::Cipher;
use cipher_crypt::Caesar;
use cipher_crypt::ROT13;

fn main(){
  let m1 = "I am my own inverse";
  assert_eq!(m1, ROT13::apply(&ROT13::apply(m1)));

  let m2 = "Attack at dawn 🗡️";
  let c = Caesar::new(3).unwrap();
  assert_eq!(m2, c.decrypt(&c.encrypt(m2).unwrap()).unwrap());
}

Disclaimer

There's a reason these archaic methods are no longer used - its because they are extremely easy to crack! Intended for learning purposes only, these ciphers should not be used to encrypt data of any real value.

Reexports

pub use caesar::Caesar;
pub use vigenere::Vigenere;
pub use railfence::Railfence;
pub use rot13 as ROT13;

Modules

caesar

The Caesar cipher is named after Julius Caesar, who used it (allegedy) with a shift of three to protect messages of military significance.

railfence

The Railfence Cipher is a transposition cipher. It has a very low keyspace and is therefore incredibly insecure.

rot13

ROT13 ("rotate by 13 places"), is a simple implementation of the Caesar cipher. It substitutes a letter with the one 13 places after it in the alphabet.

vigenere

The Vigenère Cipher is a polyalphabetic substitution cipher. It was considered 'le chiffre indéchiffrable' for 300 years until Friedrich Kasiski broke it in 1863.

Traits

Cipher