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

@ -211,6 +211,7 @@ ed25519/amd64-64-24k/batch.c.o: ed25519/amd64-51-30k/ge25519.h
ed25519/amd64-64-24k/batch.c.o: ed25519/amd64-51-30k/fe25519.h
ed25519/amd64-64-24k/batch.c.o: ed25519/amd64-51-30k/sc25519.h
ed25519/amd64-64-24k/batch.c.o: ed25519/amd64-51-30k/hram.h
ed25519/amd64-64-24k/fe25519_batchinvert.c.o: ed25519/amd64-51-30k/fe25519.h
ed25519/amd64-64-24k/fe25519_getparity.c.o: ed25519/amd64-51-30k/fe25519.h
ed25519/amd64-64-24k/fe25519_invert.c.o: ed25519/amd64-51-30k/fe25519.h
ed25519/amd64-64-24k/fe25519_iseq.c.o: ed25519/amd64-51-30k/fe25519.h
@ -226,6 +227,9 @@ ed25519/amd64-64-24k/ge25519_add.c.o: ed25519/amd64-51-30k/sc25519.h
ed25519/amd64-64-24k/ge25519_base.c.o: ed25519/amd64-51-30k/ge25519.h
ed25519/amd64-64-24k/ge25519_base.c.o: ed25519/amd64-51-30k/fe25519.h
ed25519/amd64-64-24k/ge25519_base.c.o: ed25519/amd64-51-30k/sc25519.h
ed25519/amd64-64-24k/ge25519_batchpack.c.o: ed25519/amd64-51-30k/fe25519.h
ed25519/amd64-64-24k/ge25519_batchpack.c.o: ed25519/amd64-51-30k/ge25519.h
ed25519/amd64-64-24k/ge25519_batchpack.c.o: ed25519/amd64-51-30k/sc25519.h
ed25519/amd64-64-24k/ge25519_double.c.o: ed25519/amd64-51-30k/ge25519.h
ed25519/amd64-64-24k/ge25519_double.c.o: ed25519/amd64-51-30k/fe25519.h
ed25519/amd64-64-24k/ge25519_double.c.o: ed25519/amd64-51-30k/sc25519.h
@ -286,6 +290,8 @@ ed25519/amd64-64-24k/sign.c.o: ed25519/amd64-51-30k/sc25519.h
ed25519/ref10/fe_0.c.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
ed25519/ref10/fe_1.c.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
ed25519/ref10/fe_add.c.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
ed25519/ref10/fe_batchinvert.c.o: ed25519/ref10/fe.h
ed25519/ref10/fe_batchinvert.c.o: ed25519/ref10/crypto_int32.h
ed25519/ref10/fe_cmov.c.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
ed25519/ref10/fe_copy.c.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
ed25519/ref10/fe_frombytes.c.o: ed25519/ref10/fe.h
@ -336,6 +342,8 @@ ed25519/ref10/ge_p2_dbl.c.o: ed25519/ref10/crypto_int32.h
ed25519/ref10/ge_p2_dbl.c.o: ed25519/ref10/ge_p2_dbl.h
ed25519/ref10/ge_p3_0.c.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
ed25519/ref10/ge_p3_0.c.o: ed25519/ref10/crypto_int32.h
ed25519/ref10/ge_p3_batchtobytes.c.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
ed25519/ref10/ge_p3_batchtobytes.c.o: ed25519/ref10/crypto_int32.h
ed25519/ref10/ge_p3_dbl.c.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
ed25519/ref10/ge_p3_dbl.c.o: ed25519/ref10/crypto_int32.h
ed25519/ref10/ge_p3_to_cached.c.o: ed25519/ref10/ge.h ed25519/ref10/fe.h

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);

4
main.c
View file

@ -519,7 +519,9 @@ end:
#ifdef BATCHKEYGEN
#ifndef BATCHNUM
#define BATCHNUM 64
#endif
static void *dobatchwork(void *task)
{
@ -728,7 +730,9 @@ int main(int argc,char **argv)
int dirnameflag = 0;
int numthreads = 0;
int fastkeygen = 1;
#ifdef BATCHKEYGEN
int batchkeygen = 0;
#endif
int yamlinput = 0;
#ifdef PASSPHRASE
int deterministic = 0;