halo2_axiom::poly::commitment

Trait Params

Source
pub trait Params<'params, C: CurveAffine>: Sized + Clone {
    type MSM: MSM<C> + 'params;

    // Required methods
    fn k(&self) -> u32;
    fn n(&self) -> u64;
    fn downsize(&mut self, k: u32);
    fn empty_msm(&'params self) -> Self::MSM;
    fn commit_lagrange(
        &self,
        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

Parameters for circuit sysnthesis and prover parameters.

Required Associated Types§

Source

type MSM: MSM<C> + 'params

Multi scalar multiplication engine

Required Methods§

Source

fn k(&self) -> u32

Logaritmic 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 empty_msm(&'params self) -> Self::MSM

Generates an empty multiscalar multiplication struct using the appropriate params.

Source

fn commit_lagrange( &self, 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'params, C: CurveAffine> Params<'params, C> for ParamsIPA<C>

Source§

type MSM = MSMIPA<'params, C>

Source§

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