-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AEAD handling #30
Conversation
I'm concerned this could introduce another attack: If an attacker send completely bogus messages to a recipient, the recipient will now blindly increase the counter. When the recipient afterwards receives a valid message, they will not be able to decrypt it because of FS. |
Sure, with the mechanisms currently available (the counter). There will always be one attack or the other. |
The counter is covered by the MAC, so an attacker couldn't manipulate the counter with bogus messages (where the verification fails) until now. With this PR an attacker can increase the counter by sending any random message. |
Right, but at the moment an attacker can invalidate messages and thus produce a |
Fixes https://github.com/wireapp/security/issues/22 |
@raphaelrobert can you review? Not counting anymore on failure, but properly handling decryption. |
If we don't do any other changes we should bump the version number. |
In this PR I change when the counter gets increased. Before it was not increased when the decryption failed (invalid tag). Now the counter is increased even if the decryption fails.