Browse Source

Fix MNT4-753 Fq4 Frobenius coefficient

fq2_neg_nonresidue
Pratyush Mishra 3 years ago
parent
commit
98717da099
2 changed files with 6 additions and 2 deletions
  1. +2
    -0
      mnt4_298/src/fields/fq4.rs
  2. +4
    -2
      mnt4_753/src/fields/fq4.rs

+ 2
- 0
mnt4_298/src/fields/fq4.rs

@ -18,6 +18,8 @@ impl Fp4Parameters for Fq4Parameters {
// c1[1] = 7684163245453501615621351552473337069301082060976805004625011694147890954040864167002308 // c1[1] = 7684163245453501615621351552473337069301082060976805004625011694147890954040864167002308
// c1[2] = 475922286169261325753349249653048451545124879242694725395555128576210262817955800483758080 // c1[2] = 475922286169261325753349249653048451545124879242694725395555128576210262817955800483758080
// c1[3] = 468238122923807824137727898100575114475823797181717920390930116882062371863914936316755773 // c1[3] = 468238122923807824137727898100575114475823797181717920390930116882062371863914936316755773
//
// These are calculated as `FROBENIUS_COEFF_FP4_C1[i] = Fp2Params::NONRESIDUE^((q^i - 1) / 4)`.
#[rustfmt::skip] #[rustfmt::skip]
const FROBENIUS_COEFF_FP4_C1: &'static [Fq] = &[ const FROBENIUS_COEFF_FP4_C1: &'static [Fq] = &[
FQ_ONE, FQ_ONE,

+ 4
- 2
mnt4_753/src/fields/fq4.rs

@ -17,12 +17,14 @@ impl Fp4Parameters for Fq4Parameters {
// c1[0] = 1, // c1[0] = 1,
// c1[1] = 18691656569803771296244054523431852464958959799019013859007259692542121208304602539555350517075508287829753932558576476751900235650227380562700444433662761577027341858128610410779088384480737679672900770810745291515010467307990 // c1[1] = 18691656569803771296244054523431852464958959799019013859007259692542121208304602539555350517075508287829753932558576476751900235650227380562700444433662761577027341858128610410779088384480737679672900770810745291515010467307990
// c1[2] = 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689600 // 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] #[rustfmt::skip]
const FROBENIUS_COEFF_FP4_C1: &'static [Fq] = &[ const FROBENIUS_COEFF_FP4_C1: &'static [Fq] = &[
FQ_ONE, FQ_ONE,
field_new!(Fq, "18691656569803771296244054523431852464958959799019013859007259692542121208304602539555350517075508287829753932558576476751900235650227380562700444433662761577027341858128610410779088384480737679672900770810745291515010467307990"), field_new!(Fq, "18691656569803771296244054523431852464958959799019013859007259692542121208304602539555350517075508287829753932558576476751900235650227380562700444433662761577027341858128610410779088384480737679672900770810745291515010467307990"),
field_new!(Fq, "41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689600"), field_new!(Fq, "41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689600"),
field_new!(Fq, "23206834398115182106100160267808784663211750120934935212776243228483231604266504233503543246714830633588317039329677309362453490879357004638891167538350364891904062489821230132228897943262725174047727280881395973788104254381611"),
field_new!(Fq, "23206834398115182106100160267808784663211750120934935212776243228483231604266504233503543246714830633588317039329677309362453490879357004638891161288350364891904062489821230132228897943262725174047727280881395973788104254381611"),
]; ];
} }

Loading…
Cancel
Save