The Premier Community-Driven Educational & Learning Repository for Cryptography Algorithms
Master cryptography from first principles: from classical Caesar ciphers to modern AES, RSA, zero-knowledge proofs, and NIST post-quantum standards.
Warning
CipherForge is strictly designed for educational, academic, and research purposes. Algorithms and sample scripts illustrate underlying mathematics, attack surfaces, and historical evolution. They have not undergone formal security audits and must not be used to protect production data or secrets. For production systems, always rely on audited, battle-tested implementations such as cryptography (Python), libsodium, or Google's Tink.
- π CipherForge
- π Table of Contents
- π Curriculum & Master Algorithm Index
- Level 01: Classical & Historical Ciphers
- Level 02: Symmetric Key Cryptography
- Level 03: Asymmetric / Public Key & Key Exchange
- Level 04: Cryptographic Hashing, MACs & AEAD
- Level 05: Digital Signatures & Protocols
- Level 06: Password Hashing & Key Derivation (KDF)
- Level 07: Modern, Advanced & Post-Quantum Cryptography
- Level 08: Capstone Project (SecureVault CLI)
- π Getting Started
- π― Track Your Progress & Curated Paths
- π€ Contributing & Good First Issues
- β Show Your Support
- π License
Pen-and-paper ciphers, modular arithmetic, frequency analysis, and rotor machines.
π Level 01 Guide & Documentation
| Algorithm | Category | Description | Source File |
|---|---|---|---|
| Caesar Cipher | Substitution | Shift cipher over |
level-01-classical-ciphers/traditional-ciphers/Caesar.py |
| Vigenère Cipher | Polyalphabetic | Repeating keyword shift with Kasiski examination | level-01-classical-ciphers/traditional-ciphers/Vigenere.py |
| Playfair Cipher | Digraph Substitution | 5Γ5 key matrix digram substitution cipher | level-01-classical-ciphers/traditional-ciphers/Playfair.py |
| Hill Cipher | Linear Algebra | Matrix transformation modulo 26 & modular inverse | level-01-classical-ciphers/traditional-ciphers/Hill.py |
| Enigma Machine | Rotor Machine | WWII electro-mechanical rotor simulation & reflector | level-01-classical-ciphers/traditional-ciphers/Enigma.py |
| Rail Fence Cipher | Transposition | Zigzag geometric transposition & rail depth analyzer | level-01-classical-ciphers/traditional-ciphers/rail_fence.py |
Block ciphers, Feistel networks, SPN structures, cipher modes, and stream ciphers.
π Level 02 Guide & Documentation
| Subcategory | Algorithms Included | Source Directory |
|---|---|---|
| Block Ciphers | AES (128/192/256), DES, 3DES, Blowfish, Twofish, Camellia, IDEA, RC5, RC6, Serpent, Magma, Kuznyechik | level-02-symmetric-crypto/block-ciphers/ |
| Cipher Modes | ECB (insecure demo), CBC, CFB, OFB, CTR, GCM (AEAD), CCM (AEAD), XTS (disk encryption) | level-02-symmetric-crypto/cipher-modes/ |
| Stream Ciphers | ChaCha20 (RFC 8439), Salsa20, RC4 (broken), HC-128, Rabbit, A5/1 (GSM) | level-02-symmetric-crypto/stream-ciphers/ |
Trapdoor one-way functions: Integer Factorization, Discrete Logarithms, and Elliptic Curves.
π Level 03 Guide & Documentation
| Subcategory | Algorithms Included | Source Directory |
|---|---|---|
| Public Key Encryption | RSA (OAEP), ElGamal, Rabin Cryptosystem, Paillier Additive Homomorphism | level-03-asymmetric-crypto/public-key-encryption/ |
| Key Agreement | Diffie-Hellman (DH), Elliptic Curve Diffie-Hellman (ECDH), X25519, MQV | level-03-asymmetric-crypto/key-exchange/ |
| Elliptic Curves | Curve25519, Twisted Edwards Ed25519, Weierstrass ECDSA point multiplication | level-03-asymmetric-crypto/elliptic-curves/ |
Collision resistance, Merkle-DamgΓ₯rd vs. Sponge, message authentication, and authenticated encryption.
π Level 04 Guide & Documentation
| Subcategory | Algorithms Included | Source Directory |
|---|---|---|
| Hash Functions | MD5, SHA-1, SHA-2 (224/256/384/512), SHA-3 (Keccak), BLAKE2, BLAKE3, RIPEMD-160, Whirlpool, Tiger | level-04-hashing-and-macs/hash-functions/ |
| Message Authentication | HMAC (SHA-256), CMAC (NIST SP 800-38B), GMAC (Galois MAC), Poly1305 ( |
level-04-hashing-and-macs/message-authentication/ |
| Authenticated Encryption | AES-GCM, AES-CCM, ChaCha20-Poly1305, AES-OCB | level-04-hashing-and-macs/authenticated-encryption/ |
Non-repudiation, deterministic signing, Schnorr aggregation, and network handshake simulations.
π Level 05 Guide & Documentation
| Subcategory | Algorithms Included | Source Directory |
|---|---|---|
| Digital Signatures | RSA-PSS / PKCS#1 v1.5, DSA (FIPS 186-4), ECDSA (secp256k1), Ed25519 (EdDSA), Schnorr (BIP-340) | level-05-signatures-and-protocols/digital-signatures/ |
| Secure Protocols | TLS 1.3 Handshake simulation, SSH-2 Key Exchange, IPsec IKEv2, PGP / OpenPGP Hybrid, Kerberos | level-05-signatures-and-protocols/protocols/ |
Memory-hard functions, GPU/ASIC resistance, salting best practices, and protocol key derivation.
π Level 06 Guide & Documentation
| Algorithm | Standard | Core Defense Concept | Source File |
|---|---|---|---|
| PBKDF2 | RFC 2898 / NIST SP 800-132 | Iteration stretching (600,000+ rounds) with HMAC-SHA256 | level-06-password-and-kdf/kdf-algorithms/pbkdf2.py |
| BCrypt | Eksblowfish (OpenBSD) | Adaptive work factor ( |
level-06-password-and-kdf/kdf-algorithms/bcrypt_module.py |
| Scrypt | RFC 7914 (Colin Percival) | Memory-hard RAM caching ( |
level-06-password-and-kdf/kdf-algorithms/scrypt_module.py |
| Argon2 | RFC 9106 (PHC Winner) | Hybrid Argon2id / Argon2i / Argon2d memory-time defense | level-06-password-and-kdf/kdf-algorithms/argon2_module.py |
| HKDF | RFC 5869 Extract-and-Expand | Domain-separated multi-key expansion for TLS 1.3 & Signal | level-06-password-and-kdf/kdf-algorithms/hkdf_module.py |
Quantum-resistant schemes, homomorphic computation, multi-party computation, and zero-knowledge proofs.
π Level 07 Guide & Documentation
| Subcategory | Schemes Included | Source Directory |
|---|---|---|
| Post-Quantum KEMs | CRYSTALS-Kyber (ML-KEM / FIPS 203), NTRU, Classic McEliece | level-07-advanced-and-pqc/post-quantum-kems/ |
| Post-Quantum Signatures | CRYSTALS-Dilithium (ML-DSA / FIPS 204), Falcon (FN-DSA), SPHINCS+ (SLH-DSA / FIPS 205) | level-07-advanced-and-pqc/post-quantum-signatures/ |
| Homomorphic Encryption | Paillier Additive Homomorphism (PHE), BFV / CKKS Fully Homomorphic (FHE) | level-07-advanced-and-pqc/homomorphic-encryption/ |
| Secret Sharing & MPC | Shamir's |
level-07-advanced-and-pqc/secret-sharing/ |
| Zero-Knowledge Proofs | Interactive Schnorr ZKP, non-interactive zk-SNARKs (Groth16), zk-STARKs | level-07-advanced-and-pqc/zero-knowledge-proofs/ |
End-to-End Encrypted File Vault and Secure Messaging CLI.
π Level 08 Architecture & Roadmap
- π Authenticated File Vault: Encrypt and decrypt arbitrary files using AES-256-GCM or ChaCha20-Poly1305 with PBKDF2/Argon2 key derivation and binary header verification.
- π¨ Asymmetric E2EE Messaging Envelope: Ephemeral X25519 ECDH agreement + HKDF-SHA256 session key derivation + ChaCha20-Poly1305 + Ed25519 digital signature.
- π¬ Tamper Attack Simulation: Automatic bit-flipping attack simulation showing how AEAD guarantees tamper-detection and integrity failure.
- π» Runnable Source:
level-08-capstone-project/secure_vault.py
- Python 3.10+ (Python 3.11+ recommended)
- Git
# 1. Clone the repository
git clone https://github.com/Aakash02A/CipherForge.git
cd CipherForge
# 2. Create and activate a virtual environment
python -m venv .venv
# Windows (PowerShell)
.venv\Scripts\Activate.ps1
# Linux / macOS
source .venv/bin/activate
# 3. Install core dependencies
pip install --upgrade pip
pip install -r requirements.txtStart the interactive terminal explorer:
python main.py| Command | Action | Description |
|---|---|---|
1 β 8 |
Select Level | Navigate to any of the 8 progressive levels |
D |
Run Diagnostics | Instantly verifies import integrity and dependencies for all 90 registered modules |
S |
Setup Guide | Inspects package configuration and shows environment status |
H |
Help | Displays all interactive command shortcuts |
CLS |
Clear Screen | Clears the terminal screen and redraws the banner |
Q |
Quit | Exits the toolkit |
Run CipherForge inside an isolated Docker container without configuring local Python packages:
docker compose run --rm crypto-toolkitCipherForge supports structured learning tracks tailored to your background and career goals:
- π Interactive Learner Checklist (PROGRESS.md): Track your completion across all 8 levels and test your knowledge with self-assessment checkpoints.
- π£οΈ Curated Learning Tracks (TRACKS.md):
- Track 1: 2-Week Security Interview Sprint
- Track 2: Classical to Modern Cryptography Mastery
- Track 3: Applied Cybersecurity & PKI Specialist
- Track 4: Privacy-Preserving & Post-Quantum Frontier
We welcome contributions from developers, researchers, students, and cryptographers worldwide!
Whether you want to add a new algorithm, improve docstrings, contribute unit tests, or build cryptanalysis attack simulations:
- π Check our Contribution Guide (CONTRIBUTING.md) for coding conventions and PR workflows.
- π·οΈ Look for Good First Issues:
- Adding automated unit tests in
tests/ - Writing attack demonstrations (e.g. padding oracle simulation, CBC bit-flipping)
- Profiling memory and Big-O computational benchmarks
- Adding visualization scripts for mathematical structures
- Adding automated unit tests in
If CipherForge helped you understand cryptography, ace a security interview, or design better software, please consider starring this repository! β It motivates contributors and helps fellow learners discover this project.
This project is open-source under the MIT License.
