diff --git a/ed25519/ed25519.h b/ed25519/ed25519.h index 22fb0fa..a3388f8 100644 --- a/ed25519/ed25519.h +++ b/ed25519/ed25519.h @@ -112,6 +112,7 @@ inline static void ge_initeightpoint() {} #define ED25519_CUSTOMRANDOM #define ED25519_CUSTOMHASH #include +#include #include "ed25519-donna/ed25519-donna.h" static int ed25519_seckey_expand(unsigned char *sk,const unsigned char *seed) diff --git a/main.c b/main.c index 0a02962..a0c69f8 100644 --- a/main.c +++ b/main.c @@ -817,7 +817,7 @@ end: return 0; } -static void addu64toscalar32(u8 *dst,u64 v) +static void addsztoscalar32(u8 *dst,size_t v) { int i; u32 c = 0; @@ -897,7 +897,7 @@ initseed: } // found! // update secret key with counter - addu64toscalar32(sk,counter); + addsztoscalar32(sk,counter); // sanity check if (((sk[0] & 248) == sk[0]) && (((sk[31] & 63) | 64) == sk[31])) { /* These operations should be a no-op. */