Search code examples
encryptionaes

Python Crypto AES encryption/decryption work misunderstanding


Please, explain me how it can be.

As you can see:

plain != decrypt(encrypt(plain))

enter image description here


Solution

  • Don't reuse cipher instances and make sure the IV is correct every time you use one for decryption.