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§
Sourcetype VerificationData: Send + Sync + Clone + Eq + Serialize + DeserializeOwned
type VerificationData: Send + Sync + Clone + Eq + Serialize + DeserializeOwned
The associated data that is used to verify this secret shared type.
Required Methods§
Sourcefn verify_with(
&self,
openings: &[Self::Opening],
verification_data: Self::VerificationData,
) -> Result<(), PrimitiveError>
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§
Sourcefn verify_from_peer_with(
&self,
_opening: &Self::Opening,
_peer_index: PeerIndex,
_verification_data: Self::VerificationData,
) -> Result<(), PrimitiveError>
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.
Sourcefn verify_all_with(
shares: &[Self],
verification_data: Self::VerificationData,
) -> Result<(), PrimitiveError>
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.