pub struct PrivateCrossSigningIdentity { /* private fields */ }
Expand description
Private cross signing identity.
This object holds the private and public ed25519 key triplet that is used for cross signing.
The object might be completely empty or have only some of the key pairs available.
It can be used to sign devices or other identities.
Implementations§
source§impl PrivateCrossSigningIdentity
impl PrivateCrossSigningIdentity
sourcepub async fn is_empty(&self) -> bool
pub async fn is_empty(&self) -> bool
Is the identity empty.
An empty identity doesn’t contain any private keys.
It is usual for the identity not to contain the master key since the master key is only needed to sign the subkeys.
An empty identity indicates that either no identity was created for this use or that another device created it and hasn’t shared it yet with us.
sourcepub async fn master_key_id(&self) -> Option<OwnedDeviceKeyId>
pub async fn master_key_id(&self) -> Option<OwnedDeviceKeyId>
Get the key ID of the master key.
sourcepub async fn can_sign_devices(&self) -> bool
pub async fn can_sign_devices(&self) -> bool
Can we sign our own devices, i.e. do we have a self signing key.
sourcepub async fn can_sign_users(&self) -> bool
pub async fn can_sign_users(&self) -> bool
Can we sign other users, i.e. do we have a user signing key.
sourcepub async fn has_master_key(&self) -> bool
pub async fn has_master_key(&self) -> bool
Do we have the master key.
sourcepub async fn status(&self) -> CrossSigningStatus
pub async fn status(&self) -> CrossSigningStatus
Get the status of our private cross signing keys, i.e. if we have the master key and the subkeys.
sourcepub async fn master_public_key(&self) -> Option<MasterPubkey>
pub async fn master_public_key(&self) -> Option<MasterPubkey>
Get the public part of the master key, if we have one.
sourcepub async fn self_signing_public_key(&self) -> Option<SelfSigningPubkey>
pub async fn self_signing_public_key(&self) -> Option<SelfSigningPubkey>
Get the public part of the self-signing key, if we have one.
sourcepub async fn user_signing_public_key(&self) -> Option<UserSigningPubkey>
pub async fn user_signing_public_key(&self) -> Option<UserSigningPubkey>
Get the public part of the user-signing key, if we have one.
sourcepub async fn export_secret(&self, secret_name: &SecretName) -> Option<String>
pub async fn export_secret(&self, secret_name: &SecretName) -> Option<String>
Export the seed of the private cross signing key
The exported seed will be encoded as unpadded base64.
§Arguments
secret_name
- The type of the cross signing key that should be exported.
sourcepub async fn import_secrets_unchecked(
&self,
master_key: Option<&str>,
self_signing_key: Option<&str>,
user_signing_key: Option<&str>,
) -> Result<(), SecretImportError>
pub async fn import_secrets_unchecked( &self, master_key: Option<&str>, self_signing_key: Option<&str>, user_signing_key: Option<&str>, ) -> Result<(), SecretImportError>
Import the private parts of the cross signing keys into this identity.
The private parts should be unexpanded Ed25519 keys encoded as a base64 string.
Note: This method won’t check if the public keys match the public keys present on the server.
Mark the identity as shared.
Has the identity been shared.
A shared identity here means that the public keys of the identity have been uploaded to the server.
sourcepub async fn pickle(&self) -> PickledCrossSigningIdentity
pub async fn pickle(&self) -> PickledCrossSigningIdentity
sourcepub fn from_pickle(
pickle: PickledCrossSigningIdentity,
) -> Result<Self, SigningError>
pub fn from_pickle( pickle: PickledCrossSigningIdentity, ) -> Result<Self, SigningError>
Restore the private cross signing identity from a pickle.
§Panic
Panics if the pickle_key isn’t 32 bytes long.
Trait Implementations§
source§impl Clone for PrivateCrossSigningIdentity
impl Clone for PrivateCrossSigningIdentity
source§fn clone(&self) -> PrivateCrossSigningIdentity
fn clone(&self) -> PrivateCrossSigningIdentity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for PrivateCrossSigningIdentity
impl !RefUnwindSafe for PrivateCrossSigningIdentity
impl Send for PrivateCrossSigningIdentity
impl Sync for PrivateCrossSigningIdentity
impl Unpin for PrivateCrossSigningIdentity
impl !UnwindSafe for PrivateCrossSigningIdentity
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more