Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
Fix MNT4-753 Fq4 Frobenius coefficient
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratyush committed Dec 10, 2020
1 parent 0486c30 commit 98717da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions mnt4_298/src/fields/fq4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ impl Fp4Parameters for Fq4Parameters {
// c1[1] = 7684163245453501615621351552473337069301082060976805004625011694147890954040864167002308
// c1[2] = 475922286169261325753349249653048451545124879242694725395555128576210262817955800483758080
// c1[3] = 468238122923807824137727898100575114475823797181717920390930116882062371863914936316755773
//
// These are calculated as `FROBENIUS_COEFF_FP4_C1[i] = Fp2Params::NONRESIDUE^((q^i - 1) / 4)`.
#[rustfmt::skip]
const FROBENIUS_COEFF_FP4_C1: &'static [Fq] = &[
FQ_ONE,
Expand Down
6 changes: 4 additions & 2 deletions mnt4_753/src/fields/fq4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ impl Fp4Parameters for Fq4Parameters {
// c1[0] = 1,
// c1[1] = 18691656569803771296244054523431852464958959799019013859007259692542121208304602539555350517075508287829753932558576476751900235650227380562700444433662761577027341858128610410779088384480737679672900770810745291515010467307990
// c1[2] = 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689600
// c1[3] = 23206834398115182106100160267808784663211750120934935212776243228483231604266504233503543246714830633588317039329677309362453490879357004638891167538350364891904062489821230132228897943262725174047727280881395973788104254381611
// c1[3] = 23206834398115182106100160267808784663211750120934935212776243228483231604266504233503543246714830633588317039329677309362453490879357004638891161288350364891904062489821230132228897943262725174047727280881395973788104254381611
//
// These are calculated as `FROBENIUS_COEFF_FP4_C1[i] = Fp2Params::NONRESIDUE^((q^i - 1) / 4)`.
#[rustfmt::skip]
const FROBENIUS_COEFF_FP4_C1: &'static [Fq] = &[
FQ_ONE,
field_new!(Fq, "18691656569803771296244054523431852464958959799019013859007259692542121208304602539555350517075508287829753932558576476751900235650227380562700444433662761577027341858128610410779088384480737679672900770810745291515010467307990"),
field_new!(Fq, "41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689600"),
field_new!(Fq, "23206834398115182106100160267808784663211750120934935212776243228483231604266504233503543246714830633588317039329677309362453490879357004638891167538350364891904062489821230132228897943262725174047727280881395973788104254381611"),
field_new!(Fq, "23206834398115182106100160267808784663211750120934935212776243228483231604266504233503543246714830633588317039329677309362453490879357004638891161288350364891904062489821230132228897943262725174047727280881395973788104254381611"),
];
}

0 comments on commit 98717da

Please sign in to comment.