diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-07-03 16:18:40 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-07-03 16:18:40 +0200 |
commit | 40629e89920267dadba39f5f7f2ab3d844088a0e (patch) | |
tree | 0c10bc6e983ed628f7a7ce1c9aa5d166733e0118 /src/include/taler_crypto_lib.h | |
parent | 9c3ddcbc183a9a96f10cdb14f28258ea61f5f7c5 (diff) | |
download | exchange-40629e89920267dadba39f5f7f2ab3d844088a0e.tar.xz |
[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
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r-- | src/include/taler_crypto_lib.h | 23 |
1 files changed, 20 insertions, 3 deletions
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 ************************** */ |