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>
where E: Curve, L: SecurityLevel, D: Digest + Clone + 'static,

source

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>
where E: Curve, L: SecurityLevel, D: Digest + Clone + 'static,

source

pub fn set_threshold( self, t: u16 ) -> GenericKeygenBuilder<'a, E, WithThreshold, L, D>

Specifies to generate key shares for a threshold scheme

source

pub fn set_digest<D2>(self) -> GenericKeygenBuilder<'a, E, M, L, D2>
where D2: Digest + Clone + 'static,

Specifies another hash function to use

source

pub fn set_security_level<L2>(self) -> GenericKeygenBuilder<'a, E, M, L2, D>
where L2: SecurityLevel,

Specifies security level

source

pub fn set_progress_tracer(self, tracer: &'a mut dyn Tracer) -> Self

Sets a tracer that tracks progress of protocol execution

source

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>
where E: Curve, L: SecurityLevel, D: Digest + Clone + 'static,

source

pub async fn start<R, M>( self, rng: &mut R, party: M ) -> Result<CoreKeyShare<E>, KeygenError>
where R: RngCore + CryptoRng, M: Mpc<ProtocolMessage = Msg<E, L, D>>,

Starts key generation

source§

impl<'a, E, L, D> GenericKeygenBuilder<'a, E, WithThreshold, L, D>
where E: Curve, L: SecurityLevel, D: Digest + Clone + 'static,

source

pub async fn start<R, M>( self, rng: &mut R, party: M ) -> Result<CoreKeyShare<E>, KeygenError>
where R: RngCore + CryptoRng, M: Mpc<ProtocolMessage = Msg<E, L, D>>,

Starts threshold key generation

Auto Trait Implementations§

§

impl<'a, E, M, L, D> Freeze for GenericKeygenBuilder<'a, E, M, L, D>
where M: Freeze,

§

impl<'a, E, M, L, D> !RefUnwindSafe for GenericKeygenBuilder<'a, E, M, L, D>

§

impl<'a, E, M, L, D> Send for GenericKeygenBuilder<'a, E, M, L, D>
where D: Send, M: Send,

§

impl<'a, E, M, L, D> Sync for GenericKeygenBuilder<'a, E, M, L, D>
where D: Sync, M: Sync,

§

impl<'a, E, M, L, D> Unpin for GenericKeygenBuilder<'a, E, M, L, D>
where D: Unpin, E: Unpin, L: Unpin, M: Unpin,

§

impl<'a, E, M, L, D> !UnwindSafe for GenericKeygenBuilder<'a, E, M, L, D>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more