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.

33 lines
1.1 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 BLS12_381 curve generated by [Sean Bowe](https://electriccoin.co/blog/new-snark-curve/).
  11. //! The name denotes that it is a Barreto--Lynn--Scott curve of embedding degree
  12. //! 12, defined over a 381-bit (prime) field.
  13. //! This curve was intended to replace the BN254 curve to provide a higher
  14. //! security level without incurring a large performance overhead.
  15. //!
  16. //!
  17. //! Curve information:
  18. //! * Base field: q = 4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787
  19. //! * Scalar field: r =
  20. //! 52435875175126190479447740508185965837690552500527637822603658699938581184513
  21. //! * valuation(q - 1, 2) = 1
  22. //! * valuation(r - 1, 2) = 32
  23. //! * G1 curve equation: y^2 = x^3 + 4
  24. //! * G2 curve equation: y^2 = x^3 + Fq2(4, 4)
  25. #[cfg(feature = "curve")]
  26. mod curves;
  27. mod fields;
  28. #[cfg(feature = "curve")]
  29. pub use curves::*;
  30. pub use fields::*;