Add pinned cross-signing and durable room-key recovery - #26
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Matrix cross-signing bootstrap and requested room-key recovery for persistent E2EE clients. Bootstrap preserves the existing device identity, persists private signing keys before public upload, retries password UIA, and refuses a server/local master mismatch. Device queries verify signatures and require the local master pin before marking the client's own devices cross-signed.
Missing Megolm sessions now create durable, deduplicated requests with stable ids and explicit sent state. Requested forwarded keys are accepted only over Olm from the same user's pinned cross-signed devices, and never authenticate the original sender. Own outbound sessions keep an inbound mirror, so encrypted echoes decrypt with
is_self = TRUEwithout requesting keys from this device. Malformed peer signatures do not abort verification of other devices. Bootstrap reruns upload only missing/invalid signatures.The public vignette documents bootstrap, pinning, and save-before-send request transport generically. SAS verification, automatic history forwarding, and expiry of sent but unanswered requests remain follow-ups.
Required dependency increases: Imports mx.api >= 0.3.0.2; Suggests mx.crypto >= 0.2.1.1. These floors are needed by the new cross-signing and Megolm APIs.
Validation: all four final sources were installed into a fresh isolated library; mx.client passes 315/315, mx.crypto 100/100, mx.api 208/208, and chat.api on current main passes 1092/1092. R CMD check passed for the reviewed mx.client package. Changed CI YAML and shell syntax also pass local validation.
Version 0.2.0.8 is recorded in a separate
Bump version to 0.2.0.8commit touching only DESCRIPTION and NEWS.md. CI configuration is also a separate commit.Upstream prerequisites:
Expected temporary CI failure: the required dev packages are not yet published to drat. CI now explicitly installs those sources before dependency resolution, bypasses rapt's older package-name-selected binaries, and fails clearly if either version floor is unmet. The hosted runners supply the Rust toolchain for mx.crypto's vendored source build. Rerun CI after upstream publication; merge mx.client before chat.api, whose CI installs mx.client from GitHub main.