This project is a simple GUI-based application that demonstrates various classical and modern encryption techniques. It is built using Python's Tkinter library for the GUI and Cryptodome library for cryptographic functions.
The application supports the following encryption and decryption methods:
- Ceaser Cipher
- Monoalphabetic Cipher
- Playfair Cipher (to be implemented)
- Polyalphabetic Cipher (to be implemented)
- Vigenère Cipher (to be implemented)
- Rail Fence Cipher (to be implemented)
- Row Transposition Cipher (to be implemented)
- DES (Data Encryption Standard)
- AES (Advanced Encryption Standard)
- Python 3.x
- Cryptodome library
You can install the Cryptodome library using pip:
pip install pycryptodome
- Clone the repository to your local machine.
- Navigate to the project directory.
- Run the Python script:
python sec.py
The GUI consists of the following elements:
- A title label at the top.
- A listbox to select the type of encryption/decryption.
- Entry fields to input plaintext and key.
- Buttons to perform encryption, decryption, and to exit the application.
The Encryption
function handles the encryption process. It reads the selected encryption method, plaintext, and key from the user inputs, and performs the corresponding encryption.
The Decryption
function handles the decryption process. It reads the selected decryption method, ciphertext (entered as plaintext in the input field), and key from the user inputs, and performs the corresponding decryption.
A simple substitution cipher where each letter in the plaintext is shifted by a fixed number of positions down the alphabet.
A substitution cipher where each letter of the plaintext is mapped to a different letter.
A symmetric-key algorithm for the encryption of digital data. The key size is 8 bytes, and the block size is 8 bytes.
A symmetric-key algorithm that can encrypt and decrypt data in blocks of 128 bits using cryptographic keys of 128, 192, and 256 bits.
-
Ceaser Cipher
- Encryption
- Plaintext:
HELLO
- Key:
3
- Ciphertext:
KHOOR
- Plaintext:
- Decryption
- Ciphertext:
KHOOR
- Key:
3
- Plaintext:
HELLO
- Ciphertext:
- Encryption
-
Monoalphabetic Cipher
- Encryption
- Plaintext:
hello
- Key:
qwertyuiopasdfghjklzxcvbnm
- Ciphertext:
itssg
- Plaintext:
- Decryption
- Ciphertext:
itssg
- Key:
qwertyuiopasdfghjklzxcvbnm
- Plaintext:
hello
- Ciphertext:
- Encryption
-
DES
- Encryption
- Plaintext:
HELLODES
- Key:
mysecret
- Ciphertext:
<hexadecimal string>
- Plaintext:
- Decryption
- Ciphertext:
<hexadecimal string>
- Key:
mysecret
- Plaintext:
HELLODES
- Ciphertext:
- Encryption
-
AES
- Encryption
- Plaintext:
HELLOAES
- Key:
mysecretkey123456
- Ciphertext:
<hexadecimal string>
- Plaintext:
- Decryption
- Ciphertext:
<hexadecimal string>
- Key:
mysecretkey123456
- Plaintext:
HELLOAES
- Ciphertext:
- Encryption
- Implement Playfair, Polyalphabetic, Vigenère, Rail Fence, and Row Transposition ciphers.
- Improve error handling and input validation.
- Add support for more advanced cryptographic techniques.
If you would like to contribute to this project, please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License.