Trait ark_ec::scalar_mul::glv::GLVConfig
source · pub trait GLVConfig: Send + Sync + 'static + CurveConfig {
type Curve: CurveGroup<Config = Self>;
Show 12 associated constants and 3 methods
const COEFF_A1: Self::BaseField;
const COEFF_A2: Self::BaseField;
const COEFF_A3: Self::BaseField;
const COEFF_B1: Self::BaseField;
const COEFF_B2: Self::BaseField;
const COEFF_B3: Self::BaseField;
const COEFF_C1: Self::BaseField;
const COEFF_C2: Self::BaseField;
const COEFF_N11: Self::ScalarField;
const COEFF_N12: Self::ScalarField;
const COEFF_N21: Self::ScalarField;
const COEFF_N22: Self::ScalarField;
// Required methods
fn endomorphism(
base: &<Self::Curve as CurveGroup>::Affine
) -> <Self::Curve as CurveGroup>::Affine;
fn scalar_decomposition(
k: &Self::ScalarField
) -> (Self::ScalarField, Self::ScalarField);
fn glv_mul(
base: &<Self::Curve as CurveGroup>::Affine,
scalar: &Self::ScalarField
) -> Self::Curve;
}
Expand description
The GLV parameters for computing the endomorphism and scalar decomposition.
Required Associated Types§
sourcetype Curve: CurveGroup<Config = Self>
type Curve: CurveGroup<Config = Self>
A representation of curve points that enables efficient arithmetic by avoiding inversions.
Required Associated Constants§
sourceconst COEFF_N11: Self::ScalarField
const COEFF_N11: Self::ScalarField
The first element of the matrix for scalar decomposition.
sourceconst COEFF_N12: Self::ScalarField
const COEFF_N12: Self::ScalarField
The second element of the matrix for scalar decomposition.
sourceconst COEFF_N21: Self::ScalarField
const COEFF_N21: Self::ScalarField
The third element of the matrix for scalar decomposition.
sourceconst COEFF_N22: Self::ScalarField
const COEFF_N22: Self::ScalarField
The forth element of the matrix for the scalar decomposition.
Required Methods§
sourcefn endomorphism(
base: &<Self::Curve as CurveGroup>::Affine
) -> <Self::Curve as CurveGroup>::Affine
fn endomorphism( base: &<Self::Curve as CurveGroup>::Affine ) -> <Self::Curve as CurveGroup>::Affine
Maps a point G to phi(G):= lambda G where psi is the endomorphism.
sourcefn scalar_decomposition(
k: &Self::ScalarField
) -> (Self::ScalarField, Self::ScalarField)
fn scalar_decomposition( k: &Self::ScalarField ) -> (Self::ScalarField, Self::ScalarField)
Decomposes a scalar s into k1, k2, s.t. s = k1 + lambda k2,
sourcefn glv_mul(
base: &<Self::Curve as CurveGroup>::Affine,
scalar: &Self::ScalarField
) -> Self::Curve
fn glv_mul( base: &<Self::Curve as CurveGroup>::Affine, scalar: &Self::ScalarField ) -> Self::Curve
Performs GLV multiplication.