halo2_axiom::poly::commitment

Trait MSM

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

Multi scalar multiplication engine

Required Methods§

Source

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

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) -> bool

Perform multiexp and check that it results in zero

Source

fn eval(&self) -> C::Curve

Perform multiexp and return the result

Source

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

Return base points

Source

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

Scalars

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<'a, C: CurveAffine> MSM<C> for MSMIPA<'a, C>

Source§

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