pub struct ParticipantCollectingPolynomials<G: Group> { /* private fields */ }
Expand description
Participant state during the second stage of the committed Pedersen’s distributed key generation.
During this stage, participants exchange public polynomials and openings for the commitments exchanged on the previous stage. The exchange happens using a public bulletin board (e.g., a blockchain).
Implementations§
Source§impl<G: Group> ParticipantCollectingPolynomials<G>
impl<G: Group> ParticipantCollectingPolynomials<G>
Sourcepub fn public_info(&self) -> PublicInfo<'_, G>
pub fn public_info(&self) -> PublicInfo<'_, G>
Returns public participant information: participant’s public polynomial, proof of possession for the corresponding secret polynomial and the opening of the participant’s public key share commitment.
Sourcepub fn missing_public_polynomials(&self) -> impl Iterator<Item = usize> + '_
pub fn missing_public_polynomials(&self) -> impl Iterator<Item = usize> + '_
Returns the indices of parties whose public polynomials were not provided.
Sourcepub fn insert_public_polynomial(
&mut self,
participant_index: usize,
info: PublicInfo<'_, G>,
) -> Result<(), Error>
pub fn insert_public_polynomial( &mut self, participant_index: usize, info: PublicInfo<'_, G>, ) -> Result<(), Error>
Inserts public polynomial from participant with index participant_index
their proof of possession of the public polynomial and opening of
their previously provided commitment.
§Errors
Returns an error if provided polynomial doesn’t correspond to the previous commitment or the proof of possession is not valid.
§Panics
Panics if participant_index
is out of bounds.
Sourcepub fn finish_polynomials_phase(self) -> ParticipantExchangingSecrets<G>
pub fn finish_polynomials_phase(self) -> ParticipantExchangingSecrets<G>
Proceeds to the next step of the DKG protocol, in which participants exchange secret shares.
§Panics
Panics if any public polynomials are missing. If this is not known statically, check
with Self::missing_public_polynomials()
before calling this method.
Trait Implementations§
Source§impl<G: Clone + Group> Clone for ParticipantCollectingPolynomials<G>
impl<G: Clone + Group> Clone for ParticipantCollectingPolynomials<G>
Source§fn clone(&self) -> ParticipantCollectingPolynomials<G>
fn clone(&self) -> ParticipantCollectingPolynomials<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 ParticipantCollectingPolynomials<G>
impl<'de, G: Group> Deserialize<'de> for ParticipantCollectingPolynomials<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 ParticipantCollectingPolynomials<G>
impl<G> RefUnwindSafe for ParticipantCollectingPolynomials<G>
impl<G> Send for ParticipantCollectingPolynomials<G>
impl<G> Sync for ParticipantCollectingPolynomials<G>
impl<G> Unpin for ParticipantCollectingPolynomials<G>
impl<G> UnwindSafe for ParticipantCollectingPolynomials<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
)