pub struct SignedRootRotation {
pub bytes: Vec<u8>,
pub sig_old: Signature,
pub sig_new: Signature,
}Expand description
A rotation with both signatures, unverified (verify with super::verify_chain).
JSON: {bytes, sig_old, sig_new}; canonical: bytes ‖ sig_old ‖ sig_new, each as bytes
(§3.1, u32 length prefix).
Fields§
§bytes: Vec<u8>Canonical bytes of the RootRotation.
sig_old: SignatureSignature by old_root.
sig_new: SignatureSignature by new_root.
Implementations§
Source§impl SignedRootRotation
impl SignedRootRotation
Sourcepub fn sign(
rotation: &RootRotation,
old: &SecretKey,
new: &SecretKey,
) -> Result<Self, SignedError>
pub fn sign( rotation: &RootRotation, old: &SecretKey, new: &SecretKey, ) -> Result<Self, SignedError>
Encodes rotation once and signs it (hedged) with the retiring key old and the new
key new, proving possession of both.
§Errors
SignedError when the rotation does not encode or signing fails.
Sourcepub fn sign_deterministic(
rotation: &RootRotation,
old: &SecretKey,
new: &SecretKey,
) -> Result<Self, SignedError>
pub fn sign_deterministic( rotation: &RootRotation, old: &SecretKey, new: &SecretKey, ) -> Result<Self, SignedError>
As Self::sign, deterministically. Golden test vectors only.
§Errors
SignedError when the rotation does not encode or signing fails.
Trait Implementations§
Source§impl Clone for SignedRootRotation
impl Clone for SignedRootRotation
Source§fn clone(&self) -> SignedRootRotation
fn clone(&self) -> SignedRootRotation
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 SignedRootRotation
impl Debug for SignedRootRotation
Source§impl Decode for SignedRootRotation
impl Decode for SignedRootRotation
Source§impl<'de> Deserialize<'de> for SignedRootRotation
impl<'de> Deserialize<'de> for SignedRootRotation
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for SignedRootRotation
impl Encode for SignedRootRotation
impl Eq for SignedRootRotation
Source§impl PartialEq for SignedRootRotation
impl PartialEq for SignedRootRotation
Source§impl Serialize for SignedRootRotation
impl Serialize for SignedRootRotation
impl StructuralPartialEq for SignedRootRotation
Auto Trait Implementations§
impl Freeze for SignedRootRotation
impl RefUnwindSafe for SignedRootRotation
impl Send for SignedRootRotation
impl Sync for SignedRootRotation
impl Unpin for SignedRootRotation
impl UnsafeUnpin for SignedRootRotation
impl UnwindSafe for SignedRootRotation
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