VRFProof

Trait VRFProof 

Source
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§

Required Methods§

Source

fn verify( &self, input: &[u8], public_key: &Self::PublicKey, ) -> Result<(), FastCryptoError>

Verify the correctness of this proof.

Source

fn to_hash(&self) -> [u8; OUTPUT_SIZE]

Compute the output of the VRF with this proof.

Provided Methods§

Source

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.

Implementors§