pub struct Config;Trait Implementations§
Source§impl CurveConfig for Config
 
impl CurveConfig for Config
Source§const COFACTOR: &'static [u64]
 
const COFACTOR: &'static [u64]
COFACTOR = (x^8 - 4 x^7 + 5 x^6) - (4 x^4 + 6 x^3 - 4 x^2 - 4 x + 13) // 9 = 305502333931268344200999753193121504214466019254188142667664032982267604182971884026507427359259977847832272839041616661285803823378372096355777062779109
Source§const COFACTOR_INV: Fr
 
const COFACTOR_INV: Fr
COFACTOR_INV = COFACTOR^{-1} mod r 26652489039290660355457965112010883481355318854675681319708643586776743290055
Source§type BaseField = QuadExtField<Fp2ConfigWrapper<Fq2Config>>
 
type BaseField = QuadExtField<Fp2ConfigWrapper<Fq2Config>>
Base field that the curve is defined over.
Source§type ScalarField = Fp<MontBackend<FrConfig, 4>, 4>
 
type ScalarField = Fp<MontBackend<FrConfig, 4>, 4>
Finite prime field corresponding to an appropriate prime-order subgroup
of the curve group.
fn cofactor_is_one() -> bool
Source§impl GLVConfig for Config
 
impl GLVConfig for Config
Source§const 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 endomorphismSource§const LAMBDA: Self::ScalarField
 
const LAMBDA: Self::ScalarField
The eigenvalue corresponding to the endomorphism.
Source§const 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().fn endomorphism(p: &Projective<Self>) -> Projective<Self>
fn endomorphism_affine(p: &Affine<Self>) -> Affine<Self>
Source§fn 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>
Source§impl SWCurveConfig for Config
 
impl SWCurveConfig for Config
Source§fn mul_by_a(_: Self::BaseField) -> Self::BaseField
 
fn mul_by_a(_: Self::BaseField) -> Self::BaseField
Helper method for computing 
elem * Self::COEFF_A. Read moreSource§fn is_in_correct_subgroup_assuming_on_curve(point: &G2Affine) -> bool
 
fn is_in_correct_subgroup_assuming_on_curve(point: &G2Affine) -> bool
Check if the provided curve point is in the prime-order subgroup. Read more
Source§fn clear_cofactor(p: &G2Affine) -> G2Affine
 
fn clear_cofactor(p: &G2Affine) -> G2Affine
Performs cofactor clearing.
The default method is simply to multiply by the cofactor.
Some curves can implement a more efficient algorithm.
Source§fn deserialize_with_mode<R: Read>(
    reader: R,
    compress: Compress,
    validate: Validate,
) -> Result<Affine<Self>, SerializationError>
 
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Affine<Self>, SerializationError>
If 
validate is Yes, calls check() to make sure the element is valid.Source§fn serialize_with_mode<W: Write>(
    item: &Affine<Self>,
    writer: W,
    compress: Compress,
) -> Result<(), SerializationError>
 
fn serialize_with_mode<W: Write>( item: &Affine<Self>, writer: W, compress: Compress, ) -> Result<(), SerializationError>
If uncompressed, serializes both x and y coordinates as well as a bit for whether it is
infinity. If compressed, serializes x coordinate with two bits to encode whether y is
positive, negative, or infinity.
fn serialized_size(compress: Compress) -> usize
Source§fn add_b(elem: Self::BaseField) -> Self::BaseField
 
fn add_b(elem: Self::BaseField) -> Self::BaseField
Helper method for computing 
elem + Self::COEFF_B. Read moreSource§fn mul_projective(base: &Projective<Self>, scalar: &[u64]) -> Projective<Self>
 
fn mul_projective(base: &Projective<Self>, scalar: &[u64]) -> Projective<Self>
Default implementation of group multiplication for projective
coordinates
Source§fn mul_affine(base: &Affine<Self>, scalar: &[u64]) -> Projective<Self>
 
fn mul_affine(base: &Affine<Self>, scalar: &[u64]) -> Projective<Self>
Default implementation of group multiplication for affine
coordinates.
Source§fn msm(
    bases: &[Affine<Self>],
    scalars: &[Self::ScalarField],
) -> Result<Projective<Self>, usize>
 
fn msm( bases: &[Affine<Self>], scalars: &[Self::ScalarField], ) -> Result<Projective<Self>, usize>
Default implementation for multi scalar multiplication
Source§impl WBConfig for Config
 
impl WBConfig for Config
const ISOGENY_MAP: IsogenyMap<'static, Self::IsogenousCurve, Self> = g2_swu_iso::ISOGENY_MAP_TO_G2
type IsogenousCurve = SwuIsoConfig
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more