Trait halo2_backend::poly::commitment::Params

source ·
pub trait Params<C: CurveAffine>: Sized + Clone + Debug {
    // Required methods
    fn k(&self) -> u32;
    fn n(&self) -> u64;
    fn downsize(&mut self, k: u32);
    fn commit_lagrange(
        &self,
        engine: &impl MsmAccel<C>,
        poly: &Polynomial<C::ScalarExt, LagrangeCoeff>,
        r: Blind<C::ScalarExt>
    ) -> C::CurveExt;
    fn write<W: Write>(&self, writer: &mut W) -> Result<()>;
    fn read<R: Read>(reader: &mut R) -> Result<Self>;
}
Expand description

Common for Verifier and Prover.

Parameters for circuit synthesis and prover parameters.

Required Methods§

source

fn k(&self) -> u32

Logarithmic size of the circuit

source

fn n(&self) -> u64

Size of the circuit

source

fn downsize(&mut self, k: u32)

Downsize Params with smaller k.

source

fn commit_lagrange( &self, engine: &impl MsmAccel<C>, poly: &Polynomial<C::ScalarExt, LagrangeCoeff>, r: Blind<C::ScalarExt> ) -> C::CurveExt

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

fn write<W: Write>(&self, writer: &mut W) -> Result<()>

Writes params to a buffer.

source

fn read<R: Read>(reader: &mut R) -> Result<Self>

Reads params from a buffer.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<E: Engine> Params<<E as Engine>::G1Affine> for ParamsKZG<E>
where E::G1Affine: SerdeCurveAffine<ScalarExt = <E as Engine>::Fr, CurveExt = <E as Engine>::G1>, E::G1: CurveExt<AffineExt = E::G1Affine>, E::G2Affine: SerdeCurveAffine,

source§

impl<E: Engine> Params<<E as Engine>::G1Affine> for ParamsVerifierKZG<E>
where E::G1Affine: SerdeCurveAffine<ScalarExt = <E as Engine>::Fr, CurveExt = <E as Engine>::G1>, E::G1: CurveExt<AffineExt = E::G1Affine>, E::G2Affine: SerdeCurveAffine,