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.

31 lines
1016 B

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 scalar field of the
  11. //! curve BLS12-377. This allows defining cryptographic primitives that use elliptic curves over
  12. //! the scalar field of the latter curve. This curve was generated by Sean Bowe, and is also known
  13. //! as [Jubjub](https://github.com/zkcrypto/jubjub).
  14. //!
  15. //! Curve information:
  16. //! * Base field: q = 52435875175126190479447740508185965837690552500527637822603658699938581184513
  17. //! * Scalar field: r = 6554484396890773809930967563523245729705921265872317281365359162392183254199
  18. //! * Valuation(q - 1, 2) = 32
  19. //! * Valuation(r - 1, 2) = 1
  20. //! * Curve equation: ax^2 + y^2 =1 + dx^2y^2, where
  21. //! * a = -1
  22. //! * d = -(10240/10241)
  23. #[cfg(feature = "r1cs")]
  24. pub mod constraints;
  25. mod curves;
  26. mod fields;
  27. pub use curves::*;
  28. pub use fields::*;