Rename all *Parameters to *Config (#136)

* Rename all `*Parameters` to `*Config`

* Tweak
This commit is contained in:
Pratyush Mishra
2022-12-16 22:35:32 -05:00
committed by GitHub
parent f8a6a4050e
commit febd7635fb
63 changed files with 382 additions and 414 deletions

View File

@@ -6,13 +6,13 @@ use ark_ff::{Field, MontFp};
use crate::{Fq, Fr};
pub type G1Affine = Affine<Parameters>;
pub type G1Projective = Projective<Parameters>;
pub type G1Affine = Affine<Config>;
pub type G1Projective = Projective<Config>;
#[derive(Clone, Default, PartialEq, Eq)]
pub struct Parameters;
pub struct Config;
impl CurveConfig for Parameters {
impl CurveConfig for Config {
type BaseField = Fq;
type ScalarField = Fr;
@@ -33,7 +33,7 @@ impl CurveConfig for Parameters {
const COFACTOR_INV: Fr = MontFp!("91141326767669940707819291241958318717982251277713150053234367522357946997763584490607453720072232540829942217804");
}
impl SWCurveConfig for Parameters {
impl SWCurveConfig for Config {
/// COEFF_A = 0
const COEFF_A: Fq = Fq::ZERO;

View File

@@ -6,13 +6,13 @@ use ark_ff::{Field, MontFp};
use crate::{Fq, Fr};
pub type G2Affine = Affine<Parameters>;
pub type G2Projective = Projective<Parameters>;
pub type G2Affine = Affine<Config>;
pub type G2Projective = Projective<Config>;
#[derive(Clone, Default, PartialEq, Eq)]
pub struct Parameters;
pub struct Config;
impl CurveConfig for Parameters {
impl CurveConfig for Config {
type BaseField = Fq;
type ScalarField = Fr;
@@ -33,7 +33,7 @@ impl CurveConfig for Parameters {
const COFACTOR_INV: Fr = MontFp!("214911522365886453591244899095480747723790054550866810551297776298664428889000553861210287833206024638187939842124");
}
impl SWCurveConfig for Parameters {
impl SWCurveConfig for Config {
/// COEFF_A = 0
const COEFF_A: Fq = Fq::ZERO;

View File

@@ -1,6 +1,6 @@
use ark_ec::{
bw6,
bw6::{BW6Parameters, TwistType, BW6},
bw6::{BW6Config, TwistType, BW6},
};
use ark_ff::{biginteger::BigInteger768 as BigInteger, BigInt};
@@ -13,9 +13,9 @@ pub mod g2;
mod tests;
#[derive(PartialEq, Eq)]
pub struct Parameters;
pub struct Config;
impl BW6Parameters for Parameters {
impl BW6Config for Config {
const X: BigInteger = BigInt::new([
0x8508c00000000001,
0x0,
@@ -50,13 +50,13 @@ impl BW6Parameters for Parameters {
type Fp = Fq;
type Fp3Config = Fq3Config;
type Fp6Config = Fq6Config;
type G1Parameters = g1::Parameters;
type G2Parameters = g2::Parameters;
type G1Config = g1::Config;
type G2Config = g2::Config;
}
pub type BW6_761 = BW6<Parameters>;
pub type BW6_761 = BW6<Config>;
pub type G1Affine = bw6::G1Affine<Parameters>;
pub type G1Projective = bw6::G1Projective<Parameters>;
pub type G2Affine = bw6::G2Affine<Parameters>;
pub type G2Projective = bw6::G2Projective<Parameters>;
pub type G1Affine = bw6::G1Affine<Config>;
pub type G1Projective = bw6::G1Projective<Config>;
pub type G2Affine = bw6::G2Affine<Config>;
pub type G2Projective = bw6::G2Projective<Config>;