Trait halo2_proofs::poly::commitment::MSM

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

Multiscalar multiplication engine

Required Methods§

source

fn append_term( &mut self, scalar: <C as PrimeCurveAffine>::Scalar, point: <C as CurveAffine>::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 as PrimeCurveAffine>::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 as CurveAffine>::CurveExt

Perform multiexp and return the result

source

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

Return base points

source

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

Scalars

Object Safety§

This trait is not object safe.

Implementors§

source§

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