diff --git a/Makefile.in b/Makefile.in index 7c8b5db..83cad81 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/ed25519/amd64-64-24k/fe25519.h b/ed25519/amd64-64-24k/fe25519.h index 33ffabb..2ebe4e3 100644 --- a/ed25519/amd64-64-24k/fe25519.h +++ b/ed25519/amd64-64-24k/fe25519.h @@ -1,6 +1,8 @@ #ifndef FE25519_H #define FE25519_H +#include + #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 diff --git a/ed25519/amd64-64-24k/ge25519.h b/ed25519/amd64-64-24k/ge25519.h index 0b15136..491ef80 100644 --- a/ed25519/amd64-64-24k/ge25519.h +++ b/ed25519/amd64-64-24k/ge25519.h @@ -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); diff --git a/main.c b/main.c index b6c94d4..945d1ff 100644 --- a/main.c +++ b/main.c @@ -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;