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.

40 lines
1.3 KiB

4 years ago
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 BLS12_377 curve generated in [\[BCGMMW20, “Zexe”\]](https://eprint.iacr.org/2018/962).
  11. //! The name denotes that it is a Barreto--Lynn--Scott curve of embedding degree
  12. //! 12, defined over a 377-bit (prime) field. The main feature of this curve is
  13. //! that both the scalar field and the base field are highly 2-adic.
  14. //! (This is in contrast to the BLS12_381 curve for which only the scalar field
  15. //! is highly 2-adic.)
  16. //!
  17. //!
  18. //! Curve information:
  19. //! * Base field: q = 258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177
  20. //! * Scalar field: r =
  21. //! 8444461749428370424248824938781546531375899335154063827935233455917409239041
  22. //! * valuation(q - 1, 2) = 46
  23. //! * valuation(r - 1, 2) = 47
  24. //! * G1 curve equation: y^2 = x^3 + 1
  25. //! * G2 curve equation: y^2 = x^3 + B, where
  26. //! * B = Fq2(0, 155198655607781456406391640216936120121836107652948796323930557600032281009004493664981332883744016074664192874906)
  27. #[cfg(feature = "curve")]
  28. mod curves;
  29. mod fields;
  30. #[cfg(feature = "r1cs")]
  31. pub mod constraints;
  32. #[cfg(feature = "curve")]
  33. pub use curves::*;
  34. pub use fields::*;