Struct snarkvm_polycommit::sonic_pc::PreparedVerifierKey
source · [−]pub struct PreparedVerifierKey<E: PairingEngine> {
pub prepared_vk: PreparedVerifierKey<E>,
pub degree_bounds_and_prepared_neg_powers_of_h: Option<Vec<(usize, <E::G2Affine as PairingCurve>::Prepared)>>,
pub max_degree: usize,
pub supported_degree: usize,
}
Expand description
PreparedVerifierKey
is used to check evaluation proofs for a given commitment.
Fields
prepared_vk: PreparedVerifierKey<E>
The verification key for the underlying KZG10 scheme.
degree_bounds_and_prepared_neg_powers_of_h: Option<Vec<(usize, <E::G2Affine as PairingCurve>::Prepared)>>
Information required to enforce degree bounds. Each pair
is of the form (degree_bound, shifting_advice)
.
This is None
if self
does not support enforcing any degree bounds.
max_degree: usize
The maximum degree supported by the UniversalParams
self
was derived
from.
supported_degree: usize
The maximum degree supported by the trimmed parameters that self
is
a part of.
Implementations
sourceimpl<E: PairingEngine> PreparedVerifierKey<E>
impl<E: PairingEngine> PreparedVerifierKey<E>
sourcepub fn get_prepared_shift_power(
&self,
bound: usize
) -> Option<<E::G2Affine as PairingCurve>::Prepared>
pub fn get_prepared_shift_power(
&self,
bound: usize
) -> Option<<E::G2Affine as PairingCurve>::Prepared>
Find the appropriate shift for the degree bound.
Trait Implementations
sourceimpl<TargetCurve, BaseCurve, PG> AllocGadget<PreparedVerifierKey<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for PreparedVerifierKeyVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> AllocGadget<PreparedVerifierKey<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for PreparedVerifierKeyVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
fn alloc_constant<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<PreparedVerifierKey<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
_cs: CS,
_value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<PreparedVerifierKey<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
_cs: CS,
_value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<PreparedVerifierKey<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
_cs: CS,
_value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
fn alloc_input_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
sourceimpl<E: PairingEngine> Clone for PreparedVerifierKey<E>
impl<E: PairingEngine> Clone for PreparedVerifierKey<E>
sourceimpl<E: PairingEngine> Debug for PreparedVerifierKey<E>
impl<E: PairingEngine> Debug for PreparedVerifierKey<E>
sourceimpl<E: PairingEngine> Prepare<PreparedVerifierKey<E>> for VerifierKey<E>
impl<E: PairingEngine> Prepare<PreparedVerifierKey<E>> for VerifierKey<E>
sourcefn prepare(&self) -> PreparedVerifierKey<E>
fn prepare(&self) -> PreparedVerifierKey<E>
prepare PreparedVerifierKey
from VerifierKey
Auto Trait Implementations
impl<E> RefUnwindSafe for PreparedVerifierKey<E> where
<E as PairingEngine>::G1Affine: RefUnwindSafe,
<<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
impl<E> Send for PreparedVerifierKey<E>
impl<E> Sync for PreparedVerifierKey<E>
impl<E> Unpin for PreparedVerifierKey<E> where
<E as PairingEngine>::G1Affine: Unpin,
<<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: Unpin,
impl<E> UnwindSafe for PreparedVerifierKey<E> where
<E as PairingEngine>::G1Affine: UnwindSafe,
<<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more