]> pd.if.org Git - zpackage/blob - crypto/ref10/fe.h
remove stray debug fprintf
[zpackage] / crypto / ref10 / fe.h
1 #ifndef FE_H
2 #define FE_H
3
4 #include <stdint.h>
5
6 /*
7 fe means field element.
8 Here the field is \Z/(2^255-19).
9 An element t, entries t[0]...t[9], represents the integer
10 t[0]+2^26 t[1]+2^51 t[2]+2^77 t[3]+2^102 t[4]+...+2^230 t[9].
11 Bounds on each t[i] vary depending on context.
12 */
13 int x25519(unsigned char *q, const unsigned char *n, const unsigned char *p);
14
15 void fe_frombytes(int32_t fe[10], const unsigned char *);
16 void fe_tobytes(unsigned char *, int32_t fe[10]);
17
18 void fe_copy(int32_t dest[10], int32_t src[10]);
19 void fe_0(int32_t fe[10]);
20 void fe_1(int32_t fe[10]);
21 void fe_cswap(int32_t a[10], int32_t b[10], unsigned int);
22
23 void fe_add(int32_t dest[10], int32_t a[10], int32_t b[10]);
24 void fe_sub(int32_t dest[10], int32_t a[10], int32_t b[10]);
25 void fe_mul(int32_t dest[10], int32_t a[10], int32_t b[10]);
26 void fe_sq(int32_t dest[10], int32_t a[10]);
27 void fe_mul121666(int32_t dest[10], int32_t a[10]);
28 void fe_invert(int32_t dest[10], int32_t a[10]);
29
30 #endif