Struct signed::SignedRootRotation
zaun_community_protocol::signed::SignedRootRotation · Struct
pub struct SignedRootRotation { … }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.
Fields
Section titled “Fields”bytes: Vec<u8>
Section titled “bytes: Vec<u8>”Canonical bytes of the RootRotation.
sig_old: Signature
Section titled “sig_old: Signature”Signature by old_root.
sig_new: Signature
Section titled “sig_new: Signature”Signature by new_root.
Methods
Section titled “Methods”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
Section titled “Errors”SignedError when the rotation does not encode or signing fails.
sign_deterministic
Section titled “sign_deterministic”pub fn sign_deterministic(rotation: &RootRotation, old: &SecretKey, new: &SecretKey) -> Result<Self, SignedError>As Self::sign, deterministically. Golden test vectors only.
Errors
Section titled “Errors”SignedError when the rotation does not encode or signing fails.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Decode, Deserialize<'de>, Encode, Eq, PartialEq, Serialize, StructuralPartialEq