mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-09 07:21:30 +01:00
Rename all *Parameters to *Config (#136)
* Rename all `*Parameters` to `*Config` * Tweak
This commit is contained in:
@@ -7,11 +7,11 @@ use ark_ff::{Field, MontFp, Zero};
|
||||
use crate::{Fq, Fr};
|
||||
|
||||
#[derive(Clone, Default, PartialEq, Eq)]
|
||||
pub struct Parameters;
|
||||
pub struct Config;
|
||||
|
||||
pub type G1Affine = Affine<Parameters>;
|
||||
pub type G1Affine = Affine<Config>;
|
||||
|
||||
impl CurveConfig for Parameters {
|
||||
impl CurveConfig for Config {
|
||||
type BaseField = Fq;
|
||||
type ScalarField = Fr;
|
||||
|
||||
@@ -22,7 +22,7 @@ impl CurveConfig for Parameters {
|
||||
const COFACTOR_INV: Fr = Fr::ONE;
|
||||
}
|
||||
|
||||
impl SWCurveConfig for Parameters {
|
||||
impl SWCurveConfig for Config {
|
||||
/// COEFF_A = 0
|
||||
const COEFF_A: Fq = Fq::ZERO;
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ use ark_ff::{Field, MontFp, Zero};
|
||||
|
||||
use crate::{Fq, Fq2, Fr};
|
||||
|
||||
pub type G2Affine = Affine<Parameters>;
|
||||
pub type G2Affine = Affine<Config>;
|
||||
|
||||
#[derive(Clone, Default, PartialEq, Eq)]
|
||||
pub struct Parameters;
|
||||
pub struct Config;
|
||||
|
||||
impl CurveConfig for Parameters {
|
||||
impl CurveConfig for Config {
|
||||
type BaseField = Fq2;
|
||||
type ScalarField = Fr;
|
||||
|
||||
@@ -30,7 +30,7 @@ impl CurveConfig for Parameters {
|
||||
MontFp!("10944121435919637613327163357776759465618812564592884533313067514031822496649");
|
||||
}
|
||||
|
||||
impl SWCurveConfig for Parameters {
|
||||
impl SWCurveConfig for Config {
|
||||
/// COEFF_A = [0, 0]
|
||||
const COEFF_A: Fq2 = Fq2::ZERO;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use ark_ec::{
|
||||
bn,
|
||||
bn::{Bn, BnParameters, TwistType},
|
||||
bn::{Bn, BnConfig, TwistType},
|
||||
};
|
||||
use ark_ff::MontFp;
|
||||
|
||||
@@ -12,9 +12,9 @@ pub mod g2;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
pub struct Parameters;
|
||||
pub struct Config;
|
||||
|
||||
impl BnParameters for Parameters {
|
||||
impl BnConfig for Config {
|
||||
const X: &'static [u64] = &[4965661367192848881];
|
||||
/// `x` is positive.
|
||||
const X_IS_NEGATIVE: bool = false;
|
||||
@@ -37,13 +37,13 @@ impl BnParameters for Parameters {
|
||||
type Fp2Config = Fq2Config;
|
||||
type Fp6Config = Fq6Config;
|
||||
type Fp12Config = Fq12Config;
|
||||
type G1Parameters = g1::Parameters;
|
||||
type G2Parameters = g2::Parameters;
|
||||
type G1Config = g1::Config;
|
||||
type G2Config = g2::Config;
|
||||
}
|
||||
|
||||
pub type Bn254 = Bn<Parameters>;
|
||||
pub type Bn254 = Bn<Config>;
|
||||
|
||||
pub type G1Affine = bn::G1Affine<Parameters>;
|
||||
pub type G1Projective = bn::G1Projective<Parameters>;
|
||||
pub type G2Affine = bn::G2Affine<Parameters>;
|
||||
pub type G2Projective = bn::G2Projective<Parameters>;
|
||||
pub type G1Affine = bn::G1Affine<Config>;
|
||||
pub type G1Projective = bn::G1Projective<Config>;
|
||||
pub type G2Affine = bn::G2Affine<Config>;
|
||||
pub type G2Projective = bn::G2Projective<Config>;
|
||||
|
||||
Reference in New Issue
Block a user