From d58d89dcab91823dff208d230e1b1b3a742810bd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 10 Feb 2022 20:15:17 +0100 Subject: -get recoup/refresh to pass --- src/include/taler_crypto_lib.h | 19 ++++++++++++++++--- src/include/taler_exchange_service.h | 6 +++++- src/include/taler_testing_lib.h | 3 ++- 3 files changed, 23 insertions(+), 5 deletions(-) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 244333735..8e8203790 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -466,6 +466,9 @@ struct TALER_RsaPubHashP * Master key material for the deriviation of * private coins and blinding factors. */ +// FIXME: split this struct, we should have +// a different one for the Melt/Refresh secrets +// and the withdraw secrets! struct TALER_PlanchetSecretsP { @@ -840,7 +843,10 @@ struct TALER_BlindedCsPlanchet struct GNUNET_CRYPTO_CsC c[2]; /** - * Public Nonce + * Public nonce. + * FIXME: this nonce being here has created TONS + * of trouble. Likely split off from this data + * structure in the future! */ struct TALER_CsNonce nonce; }; @@ -1108,14 +1114,21 @@ TALER_denom_cs_derive_r_public ( /** * Blind coin for blind signing with @a dk using blinding secret @a coin_bks. * + * NOTE/FIXME: As a particular oddity, the @a blinded_planchet + * is only partially initialized by this function in the + * case of CS-denominations. Here, the 'nonce' must + * be initialized separately! This has been a MAJOR + * source of bugs, and points to a likely need for a + * reorganization of either that data structure or + * this function! + * * @param dk denomination public key to blind for * @param coin_bks blinding secret to use * @param age_commitment_hash hash of the age commitment to be used for the coin. NULL if no commitment is made. * @param coin_pub public key of the coin to blind * @param alg_values algorithm specific values to blind the planchet * @param[out] c_hash resulting hashed coin - * @param[out] coin_ev blinded coin to submit - * @param[out] coin_ev_size number of bytes in @a coin_ev + * @param[out] blinded_planchet planchet data to initialize * @return #GNUNET_OK on success */ enum GNUNET_GenericReturnValue diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index a65e796a5..58364b159 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -2236,7 +2236,9 @@ typedef void * @param pk kind of coin to pay back * @param denom_sig signature over the coin by the exchange using @a pk * @param exchange_vals contribution from the exchange on the withdraw - * @param ps secret internals of the original refresh-reveal operation + * @param rps melt secret of the refreshing operation + * @param ps coin-specific secrets derived for this coin during the refreshing operation + * @param idx index of the fresh coin in the refresh operation that is now being recouped * @param recoup_cb the callback to call when the final result for this request is available * @param recoup_cb_cls closure for @a recoup_cb * @return NULL @@ -2249,7 +2251,9 @@ TALER_EXCHANGE_recoup_refresh ( const struct TALER_EXCHANGE_DenomPublicKey *pk, const struct TALER_DenominationSignature *denom_sig, const struct TALER_ExchangeWithdrawValues *exchange_vals, + const struct TALER_PlanchetSecretsP *rps, const struct TALER_PlanchetSecretsP *ps, + unsigned int idx, TALER_EXCHANGE_RecoupRefreshResultCallback recoup_cb, void *recoup_cb_cls); diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index 70bbda7fb..7284a1247 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -2444,7 +2444,8 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, op (bank_row, const uint64_t) \ op (reserve_priv, const struct TALER_ReservePrivateKeyP) \ op (planchet_secret, const struct TALER_PlanchetSecretsP) \ - op (reserve_pub, const struct TALER_ReservePublicKeyP) \ + op (refresh_secret, const struct TALER_PlanchetSecretsP) \ + op (reserve_pub, const struct TALER_ReservePublicKeyP) \ op (merchant_priv, const struct TALER_MerchantPrivateKeyP) \ op (merchant_pub, const struct TALER_MerchantPublicKeyP) \ op (merchant_sig, const struct TALER_MerchantSignatureP) \ -- cgit v1.2.3