A Python script to encrypt and decrypt files using AES encryption with a password-derived key.
- Encrypt a text file using an auto-generated password and AES-256-CBC.
- Decrypt the file with a password prompt.
- Uses SHA-512 for key derivation with PBKDF2.
- Python 3.x
cryptographylibrary
To install the required dependencies, use the following command:
pip install cryptographyTo encrypt a file (file.txt), use the following command:
python crypter.py -e file.txt
This command will output an encrypted file named file.txt.enc and display the generated password on the screen.
To decrypt a file (file.txt.enc), use:
python crypter.py -e file.txt- This command generates an encrypted version of
file.txtnamedfile.txt.enc. - An auto-generated password will be displayed on the screen for decryption purposes.
To decrypt a file (file.txt.enc):
python crypter.py -d file.txt.enc- The program will prompt for the previously generated password.
- Once verified, it will produce a decrypted version of the file named
file_decrypted.txt.
This project is licensed under the MIT License.