Struct schnorrkel::vrf::VRFPreOut
source · pub struct VRFPreOut(pub [u8; 32]);
Expand description
VRF pre-output, possibly unverified.
Internally, we keep both RistrettoPoint
and CompressedRistretto
forms using RistrettoBoth
.
We’d actually love to statically distinguish here between inputs
and outputs, as well as whether outputs were verified, but doing
so would disrupt our general purpose DLEQ proof mechanism, so
users must be responsible for this themselves. We do however
consume by value in actual output methods, and do not implement
Copy
, as a reminder that VRF outputs should only be used once
and should be checked before usage.
Tuple Fields§
§0: [u8; 32]
Implementations§
source§impl VRFPreOut
impl VRFPreOut
sourcepub fn from_bytes(bytes: &[u8]) -> SignatureResult<VRFPreOut>
pub fn from_bytes(bytes: &[u8]) -> SignatureResult<VRFPreOut>
Construct a VRFPreOut
from a slice of bytes.
sourcepub fn attach_input_hash<T>(
&self,
public: &PublicKey,
t: T,
) -> SignatureResult<VRFInOut>where
T: VRFSigningTranscript,
pub fn attach_input_hash<T>(
&self,
public: &PublicKey,
t: T,
) -> SignatureResult<VRFInOut>where
T: VRFSigningTranscript,
Pair a non-malleable VRF output with the hash of the given transcript.
Trait Implementations§
source§impl Ord for VRFPreOut
impl Ord for VRFPreOut
source§impl PartialEq for VRFPreOut
impl PartialEq for VRFPreOut
source§impl PartialOrd for VRFPreOut
impl PartialOrd for VRFPreOut
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for VRFPreOut
impl Eq for VRFPreOut
impl StructuralPartialEq for VRFPreOut
Auto Trait Implementations§
impl Freeze for VRFPreOut
impl RefUnwindSafe for VRFPreOut
impl Send for VRFPreOut
impl Sync for VRFPreOut
impl Unpin for VRFPreOut
impl UnwindSafe for VRFPreOut
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)