Trait diem_crypto::traits::VRFPrivateKey
source · pub trait VRFPrivateKey: PrivateKey<PublicKeyMaterial = Self::PublicKeyMaterial> + ValidCryptoMaterial + Sealed {
type PublicKeyMaterial: VRFPublicKey<PrivateKeyMaterial = Self>;
type ProofMaterial: VRFProof<PrivateKeyMaterial = Self>;
// Required method
fn compute(&self, seed: &[u8]) -> Result<Self::ProofMaterial>;
}
Expand description
Private key for VRF
Required Associated Types§
sourcetype PublicKeyMaterial: VRFPublicKey<PrivateKeyMaterial = Self>
type PublicKeyMaterial: VRFPublicKey<PrivateKeyMaterial = Self>
The associated public key type for this private key.
sourcetype ProofMaterial: VRFProof<PrivateKeyMaterial = Self>
type ProofMaterial: VRFProof<PrivateKeyMaterial = Self>
The associated proof type for this private key.
Required Methods§
sourcefn compute(&self, seed: &[u8]) -> Result<Self::ProofMaterial>
fn compute(&self, seed: &[u8]) -> Result<Self::ProofMaterial>
Generate a random number (hash) with a proof for verification.
Object Safety§
This trait is not object safe.