VerifiableWith

Trait VerifiableWith 

Source
pub trait VerifiableWith: Reconstructible {
    type VerificationData: Send + Sync + Clone + Eq + Serialize + DeserializeOwned;

    // Required method
    fn verify_with(
        &self,
        openings: &[Self::Opening],
        verification_data: Self::VerificationData,
    ) -> Result<(), PrimitiveError>;

    // Provided methods
    fn verify_from_peer_with(
        &self,
        _opening: &Self::Opening,
        _peer_index: PeerIndex,
        _verification_data: Self::VerificationData,
    ) -> Result<(), PrimitiveError> { ... }
    fn verify_all_with(
        shares: &[Self],
        verification_data: Self::VerificationData,
    ) -> Result<(), PrimitiveError> { ... }
}
Expand description

Verify secret share/s from one or more openings, with additional associated data.

Required Associated Types§

Source

type VerificationData: Send + Sync + Clone + Eq + Serialize + DeserializeOwned

The associated data that is used to verify this secret shared type.

Required Methods§

Source

fn verify_with( &self, openings: &[Self::Opening], verification_data: Self::VerificationData, ) -> Result<(), PrimitiveError>

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

Provided Methods§

Source

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

Verify an opening from a specific peer given your share and the opening.

Source

fn verify_all_with( shares: &[Self], verification_data: Self::VerificationData, ) -> 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", so this trait is not object safe.

Implementors§