From 8d85c8b5b6c514ce093d856a2e4b931b4108ece5 Mon Sep 17 00:00:00 2001 From: Lucien Heuzeveldt Date: Sun, 16 Jan 2022 17:02:15 +0100 Subject: implement feedback --- src/include/taler_crypto_lib.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'src/include/taler_crypto_lib.h') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index c02ab4fb..c6e2185f 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -1230,13 +1230,12 @@ TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info, /** * Compute the hash of a blinded coin. * - * @param coin_ev blinded coin - * @param coin_ev_size number of bytes in @a coin_ev + * @param blinded_planchet blinded planchet * @param[out] bch where to write the hash + * @return #GNUNET_OK when successful, #GNUNET_SYSERR if an internal error occured */ -void -TALER_coin_ev_hash (const void *coin_ev, - size_t coin_ev_size, +enum GNUNET_GenericReturnValue +TALER_coin_ev_hash (const struct TALER_BlindedPlanchet *blinded_planchet, struct TALER_BlindedCoinHash *bch); @@ -1441,19 +1440,21 @@ TALER_planchet_setup_refresh (const struct TALER_TransferSecretP *secret_seed, * Setup information for a fresh coin. * * @param[out] ps value to initialize + * @oaram alg_values WitdrawValues containing cipher */ void TALER_planchet_setup_random (struct TALER_PlanchetSecretsP *ps, - enum TALER_DenominationCipher cipher); + const struct + TALER_ExchangeWithdrawValues *alg_values); /** * Create a blinding secret @a bs for @a cipher. * * @param[out] ps planchet with blinding secret to initialize + * @param alg_values withdraw values containing cipher and additional CS values */ void TALER_planchet_blinding_secret_create (struct TALER_PlanchetSecretsP *ps, - enum TALER_DenominationCipher cipher, const struct TALER_ExchangeWithdrawValues *alg_values); @@ -1476,6 +1477,16 @@ TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk, struct TALER_PlanchetDetail *pd); +/** + * Frees blinded message inside blinded planchet depending on blinded_planchet->cipher + * Does not free the @a blinded_planchet itself! + * + * @param blinded_planchet blnded planchet + */ +void +TALER_blinded_planchet_free (struct TALER_BlindedPlanchet *blinded_planchet); + + /** * Obtain a coin from the planchet's secrets and the blind signature * of the exchange. -- cgit v1.2.3