The Text & File Encrypter and Decrypter is a Python-based GUI desktop application for securely encrypting and decrypting text and files using the AES encryption algorithm. This application supports AES-CBC and AES-GCM encryption modes, offering users a robust mechanism to protect sensitive data. It includes features to verify the integrity of decrypted messages, ensuring the correctness of encrypted data.
This application was developed as part of the Final Year Project for the CSE-Cybersecurity Curriculum, under the domain of Cryptography and Data Security. The application combines cryptographic principles with a user-friendly interface to address real-world data protection challenges.
The application has been bundled into a standalone executable (main.exe) located in dist folder, using PyInstaller, allowing easy execution without needing Python or dependencies pre-installed.
Cryptography and data security focus on the principles and techniques required to protect sensitive information from unauthorized access and tampering. It forms the backbone of cybersecurity, ensuring data confidentiality, integrity, and authenticity in transit and at rest. This domain encompasses encryption algorithms, hashing methods, digital signatures, and secure communication protocols.
The project aligns with this domain by providing:
- Confidentiality: Ensures sensitive data is accessible only to authorized users through encryption.
- Integrity: Verifies that data remains unchanged or uncorrupted.
- Usability: Simplifies secure encryption and decryption for end-users through a graphical interface.
This project's vision is to demonstrate the practical implementation of cryptographic techniques in securing digital information, addressing common security concerns like data breaches, unauthorized access, and file tampering. It aims to provide an extensible platform for further research and development in the field of cryptography.
- Find the web documentation in the given link
https://biraj007.github.io/Text-File-Encryption-Decryption-Tool/
- Encrypts and decrypts user-provided text using a secure password.
- Supports AES encryption with CBC and GCM modes.
- Provides a progress bar for visual feedback during processing.
- Encrypts and decrypts files of any type.
- Encrypted files are saved with a .enc extension, while decrypted files are restored to their original format.
- Users set a secure password to access the application.
- Passwords are hashed and salted for secure storage.
- Validates password strength (minimum 8 characters, uppercase, lowercase, digit, and special character).
- Checks if the encrypted message or file is corrupted during decryption.
- Ensures that only valid encrypted data can be decrypted successfully.
- After 3 failed password attempts, the user is locked out for 30 seconds.
- AES-CBC (Cipher Block Chaining): Requires an initialization vector (IV) for encryption.
- AES-GCM (Galois/Counter Mode): Provides encryption and authentication, ensuring data integrity.
- Developed using Tkinter, offering a clean and intuitive graphical interface.
- Includes reset options and detailed error handling.
- Packaged as an executable file (main.exe) using PyInstaller.
- No need for Python installation or additional dependencies.
-
The standalone executable (main.exe) can be run on any Windows system without additional setup.
-
For running the Python source code:
- Python 3.8+
- Required Python libraries:
- tkinter
- pycryptodome
Install dependencies with :
pip install pycryptodome
- Download the packaged executable (main.exe) along with the dependencies.
- Double-click the main.exe file to launch the application.
- Upon first launch, the application prompts you to set a secure password.
- Follow the password requirements:
- At least 8 characters long.
- Contains at least one uppercase letter, one lowercase letter, one digit, and one special character.
- Save your password for future use, as it is required for encryption and decryption.
- Enter the text you want to encrypt in the provided text box.
- Set the password in the "Enter secret key" field.
- Select the encryption mode (AES-CBC or AES-GCM).
- Click Encrypt Text to encrypt or Decrypt Text to decrypt the message.
- The result is displayed in a new window and can be saved as a file.
- Click Encrypt File or Decrypt File.
- Select the file you want to encrypt or decrypt using the file dialog.
- For encryption:
- Save the encrypted file as a
.enc
file.
- Save the encrypted file as a
- For decryption:
- Save the decrypted file to its original format.
- AES-CBC:
- Requires a random initialization vector (IV) for encryption.
- Suitable for standard encryption tasks.
- AES-GCM:
- Provides encryption and authentication.
- Detects tampering during decryption.
- Password Validation:
- Prompts user to create a strong password during setup.
- Displays detailed error messages for weak passwords.
- Decryption Errors:
- Warns if the encrypted message is corrupted or an incorrect password is provided.
- Lockout:
- Temporarily locks out users after multiple failed attempts.
- 3 failed password attempts trigger a 30-second lockout.
- After the lockout period, users can retry logging in.
- Passwords are never stored in plaintext; they are hashed with a salt using SHA-256.
- The application uses
pycryptodome
for cryptographic operations, ensuring strong security. - AES-GCM mode provides additional integrity verification, preventing data tampering.
- The password is stored in memory for the session. Exiting the application requires resetting the password.
- The application does not persist encrypted text or file history across sessions.
- Programming Language: Python
- Libraries:
- pycryptodome for cryptographic functions.
- tkinter for the graphical interface.
This project is open-source and available for modification under the MIT License. Contributions are encouraged to help make encryption more accessible and reliable for users worldwide.