mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-27 22:23:48 +01:00
Catch up with algebra (#106)
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use ark_ff::{
|
||||
fields::fp4::{Fp4, Fp4Config},
|
||||
MontFp, QuadExt,
|
||||
Field, MontFp,
|
||||
};
|
||||
|
||||
use crate::{Fq, Fq2, Fq2Config, FQ_ONE, FQ_ZERO};
|
||||
use crate::{Fq, Fq2, Fq2Config};
|
||||
|
||||
pub type Fq4 = Fp4<Fq4Config>;
|
||||
|
||||
@@ -12,7 +12,7 @@ pub struct Fq4Config;
|
||||
impl Fp4Config for Fq4Config {
|
||||
type Fp2Config = Fq2Config;
|
||||
|
||||
const NONRESIDUE: Fq2 = QuadExt!(FQ_ZERO, FQ_ONE);
|
||||
const NONRESIDUE: Fq2 = Fq2::new(Fq::ZERO, Fq::ONE);
|
||||
|
||||
// Coefficients for the Frobenius automorphism.
|
||||
// c1[0] = 1,
|
||||
@@ -23,9 +23,9 @@ impl Fp4Config for Fq4Config {
|
||||
// These are calculated as
|
||||
// `FROBENIUS_COEFF_FP4_C1[i] = Fp2Config::NONRESIDUE^((q^i - 1) / 4)`.
|
||||
const FROBENIUS_COEFF_FP4_C1: &'static [Fq] = &[
|
||||
FQ_ONE,
|
||||
MontFp!(Fq, "7684163245453501615621351552473337069301082060976805004625011694147890954040864167002308"),
|
||||
MontFp!(Fq, "475922286169261325753349249653048451545124879242694725395555128576210262817955800483758080"),
|
||||
MontFp!(Fq, "468238122923807824137727898100575114475823797181717920390930116882062371863914936316755773"),
|
||||
Fq::ONE,
|
||||
MontFp!("7684163245453501615621351552473337069301082060976805004625011694147890954040864167002308"),
|
||||
MontFp!("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758080"),
|
||||
MontFp!("468238122923807824137727898100575114475823797181717920390930116882062371863914936316755773"),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user