Use non-deterministic keys for 1-to-1 messages#78
Merged
jagerman merged 1 commit intosession-foundation:devfrom Feb 18, 2026
Merged
Use non-deterministic keys for 1-to-1 messages#78jagerman merged 1 commit intosession-foundation:devfrom
jagerman merged 1 commit intosession-foundation:devfrom
Conversation
The _deterministic version of this function is a special purpose modification of standard box seal mainly aimed for config messages where we want the same plaintext config message to end up with the same encrypted data so that we take advantage of storage-server deduplication of identical messages. We don't want that property for regular 1-to-1 messages, and this appears to be an oversight that crept into session-ios (on which this code was based). This corrects it back to the fully random box seal. (Note to any third party observers that this issue is not a compromise of message security: the only consequence of this is that a sender could reproduce the ephemeral key used to encrypt a message, which regular box seal with a random ephemeral X25519 key is not supposed to allow).
Doy-lee
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The _deterministic version of this function is a special purpose modification of standard box seal mainly aimed for config messages where we want the same plaintext config message to end up with the same encrypted data so that we take advantage of storage-server deduplication of identical messages.
We don't want that property for regular 1-to-1 messages, and this appears to be an oversight that crept into session-ios (on which this code was based).
This corrects it back to the fully random box seal.
(Note to any third party observers that this issue is not a compromise of message security: the only consequence of this is that a sender could reproduce the ephemeral key used to encrypt a message, which regular box seal with a random ephemeral X25519 key is not supposed to allow).