Trait diem_crypto::traits::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§
sourcetype PrivateKeyMaterial: VRFPrivateKey<PublicKeyMaterial = Self>
type PrivateKeyMaterial: VRFPrivateKey<PublicKeyMaterial = Self>
The associated private key type for this public key.
sourcetype ProofMaterial: VRFProof<PublicKeyMaterial = Self>
type ProofMaterial: VRFProof<PublicKeyMaterial = Self>
The associated proof type for this public key.
Provided Methods§
sourcefn verify_proof(
&self,
seed: &[u8],
proof: &Self::ProofMaterial
) -> Result<HashValue>
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.
Object Safety§
This trait is not object safe.