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.
 
 
 
 
 

42 lines
1.0 KiB

  1. #define API_NAME "decaf_255"
  2. #define API_NS(_id) decaf_255_##_id
  3. #define API_NS2(_pref,_id) _pref##_decaf_255_##_id
  4. #define SCALAR_LIMBS DECAF_255_SCALAR_LIMBS
  5. #define SCALAR_BITS DECAF_255_SCALAR_BITS
  6. #define scalar_t decaf_255_scalar_t
  7. #define point_t decaf_255_point_t
  8. #define precomputed_s decaf_255_precomputed_s
  9. #define SER_BYTES DECAF_255_SER_BYTES
  10. #define IMAGINE_TWIST 1
  11. #define P_MOD_8 5
  12. #define COFACTOR 8
  13. #ifndef DECAF_JUST_API
  14. static const int EDWARDS_D = -121665;
  15. static const scalar_t sc_p = {{{
  16. SC_LIMB(0x5812631a5cf5d3ed),
  17. SC_LIMB(0x14def9dea2f79cd6),
  18. SC_LIMB(0),
  19. SC_LIMB(0x1000000000000000)
  20. }}};
  21. #ifdef GEN_TABLES
  22. /* sqrt(9) = 3 from the curve spec. Not exported, but used by pregen tool. */
  23. static const unsigned char base_point_ser_for_pregen[SER_BYTES] = {
  24. 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  25. };
  26. #endif
  27. static const gf SQRT_ONE_MINUS_D = {FIELD_LITERAL(
  28. 0x6db8831bbddec,
  29. 0x38d7b56c9c165,
  30. 0x016b221394bdc,
  31. 0x7540f7816214a,
  32. 0x0a0d85b4032b1
  33. )};
  34. #endif /* DECAF_JUST_API */