You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
699 B

4 years ago
4 years ago
4 years ago
  1. use ark_ec::bls12::{Bls12, Bls12Parameters, TwistType};
  2. use crate::{Fq, Fq12Config, Fq2Config, Fq6Config};
  3. pub mod g1;
  4. pub mod g2;
  5. #[cfg(test)]
  6. mod tests;
  7. pub use self::{
  8. g1::{G1Affine, G1Projective},
  9. g2::{G2Affine, G2Projective},
  10. };
  11. pub type Bls12_381 = Bls12<Parameters>;
  12. pub struct Parameters;
  13. impl Bls12Parameters for Parameters {
  14. const X: &'static [u64] = &[0xd201000000010000];
  15. const X_IS_NEGATIVE: bool = true;
  16. const TWIST_TYPE: TwistType = TwistType::M;
  17. type Fp = Fq;
  18. type Fp2Config = Fq2Config;
  19. type Fp6Config = Fq6Config;
  20. type Fp12Config = Fq12Config;
  21. type G1Parameters = self::g1::Parameters;
  22. type G2Parameters = self::g2::Parameters;
  23. }