Struct schnorrkel::vrf::VRFOutput
source · [−]Expand description
VRF 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 responcible 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
Construct a VRFOutput
from a slice of bytes.
pub 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
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for VRFOutput
impl UnwindSafe for VRFOutput
Blanket Implementations
Mutably borrows from an owned value. Read more