You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was reading source in for the AES encryption and decryption function, and it looks like you have gotten the purpose of the functions mixed up (unless I am misunderstanding something).
In the chb_aes_encryption function, you have plaintext as write data and ciphertext as read data. That's just semantically incorrect. Encryption functions read plaintext and write ciphertext. The reverse is also true in your chb_aes_decryption function.
With AES in ECB mode, the encryption machine is inversely reversible. But using the ciphertext buffer for writing in an encryption function can't be a good idea. At the very least, its very confusing.
The text was updated successfully, but these errors were encountered:
Thanks for the feedback and nice catch. I don't think it's been a heavily used function so there hasn't been much peer review of it. I'll re-examine the encryption part of the code since I will be using it in a project in the future.
I really enjoy using your library in my current project. Hopefully, when I get more familiar I can add some significant features/fixes/attacks.
This weird 'bug' is the only thing I've wrong with the library. The comments and coding style have really helped simplify the more complex interactions with the Freakduino.
edit: I'm looking forward to what you find in the AES en/decryption functions.
I was reading source in for the AES encryption and decryption function, and it looks like you have gotten the purpose of the functions mixed up (unless I am misunderstanding something).
In the
chb_aes_encryption
function, you have plaintext as write data and ciphertext as read data. That's just semantically incorrect. Encryption functions read plaintext and write ciphertext. The reverse is also true in yourchb_aes_decryption
function.With AES in ECB mode, the encryption machine is inversely reversible. But using the ciphertext buffer for writing in an encryption function can't be a good idea. At the very least, its very confusing.
The text was updated successfully, but these errors were encountered: