-
Notifications
You must be signed in to change notification settings - Fork 345
feat(crypto): Start using the stable identifier for the sender device keys #4964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Should close: element-hq/element-meta#2683. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4964 +/- ##
==========================================
+ Coverage 85.92% 85.97% +0.04%
==========================================
Files 325 325
Lines 35649 35665 +16
==========================================
+ Hits 30633 30664 +31
+ Misses 5016 5001 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… keys This patch updates the sending side of the `sender_device_keys` field introduced in MSC4147. Since the MSC got merged, we're switching from the unstable identifier to the stable one. A couple of snapshot tests were added modified to make this happen.
422bc96 to
824102b
Compare
bnjbvr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have absolutely no clues about what this does, but I assume you do, and the code looks good to me 👍
(In case this question is useful: since the OlmV1Event seem to be serialized/deserialized, this might mean that a previous sender_device_keys inserted before this patch will be missing after this patch: is this OK, or does this warrant a data migration?)
It just renames an identifier, nothing fancy.
Hmm, I don't think it will be missing after this patch. The deserialization is still using a matrix-rust-sdk/crates/matrix-sdk-crypto/src/types/events/olm_v1.rs Lines 194 to 195 in 8131301
|
richvdh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For js-sdk users, this includes the following:
- Send stable identifier `sender_device_keys` for MSC4147 (Including device keys with Olm-encrypted events).
([#4964](matrix-org/matrix-rust-sdk#4964))
- Check the `sender_device_keys` field on _all_ incoming Olm-encrypted to-device messages and ignore any to-device messages which include the field but whose data is invalid (as per [MSC4147](matrix-org/matrix-spec-proposals#4147)).
([#4922](matrix-org/matrix-rust-sdk#4922))
- Fix bug which caused room keys to be unnecessarily rotated on every send in the presence of blacklisted/withheld devices in the room.
([#4954](matrix-org/matrix-rust-sdk#4954))
- Fix [matrix-rust-sdk#2729](matrix-org/matrix-rust-sdk#2729) which in rare cases can cause room key oversharing.
([#4975](matrix-org/matrix-rust-sdk#4975))
For js-sdk users, this includes the following:
- Send stable identifier `sender_device_keys` for MSC4147 (Including device keys with Olm-encrypted events).
([#4964](matrix-org/matrix-rust-sdk#4964))
- Check the `sender_device_keys` field on _all_ incoming Olm-encrypted to-device messages and ignore any to-device messages which include the field but whose data is invalid (as per [MSC4147](matrix-org/matrix-spec-proposals#4147)).
([#4922](matrix-org/matrix-rust-sdk#4922))
- Fix bug which caused room keys to be unnecessarily rotated on every send in the presence of blacklisted/withheld devices in the room.
([#4954](matrix-org/matrix-rust-sdk#4954))
- Fix [matrix-rust-sdk#2729](matrix-org/matrix-rust-sdk#2729) which in rare cases can cause room key oversharing.
([#4975](matrix-org/matrix-rust-sdk#4975))
For js-sdk users, this includes the following:
- Send stable identifier `sender_device_keys` for MSC4147 (Including device keys with Olm-encrypted events).
([#4964](matrix-org/matrix-rust-sdk#4964))
- Check the `sender_device_keys` field on _all_ incoming Olm-encrypted to-device messages and ignore any to-device messages which include the field but whose data is invalid (as per [MSC4147](matrix-org/matrix-spec-proposals#4147)).
([#4922](matrix-org/matrix-rust-sdk#4922))
- Fix bug which caused room keys to be unnecessarily rotated on every send in the presence of blacklisted/withheld devices in the room.
([#4954](matrix-org/matrix-rust-sdk#4954))
- Fix [matrix-rust-sdk#2729](matrix-org/matrix-rust-sdk#2729) which in rare cases can cause room key oversharing.
([#4975](matrix-org/matrix-rust-sdk#4975))
For js-sdk users, this includes the following:
- Send stable identifier `sender_device_keys` for MSC4147 (Including device keys with Olm-encrypted events).
([#4964](matrix-org/matrix-rust-sdk#4964))
- Check the `sender_device_keys` field on _all_ incoming Olm-encrypted to-device messages and ignore any to-device messages which include the field but whose data is invalid (as per [MSC4147](matrix-org/matrix-spec-proposals#4147)).
([#4922](matrix-org/matrix-rust-sdk#4922))
- Fix bug which caused room keys to be unnecessarily rotated on every send in the presence of blacklisted/withheld devices in the room.
([#4954](matrix-org/matrix-rust-sdk#4954))
- Fix [matrix-rust-sdk#2729](matrix-org/matrix-rust-sdk#2729) which in rare cases can cause room key oversharing.
([#4975](matrix-org/matrix-rust-sdk#4975))
For js-sdk users, this includes the following:
- Send stable identifier `sender_device_keys` for MSC4147 (Including device keys with Olm-encrypted events).
([#4964](matrix-org/matrix-rust-sdk#4964))
- Check the `sender_device_keys` field on _all_ incoming Olm-encrypted to-device messages and ignore any to-device messages which include the field but whose data is invalid (as per [MSC4147](matrix-org/matrix-spec-proposals#4147)).
([#4922](matrix-org/matrix-rust-sdk#4922))
- Fix bug which caused room keys to be unnecessarily rotated on every send in the presence of blacklisted/withheld devices in the room.
([#4954](matrix-org/matrix-rust-sdk#4954))
- Fix [matrix-rust-sdk#2729](matrix-org/matrix-rust-sdk#2729) which in rare cases can cause room key oversharing.
([#4975](matrix-org/matrix-rust-sdk#4975))
This patch updates the sending side of the
sender_device_keysfield introduced in MSC4147.Since the MSC got merged, we're switching from the unstable identifier to the stable one.
A couple of snapshot tests were added modified to make this happen.