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
