pub struct StdVsss<G, I, S>{ /* private fields */ }
Expand description
Standard verifiable secret sharing scheme
Trait Implementations§
source§impl<G, I, S> Feldman<G, I, S> for StdVsss<G, I, S>
impl<G, I, S> Feldman<G, I, S> for StdVsss<G, I, S>
§type VerifierSet = Vec<G>
type VerifierSet = Vec<G>
The verifier set
source§fn split_secret_with_verifier(
threshold: usize,
limit: usize,
secret: G::Scalar,
generator: Option<G>,
rng: impl RngCore + CryptoRng
) -> VsssResult<(Self::ShareSet, Self::VerifierSet)>
fn split_secret_with_verifier( threshold: usize, limit: usize, secret: G::Scalar, generator: Option<G>, rng: impl RngCore + CryptoRng ) -> VsssResult<(Self::ShareSet, Self::VerifierSet)>
Create shares from a secret.
F
is the prime field
generator
is the generator point to use for computing feldman verifiers.
If None
, the default generator is used.source§fn split_secret_with_participant_generator_and_verifiers<P: ParticipantNumberGenerator<G::Scalar>>(
threshold: usize,
limit: usize,
secret: G::Scalar,
generator: Option<G>,
rng: impl RngCore + CryptoRng,
participant_generator: P
) -> VsssResult<(Self::ShareSet, Self::VerifierSet)>
fn split_secret_with_participant_generator_and_verifiers<P: ParticipantNumberGenerator<G::Scalar>>( threshold: usize, limit: usize, secret: G::Scalar, generator: Option<G>, rng: impl RngCore + CryptoRng, participant_generator: P ) -> VsssResult<(Self::ShareSet, Self::VerifierSet)>
Create shares from a secret and a participant number generator.
F
is the prime field
generator
is the generator point to use for computing feldman verifiers.
If None
, the default generator is used.source§impl<G, I, S> Pedersen<G, I, S> for StdVsss<G, I, S>
impl<G, I, S> Pedersen<G, I, S> for StdVsss<G, I, S>
§type FeldmanVerifierSet = Vec<G>
type FeldmanVerifierSet = Vec<G>
The feldman verifier set
§type PedersenVerifierSet = Vec<G>
type PedersenVerifierSet = Vec<G>
The pedersen verifier set
§type PedersenResult = StdPedersenResult<G, I, S>
type PedersenResult = StdPedersenResult<G, I, S>
The result from running
split_secret_with_verifier
source§fn split_secret_with_blind_verifier(
threshold: usize,
limit: usize,
secret: G::Scalar,
blinder: Option<G::Scalar>,
secret_generator: Option<G>,
blinder_generator: Option<G>,
rng: impl RngCore + CryptoRng
) -> VsssResult<Self::PedersenResult>
fn split_secret_with_blind_verifier( threshold: usize, limit: usize, secret: G::Scalar, blinder: Option<G::Scalar>, secret_generator: Option<G>, blinder_generator: Option<G>, rng: impl RngCore + CryptoRng ) -> VsssResult<Self::PedersenResult>
Create shares from a secret.
blinder
is the blinding factor.
If None
, a random value is generated in G::Scalar.
secret_generator
is the generator point to use for shares.
If None
, the default generator is used.
blinder_generator
is the generator point to use for blinder shares.
If None
, a random generator is used Read moresource§fn split_secret_with_participant_generator_and_blind_verifiers<P: ParticipantNumberGenerator<G::Scalar>>(
threshold: usize,
limit: usize,
secret: G::Scalar,
blinder: Option<G::Scalar>,
secret_generator: Option<G>,
blinder_generator: Option<G>,
rng: impl RngCore + CryptoRng,
participant_generator: P
) -> VsssResult<Self::PedersenResult>
fn split_secret_with_participant_generator_and_blind_verifiers<P: ParticipantNumberGenerator<G::Scalar>>( threshold: usize, limit: usize, secret: G::Scalar, blinder: Option<G::Scalar>, secret_generator: Option<G>, blinder_generator: Option<G>, rng: impl RngCore + CryptoRng, participant_generator: P ) -> VsssResult<Self::PedersenResult>
Create shares from a secret and a participant number generator.
blinder
is the blinding factor.
If None
, a random value is generated in G::Scalar.
secret_generator
is the generator point to use for shares.
If None
, the default generator is used.
blinder_generator
is the generator point to use for blinder shares.
If None
, a random generator is used Read moresource§impl<G, I, S> Shamir<<G as Group>::Scalar, I, S> for StdVsss<G, I, S>
impl<G, I, S> Shamir<<G as Group>::Scalar, I, S> for StdVsss<G, I, S>
§type InnerPolynomial = Vec<<G as Group>::Scalar>
type InnerPolynomial = Vec<<G as Group>::Scalar>
The polynomial for the coefficients
The set of secret shares
source§fn 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 fieldsource§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>
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 fieldAuto Trait Implementations§
impl<G, I, S> Freeze for StdVsss<G, I, S>
impl<G, I, S> RefUnwindSafe for StdVsss<G, I, S>where
G: RefUnwindSafe,
S: RefUnwindSafe,
impl<G, I, S> Send for StdVsss<G, I, S>where
S: Send,
impl<G, I, S> Sync for StdVsss<G, I, S>where
S: Sync,
impl<G, I, S> Unpin for StdVsss<G, I, S>
impl<G, I, S> UnwindSafe for StdVsss<G, I, S>where
G: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more