libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / crypto_sign / edwards25519sha512batch / ref / ge25519.h
blob49ad163ae64c0b495c0a5336d9789dc1b9edd6e2
1 #ifndef GE25519_H
2 #define GE25519_H
4 #include "fe25519.h"
5 #include "sc25519.h"
7 #define ge25519 crypto_sign_edwards25519sha512batch_ge25519
8 #define ge25519_unpack_vartime crypto_sign_edwards25519sha512batch_ge25519_unpack_vartime
9 #define ge25519_pack crypto_sign_edwards25519sha512batch_ge25519_pack
10 #define ge25519_add crypto_sign_edwards25519sha512batch_ge25519_add
11 #define ge25519_double crypto_sign_edwards25519sha512batch_ge25519_double
12 #define ge25519_scalarmult crypto_sign_edwards25519sha512batch_ge25519_scalarmult
13 #define ge25519_scalarmult_base crypto_sign_edwards25519sha512batch_ge25519_scalarmult_base
15 typedef struct {
16 fe25519 x;
17 fe25519 y;
18 fe25519 z;
19 fe25519 t;
20 } ge25519;
22 int ge25519_unpack_vartime(ge25519 *r, const unsigned char p[32]);
24 void ge25519_pack(unsigned char r[32], const ge25519 *p);
26 void ge25519_add(ge25519 *r, const ge25519 *p, const ge25519 *q);
28 void ge25519_double(ge25519 *r, const ge25519 *p);
30 void ge25519_scalarmult(ge25519 *r, const ge25519 *p, const sc25519 *s);
32 void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s);
34 #endif