Struct cggmp21_keygen::GenericKeygenBuilder
source · pub struct GenericKeygenBuilder<'a, E: Curve, M, L: SecurityLevel, D: Digest> { /* 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) -> Self
pub fn new(eid: ExecutionId<'a>, i: u16, n: u16) -> Self
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) -> Self
pub fn set_progress_tracer(self, tracer: &'a mut dyn Tracer) -> Self
Sets a tracer that tracks progress of protocol execution
sourcepub fn enforce_reliable_broadcast(self, enforce: bool) -> Self
pub fn enforce_reliable_broadcast(self, enforce: bool) -> Self
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
.
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<CoreKeyShare<E>, KeygenError>
pub async fn start<R, M>( self, rng: &mut R, party: M ) -> Result<CoreKeyShare<E>, KeygenError>
Starts key generation
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<CoreKeyShare<E>, KeygenError>
pub async fn start<R, M>( self, rng: &mut R, party: M ) -> Result<CoreKeyShare<E>, KeygenError>
Starts threshold key generation