|
|
@ -15,26 +15,6 @@ pub struct Parameters; |
|
|
|
impl ModelParameters for Parameters {
|
|
|
|
type BaseField = Fq3;
|
|
|
|
type ScalarField = Fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SWModelParameters for Parameters {
|
|
|
|
/// COEFF_A = (0, 0, COEFF_A * TWIST^2) = (0, 0, 5)
|
|
|
|
#[rustfmt::skip]
|
|
|
|
const COEFF_A: Fq3 = field_new!(Fq3,
|
|
|
|
FQ_ZERO,
|
|
|
|
FQ_ZERO,
|
|
|
|
field_new!(Fq, "5"),
|
|
|
|
);
|
|
|
|
|
|
|
|
/// COEFF_B = (G1::COEFF_B * TWIST^3, 0, 0) =
|
|
|
|
/// (7237353553714858194254855835825640240663090882935418626687402315497764195116318527743248304684159666286416318482685337633828994152723793439622384740540789612754127688659139509552568164770448654259255628317166934203899992395064470477612,
|
|
|
|
/// 0, 0)
|
|
|
|
#[rustfmt::skip]
|
|
|
|
const COEFF_B: Fq3 = field_new!(Fq3,
|
|
|
|
field_new!(Fq, "7237353553714858194254855835825640240663090882935418626687402315497764195116318527743248304684159666286416318482685337633828994152723793439622384740540789612754127688659139509552568164770448654259255628317166934203899992395064470477612"),
|
|
|
|
FQ_ZERO,
|
|
|
|
FQ_ZERO,
|
|
|
|
);
|
|
|
|
|
|
|
|
/// COFACTOR =
|
|
|
|
/// 43276679045916726782882096851503554444292580777869919574700824986947162516693702667493938255647666346010819253090121562084993205202476199057555142869892665220155573207800985012241638987472334344174208389303164492698303448192856551557283997344470334833850065978668184377503856699635686872344035470027430053642178229054516302338812152178131995800255516474185251732445975837621097393375441662426280154371264547168198834382681059556891327702516519955053315674076980350109237328216856859758931256208439575383786363605925879337208599843910819433766160937121108797819223653884174994325142959644019600
|
|
|
@ -77,6 +57,26 @@ impl SWModelParameters for Parameters { |
|
|
|
/// 45586359457219724873147353901735745013467692594291916855200979604570630929674383405372210802279573887880950375598
|
|
|
|
#[rustfmt::skip]
|
|
|
|
const COFACTOR_INV: Fr = field_new!(Fr, "45586359457219724873147353901735745013467692594291916855200979604570630929674383405372210802279573887880950375598");
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SWModelParameters for Parameters {
|
|
|
|
/// COEFF_A = (0, 0, COEFF_A * TWIST^2) = (0, 0, 5)
|
|
|
|
#[rustfmt::skip]
|
|
|
|
const COEFF_A: Fq3 = field_new!(Fq3,
|
|
|
|
FQ_ZERO,
|
|
|
|
FQ_ZERO,
|
|
|
|
field_new!(Fq, "5"),
|
|
|
|
);
|
|
|
|
|
|
|
|
/// COEFF_B = (G1::COEFF_B * TWIST^3, 0, 0) =
|
|
|
|
/// (7237353553714858194254855835825640240663090882935418626687402315497764195116318527743248304684159666286416318482685337633828994152723793439622384740540789612754127688659139509552568164770448654259255628317166934203899992395064470477612,
|
|
|
|
/// 0, 0)
|
|
|
|
#[rustfmt::skip]
|
|
|
|
const COEFF_B: Fq3 = field_new!(Fq3,
|
|
|
|
field_new!(Fq, "7237353553714858194254855835825640240663090882935418626687402315497764195116318527743248304684159666286416318482685337633828994152723793439622384740540789612754127688659139509552568164770448654259255628317166934203899992395064470477612"),
|
|
|
|
FQ_ZERO,
|
|
|
|
FQ_ZERO,
|
|
|
|
);
|
|
|
|
|
|
|
|
/// AFFINE_GENERATOR_COEFFS = (G2_GENERATOR_X, G2_GENERATOR_Y)
|
|
|
|
const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) =
|
|
|
|