A comprehensive, modular, and interactive Python CLI toolkit for exploring, understanding, and experimenting with 80+ cryptographic algorithms and protocols.
Warning
This project is strictly designed for educational, research, and self-learning purposes. It has not undergone formal cryptographic security auditing and must NOT be used in production environments or to protect sensitive real-world data. Implementations may lack constant-time guarantees, making them susceptible to timing and side-channel vulnerabilities. For production deployments, always rely on battle-tested cryptographic libraries such as libsodium, cryptography, or Google's Tink.
- Overview
- Key Features
- Algorithm Coverage Matrix
- Getting Started
- CLI Navigation & Shortcuts
- Repository Architecture
- Documentation & References
- Contributing
- Security Policy
- License
The Cryptography Algorithm Toolkit provides a single, unified command-line platform to explore cryptographic concepts spanning centuries—from classical pen-and-paper ciphers to modern authenticated encryption and cutting-edge post-quantum cryptography.
Whether you are studying how AES rounds work under the hood, tracing an RSA key generation handshake, experimenting with zero-knowledge proofs, or analyzing lattice-based post-quantum key encapsulation mechanisms, this toolkit provides runnable code, transparent step-by-step breakdowns, and dedicated documentation for each algorithm family.
- 🎓 80+ Algorithms Across 9 Disciplines: Spans symmetric ciphers, public-key algorithms, hashing, MACs, AEAD, post-quantum schemes, advanced privacy-preserving cryptography, protocols, and historical systems.
- 💻 Interactive & Robust CLI: Intuitive terminal UI with cross-platform screen management, input validation, and resilient error recovery.
- 🔍 Built-in Diagnostics (
D): Instantly test all 80 registered modules for missing dependencies, syntax validity, and import integrity. - 🧩 Modular Architecture: Cleanly isolated directories per topic with dedicated READMEs, standard interfaces, and standalone execution support.
- 🔬 Inspect Intermediate States: Trace mathematical workings, S-Box substitutions, polynomial operations, key schedules, and network protocol handshakes.
- 📜 Historical & Pedagogical Context: Includes broken and deprecated algorithms (e.g., DES, RC4, MD5) alongside modern counterparts to teach cryptographic evolution and vulnerability analysis.
| Category | Topics & Algorithms | Modules & Documentation |
|---|---|---|
| 🔐 Symmetric Key Cryptography | Block Ciphers: AES (128/192/256), DES, 3DES, Blowfish, Twofish, Camellia, CAST-128, IDEA, RC2, RC5, RC6, SEED, ARIA, Serpent, SM4, Magma, Kuznyechik Block Modes: ECB, CBC, CFB, OFB, CTR, XTS Stream Ciphers: ChaCha20, Salsa20, RC4, HC-128, Rabbit, SOSEMANUK, A5/1 |
• Block Ciphers • Block Cipher Modes • Stream Ciphers |
| 🔑 Asymmetric Key Cryptography | Public Key Encryption: RSA, ElGamal, Paillier, Rabin Key Exchange: Diffie-Hellman (DH), ECDH, X25519, MQV Elliptic Curves: ECDSA, Ed25519, Ed448, Curve25519, SM2 Digital Signatures: DSA, ECDSA, Schnorr, BLS |
• Public Key Encryption • Key Exchange • Elliptic Curve Cryptography • Digital Signatures |
| 🏷️ Hash Functions | MD5, SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512), SHA-3 (Keccak), BLAKE2, BLAKE3, RIPEMD-160, Whirlpool, Tiger | • Hash Algorithms |
| 🛡️ Message Authentication (MAC) | HMAC (with SHA-256 / SHA-3), CMAC, GMAC, Poly1305 | • MAC Algorithms |
| ⚡ Authenticated Encryption (AEAD) | AES-GCM, AES-CCM, ChaCha20-Poly1305, AES-OCB | • AEAD Schemes |
| ⚛️ Post-Quantum Cryptography (PQC) | KEMs & Encryption: CRYSTALS-Kyber (ML-KEM), NTRU, Classic McEliece, FrodoKEM Signatures: CRYSTALS-Dilithium (ML-DSA), Falcon, SPHINCS+ (SLH-DSA) |
• PQC KEMs • PQC Signatures |
| 🔮 Advanced Cryptography | Homomorphic Encryption: Paillier additive, BFV / CKKS concepts Secret Sharing: Shamir's Secret Sharing (SSSS), Blakley Secure Computation: Yao's Garbled Circuits, GMW, Oblivious Transfer Zero-Knowledge Proofs: Schnorr ZKP, Sigma protocols, zk-SNARKs overview |
• Homomorphic Encryption • Secret Sharing • Secure Computation • Zero-Knowledge Proofs |
| 🌐 Cryptographic Protocols | TLS 1.3 Handshake simulation, SSH-2 Key Exchange, IPsec IKEv2 flow, PGP / OpenPGP Hybrid Encryption, Kerberos Authentication | • Secure Protocols |
| 📜 Classical & Historical Ciphers | Caesar Cipher, Vigenère Cipher, Playfair Cipher, Hill Cipher (Matrix), Enigma Machine Simulation | • Traditional Ciphers |
- Python 3.10 or higher (Python 3.11+ recommended)
- Git installed on your machine
- (Optional) C/C++ compiler tools (e.g. GCC/Clang or MSVC) if building optional native extensions like
twofish,tiger, orwhirlpool.
-
Clone the repository:
git clone https://github.com/Aakash02A/Cryptography-Algorithm.git cd Cryptography-Algorithm -
Create and activate a virtual environment:
Windows (PowerShell)
python -m venv .venv .venv\Scripts\Activate.ps1macOS / Linux (Bash / Zsh)
python3 -m venv .venv source .venv/bin/activate -
Install core dependencies:
pip install --upgrade pip pip install -r requirements.txt
Start the interactive terminal interface:
python main.pyDocker provides a consistent Python environment on Windows, macOS, and Linux. Docker Desktop or Docker Engine with Compose is required.
Build and start the interactive toolkit:
docker compose run --rm crypto-toolkitThe equivalent Docker commands are:
docker build -t cryptography-algorithm-toolkit .
docker run --rm -it cryptography-algorithm-toolkitUse Q to exit the toolkit and remove the temporary container.
When running main.py, you can quickly jump between sections or execute utilities using these commands:
| Command | Action | Description |
|---|---|---|
1 – 9 |
Select Category | Navigate directly to one of the 9 cryptographic categories |
D / DIAG |
Run Diagnostics | Validates all 80 registered modules and verifies dependencies |
S / SETUP |
Setup Guide | Inspects package configuration and regenerates missing package markers |
H / HELP |
Command Help | Displays a summary of all interactive commands and shortcuts |
CLS / CLEAR |
Clear Screen | Clears the terminal output and re-renders the banner |
M / MAIN |
Main Menu | Returns to the top-level main selection screen |
Q / QUIT |
Exit | Gracefully closes the toolkit |
Cryptography-Algorithm/
├── assets/ # Media, banners, and diagrams
├── Modules/ # Modular cryptographic implementations
│ ├── Advanced_Cryptography/ # Homomorphic, ZKP, MPC, Secret Sharing
│ ├── Asymmetric_Key_Cryptography/ # Public-key ciphers, Signatures, ECC, Key Exchange
│ ├── Authenticated_Encryption_AEAD/ # GCM, CCM, ChaCha20-Poly1305, OCB
│ ├── Classical_or_Historical_Ciphers/ # Caesar, Vigenère, Playfair, Hill, Enigma
│ ├── Cryptographic_Hash_Functions/ # MD5, SHA families, BLAKE, RIPEMD, Whirlpool
│ ├── Cryptographic_Protocols/ # TLS 1.3, SSH, IPsec, PGP, Kerberos simulations
│ ├── Message_Authentication/ # HMAC, CMAC, GMAC, Poly1305
│ ├── Post_Quantum_Cryptography/ # Kyber, Dilithium, Falcon, SPHINCS+, McEliece
│ └── Symmetric_Key_Cryptography/ # Block ciphers, block modes, stream ciphers
├── samples/ # Reference test outputs, test vectors, and keys
├── V1/ # Original first version — AES, RSA, SHA-256, XOR cipher
├── CONTRIBUTING.md # Contribution guidelines & coding conventions
├── DEVELOPMENT.md # Architecture details & module authoring guide
├── LICENSE # MIT License
├── Method-IOBehavior.md # I/O standards & interactive formatting conventions
├── README.md # Main documentation entry point
├── SECURITY.md # Security policy and vulnerability disclosure
├── main.py # Central CLI router and dispatcher
└── requirements.txt # Project dependencies
- 🛠️ Development Guide: Module boilerplate template, coding patterns, and internal architecture.
- 📝 Method & I/O Behavior: Standards for input parsing, hex/byte serialization, and CLI styling.
- 🤝 Contribution Guidelines: How to propose additions, submit PRs, and format cryptographic tests.
- 🔒 Security Policy: Scope of educational research and vulnerability reporting procedure.
- 🔑 Sample Outputs & Test Vectors: Known-answer test samples and cryptographic intermediate values.
- 📦 V1 — First Version: The original beginner implementation (AES, RSA, SHA-256, custom XOR cipher) preserved as a milestone.
Contributions that enrich educational clarity, add standard test vectors, implement missing algorithms, or improve documentation are very welcome!
- Fork the repository and create a feature branch (
git checkout -b feature/new-cipher). - Implement your module following the template in DEVELOPMENT.md.
- Include RFC/NIST test vectors or known-answer tests where possible.
- Run diagnostics (
python main.py->D) to confirm module integrity. - Submit a descriptive Pull Request.
Please review CONTRIBUTING.md and CODE_OF_CONDUCT.md before submitting.
This repository is maintained for educational and reference purposes. Please report any potential security oversights or inaccuracies by following our Security Policy.
Distributed under the MIT License. See LICENSE for complete terms.
Designed and developed for cryptography education, research, and technical exploration.
Built by Aakash
