Page MenuHomePhorge

Validate sender_device_keys for olm-encrypted events
Needs ReviewPublic

Authored by tusooa on Fri, Jun 5, 4:30 PM.

Details

Reviewers
None
Group Reviewers
O1: the Kazv Project
Summary

Before, when we receive an olm-encrypted event and do not yet have the sender's identity keys, we are not able to verify the decrypted event, causing a decryption error. Moreover, once we send our first olm-encrypted event to the other party, querying their keys, we will create our own outbound session and it will replace their session, causing us to be no longer able to decrypt their first message.

Matrix v1.15 adds a mechanism to send device keys info along with the encrypted message. With this, we can fix some situations where such decryption cannot be performed properly. A whole fix still needs to properly query the keys for these undecryptable sessions.

Type: add

CCBUG: https://iron.lily-is.land/T141

Test Plan

Log in to a new session using kazv and verify E2EE still works.
Verify unit tests pass.
Verify unit tests cover the checks in https://spec.matrix.org/v1.18/client-server-api/#validation-of-incoming-decrypted-events .

Diff Detail

Repository
rL libkazv
Branch
tusooa/stacked
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 621
Build 1224: Invoke BuildbotBuildbot build #1782
Build 1223: arc lint + arc unit