Struct vsss_rs::StdVsss

source ·
pub struct StdVsss<G, I, S>
where G: Group + GroupEncoding + Default, I: ShareIdentifier, S: Share<Identifier = I>,
{ /* 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>
where G: Group + GroupEncoding + Default, I: ShareIdentifier, S: Share<Identifier = I>,

§

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)>

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)>

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>
where G: Group + GroupEncoding + Default, I: ShareIdentifier, S: Share<Identifier = I>,

§

type FeldmanVerifierSet = Vec<G>

The feldman verifier set
§

type PedersenVerifierSet = Vec<G>

The pedersen verifier set
§

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>

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 more
source§

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 more
source§

impl<G, I, S> Shamir<<G as Group>::Scalar, I, S> for StdVsss<G, I, S>
where G: Group + GroupEncoding + Default, I: ShareIdentifier, S: Share<Identifier = I>,

§

type InnerPolynomial = Vec<<G as Group>::Scalar>

The polynomial for the coefficients
§

type ShareSet = Vec<S>

The set of secret shares
source§

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
source§

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

Auto Trait Implementations§

§

impl<G, I, S> Freeze for StdVsss<G, I, S>

§

impl<G, I, S> RefUnwindSafe for StdVsss<G, I, S>

§

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>
where G: Unpin, S: Unpin,

§

impl<G, I, S> UnwindSafe for StdVsss<G, I, S>
where G: UnwindSafe, S: UnwindSafe,

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, 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.