Closed paragonie-scott closed 5 years ago
My understanding is that moving to an authenticated encryption mode could solve this issue ?
AES GCM
?
AES-GCM would work, provided you have a processor with the PCLMULQDQ instruction available to compute GHASH in constant-time.
Further reading: https://eprint.iacr.org/2013/157.pdf
AES-256-CBC + HMAC-SHA256 is secure even on older hardware, provided:
However, if you have a solid AES-GCM implementation available in Python, and you're fairly certain that your users have AES-NI and PCLMULQDQ available, that's definitely my recommendation.
Hey @paragonie-scott , thanks for pointing this out. We're changing the encryption method in 2.0, could you have a look at https://github.com/maebert/jrnl/blob/2.0-wm/jrnl/EncryptedJournal.py#L29 - I'd really appreciate your feedback on that!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@paragonie-scott Hi! Thanks for pointing this out. The project is just getting back and up and running with new maintainers. It looks like the encryption method was changed since you filed this. Can you confirm that this is still an issue, or has it been resolved?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Wow, I somehow missed the email/notification on July 30!
Yes, moving to Fernet resolves this issue.
@paragonie-scott Thanks for reporting back!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
https://github.com/maebert/jrnl/blob/a2462ed7c36d8a4eed0bdf257703632abf21d441/jrnl/Journal.py#L43-L79
AES-CBC without HMAC (in Encrypt-then-MAC mode, with the MAC covering the IV and ciphertext, with a secure comparison mode; encryption is hard!) is vulnerable to padding oracle attacks which allows for decryption without access to the key.
Recommendation:
iv || ciphertext
(where||
means concatenate), prepend or append it to the filehmac.compare_digest()