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
Utilising encryption in CBC mode must always be accompanied by a MAC, or it is vulnerable to several attacks.
An example bitflipping attack which exploits this was recently written here:
The safest thing would be automatically append a HMAC, which is verified before decrypting.
The sanest HMAC would be SHA256-HMAC, keyed with a different key to the encryption key.
It might be worth considering if you really need AES. If no, you are probably better off letting RbNaCl do the actual cryptography. Your use case seems to correspond to SimpleBox operating in secret-key mode.
Utilising encryption in CBC mode must always be accompanied by a MAC, or it is vulnerable to several attacks.
An example bitflipping attack which exploits this was recently written here:
https://github.com/technion/matasano_challenge/blob/master/set2/chal16/chal16.rb
The text was updated successfully, but these errors were encountered: