pub struct SignedAlbumRoster {
pub roster: AlbumRoster,
pub attester_sig: HybridSignature,
}Expand description
An AlbumRoster plus the attesting device’s DSK hybrid signature over it.
Fields§
§roster: AlbumRosterThe attested roster.
attester_sig: HybridSignatureThe attesting DSK’s hybrid signature over AlbumRoster::signing_bytes.
Implementations§
Source§impl SignedAlbumRoster
impl SignedAlbumRoster
Sourcepub fn sign(
roster: AlbumRoster,
dsk: &HybridSigningKey,
) -> Result<Self, MembershipError>
pub fn sign( roster: AlbumRoster, dsk: &HybridSigningKey, ) -> Result<Self, MembershipError>
Sign roster with the attesting device’s DSK.
The caller is responsible for roster.attested_by_device naming the device dsk
belongs to; verify is what checks it, on the other end.
§Errors
Returns MembershipError::Encode if the roster cannot be canonically encoded.
Sourcepub fn verify(&self, directory: &DeviceDirectory) -> Result<(), MembershipError>
pub fn verify(&self, directory: &DeviceDirectory) -> Result<(), MembershipError>
Verify the attester’s DSK hybrid signature (Ed25519 and ML-DSA) against the album owner’s published device directory.
Stricter than the upgrade intent’s check in one respect: a device the directory has revoked may not attest a roster, whatever it signed before. The entry is retained so that older manifests stay verifiable; it is not a licence to keep issuing new documents.
§Errors
Returns MembershipError::Attester when the directory names a different account, does
not hold the attesting device, holds it revoked, or the signature does not verify under
its DSK.
Trait Implementations§
Source§impl Clone for SignedAlbumRoster
impl Clone for SignedAlbumRoster
Source§fn clone(&self) -> SignedAlbumRoster
fn clone(&self) -> SignedAlbumRoster
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 SignedAlbumRoster
impl Debug for SignedAlbumRoster
Source§impl<'de> Deserialize<'de> for SignedAlbumRoster
impl<'de> Deserialize<'de> for SignedAlbumRoster
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SignedAlbumRoster
Source§impl PartialEq for SignedAlbumRoster
impl PartialEq for SignedAlbumRoster
Source§fn eq(&self, other: &SignedAlbumRoster) -> bool
fn eq(&self, other: &SignedAlbumRoster) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SignedAlbumRoster
impl Serialize for SignedAlbumRoster
impl StructuralPartialEq for SignedAlbumRoster
Auto Trait Implementations§
impl Freeze for SignedAlbumRoster
impl RefUnwindSafe for SignedAlbumRoster
impl Send for SignedAlbumRoster
impl Sync for SignedAlbumRoster
impl Unpin for SignedAlbumRoster
impl UnsafeUnpin for SignedAlbumRoster
impl UnwindSafe for SignedAlbumRoster
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