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 moreSource§impl<'de, G: Group> Deserialize<'de> for ParticipantExchangingSecrets<G>
impl<'de, G: Group> Deserialize<'de> for ParticipantExchangingSecrets<G>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<G> Freeze for ParticipantExchangingSecrets<G>
impl<G> RefUnwindSafe for ParticipantExchangingSecrets<G>
impl<G> Send for ParticipantExchangingSecrets<G>
impl<G> Sync for ParticipantExchangingSecrets<G>
impl<G> Unpin for ParticipantExchangingSecrets<G>
impl<G> UnwindSafe for ParticipantExchangingSecrets<G>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)