element-hq / element-hq/element-android

E2E | Sending megolm keys sooner

Open
#1,158 0 comments 0 reactions 0 assignees View on GitHub
A-E2EE
Dominant language
Kotlin
Stars
3.7k
Forks
917
Avg merge
8d 20h
Merged PRs (30d)
1

Description

Refactor key sending to operate as follows:
- Get olm sessions that are already established
- In parallel:
- Send megolm keys to existing olm sessions
- Start olm sessions with new devices, but with a 2s timeout to /keys/claim
- Send org.matrix.room_key.withheld (MSC2399) messages to blocked devices
- Send message to room
- Start olm sessions with devices that it was unable to establish a session with earlier, but with no timeout specified to /keys/claim (which will result in a 10s timeout)

When a user starts typing in an encrypted room, start creating olm sessions and sending megolm keys (as above), so that fewer keys need to be sent when the user hits “send”. (In web, we do this every time the user hits a key, up to a maximum of once a minute.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.