This repository is an educational and experimental cryptography toolkit for learning, research, benchmarking, and modular cryptographic exploration. It contains implementations of various cryptographic algorithms across multiple domains.
This toolkit is explicitly not intended for production use. Implementations may not be constant-time, may be vulnerable to side-channel attacks, or may lack necessary security validations. If you need production-ready cryptography, use established, audited libraries such as libsodium, cryptography.io, or Tink.
- Education: To understand the inner workings of cryptographic primitives.
- Research: For experimenting with algorithms, including legacy or experimental ones.
- Benchmarking: Providing a framework to compare relative performance of various algorithms in a high-level language.
- Python 3.10+ is required.
- A C/C++ compiler may be needed for some optional hashing/encryption extensions (e.g.,
tigerhash).
git clone https://github.com/Aakash02A/Cryptography-Algorithm.git
cd Cryptography-AlgorithmIt is recommended to use a virtual environment to manage dependencies securely.
Windows:
python -m venv .venv
.venv\Scripts\activatemacOS / Linux:
python3 -m venv .venv
source .venv/bin/activateInstall required packages:
pip install -r requirements.txtNote: The toolkit handles missing optional C dependencies gracefully by safely disabling specific modules while allowing the application to run.
Launch the main interactive menu:
python main.py| Algorithm Category | Status | Production Safe | Notes |
|---|---|---|---|
| Classical Ciphers (Caesar, Vigenère) | Legacy | ❌ No | Completely broken, educational only. |
| Legacy Hash Functions (MD5, SHA-1) | Deprecated | ❌ No | Vulnerable to collision attacks. |
| Legacy Block Ciphers (DES, ECB mode) | Deprecated | ❌ No | Insecure block size or mode. |
| Modern Block Ciphers (AES-CBC, CTR) | Experimental | ❌ No | Educational implementations (likely not constant-time). |
| AEAD Schemes (AES-GCM, ChaCha20-Poly1305) | Experimental | ❌ No | Do not use for actual data protection. |
| Asymmetric (RSA, ECC, Key Exchange) | Experimental | ❌ No | Highly vulnerable to side-channels and timing attacks. |
| Post-Quantum (Kyber, Dilithium) | Experimental | ❌ No | Based on evolving NIST draft standards. |
| Advanced Crypto (ZKP, HE, MPC) | Incomplete | ❌ No | Theoretical demonstrations. |
The repository is modularly structured to separate different cryptographic domains. Note: Future architectural refactoring is planned to simplify naming and import hierarchies.
Modules/
├── Symmetric_Key/ (Block Ciphers, Stream Ciphers, Modes)
├── Asymmetric_Key/ (PKC, DSA, Key Exchange, ECC)
├── Hash_Functions/ (SHA-2, SHA-3, BLAKE3, legacy)
├── Message_Authentication/ (HMAC, CMAC, Poly1305)
├── Authenticated_Encryption/ (AES-GCM, ChaCha20-Poly1305)
├── Post_Quantum/ (PQC KEMs, Signatures)
├── Advanced_Cryptography/ (ZKP, HE, Secret Sharing)
├── Classical_Ciphers/ (Historical algorithms)
└── Protocols/ (High-level demo protocols)
We welcome contributions focused on educational clarity, algorithm correctness, and comprehensive testing.
- Fork the repository on GitHub.
- Read the Guidelines: Please review our CONTRIBUTING.md and SECURITY.md.
- Create a branch:
git checkout -b feature/algorithm-name - Test: Include known-answer tests (KATs) and RFC/NIST test vectors where applicable.
- Submit a PR: Ensure your implementation is clearly documented as educational.
This project is licensed under the MIT License — see the LICENSE file for details.
- Security: Please read SECURITY.md before reporting vulnerabilities.
- Issues: Use the issue tracker for bugs and feature requests.
- Discussions: Use Discussions for general questions.