Trait halo2_proofs::poly::commitment::Params

source ·
pub trait Params<C>: Sized + Clone + Debug
where C: CurveAffine,
{ // 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 as CurveAffine>::ScalarExt, LagrangeCoeff>, r: Blind<<C as CurveAffine>::ScalarExt> ) -> <C as CurveAffine>::CurveExt; fn write<W>(&self, writer: &mut W) -> Result<(), Error> where W: Write; fn read<R>(reader: &mut R) -> Result<Self, Error> where R: Read; }
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 as CurveAffine>::ScalarExt, LagrangeCoeff>, r: Blind<<C as CurveAffine>::ScalarExt> ) -> <C as CurveAffine>::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>(&self, writer: &mut W) -> Result<(), Error>
where W: Write,

Writes params to a buffer.

source

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

Reads params from a buffer.

Object Safety§

This trait is not object safe.

Implementors§

source§

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

source§

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