Skip to content

Use non-deterministic keys for 1-to-1 messages#78

Merged
jagerman merged 1 commit intosession-foundation:devfrom
jagerman:random-encrypt
Feb 18, 2026
Merged

Use non-deterministic keys for 1-to-1 messages#78
jagerman merged 1 commit intosession-foundation:devfrom
jagerman:random-encrypt

Conversation

@jagerman
Copy link
Copy Markdown
Member

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).

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).
@jagerman jagerman merged commit 5380191 into session-foundation:dev Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants