Trait modular_frost::sign::SignatureMachine

source ·
pub trait SignatureMachine<S>: Send + Sync {
    type SignatureShare: Clone + PartialEq + Writable;

    // Required methods
    fn read_share<R: Read>(
        &self,
        reader: &mut R,
    ) -> Result<Self::SignatureShare>;
    fn complete(
        self,
        shares: HashMap<Participant, Self::SignatureShare>,
    ) -> Result<S, FrostError>;
}
Expand description

Trait for the final machine of a two-round signing protocol.

Required Associated Types§

source

type SignatureShare: Clone + PartialEq + Writable

SignatureShare message for this machine.

Required Methods§

source

fn read_share<R: Read>(&self, reader: &mut R) -> Result<Self::SignatureShare>

Read a Signature Share message.

source

fn complete( self, shares: HashMap<Participant, Self::SignatureShare>, ) -> Result<S, FrostError>

Complete signing. Takes in everyone elses’ shares. Returns the signature.

Object Safety§

This trait is not object safe.

Implementors§