A comprehensive Rust library for classical and modern cryptographic algorithms.
- Classical Ciphers: Caesar, Affine, Hill, Playfair
- Text Modes: Preserve all characters or alphabetic only
- Key Derivation: PBKDF2-HMAC-SHA512/256
- FFI Support: C-compatible shared library (coming soon!)
- Type-Safe: Leverages Rust's type system for security
Add to your Cargo.toml:
[dependencies]
polygraphia = "0.1.0"use polygraphia::classical::Caesar;
use polygraphia::traits::Cipher;
let cipher = Caesar::new(3);
let encrypted = cipher.encrypt("hello")?;
let decrypted = cipher.decrypt(&encrypted)?;use polygraphia::classical::Caesar;
let cipher = Caesar::new(3);use polygraphia::classical::Affine;
let cipher = Affine::new(5, 8)?;use polygraphia::classical::Playfair;
let cipher = Playfair::new("secret")?;use polygraphia::classical::Hill;
let cipher = Hill::new("hill")?;Apache-2.0