-fix refresh commitment check for CS

This commit is contained in:
Christian Grothoff 2022-02-09 19:17:50 +01:00
parent 4ee82c1ed3
commit 8e4eaabc96
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 9 additions and 5 deletions

View File

@ -248,8 +248,11 @@ check_commitment (struct RevealContext *rctx,
&ts);
rce->new_coins = GNUNET_new_array (rctx->num_fresh_coins,
struct TALER_RefreshCoinData);
aoff = 0;
for (unsigned int j = 0; j<rctx->num_fresh_coins; j++)
{
const struct TALER_DenominationPublicKey *dk =
&rctx->dks[j]->denom_pub;
struct TALER_RefreshCoinData *rcd = &rce->new_coins[j];
struct TALER_CoinSpendPrivateKeyP coin_priv;
union TALER_DenominationBlindingKeyP bks;
@ -275,6 +278,12 @@ check_commitment (struct RevealContext *rctx,
&coin_priv,
&c_hash,
&pd));
if (TALER_DENOMINATION_CS == dk->cipher)
{
pd.blinded_planchet.details.cs_blinded_planchet.nonce =
nonces[aoff];
aoff++;
}
rcd->blinded_planchet = pd.blinded_planchet;
}
}

View File

@ -476,11 +476,6 @@ TALER_refresh_get_commitment (struct TALER_RefreshCommitmentP *rc,
{
const struct TALER_RefreshCoinData *rcd = &rce->new_coins[j];
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"BCH %u/%u %s\n",
i, j,
TALER_B2S (
&rcd->blinded_planchet.details.cs_blinded_planchet));
TALER_blinded_planchet_hash (&rcd->blinded_planchet,
hash_context);
}