arnaucube
arnaucube/ark-curves-cherry-pickedPublic Self-hosted repository
ark-curves-cherry-picked/bls12_377/src/curves/mod.rs
bls12_377/src/curves/mod.rsRaw
 1use ark_ec::{
 2    bls12,
 3    bls12::{Bls12, Bls12Config, TwistType},
 4};
 5
 6use crate::*;
 7
 8pub mod g1;
 9pub mod g2;
10
11#[cfg(test)]
12mod tests;
13
14pub struct Config;
15
16impl Bls12Config for Config {
17    const X: &'static [u64] = &[0x8508c00000000001];
18    /// `x` is positive.
19    const X_IS_NEGATIVE: bool = false;
20    const TWIST_TYPE: TwistType = TwistType::D;
21    type Fp = Fq;
22    type Fp2Config = Fq2Config;
23    type Fp6Config = Fq6Config;
24    type Fp12Config = Fq12Config;
25    type G1Config = g1::Config;
26    type G2Config = g2::Config;
27}
28
29pub type Bls12_377 = Bls12<Config>;
30
31pub type G1Affine = bls12::G1Affine<Config>;
32pub type G1Projective = bls12::G1Projective<Config>;
33pub type G2Affine = bls12::G2Affine<Config>;
34pub type G2Projective = bls12::G2Projective<Config>;
35
36pub use g1::{G1TEAffine, G1TEProjective};