Skip to content

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.

Canonical bytes of the RootRotation.

Signature by old_root.

Signature by new_root.

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.

SignedError when the rotation does not encode or signing fails.

pub fn sign_deterministic(rotation: &RootRotation, old: &SecretKey, new: &SecretKey) -> Result<Self, SignedError>

As Self::sign, deterministically. Golden test vectors only.

SignedError when the rotation does not encode or signing fails.

Clone, Debug, Decode, Deserialize<'de>, Encode, Eq, PartialEq, Serialize, StructuralPartialEq

Full rustdoc page