Skip to main content

Verifiable

Trait Verifiable 

Source
pub trait Verifiable: Reconstructible {
    // Required method
    fn verify(&self, openings: Vec<Self::Opening>) -> Result<(), PrimitiveError>;

    // Provided methods
    fn verify_from(
        &self,
        _opening: Self::Opening,
        _peer_index: PeerIndex,
    ) -> Result<(), PrimitiveError> { ... }
    fn verify_all(shares: Vec<Self>) -> Result<(), PrimitiveError> { ... }
}
Expand description

Verify secret share/s from one or more openings.

Required Methods§

Source

fn verify(&self, openings: Vec<Self::Opening>) -> Result<(), PrimitiveError>

Verify the shares from all peers given your share and all other peers’ openings.

Provided Methods§

Source

fn verify_from( &self, _opening: Self::Opening, _peer_index: PeerIndex, ) -> Result<(), PrimitiveError>

Verify an opening from a specific peer given your share and the opening. Only applicable to publicly verifiable or pairwise authenticated shares.

Source

fn verify_all(shares: Vec<Self>) -> Result<(), PrimitiveError>

Verify all shares by opening each share towards all other peers and performing pairwise verification of the openings.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F: FieldExtension, Exp: PowPairExponent> Verifiable for PowPair<F, Exp>

Source§

impl<F: FieldExtension, M: Positive, Exp: PowPairExponent> Verifiable for PowPairs<F, M, Exp>

Source§

impl<F: FieldExtension, M: Positive> Verifiable for Singlets<F, M>

Source§

impl<F: FieldExtension, M: Positive> Verifiable for Triples<F, M>

Source§

impl<F: FieldExtension, M: Positive> Verifiable for UnauthenticatedTriples<F, M>

Source§

impl<F: FieldExtension, N: Positive> Verifiable for DaBits<F, N>

Source§

impl<F: FieldExtension> Verifiable for DaBit<F>

Source§

impl<F: FieldExtension> Verifiable for Singlet<F>

Source§

impl<F: FieldExtension> Verifiable for Triple<F>

Source§

impl<F: FieldExtension> Verifiable for UnauthenticatedTriple<F>

Source§

impl<V, A, B> Verifiable for PairwiseAuthShare<V, A, B>
where for<'a, 'a> V: Clone + PartialEq + Send + Sync + 'static + Serialize + DeserializeOwned + SchemaWrite<Src = V> + for<'de> SchemaRead<'de, Dst = V> + Add<&'a V, Output = V> + Mul<&'a A, Output = B>, A: Clone, B: Clone + Send + Sync + 'static + Serialize + DeserializeOwned + SchemaWrite<Src = B> + for<'de> SchemaRead<'de, Dst = B> + ConstantTimeEq + SubAssign + for<'b> Add<&'b B, Output = B>,