Skip to content

[ER-59] E2EE: Send media keys via to_device message #1281

Open
4 of 7 issues completed
Open
@dbkr

Description

@dbkr

Add to-device key distribution

In addition to sending media keys as events to the room, send them via to_device events encrypted with Olm as a primary way of sending the keys, then keep the room events as backup. Add a posthog event to track when the keys don't arrive via to_device. This will allow us to migrate away from using room events in the long term as they cause the media key to be saved in the room history.

Prerequisits:

Production ready requirements

  • Exclude untrusted devices (expected to need widget api MSC changes)
  • Error handling on sending to-device events (expected to need widget api MSC changes)
  • Performance: Investigate, test the performance and eventually add ratcheting (expected to need matrixRTC MSC changes)

Tasks

Iterations: are based on Temp: see: https://excalidraw.com/#room=b7556403b8947d5ee7ac,duF48bj2SbmRTsa3ivmLFA

Iteration 1: "change transport" and "make it backwards compatible"

Iteration 2: "to device message format"

Iteration 3: "encryption error cases and security"

Other Parallelize tasks (optional)

Sub-issues

Metadata

Metadata

Assignees

Labels

EPICT-EnhancementNew features, changes in functionality, performance boosts, user-facing improvements

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions