mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-25 01:02:20 -04:00
docs(sdk): Clarify what it means for a device to be verified
This commit is contained in:
@@ -278,16 +278,20 @@ impl Device {
|
||||
/// [`Device::request_verification()`] method.
|
||||
///
|
||||
/// A [`Device`] can also be manually signed using the [`Device::verify()`]
|
||||
/// method, this works only for devices belonging to our own user. Do note
|
||||
/// that the device that is being manually signed will not trust our own
|
||||
/// user identity like it would if we interactively verify the device. Such
|
||||
/// a device can mark our own user as verified using the
|
||||
/// method, this works only for devices belonging to our own user.
|
||||
///
|
||||
/// Do note that the device that is being manually signed will not trust our
|
||||
/// own user identity like it would if we interactively verify the device.
|
||||
/// Such a device can mark our own user as verified using the
|
||||
/// [`UserIdentity::verify()`] method.
|
||||
///
|
||||
/// ### Verification of devices belonging to our own user.
|
||||
///
|
||||
/// If the device belongs to our own user, the device needs to be signed by
|
||||
/// our self-signing key and our own user identity needs to be verified.
|
||||
/// If the device belongs to our own user, the device will be considered to
|
||||
/// be verified if:
|
||||
///
|
||||
/// * The device has been signed by our self-signing key
|
||||
/// * Our own user identity is considered to be [verified]
|
||||
///
|
||||
/// In other words we need to find a valid signature chain from our user
|
||||
/// identity to the device:
|
||||
@@ -302,14 +306,13 @@ impl Device {
|
||||
///
|
||||
/// ### Verification of devices belonging to other users.
|
||||
///
|
||||
/// If the device belongs to some other user, the device needs to be signed
|
||||
/// by the user's user-signing key and the user identity, the user's
|
||||
/// identity needs to be signed by our own identity, and our own identity
|
||||
/// needs to be verified.
|
||||
/// If the device belongs to some other user it will be considered to be
|
||||
/// verified if:
|
||||
///
|
||||
/// In other words we need to find a valid signature chain from our user
|
||||
/// identity to the identity of the other user and finally to the user's
|
||||
/// device.
|
||||
/// * The device has been signed by the user's self-signing key
|
||||
/// * The user's master-signing key has been signed by our own user-signing
|
||||
/// key, i.e. our own identity trusts the other users identity.
|
||||
/// * Our own user identity is considered to be [verified]
|
||||
///
|
||||
/// ```text
|
||||
/// ┌─────────────────────────────────────┐
|
||||
@@ -365,6 +368,7 @@ impl Device {
|
||||
///
|
||||
/// [`UserIdentity::verify()`]:
|
||||
/// crate::encryption::identities::UserIdentity::verify
|
||||
/// [verified]: crate::encryption::identities::UserIdentity::verified
|
||||
pub fn verified(&self) -> bool {
|
||||
self.inner.verified()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user