[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: fixes to crypto.c changes
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: fixes to crypto.c changes |
Date: |
Sat, 05 Feb 2022 20:23:17 +0100 |
This is an automated email from the git hooks/post-receive script.
gian-demarmels pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new e8740316 fixes to crypto.c changes
e8740316 is described below
commit e8740316a79567eb23b6b75edabc1d1d77107237
Author: Gian Demarmels <gian@demarmels.org>
AuthorDate: Sat Feb 5 20:22:55 2022 +0100
fixes to crypto.c changes
---
.../taler-exchange-httpd_refreshes_reveal.c | 9 +++++---
src/lib/exchange_api_csr.c | 6 +++---
src/lib/exchange_api_withdraw.c | 25 ++++++++++++++++------
3 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c
b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
index 95ec55b2..ce1e273b 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; j<rctx->num_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 bc58c040..1716bbb5 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 477af544..024cc502 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))
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: fixes to crypto.c changes,
gnunet <=