I am working on an encryption program with Pycryptodome in Python 3. I am trying to encrypt a (byte) string and then decrypt it and verify the MAC tag. When I get to verify it, an
Solution 1:
If you look at the state diagram for authenticated modes:
You see that verify() should be called at the very end, after any decrypt() has taken place.
So, either you invert the calls or you replace them with a combined decrypt_and_verify().
Share
Post a Comment
for "Pycryptodome Error: Mac Check Failed"
Post a Comment for "Pycryptodome Error: Mac Check Failed"