Catch up with algebra (#106)

Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
Marcin
2022-07-29 21:16:16 +02:00
committed by GitHub
parent 76579d0fbb
commit 93e64df895
120 changed files with 934 additions and 1653 deletions

View File

@@ -1,4 +1,4 @@
use ark_ff::{fields::*, MontFp, QuadExt};
use ark_ff::{fields::*, MontFp};
use crate::*;
@@ -10,14 +10,14 @@ impl Fp2Config for Fq2Config {
type Fp = Fq;
/// NONRESIDUE = -1
const NONRESIDUE: Fq = MontFp!(Fq, "-1");
const NONRESIDUE: Fq = MontFp!("-1");
/// Coefficients for the Frobenius automorphism.
const FROBENIUS_COEFF_FP2_C1: &'static [Fq] = &[
// Fq(-1)**(((q^0) - 1) / 2)
MontFp!(Fq, "1"),
Fq::ONE,
// Fq(-1)**(((q^1) - 1) / 2)
MontFp!(Fq, "-1"),
MontFp!("-1"),
];
#[inline(always)]
@@ -25,6 +25,3 @@ impl Fp2Config for Fq2Config {
-(*fp)
}
}
pub const FQ2_ZERO: Fq2 = QuadExt!(FQ_ZERO, FQ_ZERO);
pub const FQ2_ONE: Fq2 = QuadExt!(FQ_ONE, FQ_ZERO);