pub trait VRFProof<const OUTPUT_SIZE: usize> {
type PublicKey: VRFPublicKey;
// Required methods
fn verify(
&self,
input: &[u8],
public_key: &Self::PublicKey,
) -> Result<(), FastCryptoError>;
fn to_hash(&self) -> [u8; OUTPUT_SIZE];
// Provided method
fn verify_output(
&self,
input: &[u8],
public_key: &Self::PublicKey,
output: &[u8; OUTPUT_SIZE],
) -> Result<(), FastCryptoError> { ... }
}Expand description
A proof that the output of a VRF was computed correctly.
Required Associated Types§
type PublicKey: VRFPublicKey
Required Methods§
Sourcefn verify(
&self,
input: &[u8],
public_key: &Self::PublicKey,
) -> Result<(), FastCryptoError>
fn verify( &self, input: &[u8], public_key: &Self::PublicKey, ) -> Result<(), FastCryptoError>
Verify the correctness of this proof.
Sourcefn to_hash(&self) -> [u8; OUTPUT_SIZE]
fn to_hash(&self) -> [u8; OUTPUT_SIZE]
Compute the output of the VRF with this proof.
Provided Methods§
Sourcefn verify_output(
&self,
input: &[u8],
public_key: &Self::PublicKey,
output: &[u8; OUTPUT_SIZE],
) -> Result<(), FastCryptoError>
fn verify_output( &self, input: &[u8], public_key: &Self::PublicKey, output: &[u8; OUTPUT_SIZE], ) -> Result<(), FastCryptoError>
Verify the correctness of this proof and VRF output.