diff options
Diffstat (limited to 'nacl/crypto_sign/edwards25519sha512batch/ref/ge25519.h')
-rw-r--r-- | nacl/crypto_sign/edwards25519sha512batch/ref/ge25519.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nacl/crypto_sign/edwards25519sha512batch/ref/ge25519.h b/nacl/crypto_sign/edwards25519sha512batch/ref/ge25519.h new file mode 100644 index 00000000..49ad163a --- /dev/null +++ b/nacl/crypto_sign/edwards25519sha512batch/ref/ge25519.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef GE25519_H | ||
2 | #define GE25519_H | ||
3 | |||
4 | #include "fe25519.h" | ||
5 | #include "sc25519.h" | ||
6 | |||
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 | ||
14 | |||
15 | typedef struct { | ||
16 | fe25519 x; | ||
17 | fe25519 y; | ||
18 | fe25519 z; | ||
19 | fe25519 t; | ||
20 | } ge25519; | ||
21 | |||
22 | int ge25519_unpack_vartime(ge25519 *r, const unsigned char p[32]); | ||
23 | |||
24 | void ge25519_pack(unsigned char r[32], const ge25519 *p); | ||
25 | |||
26 | void ge25519_add(ge25519 *r, const ge25519 *p, const ge25519 *q); | ||
27 | |||
28 | void ge25519_double(ge25519 *r, const ge25519 *p); | ||
29 | |||
30 | void ge25519_scalarmult(ge25519 *r, const ge25519 *p, const sc25519 *s); | ||
31 | |||
32 | void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s); | ||
33 | |||
34 | #endif | ||