pub struct Prover { /* private fields */ }
Expand description
The prover for Triton VM’s zk-STARK. The core method is
prove
. It is probably more convenient to call
Stark::prove
directly.
It is possible to set the randomness seed used for deriving all
prover randomness. To prevent accidental randomness re-use, the Prover
does not implement Clone
.
Implementations§
Source§impl Prover
impl Prover
Sourcepub fn new(parameters: Stark) -> Self
pub fn new(parameters: Stark) -> Self
A Prover
with a sane randomness seed.
Sourcepub fn set_randomness_seed_which_may_break_zero_knowledge(
self,
seed: <StdRng as SeedableRng>::Seed,
) -> Self
pub fn set_randomness_seed_which_may_break_zero_knowledge( self, seed: <StdRng as SeedableRng>::Seed, ) -> Self
Manually set the seed for the randomness used during proving. This makes the generated proof deterministic.
§WARNING!
Careless use of this method can break Zero-Knowledge of Triton VM. In particular, the verifier must learn nothing about the supplied seed, must be unable to influence the supplied seed, and must be unable to guess anything about the supplied seed. The latter implies that whatever source of randomness is chosen must have sufficient entropy.
§If in doubt, don’t use this method.
Sourcepub fn prove(
self,
claim: &Claim,
aet: &AlgebraicExecutionTrace,
) -> Result<Proof, ProvingError>
pub fn prove( self, claim: &Claim, aet: &AlgebraicExecutionTrace, ) -> Result<Proof, ProvingError>
See also Stark::prove
.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for Prover
impl<'arbitrary> Arbitrary<'arbitrary> for Prover
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moreimpl Eq for Prover
impl StructuralPartialEq for Prover
Auto Trait Implementations§
impl Freeze for Prover
impl RefUnwindSafe for Prover
impl Send for Prover
impl Sync for Prover
impl Unpin for Prover
impl UnwindSafe for Prover
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more