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
F113719: D27.1732488755.diff
Sat, Nov 23, 2:52 PM
F113718: D27.1732488751.diff
Sat, Nov 23, 2:52 PM
F113685: D27.1732488495.diff
Sat, Nov 23, 2:48 PM
F113516: D27.1732461661.diff
Sat, Nov 23, 7:21 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