diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c b/src/exchange/taler-exchange-httpd_refreshes_reveal.c index 95ec55b25..ce1e273bb 100644 --- a/src/exchange/taler-exchange-httpd_refreshes_reveal.c +++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.c @@ -180,7 +180,8 @@ check_commitment (struct RevealContext *rctx, for (unsigned int j = 0; jnum_fresh_coins; j++) { struct TALER_RefreshCoinData *rcd = &rce->new_coins[j]; - struct TALER_PlanchetSecretsP ps; + struct TALER_CoinSpendPrivateKeyP coin_priv; + union TALER_DenominationBlindingKeyP bks; struct TALER_ExchangeWithdrawValues alg_values; struct TALER_PlanchetDetail pd; struct TALER_CoinPubHash c_hash; @@ -188,13 +189,15 @@ check_commitment (struct RevealContext *rctx, rcd->dk = &rctx->dks[j]->denom_pub; TALER_planchet_setup_refresh (&ts, j, - &ps); + &coin_priv, + &bks); // TODO: implement cipher handling alg_values.cipher = TALER_DENOMINATION_RSA; GNUNET_assert (GNUNET_OK == TALER_planchet_prepare (rcd->dk, &alg_values, - &ps, + &bks, + &coin_priv, &c_hash, &pd)); rcd->coin_ev = diff --git a/src/lib/exchange_api_csr.c b/src/lib/exchange_api_csr.c index bc58c040e..1716bbb5e 100644 --- a/src/lib/exchange_api_csr.c +++ b/src/lib/exchange_api_csr.c @@ -94,7 +94,7 @@ csr_ok (struct TALER_EXCHANGE_CsRHandle *csrh, struct TALER_ExchangeWithdrawValues alg_values[GNUNET_NZL (alen)]; struct TALER_EXCHANGE_CsRResponse csrr = { .hr = hr, - .details.success.alg_values_len = alen, + .details.success.arg_values_len = alen, .details.success.alg_values = alg_values }; @@ -105,11 +105,11 @@ csr_ok (struct TALER_EXCHANGE_CsRHandle *csrh, struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed ( "r_pub_0", - &alg_values[i].r_pub.r_pub[0], + &alg_values[i].details.cs_values.r_pub.r_pub[0], sizeof (struct GNUNET_CRYPTO_CsRPublic)), GNUNET_JSON_spec_fixed ( "r_pub_1", - &alg_values[i].r_pub.r_pub[1], + &alg_values[i].details.cs_values.r_pub.r_pub[1], sizeof (struct GNUNET_CRYPTO_CsRPublic)), GNUNET_JSON_spec_end () }; diff --git a/src/lib/exchange_api_withdraw.c b/src/lib/exchange_api_withdraw.c index 477af5446..024cc5020 100644 --- a/src/lib/exchange_api_withdraw.c +++ b/src/lib/exchange_api_withdraw.c @@ -64,10 +64,20 @@ struct TALER_EXCHANGE_WithdrawHandle const struct TALER_ReservePrivateKeyP *reserve_priv; /** - * Secrets of the planchet. + * Seed of the planchet. */ struct TALER_PlanchetSecretsP ps; + /** + * blinding secret + */ + union DenominationBlindingKeyP bks; + + /** + * + */ + struct TALER_CoinSpendPrivateKeyP priv; + /** * Details of the planchet. */ @@ -125,8 +135,8 @@ handle_reserve_withdraw_finished ( if (GNUNET_OK != TALER_planchet_to_coin (&wh->pk.key, blind_sig, - &wh->ps, - &wh->c_hash, + &wh-> + & wh->c_hash, &wh->alg_values, &fc)) { @@ -246,15 +256,16 @@ TALER_EXCHANGE_withdraw ( switch (pk->key.cipher) { case TALER_DENOMINATION_RSA: - struct TALER_CoinSpendPrivateKeyP priv; - alg_values.cipher = TALER_DENOMINATION_RSA; + wh->alg_values.cipher = TALER_DENOMINATION_RSA; - TALER_planchet_setup_coin_priv (ps, &wh->alg_values, &priv); + TALER_planchet_setup_coin_priv (ps, &wh->alg_values, &wh->priv); + TALER_planchet_blinding_secret_create (ps, &wh->alg_values, &wh->bks); if (GNUNET_OK != TALER_planchet_prepare (&pk->key, &wh->alg_values, - ps, + &bks, + &priv, &wh->c_hash, &wh->pd)) {