some cleanups, port batch invert to amd64-64-24k

This commit is contained in:
cathugger 2019-01-19 22:40:15 +00:00
parent 354e777bb7
commit f944bb64a2
No known key found for this signature in database
GPG key ID: 9BADDA2DAF6F01A8
4 changed files with 19 additions and 0 deletions

View file

@ -1,6 +1,8 @@
#ifndef FE25519_H
#define FE25519_H
#include <stddef.h>
#define fe25519 crypto_sign_ed25519_amd64_64_fe25519
#define fe25519_freeze crypto_sign_ed25519_amd64_64_fe25519_freeze
#define fe25519_unpack crypto_sign_ed25519_amd64_64_fe25519_unpack
@ -17,6 +19,7 @@
#define fe25519_mul121666 crypto_sign_ed25519_amd64_64_fe25519_mul121666
#define fe25519_square crypto_sign_ed25519_amd64_64_fe25519_square
#define fe25519_invert crypto_sign_ed25519_amd64_64_fe25519_invert
#define fe25519_batchinvert crypto_sign_ed25519_amd64_64_fe25519_batchinvert
#define fe25519_pow2523 crypto_sign_ed25519_amd64_64_fe25519_pow2523
typedef struct
@ -59,6 +62,8 @@ void fe25519_pow(fe25519 *r, const fe25519 *x, const unsigned char *e);
void fe25519_invert(fe25519 *r, const fe25519 *x);
void fe25519_batchinvert(fe25519 *out[],fe25519 tmp[],fe25519 * const in[], size_t num);
void fe25519_pow2523(fe25519 *r, const fe25519 *x);
#endif

View file

@ -64,6 +64,8 @@ typedef struct
fe25519 t2d;
} ge25519_pniels;
typedef unsigned char bytes32[32];
extern void ge25519_p1p1_to_p2(ge25519_p2 *r, const ge25519_p1p1 *p);
extern void ge25519_p1p1_to_p3(ge25519_p3 *r, const ge25519_p1p1 *p);
extern void ge25519_add_p1p1(ge25519_p1p1 *r, const ge25519_p3 *p, const ge25519_p3 *q);