[][src]Struct frost_dalek::signature::SignatureAggregator

pub struct SignatureAggregator<A: Aggregator> { /* fields omitted */ }

A signature aggregator is an untrusted party who coalesces all of the participating signers' published commitment shares and their PartialThresholdSignature and creates the final ThresholdSignature. The signature aggregator may even be one of the \(t\) participants in this signing operation.

Implementations

impl SignatureAggregator<Initial<'_>>[src]

pub fn new<'sa>(
    parameters: Parameters,
    group_key: GroupKey,
    context: &'sa [u8],
    message: &'sa [u8]
) -> SignatureAggregator<Initial<'sa>>
[src]

Construct a new signature aggregator from some protocol instantiation parameters and a message to be signed.

Inputs

  • The Parameters for this threshold signing operation,
  • The public GroupKey for the intended sets of signers,
  • An optional context string for computing the message hash,
  • The message to be signed.

Notes

The context and the message string should be given to the aggregator so that all signers can query them before deciding whether or not to sign.

Returns

A new SignatureAggregator.

pub fn include_signer(
    &mut self,
    participant_index: u32,
    published_commitment_share: (RistrettoPoint, RistrettoPoint),
    public_key: IndividualPublicKey
)
[src]

Include a signer in the protocol.

Warning

If this method is called for a specific participant, then that participant MUST provide a partial signature to give to [SignatureAggregator.include_partial_signature], otherwise the signing procedure will fail.

Panics

If the signer.participant_index doesn't match the public_key.index.

pub fn get_signers<'sa>(&'sa mut self) -> &'sa Vec<Signer>[src]

Get the list of partipating signers.

Returns

A &Vec<Signer> of the participating signers in this round.

pub fn get_remaining_signers(&self) -> Vec<Signer>[src]

Helper function to get the remaining signers who were expected to sign, but have not yet contributed their PartialThresholdSignatures.

This can be used by an honest aggregator who wishes to ensure that the aggregation procedure is ready to be run, or who wishes to be able to remind/poll individual signers for their PartialThresholdSignature contribution.

Returns

A sorted Vec of unique Signers who have yet to contribute their partial signatures.

pub fn include_partial_signature(
    &mut self,
    partial_signature: PartialThresholdSignature
)
[src]

Add a PartialThresholdSignature to be included in the aggregation.

pub fn finalize(
    mut self: Self
) -> Result<SignatureAggregator<Finalized>, HashMap<u32, &'static str>>
[src]

Ensure that this signature aggregator is in a proper state to run the aggregation protocol.

Returns

A Result whose Ok() value is a finalized aggregator, otherwise a Hashmap<u32, &'static str> containing the participant indices of the misbehaving signers and a description of their misbehaviour.

If the Hashmap contains a key for 0, this indicates that the aggregator did not have (( t' )) partial signers s.t. (( t \le t' \le n )).

impl SignatureAggregator<Finalized>[src]

pub fn aggregate(
    &self
) -> Result<ThresholdSignature, HashMap<u32, &'static str>>
[src]

Aggregate a set of previously-collected partial signatures.

Returns

A Result whose Ok() value is a ThresholdSignature, otherwise a Hashmap<u32, &'static str> containing the participant indices of the misbehaving signers and a description of their misbehaviour.

Trait Implementations

impl<A: Debug + Aggregator> Debug for SignatureAggregator<A>[src]

Auto Trait Implementations

impl<A> RefUnwindSafe for SignatureAggregator<A> where
    A: RefUnwindSafe
[src]

impl<A> Send for SignatureAggregator<A> where
    A: Send
[src]

impl<A> Sync for SignatureAggregator<A> where
    A: Sync
[src]

impl<A> Unpin for SignatureAggregator<A> where
    A: Unpin
[src]

impl<A> UnwindSafe for SignatureAggregator<A> where
    A: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,