From 40629e89920267dadba39f5f7f2ab3d844088a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Mon, 3 Jul 2023 16:18:40 +0200 Subject: [age-withdraw] added library function for age-withdraw - Added TALER_EXCHANGE_age_withdraw - Also: Change TALER_EXCHANGE_batch_withdraw and related functions to use GNUNET_CURL_ctx, TALER_EXCHANGE_keys and const char *echange_url --- src/include/taler_crypto_lib.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 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 3af5d326d..3ad441cb9 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -439,7 +439,9 @@ struct TALER_AgeCommitmentPublicKeyP /* - * @brief Hash to represent the commitment to n*kappa blinded keys during a age-withdrawal. + * @brief Hash to represent the commitment to n*kappa blinded keys during a + * age-withdrawal. It is the running SHA512 hash over the hashes of the blinded + * envelopes of n*kappa coins. */ struct TALER_AgeWithdrawCommitmentHashP { @@ -3726,7 +3728,7 @@ TALER_wallet_withdraw_verify ( /** * Sign age-withdraw request. * - * @param h_commitment hash all n*kappa blinded coins in the commitment for the age-withdraw + * @param h_commitment hash over all n*kappa blinded coins in the commitment for the age-withdraw * @param amount_with_fee amount to debit the reserve for * @param mask the mask that defines the age groups * @param max_age maximum age from which the age group is derived, that the withdrawn coins must be restricted to. @@ -3762,7 +3764,6 @@ TALER_wallet_age_withdraw_verify ( const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_ReserveSignatureP *reserve_sig); - /** * Verify exchange melt confirmation. * @@ -4871,6 +4872,22 @@ TALER_exchange_online_age_withdraw_confirmation_sign ( struct TALER_ExchangeSignatureP *sig); +/** + * Verfiy an exchange age-withdraw confirmation + * + * @param h_commitment Commitment over all n*kappa coin candidates from the original request to age-withdraw + * @param noreveal_index The index returned by the exchange + * @param exchange_pub The public key used for signing + * @param exchange_sig The signature from the exchange + */ +enum GNUNET_GenericReturnValue +TALER_exchange_online_age_withdraw_confirmation_verify ( + const struct TALER_AgeWithdrawCommitmentHashP *h_commitment, + uint32_t noreveal_index, + const struct TALER_ExchangePublicKeyP *exchange_pub, + const struct TALER_ExchangeSignatureP *exchange_sig); + + /* ********************* offline signing ************************** */ -- cgit v1.2.3