You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of supporting Invisible Crypto, we want to store information about the sender with an InboundGroupSession (and persist it, so it needs to be in InboundGroupSessionPickle too).
Add something like this to InboundGroupSession and PickledInboundGroupSession
sender_data: InboundGroupSessionSenderData,
Where
/// Information on the device and user that sent the megolm session data to us
#[derive(Clone)]
pub enum InboundGroupSessionSenderData {
/// We have not yet found the (signed) device info for the sending device
UnknownDevice {
// we may need to handle unsigned and unknown devices separately, which
// probably necessitates a flag here
retry_details: RetryDetails,
legacy_session: bool,
},
/// We have the signed device info for the sending device, but not yet the
/// cross-signing key that it was signed with.
DeviceInfo {
device_keys: DeviceKeys,
retry_details: RetryDetails,
legacy_session: bool
},
/// We have figured out the MSK and user
SenderKnown {
mxid: OwnedUserId,
msk: Ed25519PublicKey,
/// Whether, at the time we checked the signature on the device,
/// we had actively verified that `msk` belongs to the user.
msk_verified: bool, // or maybe VerificationState
},
}
#[derive(Clone)]
struct RetryDetails {
retry_count: u8,
next_retry_time_ms: MillisecondsSinceUnixEpoch,
}
PickledInboundGroupSession must be deserializable from an existing stored inbound group session (ie, one which lacks a sender_data field). In this case, it is a “legacy” session; we set it to UnknownDevice with legacy_session=true and a next_retry_time_ms in the near future).
The text was updated successfully, but these errors were encountered:
andybalaam
changed the title
Support sender data in InboundGroupSession and InboundGroupSessionPickle
Sender Data: Support sender data in InboundGroupSession and InboundGroupSessionPickle
Jun 13, 2024
As part of supporting Invisible Crypto, we want to store information about the sender with an
InboundGroupSession
(and persist it, so it needs to be inInboundGroupSessionPickle
too).Part of #3544 which is part of Invisible Crypto.
Add something like this to InboundGroupSession and PickledInboundGroupSession
Where
PickledInboundGroupSession
must be deserializable from an existing stored inbound group session (ie, one which lacks a sender_data field). In this case, it is a “legacy” session; we set it toUnknownDevice
withlegacy_session=true
and anext_retry_time_ms
in the near future).The text was updated successfully, but these errors were encountered: