pub trait Shamir<F, I, S>{
type InnerPolynomial: Polynomial<F>;
type ShareSet: WriteableShareSet<I, S>;
// Provided methods
fn split_secret(
threshold: usize,
limit: usize,
secret: F,
rng: impl RngCore + CryptoRng
) -> VsssResult<Self::ShareSet> { ... }
fn split_secret_with_participant_generator<P: ParticipantNumberGenerator<F>>(
threshold: usize,
limit: usize,
secret: F,
rng: impl RngCore + CryptoRng,
participant_generator: P
) -> VsssResult<Self::ShareSet> { ... }
}
Expand description
A Polynomial that can create secret shares
Required Associated Types§
sourcetype InnerPolynomial: Polynomial<F>
type InnerPolynomial: Polynomial<F>
The polynomial for the coefficients
The set of secret shares
Provided Methods§
sourcefn split_secret(
threshold: usize,
limit: usize,
secret: F,
rng: impl RngCore + CryptoRng
) -> VsssResult<Self::ShareSet>
fn split_secret( threshold: usize, limit: usize, secret: F, rng: impl RngCore + CryptoRng ) -> VsssResult<Self::ShareSet>
Create shares from a secret.
F
is the prime field
sourcefn split_secret_with_participant_generator<P: ParticipantNumberGenerator<F>>(
threshold: usize,
limit: usize,
secret: F,
rng: impl RngCore + CryptoRng,
participant_generator: P
) -> VsssResult<Self::ShareSet>
fn split_secret_with_participant_generator<P: ParticipantNumberGenerator<F>>( threshold: usize, limit: usize, secret: F, rng: impl RngCore + CryptoRng, participant_generator: P ) -> VsssResult<Self::ShareSet>
Create shares from a secret and a participant number generator.
F
is the prime field
Object Safety§
This trait is not object safe.