Struct snarkvm_polycommit::kzg10::UniversalParams
source · [−]pub struct UniversalParams<E: PairingEngine> {
pub powers_of_g: Vec<E::G1Affine>,
pub powers_of_gamma_g: BTreeMap<usize, E::G1Affine>,
pub h: E::G2Affine,
pub beta_h: E::G2Affine,
pub supported_degree_bounds: Vec<usize>,
pub inverse_powers_of_g: BTreeMap<usize, E::G1Affine>,
pub inverse_neg_powers_of_h: BTreeMap<usize, E::G2Affine>,
pub prepared_h: <E::G2Affine as PairingCurve>::Prepared,
pub prepared_beta_h: <E::G2Affine as PairingCurve>::Prepared,
}
Expand description
UniversalParams
are the universal parameters for the KZG10 scheme.
Fields
powers_of_g: Vec<E::G1Affine>
Group elements of the form { \beta^i G }
, where i
ranges from 0 to degree
.
powers_of_gamma_g: BTreeMap<usize, E::G1Affine>
Group elements of the form { \beta^i \gamma G }
, where i
ranges from 0 to degree
.
h: E::G2Affine
The generator of G2.
beta_h: E::G2Affine
\beta times the above generator of G2.
supported_degree_bounds: Vec<usize>
Supported degree bounds.
inverse_powers_of_g: BTreeMap<usize, E::G1Affine>
Group elements of the form { \beta^{max_degree - i} G1}
, where i
is the supported degree bound.
This one is used for deriving the verifying key.
inverse_neg_powers_of_h: BTreeMap<usize, E::G2Affine>
Group elements of the form { \beta^{max_degree -i} G2 }
, where i
is the supported degree bound.
This one is used for deriving the verifying key.
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.
Trait Implementations
sourceimpl<E: PairingEngine> CanonicalDeserialize for UniversalParams<E>
impl<E: PairingEngine> CanonicalDeserialize for UniversalParams<E>
sourcefn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
Reads Self
from reader
.
sourcefn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
fn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
Reads Self
from reader
without compression.
sourceimpl<E: PairingEngine> CanonicalSerialize for UniversalParams<E>
impl<E: PairingEngine> CanonicalSerialize for UniversalParams<E>
sourcefn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
Serializes self
into writer
.
fn serialized_size(&self) -> usize
sourcefn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
fn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
Serializes self
into writer
without compression.
fn uncompressed_size(&self) -> usize
sourceimpl<E: PairingEngine> Clone for UniversalParams<E>
impl<E: PairingEngine> Clone for UniversalParams<E>
sourceimpl<E: PairingEngine> Debug for UniversalParams<E>
impl<E: PairingEngine> Debug for UniversalParams<E>
sourceimpl<E: PairingEngine> Default for UniversalParams<E>
impl<E: PairingEngine> Default for UniversalParams<E>
sourceimpl<E: PairingEngine> FromBytes for UniversalParams<E>
impl<E: PairingEngine> FromBytes for UniversalParams<E>
sourceimpl<E: PairingEngine> PCUniversalParams for UniversalParams<E>
impl<E: PairingEngine> PCUniversalParams for UniversalParams<E>
sourcefn max_degree(&self) -> usize
fn max_degree(&self) -> usize
Outputs the maximum degree supported by the committer key.
sourcefn supported_degree_bounds(&self) -> &[usize]
fn supported_degree_bounds(&self) -> &[usize]
Supported degree bounds
Auto Trait Implementations
impl<E> RefUnwindSafe for UniversalParams<E> where
<E as PairingEngine>::G1Affine: RefUnwindSafe,
<E as PairingEngine>::G2Affine: RefUnwindSafe,
<<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
impl<E> Send for UniversalParams<E>
impl<E> Sync for UniversalParams<E>
impl<E> Unpin for UniversalParams<E> where
<E as PairingEngine>::G1Affine: Unpin,
<E as PairingEngine>::G2Affine: Unpin,
<<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: Unpin,
impl<E> UnwindSafe for UniversalParams<E> where
<E as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe,
<E as PairingEngine>::G2Affine: UnwindSafe + RefUnwindSafe,
<<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more