[−][src]Struct frost_dalek::keygen::DistributedKeyGeneration
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]
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.
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]
mut self: 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.
impl DistributedKeyGeneration<RoundTwo>
[src]
pub fn finish(
mut self: Self,
my_commitment: &RistrettoPoint
) -> Result<(GroupKey, SecretKey), ()>
[src]
mut self: Self,
my_commitment: &RistrettoPoint
) -> Result<(GroupKey, SecretKey), ()>
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]
pub fn clone(&self) -> DistributedKeyGeneration<S>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug + DkgState> Debug for DistributedKeyGeneration<S>
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for DistributedKeyGeneration<S> where
S: RefUnwindSafe,
[src]
S: RefUnwindSafe,
impl<S> Send for DistributedKeyGeneration<S> where
S: Send,
[src]
S: Send,
impl<S> Sync for DistributedKeyGeneration<S> where
S: Sync,
[src]
S: Sync,
impl<S> Unpin for DistributedKeyGeneration<S> where
S: Unpin,
[src]
S: Unpin,
impl<S> UnwindSafe for DistributedKeyGeneration<S> where
S: UnwindSafe,
[src]
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,