-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels