[][src]Struct threshold_crypto::SecretKeySet

pub struct SecretKeySet { /* fields omitted */ }

A secret key and an associated set of secret key shares.

Methods

impl SecretKeySet[src]

pub fn random<R: Rng>(threshold: usize, rng: &mut R) -> Self[src]

Creates a set of secret key shares, where any threshold + 1 of them can collaboratively sign and decrypt. This constructor is identical to the SecretKeySet::try_random() in every way except that this constructor panics if the other returns an error.

Panic

Panics if the threshold is too large for the coefficients to fit into a Vec.

pub fn try_random<R: Rng>(threshold: usize, rng: &mut R) -> Result<Self>[src]

Creates a set of secret key shares, where any threshold + 1 of them can collaboratively sign and decrypt. This constructor is identical to the SecretKeySet::random() in every way except that this constructor returns an Err where the random would panic.

pub fn threshold(&self) -> usize[src]

Returns the threshold t: any set of t + 1 signature shares can be combined into a full signature.

pub fn secret_key_share<T: IntoFr>(&self, i: T) -> SecretKeyShare[src]

Returns the i-th secret key share.

pub fn public_keys(&self) -> PublicKeySet[src]

Returns the corresponding public key set. That information can be shared publicly.

Trait Implementations

impl From<Poly> for SecretKeySet[src]

Auto Trait Implementations

Blanket Implementations

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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