This program allows users to encrypt and decrypt files using a custom password. It uses the cryptography library for secure encryption with AES-128 (Fernet) and a key derived from the password using PBKDF2-HMAC-SHA256.
- File encryption with a custom password
- File decryption if the correct password and salt are provided
- Simple GUI built with
tkinter
Make sure you have the cryptography library installed:
pip install cryptographyRun the Python script to open the graphical user interface:
python encryptor.py- Enter a password in the text field.
- Enter a custom salt (a string) in the corresponding text field.
- Click the "Encrypt File" button.
- Choose a file to encrypt.
- A new file will be created with the
.encextension.
- Enter the same password and salt used for encryption.
- Click the "Decrypt File" button.
- Choose an
.encfile to decrypt. - The file will be decrypted and saved with
_decryptedappended to the filename.
- Uses PBKDF2 to derive a secure key from the password.
- Protects against brute-force attacks with 100,000 iterations.
- Encrypts the file with AES-128 (Fernet) for confidentiality.
salt for key derivation. For better security, it would be preferable to generate a random salt for each file and store it with the encrypted file.
- Dynamic salt management to improve security.
- Enhanced protection against brute-force attacks.
- File authentication using HMAC for better data integrity.
This project is licensed under the MIT License.