Struct saver::prelude::VerifyingKey
source · pub struct VerifyingKey<E>where
E: Pairing,{
pub alpha_g1: <E as Pairing>::G1Affine,
pub beta_g2: <E as Pairing>::G2Affine,
pub gamma_g2: <E as Pairing>::G2Affine,
pub delta_g2: <E as Pairing>::G2Affine,
pub gamma_abc_g1: Vec<<E as Pairing>::G1Affine>,
}Expand description
A verification key in the Groth16 SNARK.
Fields§
§alpha_g1: <E as Pairing>::G1AffineThe alpha * G, where G is the generator of E::G1.
beta_g2: <E as Pairing>::G2AffineThe alpha * H, where H is the generator of E::G2.
gamma_g2: <E as Pairing>::G2AffineThe gamma * H, where H is the generator of E::G2.
delta_g2: <E as Pairing>::G2AffineThe delta * H, where H is the generator of E::G2.
gamma_abc_g1: Vec<<E as Pairing>::G1Affine>The gamma^{-1} * (beta * a_i + alpha * b_i + c_i) * H, where H is the generator of E::G1.
Trait Implementations§
source§impl<E> CanonicalDeserialize for VerifyingKey<E>where
E: Pairing,
impl<E> CanonicalDeserialize for VerifyingKey<E>where
E: Pairing,
source§fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<VerifyingKey<E>, SerializationError>where
R: Read,
fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<VerifyingKey<E>, SerializationError>where
R: Read,
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> CanonicalSerialize for VerifyingKey<E>where
E: Pairing,
impl<E> CanonicalSerialize for VerifyingKey<E>where
E: Pairing,
source§fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
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 for VerifyingKey<E>
impl<E> Clone for VerifyingKey<E>
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> Debug for VerifyingKey<E>
impl<E> Debug for VerifyingKey<E>
source§impl<E> Default for VerifyingKey<E>where
E: Pairing,
impl<E> Default for VerifyingKey<E>where
E: Pairing,
source§fn default() -> VerifyingKey<E>
fn default() -> VerifyingKey<E>
Returns the “default value” for a type. Read more
source§impl<E> From<PreparedVerifyingKey<E>> for VerifyingKey<E>where
E: Pairing,
impl<E> From<PreparedVerifyingKey<E>> for VerifyingKey<E>where
E: Pairing,
source§fn from(other: PreparedVerifyingKey<E>) -> VerifyingKey<E>
fn from(other: PreparedVerifyingKey<E>) -> VerifyingKey<E>
Converts to this type from the input type.
source§impl<E> From<VerifyingKey<E>> for PreparedVerifyingKey<E>where
E: Pairing,
impl<E> From<VerifyingKey<E>> for PreparedVerifyingKey<E>where
E: Pairing,
source§fn from(other: VerifyingKey<E>) -> PreparedVerifyingKey<E>
fn from(other: VerifyingKey<E>) -> PreparedVerifyingKey<E>
Converts to this type from the input type.
source§impl<E> PartialEq for VerifyingKey<E>
impl<E> PartialEq for VerifyingKey<E>
source§fn eq(&self, other: &VerifyingKey<E>) -> bool
fn eq(&self, other: &VerifyingKey<E>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<E> Valid for VerifyingKey<E>where
E: Pairing,
impl<E> Valid for VerifyingKey<E>where
E: Pairing,
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a VerifyingKey<E>> + Send,
) -> Result<(), SerializationError>where
VerifyingKey<E>: 'a,
impl<E> StructuralPartialEq for VerifyingKey<E>where
E: Pairing,
Auto Trait Implementations§
impl<E> Freeze for VerifyingKey<E>
impl<E> RefUnwindSafe for VerifyingKey<E>
impl<E> Send for VerifyingKey<E>
impl<E> Sync for VerifyingKey<E>
impl<E> Unpin for VerifyingKey<E>
impl<E> UnwindSafe for VerifyingKey<E>
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
source§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
fn hash<H>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
fn hash_uncompressed<H>(
&self,
) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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