[−][src]Struct threshold_crypto::SecretKeySet
A secret key and an associated set of secret key shares.
Implementations
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 Clone for SecretKeySet
[src]
fn clone(&self) -> SecretKeySet
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for SecretKeySet
[src]
impl From<Poly> for SecretKeySet
[src]
fn from(poly: Poly) -> SecretKeySet
[src]
impl PartialEq<SecretKeySet> for SecretKeySet
[src]
fn eq(&self, other: &SecretKeySet) -> bool
[src]
fn ne(&self, other: &SecretKeySet) -> bool
[src]
impl StructuralEq for SecretKeySet
[src]
impl StructuralPartialEq for SecretKeySet
[src]
Auto Trait Implementations
impl RefUnwindSafe for SecretKeySet
impl Send for SecretKeySet
impl Sync for SecretKeySet
impl Unpin for SecretKeySet
impl UnwindSafe for SecretKeySet
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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.
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>,