summaryrefslogtreecommitdiff
path: root/src/util/crypto_ecc_dlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/crypto_ecc_dlog.c')
-rw-r--r--src/util/crypto_ecc_dlog.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/crypto_ecc_dlog.c b/src/util/crypto_ecc_dlog.c
index fb402d505..e084b33c7 100644
--- a/src/util/crypto_ecc_dlog.c
+++ b/src/util/crypto_ecc_dlog.c
@@ -290,20 +290,20 @@ GNUNET_CRYPTO_ecc_rnd_mpi (struct GNUNET_CRYPTO_EccScalar *r,
void
-GNUNET_CRYPTO_ecc_scalar_from_int (int val,
+GNUNET_CRYPTO_ecc_scalar_from_int (int64_t val,
struct GNUNET_CRYPTO_EccScalar *r)
{
unsigned char fact[crypto_scalarmult_ed25519_SCALARBYTES];
- uint32_t valBe;
+ uint64_t valBe;
GNUNET_assert (sizeof (*r) == sizeof (fact));
if (val < 0)
{
- valBe = htonl ((uint32_t) (-val));
+ valBe = GNUNET_htonll ((uint64_t) (-val));
}
else
{
- valBe = htonl ((uint32_t) val);
+ valBe = GNUNET_htonll ((uint64_t) val);
}
memset (fact,
0,