pub trait GLVConfig:
Send
+ Sync
+ 'static
+ SWCurveConfig {
const ENDO_COEFFS: &'static [Self::BaseField];
const LAMBDA: <Self as CurveConfig>::ScalarField;
const SCALAR_DECOMP_COEFFS: [(bool, <Self::ScalarField as PrimeField>::BigInt); 4];
// Required methods
fn endomorphism(p: &Projective<Self>) -> Projective<Self>;
fn endomorphism_affine(p: &Affine<Self>) -> Affine<Self>;
// Provided methods
fn scalar_decomposition(
k: Self::ScalarField,
) -> ((bool, Self::ScalarField), (bool, Self::ScalarField)) { ... }
fn glv_mul_projective(
p: Projective<Self>,
k: Self::ScalarField,
) -> Projective<Self> { ... }
fn glv_mul_affine(p: Affine<Self>, k: Self::ScalarField) -> Affine<Self> { ... }
}
Expand description
The GLV parameters for computing the endomorphism and scalar decomposition.
Required Associated Constants§
Sourceconst ENDO_COEFFS: &'static [Self::BaseField]
const ENDO_COEFFS: &'static [Self::BaseField]
Constants that are used to calculate phi(G) := lambda*G
.
The coefficients of the endomorphism
Sourceconst LAMBDA: <Self as CurveConfig>::ScalarField
const LAMBDA: <Self as CurveConfig>::ScalarField
The eigenvalue corresponding to the endomorphism.
Sourceconst SCALAR_DECOMP_COEFFS: [(bool, <Self::ScalarField as PrimeField>::BigInt); 4]
const SCALAR_DECOMP_COEFFS: [(bool, <Self::ScalarField as PrimeField>::BigInt); 4]
A 4-element vector representing a 2x2 matrix of coefficients the for scalar decomposition, s.t. k-th entry in the vector is at col i, row j in the matrix, with ij = BE binary decomposition of k.
The entries are the LLL-reduced bases.
The determinant of this matrix must equal ScalarField::characteristic()
.
Required Methods§
fn endomorphism(p: &Projective<Self>) -> Projective<Self>
fn endomorphism_affine(p: &Affine<Self>) -> Affine<Self>
Provided Methods§
Sourcefn scalar_decomposition(
k: Self::ScalarField,
) -> ((bool, Self::ScalarField), (bool, Self::ScalarField))
fn scalar_decomposition( k: Self::ScalarField, ) -> ((bool, Self::ScalarField), (bool, Self::ScalarField))
Decomposes a scalar s into k1, k2, s.t. s = k1 + lambda k2,
fn glv_mul_projective( p: Projective<Self>, k: Self::ScalarField, ) -> Projective<Self>
fn glv_mul_affine(p: Affine<Self>, k: Self::ScalarField) -> Affine<Self>
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.