pub struct RotationAttestation { /* private fields */ }Expand description
A signed statement that one keypair authorizes a successor public bundle at a given epoch.
Implementations§
Source§impl RotationAttestation
impl RotationAttestation
Sourcepub fn new_public(&self) -> &PublicKeyBundle
pub fn new_public(&self) -> &PublicKeyBundle
The attested successor public bundle. Only trustworthy once the
attestation has passed verify_rotation.
Sourcepub fn epoch(&self) -> u64
pub fn epoch(&self) -> u64
The caller-chosen monotonic epoch bound into the signature. Verifiers must reject an attestation whose epoch does not advance past the last one they accepted for this signer (see the module docs on rollback).
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialize to the QSR2 wire format:
header[6] || epoch (u64_be, 8) || new_public (QSP2, 4230) || signature (QSS2, 4697).
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Parse a QSR2 attestation.
§Errors
Error::InvalidSignature on malformed input; version/suite errors for
other formats. The signature is not checked here — call
verify_rotation.
Trait Implementations§
Source§impl Clone for RotationAttestation
impl Clone for RotationAttestation
Source§fn clone(&self) -> RotationAttestation
fn clone(&self) -> RotationAttestation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RotationAttestation
impl Debug for RotationAttestation
impl Eq for RotationAttestation
Source§impl PartialEq for RotationAttestation
impl PartialEq for RotationAttestation
impl StructuralPartialEq for RotationAttestation
Auto Trait Implementations§
impl Freeze for RotationAttestation
impl RefUnwindSafe for RotationAttestation
impl Send for RotationAttestation
impl Sync for RotationAttestation
impl Unpin for RotationAttestation
impl UnsafeUnpin for RotationAttestation
impl UnwindSafe for RotationAttestation
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
Mutably borrows from an owned value. Read more