Struct chain_crypto::algorithms::vrf::RistrettoGroup2HashDh
source · pub struct RistrettoGroup2HashDh;
Expand description
VRF
Trait Implementations§
source§impl Arbitrary for RistrettoGroup2HashDh
impl Arbitrary for RistrettoGroup2HashDh
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<RistrettoGroup2HashDh>
type Strategy = BoxedStrategy<RistrettoGroup2HashDh>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
source§impl AsymmetricKey for RistrettoGroup2HashDh
impl AsymmetricKey for RistrettoGroup2HashDh
type Secret = SecretKey
type PubAlg = RistrettoGroup2HashDh
const SECRET_BECH32_HRP: &'static str = "vrf_sk"
fn generate<T: RngCore + CryptoRng>(rng: T) -> Self::Secret
fn compute_public( key: &Self::Secret ) -> <Self::PubAlg as AsymmetricPublicKey>::Public
fn secret_from_binary(data: &[u8]) -> Result<Self::Secret, SecretKeyError>
source§impl AsymmetricPublicKey for RistrettoGroup2HashDh
impl AsymmetricPublicKey for RistrettoGroup2HashDh
type Public = PublicKey
const PUBLIC_BECH32_HRP: &'static str = "vrf_pk"
const PUBLIC_KEY_SIZE: usize = 32usize
fn public_from_binary(data: &[u8]) -> Result<Self::Public, PublicKeyError>
source§impl Debug for RistrettoGroup2HashDh
impl Debug for RistrettoGroup2HashDh
source§impl SecretKeySizeStatic for RistrettoGroup2HashDh
impl SecretKeySizeStatic for RistrettoGroup2HashDh
const SECRET_KEY_SIZE: usize = 32usize
source§impl VerifiableRandomFunction for RistrettoGroup2HashDh
impl VerifiableRandomFunction for RistrettoGroup2HashDh
type VerifiedRandomOutput = ProvenOutputSeed
type RandomOutput = OutputSeed
type Input = [u8]
const VERIFIED_RANDOM_SIZE: usize = 96usize
fn evaluate_and_prove<T: RngCore + CryptoRng>( secret: &Self::Secret, input: &Self::Input, rng: T ) -> Self::VerifiedRandomOutput
fn verify( public: &Self::Public, input: &Self::Input, vrand: &Self::VerifiedRandomOutput ) -> VrfVerification
fn strip_verification_output( vr: &Self::VerifiedRandomOutput ) -> Self::RandomOutput
Auto Trait Implementations§
impl RefUnwindSafe for RistrettoGroup2HashDh
impl Send for RistrettoGroup2HashDh
impl Sync for RistrettoGroup2HashDh
impl Unpin for RistrettoGroup2HashDh
impl UnwindSafe for RistrettoGroup2HashDh
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more