This commit is contained in:
Pratyush Mishra
2020-12-09 11:05:07 -08:00
parent 4e45f92ca9
commit 0486c30b3b
19 changed files with 95 additions and 65 deletions

View File

@@ -3,7 +3,7 @@ use ark_ec::{
mnt4,
models::{ModelParameters, SWModelParameters},
};
use ark_ff::{field_new};
use ark_ff::field_new;
pub type G1Affine = mnt4::G1Affine<crate::Parameters>;
pub type G1Projective = mnt4::G1Projective<crate::Parameters>;

View File

@@ -19,10 +19,7 @@ impl Fp2Parameters for Fq2Parameters {
/// The quadratic non-residue in F<sub>p</sub><sup>2</sup> that is used
/// in the computation of square roots is (8, 1), the same as that in
/// [`libff`](https://github.com/scipr-lab/libff/blob/c927821ebe02e0a24b5e0f9170cec5e211a35f08/libff/algebra/curves/mnt/mnt4/mnt4_init.cpp#L103)
const QUADRATIC_NONRESIDUE: (Self::Fp, Self::Fp) = (
field_new!(Fq, "8"),
FQ_ONE,
);
const QUADRATIC_NONRESIDUE: (Self::Fp, Self::Fp) = (field_new!(Fq, "8"), FQ_ONE);
/// Precomputed coefficients:
/// `[1, 475922286169261325753349249653048451545124879242694725395555128576210262817955800483758080]`