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.

37 lines
1.3 KiB

4 years ago
4 years ago
4 years ago
  1. #![cfg_attr(not(feature = "std"), no_std)]
  2. #![deny(
  3. warnings,
  4. unused,
  5. future_incompatible,
  6. nonstandard_style,
  7. rust_2018_idioms
  8. )]
  9. #![forbid(unsafe_code)]
  10. //! This library implements the MNT6_298 curve generated in
  11. //! [[BCTV14]](https://eprint.iacr.org/2014/595). The name denotes that it is a
  12. //! Miyaji--Nakabayashi--Takano curve of embedding degree 6, defined over a 298-bit (prime) field.
  13. //! The main feature of this curve is that its scalar field and base field respectively equal the
  14. //! base field and scalar field of MNT4_298.
  15. //!
  16. //!
  17. //! Curve information:
  18. //! * Base field: q = 475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137
  19. //! * Scalar field: r = 475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081
  20. //! * valuation(q - 1, 2) = 34
  21. //! * valuation(r - 1, 2) = 17
  22. //! * G1 curve equation: y^2 = x^3 + ax + b, where
  23. //! * a = 11
  24. //! * b = 106700080510851735677967319632585352256454251201367587890185989362936000262606668469523074
  25. //! * G2 curve equation: y^2 = x^3 + Ax + B, where
  26. //! * A = Fq2 = (0, 0, a)
  27. //! * B = Fq2(b * NON_RESIDUE, 0, 0)
  28. //! * NON_RESIDUE = 5 is the cubic non-residue used to construct the field extension Fq3
  29. #[cfg(feature = "r1cs")]
  30. pub mod constraints;
  31. mod curves;
  32. mod fields;
  33. pub use curves::*;
  34. pub use fields::*;