This project is an encryption program built using Object-Oriented Programming (OOP) principles and the Tkinter library for the graphical user interface (GUI). The program allows users to encrypt and decrypt messages using various classical encryption algorithms.
- User-friendly GUI with real-time input validation
- Multiple Encryption Algorithms:
- Caesar Cipher: Simple substitution cipher that shifts letters by a specified amount
- Vernam Cipher: A stream cipher that uses a key of the same length as the plaintext
- Vigenère Cipher: A polyalphabetic substitution cipher using a keyword
- Real-time Validation: Input fields are validated as you type with visual feedback
- Frequency Analysis: Analyze character frequency differences between input and output
- Error Handling: Clear error messages and input validation prevent invalid operations
- Python 3.x
- Tkinter (usually included with Python)
- Matplotlib (for frequency analysis)
-
Clone the repository:
git clone https://github.com/yourusername/encryption-program.git cd encryption-program -
Install required packages:
pip install -r requirements.txt
-
Start the program:
python main.py
-
Using the Interface:
- Select an encryption algorithm (Caesar, Vernam, or Vigenère)
- Choose between Encrypt or Decrypt operation
- Enter your text in the plaintext field
- Provide the required key or shift value:
- Caesar: Enter a numerical shift value
- Vernam: Enter a key of the same length as the input text
- Vigenère: Enter any length key
- Click "Submit" to perform the operation
- Use "Frequency Analysis" to visualize character frequency changes
- Access "Encryption Info" for algorithm descriptions
-
Input Requirements:
- Caesar Cipher: Requires a numerical shift value
- Vernam Cipher: Key must match plaintext length exactly
- Vigenère Cipher: Requires any non-empty key
The program includes comprehensive error handling:
- Invalid inputs are highlighted in red
- Error messages appear below the relevant input fields
- The Submit button is disabled until all inputs are valid
Built using:
- Python's OOP features for encapsulation and modularity
- Tkinter for the GUI implementation
- Matplotlib for frequency analysis visualization
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
For any questions or suggestions, please contact [your email address].