commit a1a59e5f97fcfcb1999194ecf9b7b5c14c0cb34b
parent bd14b7510a41176cb38311a789a89522a3a5343f
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Fri, 14 Aug 2026 18:18:06 +0200
hash over big-endian fixed-length representation of 'i' in age restriction
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c
@@ -781,11 +781,12 @@ TALER_age_restriction_from_secret (
{
enum GNUNET_GenericReturnValue ret;
const char *label = i < num_priv ? "age-commitment" : "age-factor";
+ uint32_t ibe = htonl ((uint32_t) i);
ret = GNUNET_CRYPTO_hkdf_gnunet (&seed_i, sizeof(seed_i),
secret, sizeof(*secret),
label, strlen (label),
- GNUNET_CRYPTO_kdf_arg_auto (&i));
+ GNUNET_CRYPTO_kdf_arg_auto (&ibe));
GNUNET_assert (GNUNET_OK == ret);
/* Only generate and save the private keys and public keys for age groups