feat(crypto): gossip the dehydrated device pickle key (MSC3814) when verifying a device - #6909
Draft
ara4n wants to merge 1 commit into
Draft
feat(crypto): gossip the dehydrated device pickle key (MSC3814) when verifying a device#6909ara4n wants to merge 1 commit into
ara4n wants to merge 1 commit into
Conversation
…vice Make the dehydrated device pickle key a gossipable secret so a user's own verified devices can share it instead of each reading it from Secret Storage: export_secret/import_secret handle the custom secret name org.matrix.msc3814 (loading/saving Changes.dehydrated_device_pickle_key), and accept_secret already routes received secrets to import_secret. On verification, request_missing_secrets also requests the dehydration key if we don't have it, so verifying a device hands it the key. Fixes element-hq/element-meta#2703.
This was referenced Aug 24, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6909 +/- ##
==========================================
- Coverage 90.12% 90.12% -0.01%
==========================================
Files 407 407
Lines 115984 116071 +87
Branches 115984 116071 +87
==========================================
+ Hits 104535 104609 +74
- Misses 7526 7532 +6
- Partials 3923 3930 +7 ☔ View full report in Codecov by Harness. |
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.
When verifying one of our own devices, also request the MSC3814 dehydrated device pickle key (alongside cross-signing keys and the backup recovery key), and serve/import it via secret gossip, so a freshly-verified device can manage the dehydrated device without reading Secret Storage.
The key is stored under its Secret Storage name (
org.matrix.msc3814) and imported directly into the crypto store rather than parked in the secret inbox, since there is no user decision to make.Part of element-hq/element-meta#2703. The companion change gossiping the key when it changes is stacked on this PR.
This code was largely written with Claude, and rebased/revalidated against current main (crypto tests pass locally with
--features experimental-push-secrets).🤖 Generated with Claude Code