A Python tool for AES encryption and decryption using the cryptography
library. This project provides two scripts: one for encrypting text and another for decrypting it using AES in CBC mode.
aes_encrypt.py
: Script for encrypting text using AES encryption.aes_decrypt.py
: Script for decrypting AES-encrypted text.
- Run the encryption script:
python aes_encrypt.py
- Enter the text you want to encrypt.
- Enter the encryption key (16, 24, or 32 bytes long).
The script will output the encrypted text.
- Run the decryption script:
python aes_decrypt.py
- Enter the encrypted text you want to decrypt.
- Enter the decryption key (16, 24, or 32 bytes long).
The script will output the decrypted text.
$ python aes_encrypt.py
Enter the message to encrypt: Hello, World!
Enter the encryption key (16, 24, or 32 bytes long): 1234567890123456
Encrypted message: <base64_encoded_encrypted_text>
$ python aes_decrypt.py
Enter the encrypted message to decrypt: <base64_encoded_encrypted_text>
Enter the decryption key (16, 24, or 32 bytes long): 1234567890123456
Decrypted message: Hello, World!
pip install cryptography