pub struct VerifyingKey<E: Pairing> {
pub domain_size: usize,
pub num_inputs: usize,
pub sigma_comms: Vec<Commitment<E>>,
pub selector_comms: Vec<Commitment<E>>,
pub k: Vec<E::ScalarField>,
pub open_key: OpenKey<E>,
pub is_merged: bool,
pub plookup_vk: Option<PlookupVerifyingKey<E>>,
}
Expand description
Preprocessed verifier parameters used to verify Plonk proofs for a certain circuit.
Fields§
§domain_size: usize
The size of the evaluation domain. Should be a power of two.
num_inputs: usize
The number of public inputs.
sigma_comms: Vec<Commitment<E>>
The permutation polynomial commitments. The commitments are not hiding.
selector_comms: Vec<Commitment<E>>
The selector polynomial commitments. The commitments are not hiding.
k: Vec<E::ScalarField>
The constants K0, …, K_num_wire_types that ensure wire subsets are disjoint.
open_key: OpenKey<E>
KZG PCS opening key.
is_merged: bool
A flag indicating whether the key is a merged key.
plookup_vk: Option<PlookupVerifyingKey<E>>
Plookup verifying key, None if not support lookup.
Implementations§
Source§impl<E, F, P> VerifyingKey<E>where
E: Pairing<BaseField = F, G1Affine = Affine<P>>,
F: SWToTEConParam,
P: SWCurveConfig<BaseField = F>,
impl<E, F, P> VerifyingKey<E>where
E: Pairing<BaseField = F, G1Affine = Affine<P>>,
F: SWToTEConParam,
P: SWCurveConfig<BaseField = F>,
Sourcepub fn convert_te_coordinates_to_scalars(&self) -> Vec<F>
pub fn convert_te_coordinates_to_scalars(&self) -> Vec<F>
Convert the group elements to a list of scalars that represent the Twisted Edwards coordinates.
Trait Implementations§
Source§impl<E: Pairing> CanonicalDeserialize for VerifyingKey<E>
impl<E: Pairing> CanonicalDeserialize for VerifyingKey<E>
Source§fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<Self, SerializationError>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Source§impl<E: Pairing> CanonicalSerialize for VerifyingKey<E>
impl<E: Pairing> CanonicalSerialize for VerifyingKey<E>
Source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>
fn serialize_with_mode<W: Write>( &self, writer: W, compress: Compress, ) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
Source§impl<E: Clone + Pairing> Clone for VerifyingKey<E>where
E::ScalarField: Clone,
impl<E: Clone + Pairing> Clone for VerifyingKey<E>where
E::ScalarField: Clone,
Source§fn clone(&self) -> VerifyingKey<E>
fn clone(&self) -> VerifyingKey<E>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<E, F, P1, P2> From<VerifyingKey<E>> for Vec<E::BaseField>where
E: Pairing<G1Affine = Affine<P1>, G2Affine = Affine<P2>, TargetField = Fp2<F>>,
F: Fp2Config<Fp = E::BaseField>,
P1: SWCurveConfig<BaseField = E::BaseField, ScalarField = E::ScalarField>,
P2: SWCurveConfig<BaseField = E::TargetField, ScalarField = E::ScalarField>,
impl<E, F, P1, P2> From<VerifyingKey<E>> for Vec<E::BaseField>where
E: Pairing<G1Affine = Affine<P1>, G2Affine = Affine<P2>, TargetField = Fp2<F>>,
F: Fp2Config<Fp = E::BaseField>,
P1: SWCurveConfig<BaseField = E::BaseField, ScalarField = E::ScalarField>,
P2: SWCurveConfig<BaseField = E::TargetField, ScalarField = E::ScalarField>,
Source§fn from(vk: VerifyingKey<E>) -> Self
fn from(vk: VerifyingKey<E>) -> Self
Converts to this type from the input type.
Source§impl<E: Pairing> Valid for VerifyingKey<E>
impl<E: Pairing> Valid for VerifyingKey<E>
impl<E: Eq + Pairing> Eq for VerifyingKey<E>where
E::ScalarField: Eq,
impl<E: Pairing> StructuralPartialEq for VerifyingKey<E>
Auto Trait Implementations§
impl<E> Freeze for VerifyingKey<E>
impl<E> RefUnwindSafe for VerifyingKey<E>where
<E as Pairing>::G1Affine: RefUnwindSafe,
<E as Pairing>::G2Affine: RefUnwindSafe,
<E as Pairing>::ScalarField: RefUnwindSafe,
impl<E> Send for VerifyingKey<E>
impl<E> Sync for VerifyingKey<E>
impl<E> Unpin for VerifyingKey<E>
impl<E> UnwindSafe for VerifyingKey<E>where
<E as Pairing>::G1Affine: UnwindSafe,
<E as Pairing>::G2Affine: UnwindSafe,
<E as Pairing>::ScalarField: UnwindSafe,
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
§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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>
Converts
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>
Converts
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