ark_ec::scalar_mul::glv

Trait GLVConfig

Source
pub trait GLVConfig:
    Send
    + Sync
    + 'static
    + SWCurveConfig {
    const ENDO_COEFFS: &'static [Self::BaseField];
    const LAMBDA: Self::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§

Source

const ENDO_COEFFS: &'static [Self::BaseField]

Constants that are used to calculate phi(G) := lambda*G. The coefficients of the endomorphism

Source

const LAMBDA: Self::ScalarField

The eigenvalue corresponding to the endomorphism.

Source

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§

Source

fn endomorphism(p: &Projective<Self>) -> Projective<Self>

Source

fn endomorphism_affine(p: &Affine<Self>) -> Affine<Self>

Provided Methods§

Source

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,

Source

fn glv_mul_projective( p: Projective<Self>, k: Self::ScalarField, ) -> Projective<Self>

Source

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.

Implementors§