Struct bellperson::groth16::aggregate::GenericSRS [−][src]
pub struct GenericSRS<E: Engine> { pub g_alpha_powers: Vec<E::G1Affine>, pub h_alpha_powers: Vec<E::G2Affine>, pub g_beta_powers: Vec<E::G1Affine>, pub h_beta_powers: Vec<E::G2Affine>, }
Expand description
It contains the maximum number of raw elements of the SRS needed to aggregate and verify
Groth16 proofs. One can derive specialized prover and verifier key for specific size of
aggregations by calling srs.specialize(n)
. The specialized prover key also contains
precomputed tables that drastically increase prover’s performance.
This GenericSRS is usually formed from the transcript of two distinct power of taus ceremony
,in other words from two distinct Groth16 CRS.
See there a way on how to generate this GenesisSRS.
Fields
g_alpha_powers: Vec<E::G1Affine>
${g^a^i}_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS.
h_alpha_powers: Vec<E::G2Affine>
${h^a^i}_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS.
g_beta_powers: Vec<E::G1Affine>
${g^b^i}_{i=n}^{N}$ where N is the smallest size of the two Groth16 CRS.
h_beta_powers: Vec<E::G2Affine>
${h^b^i}_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS.
Implementations
impl<E: Engine> GenericSRS<E>
[src]
impl<E: Engine> GenericSRS<E>
[src]pub fn specialize(&self, num_proofs: usize) -> (ProverSRS<E>, VerifierSRS<E>)
[src]
pub fn specialize(&self, num_proofs: usize) -> (ProverSRS<E>, VerifierSRS<E>)
[src]specializes returns the prover and verifier SRS for a specific number of proofs to aggregate. The number of proofs MUST BE a power of two, it panics otherwise. The number of proofs must be inferior to half of the size of the generic srs otherwise it panics.
pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
[src]
pub fn read<R: Read>(reader: &mut R) -> Result<Self>
[src]
pub fn read_mmap(reader: &Mmap, max_len: usize) -> Result<Self>
[src]
Trait Implementations
impl<E: Clone + Engine> Clone for GenericSRS<E> where
E::G1Affine: Clone,
E::G2Affine: Clone,
E::G1Affine: Clone,
E::G2Affine: Clone,
[src]
impl<E: Clone + Engine> Clone for GenericSRS<E> where
E::G1Affine: Clone,
E::G2Affine: Clone,
E::G1Affine: Clone,
E::G2Affine: Clone,
[src]fn clone(&self) -> GenericSRS<E>
[src]
fn clone(&self) -> GenericSRS<E>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<E> RefUnwindSafe for GenericSRS<E> where
<E as Engine>::G1Affine: RefUnwindSafe,
<E as Engine>::G2Affine: RefUnwindSafe,
<E as Engine>::G1Affine: RefUnwindSafe,
<E as Engine>::G2Affine: RefUnwindSafe,
impl<E> Send for GenericSRS<E>
impl<E> Sync for GenericSRS<E>
impl<E> Unpin for GenericSRS<E> where
<E as Engine>::G1Affine: Unpin,
<E as Engine>::G2Affine: Unpin,
<E as Engine>::G1Affine: Unpin,
<E as Engine>::G2Affine: Unpin,
impl<E> UnwindSafe for GenericSRS<E> where
<E as Engine>::G1Affine: UnwindSafe,
<E as Engine>::G2Affine: UnwindSafe,
<E as Engine>::G1Affine: UnwindSafe,
<E as Engine>::G2Affine: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,