Struct EnrolleeKeys
pub struct EnrolleeKeys {
pub device_id: Uuid,
pub dsk_public: HybridVerifyingKey,
pub dek_public: DekPublic,
pub nonce: [u8; 32],
}Expand description
What the enrollee (the new device B) advertises: the public halves of the device keys it generated, which A cross-signs into the directory.
The DEK is required, not optional: a device admitted without one could never be wrapped to, so it could not join a single album.
Fields§
§device_id: UuidThe enrollee’s device id.
dsk_public: HybridVerifyingKeyThe enrollee’s device signing public key.
dek_public: DekPublicThe enrollee’s device encryption public key.
nonce: [u8; 32]Fresh random bytes drawn for this ceremony alone, which the commitment and the safety code cover. Hidden under the commitment until A has revealed, so B’s input stays unpredictable even when its keys are known (a retried ceremony has already revealed them).
Implementations§
§impl EnrolleeKeys
impl EnrolleeKeys
pub fn canonical_bytes(&self) -> Vec<u8> ⓘ
pub fn canonical_bytes(&self) -> Vec<u8> ⓘ
The canonical bytes the safety code and the commitment are derived over.
pub fn commitment(&self) -> [u8; 32]
pub fn commitment(&self) -> [u8; 32]
The commitment B sends before A reveals its keys.
pub fn matches_commitment(&self, commitment: &[u8; 32]) -> bool
pub fn matches_commitment(&self, commitment: &[u8; 32]) -> bool
Whether these revealed keys are the ones commitment was made to.
pub fn into_device_entry(self, added_at: String) -> DeviceEntry
pub fn into_device_entry(self, added_at: String) -> DeviceEntry
The directory entry A cross-signs for these keys. added_at is the initiator’s clock,
never the enrollee’s claim: it bounds which manifests the new device can have signed.
Trait Implementations§
§impl Clone for EnrolleeKeys
impl Clone for EnrolleeKeys
§fn clone(&self) -> EnrolleeKeys
fn clone(&self) -> EnrolleeKeys
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for EnrolleeKeys
impl Debug for EnrolleeKeys
§impl<'de> Deserialize<'de> for EnrolleeKeys
impl<'de> Deserialize<'de> for EnrolleeKeys
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnrolleeKeys, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnrolleeKeys, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for EnrolleeKeys
§impl PartialEq for EnrolleeKeys
impl PartialEq for EnrolleeKeys
§impl Serialize for EnrolleeKeys
impl Serialize for EnrolleeKeys
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for EnrolleeKeys
Auto Trait Implementations§
impl Freeze for EnrolleeKeys
impl RefUnwindSafe for EnrolleeKeys
impl Send for EnrolleeKeys
impl Sync for EnrolleeKeys
impl Unpin for EnrolleeKeys
impl UnsafeUnpin for EnrolleeKeys
impl UnwindSafe for EnrolleeKeys
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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