use ark_ec::{ mnt6, models::{ModelParameters, SWModelParameters}, }; use ark_ff::{biginteger::BigInteger768, field_new}; use crate::{Fq, Fr, FR_ONE}; pub type G1Affine = mnt6::G1Affine; pub type G1Projective = mnt6::G1Projective; pub type G1Prepared = mnt6::G1Prepared; #[derive(Clone, Default, PartialEq, Eq)] pub struct Parameters; impl ModelParameters for Parameters { type BaseField = Fq; type ScalarField = Fr; } impl SWModelParameters for Parameters { /// COEFF_A = 11 #[rustfmt::skip] const COEFF_A: Fq = field_new!(Fq, BigInteger768([ 5145524327033718740, 14149824967095184544, 5159730833497260295, 3902941467692815387, 15830098551216085679, 8665641533746801158, 17502192300007146323, 14483698255198590748, 546300946688995976, 4331975528992054828, 5311428878520309260, 495362057711802, ])); /// COEFF_B = 0x7DA285E70863C79D56446237CE2E1468D14AE9BB64B2BB01B10E60A5D5DFE0A25714B7985993F62F03B22A9A3C737A1A1E0FCF2C43D7BF847957C34CCA1E3585F9A80A95F401867C4E80F4747FDE5ABA7505BA6FCF2485540B13DFC8468A #[rustfmt::skip] const COEFF_B: Fq = field_new!(Fq, BigInteger768([ 8828711393625909642, 12722539140758597443, 2303826860244282256, 8063890988281098391, 6269149169423748670, 3425772737529456013, 1457017085322601211, 5177155908178255133, 18057960053344868113, 10481469207136524576, 17888199912367160320, 290288558853910, ])); /// COFACTOR = 1 const COFACTOR: &'static [u64] = &[1]; /// COFACTOR^(-1) mod r = /// 1 #[rustfmt::skip] const COFACTOR_INV: Fr = FR_ONE; /// AFFINE_GENERATOR_COEFFS = (G1_GENERATOR_X, G1_GENERATOR_Y) const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) = (G1_GENERATOR_X, G1_GENERATOR_Y); } // Generator of G1 // X = 3458420969484235708806261200128850544017070333833944116801482064540723268149235477762870414664917360605949659630933184751526227993647030875167687492714052872195770088225183259051403087906158701786758441889742618916006546636728, // Y = 27460508402331965149626600224382137254502975979168371111640924721589127725376473514838234361114855175488242007431439074223827742813911899817930728112297763448010814764117701403540298764970469500339646563344680868495474127850569, /// G1_GENERATOR_X = #[rustfmt::skip] pub const G1_GENERATOR_X: Fq = field_new!(Fq, BigInteger768([ 16404456614462158210, 16873534995404346316, 29580875041164893, 12740551787746921884, 16087583716780115490, 15096170813200936110, 930080103225705610, 660122182606823185, 5211213138865083410, 15466479635231681544, 11783401481713071326, 20214808394592 ])); /// G1_GENERATOR_Y = #[rustfmt::skip] pub const G1_GENERATOR_Y: Fq = field_new!(Fq, BigInteger768([ 11636140615878154554, 15149343852908177063, 14426639389651280896, 12711360703798958610, 3787948290527586979, 7628180411662927078, 17195203689728925717, 6800476327444280291, 2228796880865780105, 15627033749683396124, 13783535191786892346, 61400438920476 ]));