polygraphia

Crates.iopolygraphia
lib.rspolygraphia
version0.1.1
created_at2025-12-25 00:00:34.854756+00
updated_at2026-01-25 21:34:51.980985+00
descriptionA comprehensive library for classical and modern cryptographic algorithms.
homepagehttps://github.com/fathiabdelmalek/polygraphia
repositoryhttps://github.com/fathiabdelmalek/polygraphia
max_upload_size
id2004025
size84,555
Fathi Abdelmalek (fathiabdelmalek)

documentation

https://docs.rs/polygraphia

README

Polygraphia

A comprehensive Rust library for classical and modern cryptographic algorithms.

Features

  • 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

Installation

Add to your Cargo.toml:

[dependencies]
polygraphia = "0.1.1"

Quick Start

use polygraphia::classical::Caesar;
use polygraphia::traits::Cipher;

let cipher = Caesar::new(3);
let encrypted = cipher.encrypt("hello")?;
let decrypted = cipher.decrypt(&encrypted)?;

Algorithms

Caesar Cipher

use polygraphia::classical::Caesar;
let cipher = Caesar::new(3);

Affine Cipher

use polygraphia::classical::Affine;
let cipher = Affine::new(5, 8)?;

Playfair Cipher

use polygraphia::classical::Playfair;
let cipher = Playfair::new("secret")?;

Hill Cipher

use polygraphia::classical::Hill;
let cipher = Hill::new("hill")?;

License

Apache-2.0

Commit count: 7

cargo fmt