mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-27 14:13:46 +01:00
Upgrade to work with latest ark-ff (#95)
Co-authored-by: Sun <huachuang20@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use ark_ec::models::{ModelParameters, SWModelParameters};
|
||||
use ark_ff::{field_new, Zero};
|
||||
use ark_ff::{MontFp, Zero};
|
||||
|
||||
use crate::{Fq, Fr};
|
||||
|
||||
@@ -14,15 +14,15 @@ impl ModelParameters for Parameters {
|
||||
const COFACTOR: &'static [u64] = &[0x1];
|
||||
|
||||
/// COFACTOR_INV = COFACTOR^{-1} mod r = 1
|
||||
const COFACTOR_INV: Fr = field_new!(Fr, "1");
|
||||
const COFACTOR_INV: Fr = MontFp!(Fr, "1");
|
||||
}
|
||||
|
||||
impl SWModelParameters for Parameters {
|
||||
/// COEFF_A = 0
|
||||
const COEFF_A: Fq = field_new!(Fq, "0");
|
||||
const COEFF_A: Fq = MontFp!(Fq, "0");
|
||||
|
||||
/// COEFF_B = 3
|
||||
const COEFF_B: Fq = field_new!(Fq, "3");
|
||||
const COEFF_B: Fq = MontFp!(Fq, "3");
|
||||
|
||||
/// AFFINE_GENERATOR_COEFFS = (G1_GENERATOR_X, G1_GENERATOR_Y)
|
||||
const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) =
|
||||
@@ -35,7 +35,7 @@ impl SWModelParameters for Parameters {
|
||||
}
|
||||
|
||||
/// G1_GENERATOR_X = 1
|
||||
pub const G1_GENERATOR_X: Fq = field_new!(Fq, "1");
|
||||
pub const G1_GENERATOR_X: Fq = MontFp!(Fq, "1");
|
||||
|
||||
/// G1_GENERATOR_Y = 2
|
||||
pub const G1_GENERATOR_Y: Fq = field_new!(Fq, "2");
|
||||
pub const G1_GENERATOR_Y: Fq = MontFp!(Fq, "2");
|
||||
|
||||
Reference in New Issue
Block a user