mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-09 15:31:34 +01:00
Upgrade for algebra/365 (#92)
* Upgrade for algebra/365 * Merge fix * Fix
This commit is contained in:
@@ -15,6 +15,14 @@ pub struct Parameters;
|
||||
impl ModelParameters for Parameters {
|
||||
type BaseField = Fq;
|
||||
type ScalarField = Fr;
|
||||
|
||||
/// COFACTOR = 1
|
||||
const COFACTOR: &'static [u64] = &[1];
|
||||
|
||||
/// COFACTOR^(-1) mod r =
|
||||
/// 1
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR_INV: Fr = FR_ONE;
|
||||
}
|
||||
|
||||
impl SWModelParameters for Parameters {
|
||||
@@ -28,14 +36,6 @@ impl SWModelParameters for Parameters {
|
||||
#[rustfmt::skip]
|
||||
const COEFF_B: Fq = field_new!(Fq, "423894536526684178289416011533888240029318103673896002803341544124054745019340795360841685");
|
||||
|
||||
/// 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);
|
||||
|
||||
@@ -16,6 +16,22 @@ pub struct Parameters;
|
||||
impl ModelParameters for Parameters {
|
||||
type BaseField = Fq2;
|
||||
type ScalarField = Fr;
|
||||
|
||||
/// COFACTOR =
|
||||
/// 475922286169261325753349249653048451545124879932565935237842521413255878328503110407553025
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR: &'static [u64] = &[
|
||||
15480692783052488705,
|
||||
9802782456999489873,
|
||||
14622846468721090623,
|
||||
11702080941310629006,
|
||||
4110145082483,
|
||||
];
|
||||
|
||||
/// COFACTOR^(-1) mod r =
|
||||
/// 475922286169261325753349249653048451545124878207887910632124039320641839552134835598065665
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR_INV: Fr = field_new!(Fr, "475922286169261325753349249653048451545124878207887910632124039320641839552134835598065665");
|
||||
}
|
||||
|
||||
/// MUL_BY_A_C0 = NONRESIDUE * COEFF_A
|
||||
@@ -43,22 +59,6 @@ impl SWModelParameters for Parameters {
|
||||
field_new!(Fq, "67372828414711144619833451280373307321534573815811166723479321465776723059456513877937430"),
|
||||
);
|
||||
|
||||
/// COFACTOR =
|
||||
/// 475922286169261325753349249653048451545124879932565935237842521413255878328503110407553025
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR: &'static [u64] = &[
|
||||
15480692783052488705,
|
||||
9802782456999489873,
|
||||
14622846468721090623,
|
||||
11702080941310629006,
|
||||
4110145082483,
|
||||
];
|
||||
|
||||
/// COFACTOR^(-1) mod r =
|
||||
/// 475922286169261325753349249653048451545124878207887910632124039320641839552134835598065665
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR_INV: Fr = field_new!(Fr, "475922286169261325753349249653048451545124878207887910632124039320641839552134835598065665");
|
||||
|
||||
/// AFFINE_GENERATOR_COEFFS = (G2_GENERATOR_X, G2_GENERATOR_Y)
|
||||
const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) =
|
||||
(G2_GENERATOR_X, G2_GENERATOR_Y);
|
||||
|
||||
Reference in New Issue
Block a user