[tor-commits] [tor/master] ed25519_ref10: use uint64_t and int64_t, not long long

nickm at torproject.org nickm at torproject.org
Thu Sep 25 19:12:40 UTC 2014


commit b2acd3580c8c129771cdcc1f0ab2bbfcaffbdefb
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Aug 26 10:58:26 2014 -0400

    ed25519_ref10: use uint64_t and int64_t, not long long
---
 src/ext/ed25519/ref10/ge_scalarmult_base.c |    2 +-
 src/ext/ed25519/ref10/open.c               |    4 ++--
 src/ext/ed25519/ref10/sign.c               |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/ext/ed25519/ref10/ge_scalarmult_base.c b/src/ext/ed25519/ref10/ge_scalarmult_base.c
index 421e4fa..a55c3c4 100644
--- a/src/ext/ed25519/ref10/ge_scalarmult_base.c
+++ b/src/ext/ed25519/ref10/ge_scalarmult_base.c
@@ -14,7 +14,7 @@ static unsigned char equal(signed char b,signed char c)
 
 static unsigned char negative(signed char b)
 {
-  unsigned long long x = b; /* 18446744073709551361..18446744073709551615: yes; 0..255: no */
+  uint64_t x = b; /* 18446744073709551361..18446744073709551615: yes; 0..255: no */
   x >>= 63; /* 1: yes; 0: no */
   return x;
 }
diff --git a/src/ext/ed25519/ref10/open.c b/src/ext/ed25519/ref10/open.c
index 1ec4cd2..2d0d55e 100644
--- a/src/ext/ed25519/ref10/open.c
+++ b/src/ext/ed25519/ref10/open.c
@@ -6,8 +6,8 @@
 #include "sc.h"
 
 int crypto_sign_open(
-  unsigned char *m,unsigned long long *mlen,
-  const unsigned char *sm,unsigned long long smlen,
+  unsigned char *m,uint64_t *mlen,
+  const unsigned char *sm,uint64_t smlen,
   const unsigned char *pk
 )
 {
diff --git a/src/ext/ed25519/ref10/sign.c b/src/ext/ed25519/ref10/sign.c
index de53742..eb3fd65 100644
--- a/src/ext/ed25519/ref10/sign.c
+++ b/src/ext/ed25519/ref10/sign.c
@@ -5,8 +5,8 @@
 #include "sc.h"
 
 int crypto_sign(
-  unsigned char *sm,unsigned long long *smlen,
-  const unsigned char *m,unsigned long long mlen,
+  unsigned char *sm,uint64_t *smlen,
+  const unsigned char *m,uint64_t mlen,
   const unsigned char *sk
 )
 {





More information about the tor-commits mailing list