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
11mod g1_swu_iso;
12mod g2_swu_iso;
13
14#[cfg(test)]
15mod tests;
16
17pub struct Config;
18
19impl Bls12Config for Config {
20    const X: &'static [u64] = &[0x8508c00000000001];
21    /// `x` is positive.
22    const X_IS_NEGATIVE: bool = false;
23    const TWIST_TYPE: TwistType = TwistType::D;
24    type Fp = Fq;
25    type Fp2Config = Fq2Config;
26    type Fp6Config = Fq6Config;
27    type Fp12Config = Fq12Config;
28    type G1Config = g1::Config;
29    type G2Config = g2::Config;
30}
31
32pub type Bls12_377 = Bls12<Config>;
33
34pub type G1Affine = bls12::G1Affine<Config>;
35pub type G1Projective = bls12::G1Projective<Config>;
36pub type G2Affine = bls12::G2Affine<Config>;
37pub type G2Projective = bls12::G2Projective<Config>;
38
39pub use g1::{G1TEAffine, G1TEProjective};