Upgrade for algebra/365 (#92)

* Upgrade for algebra/365

* Merge fix

* Fix
This commit is contained in:
Pratyush Mishra
2021-12-29 19:07:52 +03:00
committed by GitHub
parent 677b4ae751
commit d1ced15cc2
27 changed files with 310 additions and 336 deletions

View File

@@ -18,6 +18,14 @@ pub struct EdwardsParameters;
impl ModelParameters for EdwardsParameters {
type BaseField = Fq;
type ScalarField = Fr;
/// COFACTOR = 8
const COFACTOR: &'static [u64] = &[8];
/// COFACTOR_INV (mod r) =
/// 4582647449616135528381398492791944685893671397494963179726320631987147963874964803303316505414568319530101512550297775574042810022553679071007001162683923594233560231270043634777390699589793776691858866199511300853468155295505
#[rustfmt::skip]
const COFACTOR_INV: Fr = field_new!(Fr, "4582647449616135528381398492791944685893671397494963179726320631987147963874964803303316505414568319530101512550297775574042810022553679071007001162683923594233560231270043634777390699589793776691858866199511300853468155295505");
}
impl TEModelParameters for EdwardsParameters {
@@ -29,14 +37,6 @@ impl TEModelParameters for EdwardsParameters {
#[rustfmt::skip]
const COEFF_D: Fq = field_new!(Fq, "317690");
/// COFACTOR = 8
const COFACTOR: &'static [u64] = &[8];
/// COFACTOR_INV (mod r) =
/// 4582647449616135528381398492791944685893671397494963179726320631987147963874964803303316505414568319530101512550297775574042810022553679071007001162683923594233560231270043634777390699589793776691858866199511300853468155295505
#[rustfmt::skip]
const COFACTOR_INV: Fr = field_new!(Fr, "4582647449616135528381398492791944685893671397494963179726320631987147963874964803303316505414568319530101512550297775574042810022553679071007001162683923594233560231270043634777390699589793776691858866199511300853468155295505");
/// Generated randomly
const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) = (GENERATOR_X, GENERATOR_Y);