mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-08 23:11:29 +01:00
Upgrade for algebra/365 (#92)
* Upgrade for algebra/365 * Merge fix * Fix
This commit is contained in:
@@ -16,6 +16,13 @@ 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 {
|
||||
@@ -27,14 +34,6 @@ impl SWModelParameters for Parameters {
|
||||
#[rustfmt::skip]
|
||||
const COEFF_B: Fq = field_new!(Fq, "11625908999541321152027340224010374716841167701783584648338908235410859267060079819722747939267925389062611062156601938166010098747920378738927832658133625454260115409075816187555055859490253375704728027944315501122723426879114");
|
||||
|
||||
/// 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);
|
||||
|
||||
@@ -17,6 +17,41 @@ pub struct Parameters;
|
||||
impl ModelParameters for Parameters {
|
||||
type BaseField = Fq3;
|
||||
type ScalarField = Fr;
|
||||
|
||||
/// COFACTOR =
|
||||
/// 1755483545388786116744270475466687259186947712032004459714210070280389500116987496124098574823389466285978151140155508638765729019174599527183600372094760023144398285325863550664578643924584541949466179502227232245309952839189635010671372908411609248348904807785904229403747495114436660255866932060472369629692502198423138429922875792635236729929780298333055698257230963645509826963717287902205842627121011526048163097042046361575549171961352924692480000
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR: &'static [u64] = &[
|
||||
17839255819456086016,
|
||||
500623104730997740,
|
||||
2110252009236161768,
|
||||
1500878543414750896,
|
||||
12839751506594314239,
|
||||
8978537329634833065,
|
||||
13830010955957826199,
|
||||
7626514311663165506,
|
||||
14876243211944528805,
|
||||
2316601947950921451,
|
||||
2601177562497904269,
|
||||
18300670698693155036,
|
||||
17321427554953155530,
|
||||
12586270719596716948,
|
||||
807965545138267130,
|
||||
13086323046094411844,
|
||||
16597411233431396880,
|
||||
5578519820383338987,
|
||||
16478065054289650824,
|
||||
12110148809888520863,
|
||||
5901144846689643164,
|
||||
3407195776166256068,
|
||||
14663852814447346059,
|
||||
13435169368,
|
||||
];
|
||||
|
||||
/// COFACTOR^(-1) mod r =
|
||||
/// 6983081827986492233724035798540106188028451653325658178630583820170892135428517795509815627298389820236345161981341515817589065927929152555581161598204976128690232061758269440757592419606754539638220064054062394397574161203200
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR_INV: Fr = field_new!(Fr, "6983081827986492233724035798540106188028451653325658178630583820170892135428517795509815627298389820236345161981341515817589065927929152555581161598204976128690232061758269440757592419606754539638220064054062394397574161203200");
|
||||
}
|
||||
|
||||
/// MUL_BY_A_C0 = NONRESIDUE * COEFF_A
|
||||
@@ -54,41 +89,6 @@ impl SWModelParameters for Parameters {
|
||||
FQ_ZERO,
|
||||
);
|
||||
|
||||
/// COFACTOR =
|
||||
/// 1755483545388786116744270475466687259186947712032004459714210070280389500116987496124098574823389466285978151140155508638765729019174599527183600372094760023144398285325863550664578643924584541949466179502227232245309952839189635010671372908411609248348904807785904229403747495114436660255866932060472369629692502198423138429922875792635236729929780298333055698257230963645509826963717287902205842627121011526048163097042046361575549171961352924692480000
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR: &'static [u64] = &[
|
||||
17839255819456086016,
|
||||
500623104730997740,
|
||||
2110252009236161768,
|
||||
1500878543414750896,
|
||||
12839751506594314239,
|
||||
8978537329634833065,
|
||||
13830010955957826199,
|
||||
7626514311663165506,
|
||||
14876243211944528805,
|
||||
2316601947950921451,
|
||||
2601177562497904269,
|
||||
18300670698693155036,
|
||||
17321427554953155530,
|
||||
12586270719596716948,
|
||||
807965545138267130,
|
||||
13086323046094411844,
|
||||
16597411233431396880,
|
||||
5578519820383338987,
|
||||
16478065054289650824,
|
||||
12110148809888520863,
|
||||
5901144846689643164,
|
||||
3407195776166256068,
|
||||
14663852814447346059,
|
||||
13435169368,
|
||||
];
|
||||
|
||||
/// COFACTOR^(-1) mod r =
|
||||
/// 6983081827986492233724035798540106188028451653325658178630583820170892135428517795509815627298389820236345161981341515817589065927929152555581161598204976128690232061758269440757592419606754539638220064054062394397574161203200
|
||||
#[rustfmt::skip]
|
||||
const COFACTOR_INV: Fr = field_new!(Fr, "6983081827986492233724035798540106188028451653325658178630583820170892135428517795509815627298389820236345161981341515817589065927929152555581161598204976128690232061758269440757592419606754539638220064054062394397574161203200");
|
||||
|
||||
/// 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