A comprehensive cryptographic toolkit implemented in Python 3.12. This suite provides high-performance implementations of classical and modern symmetric/asymmetric encryption algorithms, featuring both headless CLI interfaces and interactive GUI wrappers.
- Runtime: Python 3.12.0+
- Data Store: Tkinter (GUI), Argparse (CLI)
- Orchestration: Modular Provider Pattern (Logic separation from Interface)
- Security: Implementation of cryptographic primitives with a focus on educational transparency and algorithmic integrity.
The project follows a decoupled architecture where each cryptographic algorithm resides in its own isolated module:
- CLI Version: Optimized for automated pipelines and shell interactions.
- GUI Version: Designed for end-user accessibility with real-time feedback.
Ensure you have the required runtime and dependencies installed:
# Clone the repository
git clone https://github.com/sha-wrks/Cipher.git
# Navigate to the project directory
cd Cipher
# (Optional) Create a virtual environment
python -m venv venv #Windows
source venv/bin/activate # Linux/macOSThe CLI implementation utilizes a standardized argument parsing strategy for seamless integration into scripts.
The CLI implementation utilizes a standardized argument parsing strategy for seamless integration into scripts.
Command:
python "Affine Cipher/CLI Version.py"
The GUI versions provide a stateful interaction layer for users who prefer visual input management.
Command:
python "Vigenère Cipher/GUI Version.py"
The RSA module includes specific scripts for key generation and drawback analysis of small prime factors.
Command:
python "RSA Encryption/app.py"
The codebase adheres to the following engineering principles:
- Separation of Concerns (SoC): Cryptographic logic (mathematical functions) is strictly separated from the I/O logic (CLI/GUI).
- Modular Extensibility: New algorithms can be integrated by following the established directory structure without modifying the core suite.
- Defensive Programming: Extensive input validation ensures that keys (e.g., in Affine Cipher) satisfy mathematical requirements such as being coprime to the alphabet size.
-
Performance: Matrix operations in the Hill Cipher are optimized for minimal time complexity
$O(n^3)$ during the modular inverse calculation.
This project is intended for educational and research purposes only. While the implementations are mathematically accurate, they are not intended to replace industry-standard libraries (like OpenSSL or PyCryptodome) for production-grade data protection.