Skip to content
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

Allow inbound megolm sessions to be merged when two copies are received from different sources #4698

Open
poljar opened this issue Feb 20, 2025 · 0 comments

Comments

@poljar
Copy link
Contributor

poljar commented Feb 20, 2025

We may receive a room key with an incomplete ratchet (first known message index of 1) but ideal SenderData, only to later find another room key with a complete ratchet (first known message index of 0) but less optimal SenderData.

PR #4040 addressed a special case of this issue, where the ratchets are identical (i.e., the first known message index is the same) but the SenderData differs.

However, we should also be able to merge two room keys with different ratchet states and SenderData, ensuring that the resulting key retains the best properties from both.

The InboundGroupSession::merge() method can be used to determine if two InboundGroupSession instances share the same ratchet.

This issue supersedes #3703, which had become cluttered with some loosely related discussions.

Causes app layer issue: element-hq/element-x-ios#3352

@richvdh richvdh changed the title Allow room keys to be merged Allow inbound megolm sessions to be merged when two copies are received from different sources Feb 20, 2025
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

No branches or pull requests

1 participant