Page MenuHomePhorge

Send only relevant ciphertext to each device when sharing room keys
ClosedPublic

Authored by tusooa on May 11 2024, 4:50 PM.
Tags
None
Referenced Files
F113127: D27.1732385941.diff
Fri, Nov 22, 10:19 AM
F113122: D27.1732384977.diff
Fri, Nov 22, 10:02 AM
F112996: D27.1732364120.diff
Fri, Nov 22, 4:15 AM
Subscribers
None

Details

Summary

This commit changes the key sharing workflow so that we only send to some device the ciphertext for that specific device. This means a device will now only receive room keys encrypted for it, and no longer receive ciphertext for other devices.

Some clients, like Element Android or Element iOS, only checks the first kv-pair of the ciphertext map in an olm-encrypted event. This fixes the problem where these clients cannot properly parse our room key events.

Type: add

BUG: https://iron.lily-is.land/T45

Test Plan

Verify unit tests pass.

Build kazv against libkazv at this commit.
Run kazv and rotate the megolm session of some room (by going into an encrypted room, going to some user's UserPage, and changing the trust level of one of their devices from Unseen to Blocked then back to Unseen).
Send a message to that room.
Verify, from an Element Android client, that you can receive that message and no white shield ("The authenticity of this message cannot be verified on this device" indicator) appears.

Diff Detail

Repository
rL libkazv
Lint
Lint Not Applicable
Unit
Tests Not Applicable