Trait ark_test_curves::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 as CurveConfig>::BaseField;
const COEFF_A2: <Self as CurveConfig>::BaseField;
const COEFF_A3: <Self as CurveConfig>::BaseField;
const COEFF_B1: <Self as CurveConfig>::BaseField;
const COEFF_B2: <Self as CurveConfig>::BaseField;
const COEFF_B3: <Self as CurveConfig>::BaseField;
const COEFF_C1: <Self as CurveConfig>::BaseField;
const COEFF_C2: <Self as CurveConfig>::BaseField;
const COEFF_N11: <Self as CurveConfig>::ScalarField;
const COEFF_N12: <Self as CurveConfig>::ScalarField;
const COEFF_N21: <Self as CurveConfig>::ScalarField;
const COEFF_N22: <Self as CurveConfig>::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_A1: <Self as CurveConfig>::BaseField
const COEFF_A1: <Self as CurveConfig>::BaseField
Coefficient a_1
of f(y) = a_1 * (y + a_2) * (y + a_3)
.
sourceconst COEFF_A2: <Self as CurveConfig>::BaseField
const COEFF_A2: <Self as CurveConfig>::BaseField
Coefficient a_2
of f(y) = a_1 * (y + a_2) * (y + a_3)
.
sourceconst COEFF_A3: <Self as CurveConfig>::BaseField
const COEFF_A3: <Self as CurveConfig>::BaseField
Coefficient a_3
of f(y) = a_1 * (y + a_2) * (y + a_3)
.
sourceconst COEFF_B1: <Self as CurveConfig>::BaseField
const COEFF_B1: <Self as CurveConfig>::BaseField
Coefficient b_1
of g(y) = b_1 * (y + b_2) * (y + b_3)
.
sourceconst COEFF_B2: <Self as CurveConfig>::BaseField
const COEFF_B2: <Self as CurveConfig>::BaseField
Coefficient b_2
of g(y) = b_1 * (y + b_2) * (y + b_3)
.
sourceconst COEFF_B3: <Self as CurveConfig>::BaseField
const COEFF_B3: <Self as CurveConfig>::BaseField
Coefficient b_3
of g(y) = b_1 * (y + b_2) * (y + b_3)
.
sourceconst COEFF_C1: <Self as CurveConfig>::BaseField
const COEFF_C1: <Self as CurveConfig>::BaseField
Coefficient c_1
of h(y) = (y + c_1) * (y + c_2)
.
sourceconst COEFF_C2: <Self as CurveConfig>::BaseField
const COEFF_C2: <Self as CurveConfig>::BaseField
Coefficient c_2
of h(y) = (y + c_1) * (y + c_2)
.
sourceconst COEFF_N11: <Self as CurveConfig>::ScalarField
const COEFF_N11: <Self as CurveConfig>::ScalarField
The first element of the matrix for scalar decomposition.
sourceconst COEFF_N12: <Self as CurveConfig>::ScalarField
const COEFF_N12: <Self as CurveConfig>::ScalarField
The second element of the matrix for scalar decomposition.
sourceconst COEFF_N21: <Self as CurveConfig>::ScalarField
const COEFF_N21: <Self as CurveConfig>::ScalarField
The third element of the matrix for scalar decomposition.
sourceconst COEFF_N22: <Self as CurveConfig>::ScalarField
const COEFF_N22: <Self as CurveConfig>::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.