[−][src]Struct schnorr::feldman_vss::VerifiableSS
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: ShamirSecretSharing
commitments: 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]
t: usize,
n: usize,
secret: &Scalar,
index_vec: &[usize]
) -> (VerifiableSS, Vec<Scalar>)
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]
coefficients: &[Scalar],
index_vec: &[usize]
) -> Vec<Scalar>
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]
points: &[Scalar],
values: &[Scalar]
) -> Scalar
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]
&self,
secret_share: &Scalar,
index: usize
) -> Result<(), SchnorrError>
pub fn validate_share_public(
&self,
ss_point: &RistrettoPoint,
index: usize
) -> Result<(), SchnorrError>
[src]
&self,
ss_point: &RistrettoPoint,
index: usize
) -> Result<(), SchnorrError>
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]
fn clone(&self) -> VerifiableSS
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<VerifiableSS> for VerifiableSS
[src]
fn eq(&self, other: &VerifiableSS) -> bool
[src]
fn ne(&self, other: &VerifiableSS) -> bool
[src]
impl Debug for VerifiableSS
[src]
impl StructuralPartialEq for VerifiableSS
[src]
impl<'de> Deserialize<'de> for VerifiableSS
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for VerifiableSS
[src]
Auto Trait Implementations
impl Send for VerifiableSS
impl Sync for VerifiableSS
impl Unpin for VerifiableSS
impl UnwindSafe for VerifiableSS
impl RefUnwindSafe for VerifiableSS
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> FromCast<T> for T
fn from_cast(t: T) -> T
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
fn cast(self) -> U
impl<T> FromBits<T> for T
fn from_bits(t: T) -> T
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
fn into_bits(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,