[][src]Struct schnorr::feldman_vss::VerifiableSS

pub struct VerifiableSS {
    pub parameters: ShamirSecretSharing,
    pub commitments: Vec<RistrettoPoint>,
}

Feldman VSS, based on Paul Feldman. 1987. A practical scheme for non-interactive verifiable secret sharing. In Foundations of Computer Science, 1987., 28th Annual Symposium on.IEEE, 427–43

implementation details: The code is using FE and GE. Each party is given an index from 1,..,n and a secret share of type FE. The index of the party is also the point on the polynomial where we treat this number as u32 but converting it to FE internally.

Fields

parameters: ShamirSecretSharingcommitments: Vec<RistrettoPoint>

Methods

impl VerifiableSS[src]

pub fn reconstruct_limit(&self) -> usize[src]

pub fn share(t: usize, n: usize, secret: &Scalar) -> (VerifiableSS, Vec<Scalar>)[src]

generate VerifiableSS from a secret

pub fn share_at_indices(
    t: usize,
    n: usize,
    secret: &Scalar,
    index_vec: &[usize]
) -> (VerifiableSS, Vec<Scalar>)
[src]

generate VerifiableSS from a secret and user defined x values (in case user wants to distribute point f(1), f(4), f(6) and not f(1),f(2),f(3))

pub fn sample_polynomial(t: usize, coef0: &Scalar) -> Vec<Scalar>[src]

pub fn evaluate_polynomial(
    coefficients: &[Scalar],
    index_vec: &[usize]
) -> Vec<Scalar>
[src]

pub fn mod_evaluate_polynomial(coefficients: &[Scalar], point: Scalar) -> Scalar[src]

pub fn reconstruct(&self, indices: &[usize], shares: &[Scalar]) -> Scalar[src]

pub fn lagrange_interpolation_at_zero(
    points: &[Scalar],
    values: &[Scalar]
) -> Scalar
[src]

Performs a Lagrange interpolation in field Zp at the origin for a polynomial defined by points and values. points and values are expected to be two arrays of the same size, containing respectively the evaluation points (x) and the value of the polynomial at those point (p(x)). The result is the value of the polynomial at x=0. It is also its zero-degree coefficient. This is obviously less general than newton_interpolation_general as we only get a single value, but it is much faster.

pub fn validate_share(
    &self,
    secret_share: &Scalar,
    index: usize
) -> Result<(), SchnorrError>
[src]

pub fn validate_share_public(
    &self,
    ss_point: &RistrettoPoint,
    index: usize
) -> Result<(), SchnorrError>
[src]

pub fn get_point_commitment(&self, index: usize) -> RistrettoPoint[src]

pub fn map_share_to_new_params(&self, index: usize, s: &[usize]) -> Scalar[src]

Trait Implementations

impl Clone for VerifiableSS[src]

impl PartialEq<VerifiableSS> for VerifiableSS[src]

impl Debug for VerifiableSS[src]

impl StructuralPartialEq for VerifiableSS[src]

impl<'de> Deserialize<'de> for VerifiableSS[src]

impl Serialize for VerifiableSS[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> FromCast<T> for T

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> FromBits<T> for T

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,