Skip to content

fathiabdelmalek/polygraphia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.0"

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages