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.

38 lines
1.6 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 MNT6_753 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
  13. //! 753-bit (prime) field. The main feature of this curve is that its scalar
  14. //! field and base field respectively equal the base field and scalar field of
  15. //! MNT4_753.
  16. //!
  17. //! Curve information:
  18. //! * Base field: q = 0x01C4C62D92C41110229022EEE2CDADB7F997505B8FAFED5EB7E8F96C97D87307FDB925E8A0ED8D99D124D9A15AF79DB26C5C28C859A99B3EEBCA9429212636B9DFF97634993AA4D6C381BC3F0057974EA099170FA13A4FD90776E240000001
  19. //! * Scalar field: r = 0x01C4C62D92C41110229022EEE2CDADB7F997505B8FAFED5EB7E8F96C97D87307FDB925E8A0ED8D99D124D9A15AF79DB117E776F218059DB80F0DA5CB537E38685ACCE9767254A4638810719AC425F0E39D54522CDD119F5E9063DE245E8001
  20. //! * valuation(q - 1, 2) = 30
  21. //! * valuation(r - 1, 2) = 15
  22. //! * G1 curve equation: y^2 = x^3 + ax + b, where
  23. //! * a = 11
  24. //! * b = 0x7DA285E70863C79D56446237CE2E1468D14AE9BB64B2BB01B10E60A5D5DFE0A25714B7985993F62F03B22A9A3C737A1A1E0FCF2C43D7BF847957C34CCA1E3585F9A80A95F401867C4E80F4747FDE5ABA7505BA6FCF2485540B13DFC8468A
  25. //! * G2 curve equation: y^2 = x^3 + Ax + B, where
  26. //! * A = Fq3(0, 0, a)
  27. //! * B = Fq3(b * NON_RESIDUE, 0, 0)
  28. //! * NON_RESIDUE = 11 is the cubic non-residue used to construct the
  29. //! extension field Fq3
  30. #[cfg(feature = "r1cs")]
  31. pub mod constraints;
  32. mod curves;
  33. mod fields;
  34. pub use curves::*;
  35. pub use fields::*;