aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index ea53c2fcb..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,9 +3728,10 @@ 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 max_age_group maximum age group that the withdrawn coins must be restricted to
+ * @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.
* @param reserve_priv private key to sign with
* @param[out] reserve_sig resulting signature
*/
@@ -3736,7 +3739,8 @@ void
TALER_wallet_age_withdraw_sign (
const struct TALER_AgeWithdrawCommitmentHashP *h_commitment,
const struct TALER_Amount *amount_with_fee,
- uint32_t max_age_group,
+ const struct TALER_AgeMask *mask,
+ uint8_t max_age,
const struct TALER_ReservePrivateKeyP *reserve_priv,
struct TALER_ReserveSignatureP *reserve_sig);
@@ -3745,7 +3749,8 @@ TALER_wallet_age_withdraw_sign (
*
* @param h_commitment hash all n*kappa blinded coins in the commitment for the age-withdraw
* @param amount_with_fee amount to debit the reserve for
- * @param max_age_group maximum age group that the withdrawn coins must be restricted to
+ * @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.
* @param reserve_pub public key of the reserve
* @param reserve_sig resulting signature
* @return #GNUNET_OK if the signature is valid
@@ -3754,11 +3759,11 @@ enum GNUNET_GenericReturnValue
TALER_wallet_age_withdraw_verify (
const struct TALER_AgeWithdrawCommitmentHashP *h_commitment,
const struct TALER_Amount *amount_with_fee,
- uint32_t max_age_group,
+ const struct TALER_AgeMask *mask,
+ uint8_t max_age,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_ReserveSignatureP *reserve_sig);
-
/**
* Verify exchange melt confirmation.
*
@@ -4867,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 ************************** */