[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: kdf_mod_mpi: fix size and use nbo
From: |
gnunet |
Subject: |
[gnunet] branch master updated: kdf_mod_mpi: fix size and use nbo |
Date: |
Wed, 27 Nov 2019 12:50:37 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new bb5def7be kdf_mod_mpi: fix size and use nbo
bb5def7be is described below
commit bb5def7be01569fe49b074e76e40cc5a7467c925
Author: Florian Dold <address@hidden>
AuthorDate: Wed Nov 27 12:47:44 2019 +0100
kdf_mod_mpi: fix size and use nbo
---
src/util/crypto_kdf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/util/crypto_kdf.c b/src/util/crypto_kdf.c
index 92b2cf5c2..1b3bd686f 100644
--- a/src/util/crypto_kdf.c
+++ b/src/util/crypto_kdf.c
@@ -132,7 +132,7 @@ GNUNET_CRYPTO_kdf_mod_mpi (gcry_mpi_t *r,
gcry_error_t rc;
unsigned int nbits;
size_t rsize;
- uint32_t ctr;
+ uint16_t ctr;
nbits = gcry_mpi_get_nbits (n);
/* GNUNET_assert (nbits > 512); */
@@ -143,12 +143,14 @@ GNUNET_CRYPTO_kdf_mod_mpi (gcry_mpi_t *r,
/* Ain't clear if n is always divisible by 8 */
uint8_t buf[ (nbits - 1) / 8 + 1 ];
+ uint16_t ctr_nbo = htons (ctr);
+
rc = GNUNET_CRYPTO_kdf (buf,
sizeof(buf),
xts, xts_len,
skm, skm_len,
ctx, strlen (ctx),
- &ctr, sizeof(ctr),
+ &ctr_nbo, sizeof(ctr_nbo),
NULL, 0);
GNUNET_assert (GNUNET_YES == rc);
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: kdf_mod_mpi: fix size and use nbo,
gnunet <=