Struct legogroth16::aggregation::srs::ProverSRS
source · pub struct ProverSRS<E: Pairing> {
pub n: u32,
pub g_alpha_powers_table: Vec<E::G1Affine>,
pub h_alpha_powers_table: Vec<E::G2Affine>,
pub g_beta_powers_table: Vec<E::G1Affine>,
pub h_beta_powers_table: Vec<E::G2Affine>,
pub vkey: VKey<E>,
pub wkey: WKey<E>,
}
Expand description
ProverSRS is the specialized SRS version for the prover for a specific number of proofs to aggregate. It contains as well the commitment keys for this specific size. Note the size must be a power of two for the moment - if it is not, padding must be applied.
Fields§
§n: u32
number of proofs to aggregate
g_alpha_powers_table: Vec<E::G1Affine>
${g^a^i}_{i=0}^{2n-1}$ where n is the number of proofs to be aggregated We take all powers instead of only ones from n -> 2n-1 (w commitment key is formed from these powers) since the prover will create a shifted polynomial of degree 2n-1 when doing the KZG opening proof.
h_alpha_powers_table: Vec<E::G2Affine>
${h^a^i}_{i=0}^{n-1}$ - here we don’t need to go to 2n-1 since v commitment key only goes up to n-1 exponent.
g_beta_powers_table: Vec<E::G1Affine>
${g^b^i}_{i=0}^{2n-1}$
h_beta_powers_table: Vec<E::G2Affine>
${h^b^i}_{i=0}^{n-1}$
vkey: VKey<E>
commitment key using in MIPP and TIPP
wkey: WKey<E>
commitment key using in TIPP
Implementations§
Trait Implementations§
source§impl<E: Pairing> CanonicalDeserialize for ProverSRS<E>
impl<E: Pairing> CanonicalDeserialize for ProverSRS<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>
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 ProverSRS<E>
impl<E: Pairing> CanonicalSerialize for ProverSRS<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>
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: PartialEq + Pairing> PartialEq for ProverSRS<E>
impl<E: PartialEq + Pairing> PartialEq for ProverSRS<E>
source§impl<E: Pairing> Valid for ProverSRS<E>
impl<E: Pairing> Valid for ProverSRS<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send
) -> Result<(), SerializationError>where
Self: 'a,
impl<E: Pairing> StructuralPartialEq for ProverSRS<E>
Auto Trait Implementations§
impl<E> Freeze for ProverSRS<E>
impl<E> RefUnwindSafe for ProverSRS<E>
impl<E> Send for ProverSRS<E>
impl<E> Sync for ProverSRS<E>
impl<E> Unpin for ProverSRS<E>
impl<E> UnwindSafe for ProverSRS<E>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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<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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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>
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