pub type Halo2Params = ParamsKZG<Bn256>;
Aliased Type§
struct Halo2Params { /* private fields */ }
Implementations
Source§impl<E> ParamsKZG<E>
impl<E> ParamsKZG<E>
Sourcepub fn setup<R>(k: u32, rng: R) -> ParamsKZG<E>where
R: RngCore,
pub fn setup<R>(k: u32, rng: R) -> ParamsKZG<E>where
R: RngCore,
Initializes parameters for the curve, draws toxic secret from given rng. MUST NOT be used in production.
Sourcepub fn from_parts(
&self,
k: u32,
g: Vec<<E as Engine>::G1Affine>,
g_lagrange: Option<Vec<<E as Engine>::G1Affine>>,
g2: <E as Engine>::G2Affine,
s_g2: <E as Engine>::G2Affine,
) -> ParamsKZG<E>
pub fn from_parts( &self, k: u32, g: Vec<<E as Engine>::G1Affine>, g_lagrange: Option<Vec<<E as Engine>::G1Affine>>, g2: <E as Engine>::G2Affine, s_g2: <E as Engine>::G2Affine, ) -> ParamsKZG<E>
Initializes parameters for the curve through existing parameters k, g, g_lagrange (optional), g2, s_g2
Sourcepub fn write_custom<W>(
&self,
writer: &mut W,
format: SerdeFormat,
) -> Result<(), Error>
pub fn write_custom<W>( &self, writer: &mut W, format: SerdeFormat, ) -> Result<(), Error>
Writes parameters to buffer
Trait Implementations
Source§impl<'params, E> Params<'params, <E as Engine>::G1Affine> for ParamsKZG<E>
impl<'params, E> Params<'params, <E as Engine>::G1Affine> for ParamsKZG<E>
Source§fn write<W>(&self, writer: &mut W) -> Result<(), Error>where
W: Write,
fn write<W>(&self, writer: &mut W) -> Result<(), Error>where
W: Write,
Writes params to a buffer.
Source§fn read<R>(reader: &mut R) -> Result<ParamsKZG<E>, Error>where
R: Read,
fn read<R>(reader: &mut R) -> Result<ParamsKZG<E>, Error>where
R: Read,
Reads params from a buffer.
Source§fn empty_msm(&'params self) -> MSMKZG<E>
fn empty_msm(&'params self) -> MSMKZG<E>
Generates an empty multiscalar multiplication struct using the
appropriate params.
Source§fn commit_lagrange(
&self,
poly: &Polynomial<<E as Engine>::Fr, LagrangeCoeff>,
_: Blind<<E as Engine>::Fr>,
) -> <E as Engine>::G1
fn commit_lagrange( &self, poly: &Polynomial<<E as Engine>::Fr, LagrangeCoeff>, _: Blind<<E as Engine>::Fr>, ) -> <E as Engine>::G1
This commits to a polynomial using its evaluations over the $2^k$ size
evaluation domain. The commitment will be blinded by the blinding factor
r
.Source§impl<'params, E> ParamsProver<'params, <E as Engine>::G1Affine> for ParamsKZG<E>
impl<'params, E> ParamsProver<'params, <E as Engine>::G1Affine> for ParamsKZG<E>
Source§type ParamsVerifier = ParamsKZG<E>
type ParamsVerifier = ParamsKZG<E>
Constant verifier parameters.
Source§fn verifier_params(
&'params self,
) -> &'params <ParamsKZG<E> as ParamsProver<'params, <E as Engine>::G1Affine>>::ParamsVerifier
fn verifier_params( &'params self, ) -> &'params <ParamsKZG<E> as ParamsProver<'params, <E as Engine>::G1Affine>>::ParamsVerifier
Returns verification parameters.