Skip to content

Instantly share code, notes, and snippets.

@Epic-R-R
Epic-R-R / aes_encrypt_decrypt.py
Created February 8, 2024 14:27
Python script demonstrating AES-128 encryption and decryption using the pycryptodome library. The script generates a random key, encrypts a user-input message, and then decrypts it, showcasing the AES-128 algorithm in EAX mode. Ensure to have the pycryptodome library installed (pip install pycryptodome).
"""
Python script for encrypting and decrypting messages using AES-128 in EAX mode with the pycryptodome library.
## Usage:
1. Run the script.
2. Enter the message when prompted.
3. The script will output the ciphertext and decrypted message (if authentication succeeds).
## Note:
Ensure you have the required library installed ``(pycryptodome)``. Install it using ``pip install pycryptodome``
"""