curve25519_donna_helpers.h 479 B

12345678910111213141516171819202122
  1. /*
  2. Public domain by Andrew M. <liquidsun@gmail.com>
  3. See: https://github.com/floodyberry/curve25519-donna
  4. Curve25519 implementation agnostic helpers
  5. */
  6. /*
  7. * In: b = 2^5 - 2^0
  8. * Out: b = 2^250 - 2^0
  9. */
  10. void curve25519_pow_two5mtwo0_two250mtwo0(bignum25519 b);
  11. /*
  12. * z^(p - 2) = z(2^255 - 21)
  13. */
  14. void curve25519_recip(bignum25519 out, const bignum25519 z);
  15. /*
  16. * z^((p-5)/8) = z^(2^252 - 3)
  17. */
  18. void curve25519_pow_two252m3(bignum25519 two252m3, const bignum25519 z);