Trait vsss_rs::shamir::Shamir

source ·
pub trait Shamir<F, I, S>
where F: PrimeField, I: ShareIdentifier, S: Share<Identifier = I>,
{ 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§

source

type InnerPolynomial: Polynomial<F>

The polynomial for the coefficients

source

type ShareSet: WriteableShareSet<I, S>

The set of secret shares

Provided Methods§

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<F, I, S, L> Shamir<F, I, S> for GenericArray<S, L>
where F: PrimeField, I: ShareIdentifier, S: Share<Identifier = I>, L: ArrayLength,

source§

impl<F: PrimeField, I: ShareIdentifier, S: Share<Identifier = I>> Shamir<F, I, S> for Vec<F>

§

type InnerPolynomial = Vec<F>

§

type ShareSet = Vec<S>

source§

impl<F: PrimeField, I: ShareIdentifier, S: Share<Identifier = I>, const L: usize> Shamir<F, I, S> for [S; L]

Implementors§

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>

§

type ShareSet = Vec<S>

source§

impl<G: Group + GroupEncoding + Default> Shamir<<G as Group>::Scalar, u8, Vec<u8>> for DefaultStdVsss<G>