ge25519.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef GE25519_H
  2. #define GE25519_H
  3. #include "fe25519.h"
  4. #include "sc25519.h"
  5. #define ge25519 crypto_sign_ed25519_ref_ge25519
  6. #define ge25519_base crypto_sign_ed25519_ref_ge25519_base
  7. #define ge25519_unpackneg_vartime crypto_sign_ed25519_ref_unpackneg_vartime
  8. #define ge25519_pack crypto_sign_ed25519_ref_pack
  9. #define ge25519_isneutral_vartime crypto_sign_ed25519_ref_isneutral_vartime
  10. #define ge25519_double_scalarmult_vartime crypto_sign_ed25519_ref_double_scalarmult_vartime
  11. #define ge25519_scalarmult_base crypto_sign_ed25519_ref_scalarmult_base
  12. typedef struct
  13. {
  14. fe25519 x;
  15. fe25519 y;
  16. fe25519 z;
  17. fe25519 t;
  18. } ge25519;
  19. const ge25519 ge25519_base;
  20. int ge25519_unpackneg_vartime(ge25519 *r, const unsigned char p[32]);
  21. void ge25519_pack(unsigned char r[32], const ge25519 *p);
  22. int ge25519_isneutral_vartime(const ge25519 *p);
  23. void ge25519_double_scalarmult_vartime(ge25519 *r, const ge25519 *p1, const sc25519 *s1, const ge25519 *p2, const sc25519 *s2);
  24. void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s);
  25. #endif