pub struct DeviceEntry {
pub device_id: Uuid,
pub dsk_public: HybridVerifyingKey,
pub dek_public: Option<DekPublic>,
pub added_at: String,
pub revoked_at: Option<String>,
pub unknown: BTreeMap<String, Value>,
}Expand description
One device’s published entry. A revoked device’s entry is retained (marked with
revoked_at), never deleted, so manifests it signed before revocation stay verifiable.
Fields§
§device_id: UuidStable device id.
dsk_public: HybridVerifyingKeyThe device signing key’s hybrid public half.
dek_public: Option<DekPublic>The device encryption key’s public half — what a peer encapsulates to.
Wire-absent when unpublished, never a present null: the entry is inside the
IK-signed core, so presence is signature-visible (see the module docs). A device that has
not published a DEK encodes exactly the bytes it did before this field existed.
added_at: StringRFC3339 time the device was added (must precede any manifest it signs).
revoked_at: Option<String>RFC3339 revocation time, if revoked.
unknown: BTreeMap<String, Value>Keys a newer writer added that this build does not know, preserved verbatim and signed over as part of the core. Empty (and so wire-absent) on everything this build writes.
A key here must never collide with a known field name: the decoder only ever places the keys it did not recognise here, and a caller building an entry by hand must do the same.
Implementations§
Source§impl DeviceEntry
impl DeviceEntry
Sourcepub fn encapsulate(&self) -> Result<(Vec<u8>, [u8; 32]), CryptoError>
pub fn encapsulate(&self) -> Result<(Vec<u8>, [u8; 32]), CryptoError>
Encapsulate a fresh shared secret to this published entry — the whole point of cross-signing the DEK: a peer holding nothing but an IK-verified directory can wrap a key to a device it has never met.
Refused (rather than silently mis-wrapped) when the device is revoked — the design forbids delivering new key wraps to a revoked device — or when it has published no DEK.
Trait Implementations§
Source§impl Clone for DeviceEntry
impl Clone for DeviceEntry
Source§fn clone(&self) -> DeviceEntry
fn clone(&self) -> DeviceEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceEntry
impl Debug for DeviceEntry
Source§impl<'de> Deserialize<'de> for DeviceEntry
impl<'de> Deserialize<'de> for DeviceEntry
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
impl Eq for DeviceEntry
Source§impl PartialEq for DeviceEntry
impl PartialEq for DeviceEntry
Source§fn eq(&self, other: &DeviceEntry) -> bool
fn eq(&self, other: &DeviceEntry) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DeviceEntry
impl Serialize for DeviceEntry
impl StructuralPartialEq for DeviceEntry
Auto Trait Implementations§
impl Freeze for DeviceEntry
impl RefUnwindSafe for DeviceEntry
impl Send for DeviceEntry
impl Sync for DeviceEntry
impl Unpin for DeviceEntry
impl UnsafeUnpin for DeviceEntry
impl UnwindSafe for DeviceEntry
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