Struct schnorrkel::vrf::VRFInOut
source · [−]pub struct VRFInOut {
pub input: RistrettoBoth,
pub output: RistrettoBoth,
}
Expand description
VRF input and output paired together, possibly unverified.
Internally, we keep both RistrettoPoint
and CompressedRistretto
forms using RistrettoBoth
.
Fields
input: RistrettoBoth
VRF input point
output: RistrettoBoth
VRF output point
Implementations
VRF output point bytes for serialization.
Commit VRF input and output to a transcript.
We commit both the input and output to provide the 2Hash-DH construction from Theorem 2 on page 32 in appendix C of “Ouroboros Praos: An adaptively-secure, semi-synchronous proof-of-stake blockchain” by Bernardo David, Peter Gazi, Aggelos Kiayias, and Alexander Russell.
We use this construction both for the VRF usage methods
VRFInOut::make_*
as well as for signer side batching.
Raw bytes output from the VRF.
If you are not the signer then you must verify the VRF before calling this method.
If called with distinct contexts then outputs should be independent.
We incorporate both the input and output to provide the 2Hash-DH construction from Theorem 2 on page 32 in appendex C of “Ouroboros Praos: An adaptively-secure, semi-synchronous proof-of-stake blockchain” by Bernardo David, Peter Gazi, Aggelos Kiayias, and Alexander Russell.
VRF output converted into any SeedableRng
.
If you are not the signer then you must verify the VRF before calling this method.
We expect most users would prefer the less generic VRFInOut::make_chacharng
method.
VRF output converted into Merlin’s Keccek based Rng
.
If you are not the signer then you must verify the VRF before calling this method.
We think this might be marginally slower than ChaChaRng
when considerable output is required, but it should reduce
the final linked binary size slightly, and improves domain
separation.
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 VRFInOut
impl UnwindSafe for VRFInOut
Blanket Implementations
Mutably borrows from an owned value. Read more