2016-04-22 15:47:48 +00:00
|
|
|
/*
|
|
|
|
Public domain by Andrew M. <liquidsun@gmail.com>
|
|
|
|
See: https://github.com/floodyberry/curve25519-donna
|
|
|
|
|
|
|
|
Curve25519 implementation agnostic helpers
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* In: b = 2^5 - 2^0
|
|
|
|
* Out: b = 2^250 - 2^0
|
|
|
|
*/
|
2017-07-31 14:40:09 +00:00
|
|
|
void curve25519_pow_two5mtwo0_two250mtwo0(bignum25519 b);
|
2016-04-22 15:47:48 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* z^(p - 2) = z(2^255 - 21)
|
|
|
|
*/
|
2017-07-31 14:40:09 +00:00
|
|
|
void curve25519_recip(bignum25519 out, const bignum25519 z);
|
2016-04-22 15:47:48 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* z^((p-5)/8) = z^(2^252 - 3)
|
|
|
|
*/
|
2017-07-31 14:40:09 +00:00
|
|
|
void curve25519_pow_two252m3(bignum25519 two252m3, const bignum25519 z);
|