snark_verifier::loader

Trait EcPointLoader

Source
pub trait EcPointLoader<C: CurveAffine> {
    type LoadedEcPoint: LoadedEcPoint<C, Loader = Self>;

    // Required methods
    fn ec_point_load_const(&self, value: &C) -> Self::LoadedEcPoint;
    fn ec_point_assert_eq(
        &self,
        annotation: &str,
        lhs: &Self::LoadedEcPoint,
        rhs: &Self::LoadedEcPoint,
    );
    fn multi_scalar_multiplication(
        pairs: &[(&Self::LoadedScalar, &Self::LoadedEcPoint)],
    ) -> Self::LoadedEcPoint
       where Self: ScalarLoader<C::ScalarExt>;

    // Provided methods
    fn ec_point_load_zero(&self) -> Self::LoadedEcPoint { ... }
    fn ec_point_load_one(&self) -> Self::LoadedEcPoint { ... }
}
Expand description

Elliptic curve point loader.

Required Associated Types§

Required Methods§

Source

fn ec_point_load_const(&self, value: &C) -> Self::LoadedEcPoint

Load a constant elliptic curve point.

Source

fn ec_point_assert_eq( &self, annotation: &str, lhs: &Self::LoadedEcPoint, rhs: &Self::LoadedEcPoint, )

Assert lhs and rhs elliptic curve points are equal.

Source

fn multi_scalar_multiplication( pairs: &[(&Self::LoadedScalar, &Self::LoadedEcPoint)], ) -> Self::LoadedEcPoint
where Self: ScalarLoader<C::ScalarExt>,

Perform multi-scalar multiplication.

Provided Methods§

Source

fn ec_point_load_zero(&self) -> Self::LoadedEcPoint

Load identity as constant.

Source

fn ec_point_load_one(&self) -> Self::LoadedEcPoint

Load generator as constant.

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.

Implementations on Foreign Types§

Source§

impl<C> EcPointLoader<C> for Rc<EvmLoader>
where C: CurveAffine, C::Scalar: PrimeField<Repr = [u8; 32]>,

Source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> EcPointLoader<C> for Rc<Halo2Loader<C, EccChip>>

Source§

type LoadedEcPoint = EcPoint<C, EccChip>

Source§

fn ec_point_load_const(&self, ec_point: &C) -> EcPoint<C, EccChip>

Source§

fn ec_point_assert_eq( &self, _annotation: &str, lhs: &EcPoint<C, EccChip>, rhs: &EcPoint<C, EccChip>, )

Source§

fn multi_scalar_multiplication( pairs: &[(&<Self as ScalarLoader<C::Scalar>>::LoadedScalar, &EcPoint<C, EccChip>)], ) -> EcPoint<C, EccChip>

Implementors§