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

Optimise MatrixRTC sender key distribution for case of single member #4460

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

hughns
Copy link
Member

@hughns hughns commented Oct 16, 2024

Based on top of #4453.

Optimises two scenarios:

  • user is only member of call, then other member(s) joins => the user can immediately rotate the key and start using it.
  • there were two or more members in the call, then the other members left => the user can immediately rotate their key and start using it.

The "doesn't re-send key immediately" test is superseded by the other test cases.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

None of the tests themselves should have changed
The "doesn't re-send key immediately" test is superseded by the other test cases
@hughns hughns changed the title Organise MatrixRTCSession tests Optimise MatrixRTC sender key distribution for case of single member Oct 16, 2024
@hughns hughns changed the title Optimise MatrixRTC sender key distribution for case of single member Optimise MatrixRTC sender key distribution for case of single member Oct 16, 2024
@hughns hughns marked this pull request as ready for review October 16, 2024 17:39
@hughns hughns requested a review from a team as a code owner October 16, 2024 17:39
@fkwp
Copy link

fkwp commented Oct 16, 2024

Just got additional input

we do want to rotate the keys on any participant change. But, the keys won't actually be sent anywhere in the case of <2 devices/participants.

so pls ignore the below :-)

user is only member of call, then one other member joins => the user can immediately rotate the key and start using it.

wondering how that would behave in case of to-device messages. In that case you can only start sharing/sending a key with N=2 -- right?

there were two members in the call, then the other member left => the user can immediately rotate their key and start using it.

I think rotating in that case is sane -- independent of a consumer just to be on the safe side. However, that "intermediate" key cannot be really used since there is nobody to send the key to in case of to-device messages.

src/matrixrtc/MatrixRTCSession.ts Outdated Show resolved Hide resolved
Base automatically changed from hughns/rtc-test-cleanup to develop October 21, 2024 16:43
@hughns
Copy link
Member Author

hughns commented Oct 25, 2024

I've converted to draft as this will collide with #4472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants