A modern, cross-platform GUI application for encrypting and decrypting messages using various cryptographic ciphers. Features a responsive design that works seamlessly across Windows, macOS, and Linux.
- ๐ Caesar Cipher: A substitution cipher that shifts letters by a fixed number of positions
- ๐ Vigenรจre Cipher: A polyalphabetic substitution cipher using a keyword
- ๐งฎ Affine Cipher: A monoalphabetic substitution cipher with a mathematical function
- ๐ Hill Cipher: A polygraphic substitution cipher based on linear algebra
- ๐ Substitution Cipher: A cipher that replaces each letter with a unique substitution
- ๐ฒ One-Time Pad (OTP): A symmetric encryption algorithm using a random key
- Modern GUI: Beautiful, dark-themed interface using CustomTkinter
- Cross-platform compatibility: Works seamlessly on Windows, macOS, and Linux
- Enhanced security: Removed dangerous
eval()calls with safe parsing functions - Better error handling: Comprehensive input validation and user-friendly error messages
- Responsive design: Adaptive window sizing and layout
- Multi-line text support: Text areas for longer messages
- Keyboard shortcuts: Ctrl+Enter to perform actions, Ctrl+C to copy results
- Copy to clipboard: Easy result copying functionality
- Real-time help: Dynamic key format hints based on selected cipher
- Status feedback: Real-time status updates and operation feedback
- Python 3.8 or higher
- Operating System: Windows 10+, macOS 10.14+, or Linux (Ubuntu 18.04+, etc.)
Windows:
# Double-click run.bat or run in Command Prompt:
run.batLinux/macOS:
# Make the script executable and run:
chmod +x run.sh
./run.sh-
Clone the repository:
git clone https://github.com/AlexBesios/CyberSecurityProject.git cd CyberSecurityProject -
Create and activate virtual environment:
Windows:
python -m venv venv venv\Scripts\activate
Linux/macOS:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python App.py
- Launch the application using one of the methods above
- Select a cipher from the dropdown menu
- Choose the action (Encrypt or Decrypt)
- Enter your message in the text area
- Enter the key according to the format hint shown
- Click "Perform" or press Ctrl+Enter
- Copy the result using the copy button or Ctrl+C
| Cipher | Key Format | Example |
|---|---|---|
| Caesar | Integer | 3 |
| Vigenรจre | Keyword (letters only) | KEY |
| Affine | Two integers separated by comma | 5,8 |
| Hill | Square matrix in JSON format | [[3, 2], [5, 7]] |
| Substitution | Dictionary mapping | {'a': 'm', 'b': 'n', 'c': 'o'} |
| OTP | String (โฅ message length) | MYSECRETKEY |
- Message:
Hello World! - Key:
3 - Action: Encrypt
- Result:
Khoor Zruog!
- Message:
ATTACK AT DAWN - Key:
LEMON - Action: Encrypt
- Result:
LXFOPV EF RNHR
- Message:
HELLO - Key:
[[3, 2], [5, 7]] - Action: Encrypt
- Result:
dldck
- โ
Removed dangerous
eval()calls - โ Implemented safe JSON parsing for complex keys
- โ Added comprehensive input validation
- โ Enhanced error handling with specific error messages
- โ Added type hints throughout the codebase
- โ Improved code structure and modularity
- โ Comprehensive documentation and comments
- โ Added unit tests for all cipher functions
- โ Modern, intuitive interface design
- โ Cross-platform compatibility
- โ Responsive layout that adapts to screen size
- โ Real-time help and feedback
- โ Keyboard shortcuts for power users
Run the test suite to verify all cipher implementations:
python test_ciphers.pyCyberSecurityProject/
โโโ App.py # Main GUI application
โโโ Ciphers.py # Cipher implementations
โโโ requirements.txt # Python dependencies
โโโ test_ciphers.py # Test suite
โโโ run.bat # Windows launcher
โโโ run.sh # Linux/macOS launcher
โโโ README.md # This file
- customtkinter: Modern GUI framework
- numpy: Numerical operations for Hill cipher
- Pillow: Image processing support
- ttkthemes: Additional theme support
-
"Module not found" errors
- Ensure virtual environment is activated
- Run
pip install -r requirements.txt
-
GUI doesn't appear on Linux
- Install tkinter:
sudo apt-get install python3-tk - Ensure X11 forwarding if using SSH
- Install tkinter:
-
Font rendering issues on Linux
- Install DejaVu fonts:
sudo apt-get install fonts-dejavu
- Install DejaVu fonts:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Add tests for new features
- Run the test suite:
python test_ciphers.py - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Create a Pull Request
This project is open source and available under the MIT License.
- PhyniX - Initial development
- AlexBesios - Enhancements and modernization
- Thanks to the cryptography community for cipher algorithms
- CustomTkinter team for the modern GUI framework
- NumPy developers for numerical computation support
Made with โค๏ธ by PhyniX and AlexBesios