Closed klack closed 3 years ago
How do you set padding in Python? It seems to have no padding whatsoever (given the length of resulting base64 data).
Try to change aesLib.set_paddingmode(paddingMode::ZeroLength);
to aesLib.set_paddingmode(paddingMode::CMS);
It seems the ZeroLength padding is something else than what does the default Cryptodome AES use.
Also, don't use the encrypt64 and decrypt64 methods, those should apparently have been already deprecated.
Hey suclent. Thanks for the reply. I am not setting any padding at the moment, however if there was padding, the first bytes would be the same: 41N3nBB5rrgnCJQtvncYGg==
I am using the test vectors, case 1 published here:
I guess you should not use deprecated encrypt64 function.
I am using your provided example in the examples directory. I don't have time to go back and try it again, so I will close this.
I have been trying to use this library but cannot get the same result as my python code. They use the same IV and Key.
Arduino Code:
Output:
Base64 encoded Ciphertext: D9lURiJvj46w14X/1dYlEWf3tkHEaNrfgBrV733sCcQ=
Python:
Output:
Base64: 41N3nBB5rrgnCJQtvncYGg==