Trait halo2_backend::poly::commitment::MSM

source ·
pub trait MSM<C: CurveAffine>: Clone + Debug + Send + Sync {
    // Required methods
    fn append_term(&mut self, scalar: C::Scalar, point: C::CurveExt);
    fn add_msm(&mut self, other: &Self)
       where Self: Sized;
    fn scale(&mut self, factor: C::Scalar);
    fn check(&self, engine: &impl MsmAccel<C>) -> bool;
    fn eval(&self, engine: &impl MsmAccel<C>) -> C::CurveExt;
    fn bases(&self) -> Vec<C::CurveExt>;
    fn scalars(&self) -> Vec<C::Scalar>;
}
Expand description

Multiscalar multiplication engine

Required Methods§

source

fn append_term(&mut self, scalar: C::Scalar, point: C::CurveExt)

Add arbitrary term (the scalar and the point)

source

fn add_msm(&mut self, other: &Self)
where Self: Sized,

Add another multiexp into this one

source

fn scale(&mut self, factor: C::Scalar)

Scale all scalars in the MSM by some scaling factor

source

fn check(&self, engine: &impl MsmAccel<C>) -> bool

Perform multiexp and check that it results in zero

source

fn eval(&self, engine: &impl MsmAccel<C>) -> C::CurveExt

Perform multiexp and return the result

source

fn bases(&self) -> Vec<C::CurveExt>

Return base points

source

fn scalars(&self) -> Vec<C::Scalar>

Scalars

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<E: Engine> MSM<<E as Engine>::G1Affine> for MSMKZG<E>
where E::G1Affine: CurveAffine<ScalarExt = <E as Engine>::Fr, CurveExt = <E as Engine>::G1>, E::G1: CurveExt<AffineExt = E::G1Affine>,