Struct snarkvm_algorithms::polycommit::kzg10::UniversalParams
source · pub struct UniversalParams<E: PairingEngine> {
pub h: E::G2Affine,
pub prepared_h: <E::G2Affine as PairingCurve>::Prepared,
pub prepared_beta_h: <E::G2Affine as PairingCurve>::Prepared,
/* private fields */
}
Expand description
UniversalParams
are the universal parameters for the KZG10 scheme.
Fields§
§h: E::G2Affine
The generator of G2.
prepared_h: <E::G2Affine as PairingCurve>::Prepared
The generator of G2, prepared for use in pairings.
prepared_beta_h: <E::G2Affine as PairingCurve>::Prepared
\beta times the above generator of G2, prepared for use in pairings.
Implementations§
source§impl<E: PairingEngine> UniversalParams<E>
impl<E: PairingEngine> UniversalParams<E>
pub fn load() -> Result<Self>
pub fn download_powers_for(&self, range: Range<usize>) -> Result<()>
pub fn lagrange_basis( &self, domain: EvaluationDomain<E::Fr> ) -> Result<Vec<E::G1Affine>>
pub fn power_of_beta_g(&self, index: usize) -> Result<E::G1Affine>
pub fn powers_of_beta_g( &self, lower: usize, upper: usize ) -> Result<Vec<E::G1Affine>>
pub fn powers_of_beta_times_gamma_g(&self) -> Arc<BTreeMap<usize, E::G1Affine>>
pub fn beta_h(&self) -> E::G2Affine
pub fn max_degree(&self) -> usize
pub fn to_universal_prover(&self) -> Result<UniversalProver<E>>
pub fn to_universal_verifier(&self) -> Result<UniversalVerifier<E>>
Trait Implementations§
source§impl<E: Clone + PairingEngine> Clone for UniversalParams<E>where
E::G2Affine: Clone,
impl<E: Clone + PairingEngine> Clone for UniversalParams<E>where E::G2Affine: Clone,
source§fn clone(&self) -> UniversalParams<E>
fn clone(&self) -> UniversalParams<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 + PairingEngine> Debug for UniversalParams<E>where
E::G2Affine: Debug,
impl<E: Debug + PairingEngine> Debug for UniversalParams<E>where E::G2Affine: Debug,
source§impl<E: PairingEngine> FromBytes for UniversalParams<E>
impl<E: PairingEngine> FromBytes for UniversalParams<E>
Auto Trait Implementations§
impl<E> !RefUnwindSafe for UniversalParams<E>
impl<E> Send for UniversalParams<E>
impl<E> Sync for UniversalParams<E>
impl<E> Unpin for UniversalParams<E>where <E as PairingEngine>::G2Affine: Unpin, <<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: Unpin,
impl<E> !UnwindSafe for UniversalParams<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