[][src]Struct frost_dalek::keygen::DistributedKeyGeneration

pub struct DistributedKeyGeneration<S: DkgState> { /* fields omitted */ }

State machine structures for holding intermediate values during a distributed key generation protocol run, to prevent misuse.

Implementations

impl DistributedKeyGeneration<RoundOne>[src]

pub fn new(
    parameters: &Parameters,
    my_index: &u32,
    my_coefficients: &Coefficients,
    other_participants: &mut Vec<Participant>
) -> Result<Self, Vec<u32>>
[src]

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.

pub fn their_secret_shares(&self) -> Result<&Vec<SecretShare>, ()>[src]

Retrieve a secret share for each other participant, to be given to them at the end of DistributedKeyGeneration::<RoundOne>.

pub fn to_round_two(
    mut self: Self,
    my_secret_shares: Vec<SecretShare>
) -> Result<DistributedKeyGeneration<RoundTwo>, ()>
[src]

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.

impl DistributedKeyGeneration<RoundTwo>[src]

pub fn finish(
    mut self: Self,
    my_commitment: &RistrettoPoint
) -> Result<(GroupKey, SecretKey), ()>
[src]

Calculate this threshold signing protocol participant's long-lived secret signing keyshare and the group's public verification key.

Example

let (group_key, secret_key) = state.finish(participant.public_key()?)?;

Trait Implementations

impl<S: Clone + DkgState> Clone for DistributedKeyGeneration<S>[src]

impl<S: Debug + DkgState> Debug for DistributedKeyGeneration<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for DistributedKeyGeneration<S> where
    S: RefUnwindSafe
[src]

impl<S> Send for DistributedKeyGeneration<S> where
    S: Send
[src]

impl<S> Sync for DistributedKeyGeneration<S> where
    S: Sync
[src]

impl<S> Unpin for DistributedKeyGeneration<S> where
    S: Unpin
[src]

impl<S> UnwindSafe for DistributedKeyGeneration<S> where
    S: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,