Skip to content

Add pinned cross-signing and durable room-key recovery - #26

Merged
TroyHernandez merged 3 commits into
mainfrom
feat/matrix-cross-signing-recovery
Sep 7, 2026
Merged

TroyHernandez merged 3 commits into
mainfrom
feat/matrix-cross-signing-recovery

Conversation

@TroyHernandez

Copy link
Copy Markdown
Contributor

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 = TRUE without 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.8 commit 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.

@TroyHernandez
TroyHernandez merged commit 18b4564 into main Sep 7, 2026
2 of 4 checks passed
@TroyHernandez
TroyHernandez deleted the feat/matrix-cross-signing-recovery branch September 11, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant