ThresholdSupervisor

Trait ThresholdSupervisor 

Source
pub trait ThresholdSupervisor: Supervisor {
    type Identity;
    type Seed;
    type Polynomial;
    type Share;

    // Required methods
    fn identity(&self) -> &Self::Identity;
    fn leader(
        &self,
        index: Self::Index,
        seed: Self::Seed,
    ) -> Option<Self::PublicKey>;
    fn polynomial(&self, index: Self::Index) -> Option<&Self::Polynomial>;
    fn share(&self, index: Self::Index) -> Option<&Self::Share>;
}
Expand description

ThresholdSupervisor is the interface responsible for managing which polynomial (typically a polynomial with a fixed constant identity) and share for a participant is active at a given time.

§Synchronization

The same considerations for crate::Supervisor apply here.

Required Associated Types§

Source

type Identity

Identity is the type against which threshold signatures are verified.

Source

type Seed

Seed is some random value used to bias the leader selection process.

Source

type Polynomial

Polynomial is the group polynomial over which partial signatures are verified.

Source

type Share

Share is the type used to generate a partial signature that can be verified against Identity.

Required Methods§

Source

fn identity(&self) -> &Self::Identity

Returns the static identity of the shared secret (typically the constant term of a polynomial).

Source

fn leader( &self, index: Self::Index, seed: Self::Seed, ) -> Option<Self::PublicKey>

Return the leader at a given index over the provided seed.

Source

fn polynomial(&self, index: Self::Index) -> Option<&Self::Polynomial>

Returns the polynomial over which partial signatures are verified at a given index.

Source

fn share(&self, index: Self::Index) -> Option<&Self::Share>

Returns share to sign with at a given index. After resharing, the share may change (and old shares may be deleted).

This can be used to generate a partial signature that can be verified against polynomial.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§