commit d54a086f05da629d91dc009e76f6cd84a8fac0d8
parent e094df15af7c8d3623b0ea034831f917e00ef239
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 9 Mar 2026 12:28:33 +0100
need 64-bit value for correct bit shift
Diffstat:
3 files changed, 2 insertions(+), 41 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_melt.c b/src/exchange/taler-exchange-httpd_melt.c
@@ -1230,13 +1230,14 @@ phase_prepare_transaction (
}
/* Now save the choices for the selected bits */
+ GNUNET_assert (num_cs_r_values <= 64);
for (size_t i = 0; i < num_cs_r_values; i++)
{
size_t idx = mc->request.cs_indices[i];
struct TALER_BlindedDenominationSignature *sig =
&mc->request.refresh.denom_sigs[idx];
- uint8_t bit = sig->blinded_sig->details.blinded_cs_answer.b;
+ uint64_t bit = sig->blinded_sig->details.blinded_cs_answer.b;
mc->request.refresh.cs_r_choices |= bit << i;
GNUNET_static_assert (
diff --git a/src/include/taler/taler_crypto_lib.h b/src/include/taler/taler_crypto_lib.h
@@ -1825,21 +1825,6 @@ TALER_cs_derive_nonces_from_seed (
/**
- * @brief method to find the indices of denominations for CS
- *
- * @param num number of elements in @e cs_indeces and @e denoms
- * @param denoms array @e num of denominations
- * @param[out] is_cs array @e num of booleans, marking the CS denominations in @e denoms
- * @return true, if a CS denomination was found, false otherwise
- */
-bool
-TALER_cs_mark_indices (
- size_t num,
- const struct TALER_DenominationPublicKey denoms[static num],
- bool is_cs[static num]);
-
-
-/**
* @brief Method to derive a batch of blind session nonces
*
* @param seed blinding master seed for the nonces
diff --git a/src/util/crypto.c b/src/util/crypto.c
@@ -366,31 +366,6 @@ TALER_cs_derive_only_cs_blind_nonces_from_seed (
}
-bool
-TALER_cs_mark_indices (
- size_t num,
- const struct TALER_DenominationPublicKey denoms[static num],
- bool is_cs[static num])
-{
- bool found = false;
- for (size_t i = 0; i < num; i++)
- {
- switch (denoms[i].bsign_pub_key->cipher)
- {
- case GNUNET_CRYPTO_BSA_INVALID:
- GNUNET_assert (0);
- break;
- case GNUNET_CRYPTO_BSA_RSA:
- is_cs[i] = false;
- case GNUNET_CRYPTO_BSA_CS:
- is_cs[i] = true;
- found = true;
- }
- }
- return found;
-}
-
-
void
TALER_cs_derive_blind_nonces_from_seed (
const struct TALER_BlindingMasterSeedP *seed,