This commit is contained in:
JISAUAY committed 2025-09-22 11:29:37 -05:00
commit 4797a57f1e
5 files changed
+51

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
from Crypto.Cipher import AES
from Crypto.Util.Padding import unpad
# Read Key
with open('key', 'rb') as f:
aes_key = f.read()
cipher = AES.new(aes_key, AES.MODE_CBC)
# Read message and decrypt
with open('ctext', 'rb') as f:
ciphertext = f.read()
plaintext = unpad(cipher.decrypt(ciphertext), 16)
print(f'Plaintext: {plaintext}')