#cipher #classical #crypto #caesar #adfgvx

cipher-crypt

A cryptographic tomb of ciphers forgotten by time

24 releases (breaking)

0.18.0 Oct 3, 2019
0.17.0 Dec 9, 2018
0.16.0 Nov 30, 2018
0.14.0 May 21, 2018
0.8.0 Jul 18, 2017

#369 in Cryptography

Download history 5/week @ 2021-06-28 4/week @ 2021-07-05 2/week @ 2021-07-12 50/week @ 2021-07-19 29/week @ 2021-07-26 54/week @ 2021-08-02 5/week @ 2021-08-09 27/week @ 2021-08-16 9/week @ 2021-08-23 5/week @ 2021-08-30 6/week @ 2021-09-06 6/week @ 2021-09-13 4/week @ 2021-09-20 29/week @ 2021-09-27 2/week @ 2021-10-04 7/week @ 2021-10-11

103 downloads per month

MIT/Apache

155KB
2.5K SLoC

Cipher-crypt

Crates.io Documentation Build Status

A library of historic cryptographic algorithms implemented in rust.

Usage

Importing this crypt of ciphers is as easy as adding the following to your Cargo.toml:

[dependencies]
cipher-crypt = "^0.16"

Using the crate as such:

extern crate cipher_crypt;

use cipher_crypt::{Cipher, Caesar};

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

Ciphers

The crypt only contains a few ciphers, but with time (and your help) it will have even more! A list of what is planned for the future and what is currently implemented is as follows.

  • ADFGVX
  • Affine
  • Autokey
  • Baconian
  • Caesar
  • Columnar Transposition
  • Fractionated Morse
  • Hill
  • Playfair
  • Polybius Square
  • Porta
  • Rail-fence
  • ROT13
  • Scytale
  • Vigenère
  • Bifid
  • Four-Square
  • Homophonic
  • Straddle Checkerboard
  • Trifid

Contributions

Contributions are extremely welcome. A good place to start would be helping to implement new algorithms. General cleanup and improvements of the code would also be greatly appreciated.

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.

Dependencies

~1.5MB
~25K SLoC