This commit is contained in:
NIIBE Yutaka
2014-03-18 14:18:39 +09:00
parent bfe0466bd2
commit a3504e8510
5 changed files with 111 additions and 63 deletions

View File

@@ -1,4 +1,8 @@
#define FE25519_WORDS 8
typedef struct fe25519 {
uint32_t word[FE25519_WORDS]; /* Little endian */
} fe25519;
extern const bn256 n25638;
#define N25638 (&n25638)
void mod25638_add (bn256 *X, const bn256 *A, const bn256 *B);
void mod25638_sub (bn256 *X, const bn256 *A, const bn256 *B);
void mod25638_mul (bn256 *X, const bn256 *A, const bn256 *B);
void mod25638_sqr (bn256 *X, const bn256 *A);
void mod25638_shift (bn256 *X, const bn256 *A, int shift);