Struct akd::ecvrf::VRFExpandedPrivateKey
source · pub struct VRFExpandedPrivateKey { /* private fields */ }
Expand description
A longer private key which is slightly optimized for proof generation.
This is similar in structure to ed25519_dalek::ExpandedSecretKey. It can be produced from a VRFPrivateKey.
Implementations§
source§impl VRFExpandedPrivateKey
impl VRFExpandedPrivateKey
sourcepub fn prove(&self, pk: &VRFPublicKey, alpha: &[u8]) -> Proof
pub fn prove(&self, pk: &VRFPublicKey, alpha: &[u8]) -> Proof
Produces a proof for an input (using the expanded private key)
sourcepub fn evaluate(&self, pk: &VRFPublicKey, alpha: &[u8]) -> Output
pub fn evaluate(&self, pk: &VRFPublicKey, alpha: &[u8]) -> Output
Directly evaluate the VRF for an input, without producing a proof (using the expanded private key)
Trait Implementations§
source§impl Clone for VRFExpandedPrivateKey
impl Clone for VRFExpandedPrivateKey
source§fn clone(&self) -> VRFExpandedPrivateKey
fn clone(&self) -> VRFExpandedPrivateKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Drop for VRFExpandedPrivateKey
impl Drop for VRFExpandedPrivateKey
source§impl<'a> From<&'a VRFPrivateKey> for VRFExpandedPrivateKey
impl<'a> From<&'a VRFPrivateKey> for VRFExpandedPrivateKey
source§fn from(private_key: &'a VRFPrivateKey) -> VRFExpandedPrivateKey
fn from(private_key: &'a VRFPrivateKey) -> VRFExpandedPrivateKey
Converts to this type from the input type.
impl ZeroizeOnDrop for VRFExpandedPrivateKey
Auto Trait Implementations§
impl RefUnwindSafe for VRFExpandedPrivateKey
impl Send for VRFExpandedPrivateKey
impl Sync for VRFExpandedPrivateKey
impl Unpin for VRFExpandedPrivateKey
impl UnwindSafe for VRFExpandedPrivateKey
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