pub struct DistributedKeyGeneration<S: DkgState> { /* private fields */ }Expand description
State machine structures for holding intermediate values during a distributed key generation protocol run, to prevent misuse.
Implementations§
Source§impl DistributedKeyGeneration<RoundOne>
impl DistributedKeyGeneration<RoundOne>
Sourcepub fn new(
parameters: &Parameters,
my_index: &u32,
my_coefficients: &Coefficients,
other_participants: &mut Vec<Participant>,
) -> Result<Self, Vec<u32>>
pub fn new( parameters: &Parameters, my_index: &u32, my_coefficients: &Coefficients, other_participants: &mut Vec<Participant>, ) -> Result<Self, Vec<u32>>
Check the zero-knowledge proofs of knowledge of secret keys of all the other participants.
§Note
The participants will be sorted by their indices.
§Returns
An updated state machine for the distributed key generation protocol if all of the zero-knowledge proofs verified successfully, otherwise a vector of participants whose zero-knowledge proofs were incorrect.
Retrieve a secret share for each other participant, to be given to them
at the end of DistributedKeyGeneration::<RoundOne>.
Sourcepub fn to_round_two(
self,
my_secret_shares: Vec<SecretShare>,
) -> Result<DistributedKeyGeneration<RoundTwo>, ()>
pub fn to_round_two( self, my_secret_shares: Vec<SecretShare>, ) -> Result<DistributedKeyGeneration<RoundTwo>, ()>
Progress to round two of the DKG protocol once we have sent each share
from DistributedKeyGeneration::<RoundOne>.their_secret_shares() to its
respective other participant, and collected our shares from the other
participants in turn.
Trait Implementations§
Source§impl<S: Clone + DkgState> Clone for DistributedKeyGeneration<S>
impl<S: Clone + DkgState> Clone for DistributedKeyGeneration<S>
Source§fn clone(&self) -> DistributedKeyGeneration<S>
fn clone(&self) -> DistributedKeyGeneration<S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more