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

@@ -18,37 +18,11 @@ mod tests;
pub struct Config;
impl BW6Config for Config {
const X: BigInteger = BigInt::new([
0x8508c00000000001,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
]);
const X: BigInteger = BigInt!("0x8508c00000000001");
/// `x` is positive.
const X_IS_NEGATIVE: bool = false;
// (X-1)/3
const X_MINUS_1_DIV_3: BigInteger = BigInt::new([
0x2c58400000000000,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
]);
const X_MINUS_1_DIV_3: BigInteger = BigInt!("0x2c58400000000000");
// X+1
const ATE_LOOP_COUNT_1: &'static [u64] = &[0x8508c00000000002];
const ATE_LOOP_COUNT_1_IS_NEGATIVE: bool = false;