pub struct GenericKeygenBuilder<'a, E, M, L, D>{ /* private fields */ }Expand description
Key generation entry point with choice for threshold or non-threshold variant
Implementations§
Source§impl<'a, E, L, D> GenericKeygenBuilder<'a, E, NonThreshold, L, D>
impl<'a, E, L, D> GenericKeygenBuilder<'a, E, NonThreshold, L, D>
Sourcepub fn new(
eid: ExecutionId<'a>,
i: u16,
n: u16,
) -> GenericKeygenBuilder<'a, E, NonThreshold, L, D>
pub fn new( eid: ExecutionId<'a>, i: u16, n: u16, ) -> GenericKeygenBuilder<'a, E, NonThreshold, L, D>
Constructs KeygenBuilder
Takes local party index $i$ and number of parties $n$
Source§impl<'a, E, L, D, M> GenericKeygenBuilder<'a, E, M, L, D>
impl<'a, E, L, D, M> GenericKeygenBuilder<'a, E, M, L, D>
Sourcepub fn set_threshold(
self,
t: u16,
) -> GenericKeygenBuilder<'a, E, WithThreshold, L, D>
pub fn set_threshold( self, t: u16, ) -> GenericKeygenBuilder<'a, E, WithThreshold, L, D>
Specifies to generate key shares for a threshold scheme
Sourcepub fn set_digest<D2>(self) -> GenericKeygenBuilder<'a, E, M, L, D2>
pub fn set_digest<D2>(self) -> GenericKeygenBuilder<'a, E, M, L, D2>
Specifies another hash function to use
Sourcepub fn set_security_level<L2>(self) -> GenericKeygenBuilder<'a, E, M, L2, D>where
L2: SecurityLevel,
pub fn set_security_level<L2>(self) -> GenericKeygenBuilder<'a, E, M, L2, D>where
L2: SecurityLevel,
Specifies security level
Sourcepub fn set_progress_tracer(
self,
tracer: &'a mut dyn Tracer,
) -> GenericKeygenBuilder<'a, E, M, L, D>
pub fn set_progress_tracer( self, tracer: &'a mut dyn Tracer, ) -> GenericKeygenBuilder<'a, E, M, L, D>
Sets a tracer that tracks progress of protocol execution
Sourcepub fn enforce_reliable_broadcast(
self,
enforce: bool,
) -> GenericKeygenBuilder<'a, E, M, L, D>
pub fn enforce_reliable_broadcast( self, enforce: bool, ) -> GenericKeygenBuilder<'a, E, M, L, D>
Ensures reliability of broadcast channel by adding one extra communication round
CGGMP21 protocol requires message in the first round to be sent over reliable broadcast channel. We ensure reliability of the broadcast channel by introducing extra communication round (at cost of additional latency). You may disable it, for instance, if your transport layer is reliable by construction (e.g. you use blockchain for communications).
Default: true.
Sourcepub fn hd_wallet(self, v: bool) -> GenericKeygenBuilder<'a, E, M, L, D>
Available on crate feature hd-wallet only.
pub fn hd_wallet(self, v: bool) -> GenericKeygenBuilder<'a, E, M, L, D>
hd-wallet only.Specifies whether HD derivation is enabled for a key
Source§impl<'a, E, L, D> GenericKeygenBuilder<'a, E, NonThreshold, L, D>
impl<'a, E, L, D> GenericKeygenBuilder<'a, E, NonThreshold, L, D>
Sourcepub async fn start<R, M>(
self,
rng: &mut R,
party: M,
) -> Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>
pub async fn start<R, M>( self, rng: &mut R, party: M, ) -> Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>
Starts key generation
Sourcepub fn into_state_machine<R>(
self,
rng: &'a mut R,
) -> impl StateMachine<Output = Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>, Msg = Msg<E, L, D>> + 'a
Available on crate feature state-machine only.
pub fn into_state_machine<R>( self, rng: &'a mut R, ) -> impl StateMachine<Output = Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>, Msg = Msg<E, L, D>> + 'a
state-machine only.Returns a state machine that can be used to carry out the key generation protocol
See round_based::state_machine for details on how that can be done.
Source§impl<'a, E, L, D> GenericKeygenBuilder<'a, E, WithThreshold, L, D>
impl<'a, E, L, D> GenericKeygenBuilder<'a, E, WithThreshold, L, D>
Sourcepub async fn start<R, M>(
self,
rng: &mut R,
party: M,
) -> Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>
pub async fn start<R, M>( self, rng: &mut R, party: M, ) -> Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>
Starts threshold key generation
Sourcepub fn into_state_machine<R>(
self,
rng: &'a mut R,
) -> impl StateMachine<Output = Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>, Msg = Msg<E, L, D>> + 'a
Available on crate feature state-machine only.
pub fn into_state_machine<R>( self, rng: &'a mut R, ) -> impl StateMachine<Output = Result<Valid<DirtyCoreKeyShare<E>>, KeygenError>, Msg = Msg<E, L, D>> + 'a
state-machine only.Returns a state machine that can be used to carry out the key generation protocol
See round_based::state_machine for details on how that can be done.