Browse Source

Update edwards curves constants

fq2_neg_nonresidue
Pratyush Mishra 3 years ago
parent
commit
9a97d75149
2 changed files with 25 additions and 4 deletions
  1. +7
    -2
      ed_on_bls12_377/src/fields/fr.rs
  2. +18
    -2
      ed_on_cp6_782/src/fields/fr.rs

+ 7
- 2
ed_on_bls12_377/src/fields/fr.rs

@ -72,7 +72,12 @@ impl FpParameters for FrParameters {
168160046336021674u64, 168160046336021674u64,
]); ]);
const T: BigInteger = BigInteger([0x0, 0x0, 0x0, 0x0]);
const T: BigInteger = Self::MODULUS_MINUS_ONE_DIV_TWO;
const T_MINUS_ONE_DIV_TWO: BigInteger = BigInteger([0x0, 0x0, 0x0, 0x0]);
const T_MINUS_ONE_DIV_TWO: BigInteger = BigInteger([
0xae56bba6b0cff67f,
0x14a4e8ebf10f22bf,
0x660b44d1e5c37b00,
0x12ab655e9a2ca55,
]);
} }

+ 18
- 2
ed_on_cp6_782/src/fields/fr.rs

@ -84,7 +84,23 @@ impl FpParameters for FrParameters {
7568644544155918u64, 7568644544155918u64,
]); ]);
const T: BigInteger = BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0]);
/// 8083263312905284187832897927965422923012297273591083141858954470483627824280993199911680825703270958985656030373
const T: BigInteger = BigInteger([
5782852926996632741,
10160572951715783904,
8680081325396045328,
15623293663189641372,
6210983053257673289,
3784322272077959,
]);
const T_MINUS_ONE_DIV_TWO: BigInteger = BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0]);
/// 4041631656452642093916448963982711461506148636795541570929477235241813912140496599955840412851635479492828015186
const T_MINUS_ONE_DIV_TWO: BigInteger = BigInteger([
2891426463498316370,
5080286475857891952,
4340040662698022664,
17035018868449596494,
12328863563483612452,
1892161136038979,
]);
} }

Loading…
Cancel
Save