Trait halo2_proofs::poly::commitment::MSM
source · pub trait MSM<C>: Clone + Debug + Send + Syncwhere
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§
sourcefn append_term(
&mut self,
scalar: <C as PrimeCurveAffine>::Scalar,
point: <C as CurveAffine>::CurveExt
)
fn append_term( &mut self, scalar: <C as PrimeCurveAffine>::Scalar, point: <C as CurveAffine>::CurveExt )
Add arbitrary term (the scalar and the point)
sourcefn scale(&mut self, factor: <C as PrimeCurveAffine>::Scalar)
fn scale(&mut self, factor: <C as PrimeCurveAffine>::Scalar)
Scale all scalars in the MSM by some scaling factor
sourcefn check(&self, engine: &impl MsmAccel<C>) -> bool
fn check(&self, engine: &impl MsmAccel<C>) -> bool
Perform multiexp and check that it results in zero
sourcefn eval(&self, engine: &impl MsmAccel<C>) -> <C as CurveAffine>::CurveExt
fn eval(&self, engine: &impl MsmAccel<C>) -> <C as CurveAffine>::CurveExt
Perform multiexp and return the result
sourcefn bases(&self) -> Vec<<C as CurveAffine>::CurveExt>
fn bases(&self) -> Vec<<C as CurveAffine>::CurveExt>
Return base points
Object Safety§
This trait is not object safe.