Trait VRFPublicKey

Source
pub trait VRFPublicKey:
    PublicKey<PrivateKeyMaterial = Self::PrivateKeyMaterial>
    + ValidCryptoMaterial
    + Sealed {
    type PrivateKeyMaterial: VRFPrivateKey<PublicKeyMaterial = Self>;
    type ProofMaterial: VRFProof<PublicKeyMaterial = Self>;

    // Provided method
    fn verify_proof(
        &self,
        seed: &[u8],
        proof: &Self::ProofMaterial,
    ) -> Result<HashValue> { ... }
}
Expand description

Public key for VRF

Required Associated Types§

Source

type PrivateKeyMaterial: VRFPrivateKey<PublicKeyMaterial = Self>

The associated private key type for this public key.

Source

type ProofMaterial: VRFProof<PublicKeyMaterial = Self>

The associated proof type for this public key.

Provided Methods§

Source

fn verify_proof( &self, seed: &[u8], proof: &Self::ProofMaterial, ) -> Result<HashValue>

Verify if proof if generated from seed by the private key of this public key.

If successful, return the VRF hash output.

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§