Use BigInt macro for defining curve config parameters (#170)

This commit is contained in:
mmagician
2023-09-01 10:43:12 -06:00
committed by GitHub
parent 7e58260618
commit 379f23070c
7 changed files with 20 additions and 131 deletions

View File

@@ -38,10 +38,11 @@ impl MNT4Config for Config {
0, 0, 0, 0, 0, 0,
];
const ATE_IS_LOOP_COUNT_NEG: bool = false;
const FINAL_EXPONENT_LAST_CHUNK_1: BigInteger320 = BigInt::new([0x1, 0x0, 0x0, 0x0, 0x0]);
const FINAL_EXPONENT_LAST_CHUNK_1: BigInteger320 = BigInt!("0x1");
const FINAL_EXPONENT_LAST_CHUNK_W0_IS_NEG: bool = false;
// https://github.com/o1-labs/snarky/blob/9c21ab2bb23874604640740d646a932e813432c3/snarkette/mnt4_80.ml#L96
const FINAL_EXPONENT_LAST_CHUNK_ABS_OF_W0: BigInteger320 =
BigInt::new([993502997770534913, 5071219579242586943, 2027349, 0, 0]);
BigInt!("689871209842287392837045615510547309923794945");
type Fp = Fq;
type Fr = Fr;
type Fp2Config = Fq2Config;