[−][src]Struct frost_dalek::signature::SignatureAggregator
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]
parameters: Parameters,
group_key: GroupKey,
context: &'sa [u8],
message: &'sa [u8]
) -> SignatureAggregator<Initial<'sa>>
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]
&mut self,
participant_index: u32,
published_commitment_share: (RistrettoPoint, RistrettoPoint),
public_key: IndividualPublicKey
)
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 PartialThresholdSignature
s.
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 Signer
s who have yet to contribute their
partial signatures.
pub fn include_partial_signature(
&mut self,
partial_signature: PartialThresholdSignature
)
[src]
&mut self,
partial_signature: PartialThresholdSignature
)
Add a PartialThresholdSignature
to be included in the aggregation.
pub fn finalize(
mut self: Self
) -> Result<SignatureAggregator<Finalized>, HashMap<u32, &'static str>>
[src]
mut self: Self
) -> Result<SignatureAggregator<Finalized>, HashMap<u32, &'static str>>
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]
&self
) -> Result<ThresholdSignature, HashMap<u32, &'static str>>
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]
A: RefUnwindSafe,
impl<A> Send for SignatureAggregator<A> where
A: Send,
[src]
A: Send,
impl<A> Sync for SignatureAggregator<A> where
A: Sync,
[src]
A: Sync,
impl<A> Unpin for SignatureAggregator<A> where
A: Unpin,
[src]
A: Unpin,
impl<A> UnwindSafe for SignatureAggregator<A> where
A: UnwindSafe,
[src]
A: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,