Struct elastic_elgamal::dkg::ParticipantExchangingSecrets
source · pub struct ParticipantExchangingSecrets<G: Group> { /* private fields */ }
Expand description
Participant state during the third and final stage of the committed Pedersen’s distributed key generation.
During this stage, participants exchange secret shares corresponding to the polynomials exchanged on the previous stage. The exchange happens using secure peer-to-peer channels established between pairs of participants.
Implementations§
source§impl<G: Group> ParticipantExchangingSecrets<G>
impl<G: Group> ParticipantExchangingSecrets<G>
Returns the secret share for a participant with the specified participant_index
.
Returns indices of parties whose secret shares were not provided.
Inserts a secret share from participant with index participant_index
and
checks that the share is valid.
Errors
Returns an error if provided secret share doesn’t correspond to the participant’s public polynomial collected on the previous step of the DKG protocol.
Panics
Panics if participant_index
is out of bounds.
sourcepub fn complete(self) -> Result<ActiveParticipant<G>, Error>
pub fn complete(self) -> Result<ActiveParticipant<G>, Error>
Completes the distributed key generation protocol returning an ActiveParticipant
.
Errors
Returns error if secret shares from some parties were not provided,
or if the PublicKeySet
cannot be created from participants’ keys.
Panics
Panics if shares from any participants are missing. If this is not known statically, check
with Self::missing_shares()
before calling this method.
Trait Implementations§
source§impl<G: Clone + Group> Clone for ParticipantExchangingSecrets<G>
impl<G: Clone + Group> Clone for ParticipantExchangingSecrets<G>
source§fn clone(&self) -> ParticipantExchangingSecrets<G>
fn clone(&self) -> ParticipantExchangingSecrets<G>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more