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
1020 B

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 a twisted Edwards curve whose base field is the
  11. //! scalar field of the curve BLS12-377. This allows defining cryptographic
  12. //! primitives that use elliptic curves over the scalar field of the latter
  13. //! curve. This curve was generated as part of the paper [\[BCGMMW20, “Zexe”\]](https://eprint.iacr.org/2018/962).
  14. //!
  15. //! Curve information:
  16. //! * Base field: q =
  17. //! 8444461749428370424248824938781546531375899335154063827935233455917409239041
  18. //! * Scalar field: r =
  19. //! 2111115437357092606062206234695386632838870926408408195193685246394721360383
  20. //! * Valuation(q - 1, 2) = 47
  21. //! * Valuation(r - 1, 2) = 1
  22. //! * Curve equation: ax^2 + y^2 =1 + dx^2y^2, where
  23. //! * a = -1
  24. //! * d = 3021
  25. #[cfg(feature = "r1cs")]
  26. pub mod constraints;
  27. mod curves;
  28. mod fields;
  29. pub use curves::*;
  30. pub use fields::*;