Implement optional AES-CCM support for channels #9606
Closed
+138
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, messages to channels are only encrypted using AES-CTR. This ensures nobody can read your messages. However, people can still modify your messages because there is no way of knowing if the content being sent was what was originally sent. Let me give an example with rot13 encryption. In rot 13, 'abc' transforms to 'nop', but there is no way of knowing an attacker has maybe modified the original message to be adc, which would still perfectly well translate to 'nqp'. As long as the protobuf parsing goes well, we do not know if messages are modified. There was already AES-CCM support for private messaging, it adds a tag to the message that makes sure messages aren't altered without knowing the key.
This commit adds support for AES-CCM at the channel level, it will need everyone in the channel to agree on using it though, so it's disabled by default. This change will need app level support before being practically used by users.
supersedes #9602
Details:
What needs to happen upstream