summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h22
-rw-r--r--src/include/taler_exchange_service.h13
2 files changed, 23 insertions, 12 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 2843d8209..8a1c7bf12 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -1053,7 +1053,7 @@ struct TALER_CoinPublicInfo
* Hash of the age commitment. If no age commitment was provided, it must be
* set to all zeroes.
*/
- struct TALER_AgeCommitmentHash age_commitment_hash;
+ struct TALER_AgeCommitmentHash h_age_commitment;
/**
* (Unblinded) signature over @e coin_pub with @e denom_pub,
@@ -2414,11 +2414,12 @@ TALER_wallet_melt_verify (
* @param[out] coin_sig resulting signature
*/
void
-TALER_wallet_link_sign (const struct TALER_DenominationHash *h_denom_pub,
- const struct TALER_TransferPublicKeyP *transfer_pub,
- const struct TALER_BlindedCoinHash *bch,
- const struct TALER_CoinSpendPrivateKeyP *old_coin_priv,
- struct TALER_CoinSpendSignatureP *coin_sig);
+TALER_wallet_link_sign (
+ const struct TALER_DenominationHash *h_denom_pub,
+ const struct TALER_TransferPublicKeyP *transfer_pub,
+ const struct TALER_BlindedCoinHash *bch,
+ const struct TALER_CoinSpendPrivateKeyP *old_coin_priv,
+ struct TALER_CoinSpendSignatureP *coin_sig);
/**
@@ -2428,7 +2429,6 @@ TALER_wallet_link_sign (const struct TALER_DenominationHash *h_denom_pub,
* @param transfer_pub transfer public key
* @param h_coin_ev hash of the coin envelope
* @param old_coin_pub old coin key that the link signature is for
- * @param h_age_commitment hash of age commitment. Maybe NULL, if not applicable.
* @param coin_sig resulting signature
* @return #GNUNET_OK if the signature is valid
*/
@@ -2438,7 +2438,6 @@ TALER_wallet_link_verify (
const struct TALER_TransferPublicKeyP *transfer_pub,
const struct TALER_BlindedCoinHash *h_coin_ev,
const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
- const struct TALER_AgeCommitmentHash *h_age_commitment,
const struct TALER_CoinSpendSignatureP *coin_sig);
@@ -3322,12 +3321,11 @@ TALER_age_commitment_derive (
struct TALER_AgeCommitment *derived);
/*
- * @brief helper function to free memory inside a struct TALER_AgeCommitment
- * @param cmt the commitment from which internal memory should be freed. Note
- * that cmt itself is NOT freed!
+ * @brief helper function to free memory of a struct TALER_AgeCommitment
+ * @param cmt the commitment from which all memory should be freed.
*/
void
-TALER_age_restriction_commitment_free_inside (
+TALER_age_commitment_free (
struct TALER_AgeCommitment *cmt);
#endif
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index df1d4da93..666bf101b 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -1680,6 +1680,11 @@ struct TALER_EXCHANGE_RefreshData
*/
struct TALER_CoinSpendPrivateKeyP melt_priv;
+ /*
+ * age commitment that went into the original coin, might be NULL
+ */
+ struct TALER_AgeCommitment *age_commitment;
+
/**
* amount specifying how much the coin will contribute to the melt
* (including fee)
@@ -1848,6 +1853,12 @@ struct TALER_EXCHANGE_RevealedCoinInfo
struct TALER_PlanchetMasterSecretP ps;
/**
+ * Age commitment and its hash of the coin, might be NULL.
+ */
+ struct TALER_AgeCommitment *age_commitment;
+ struct TALER_AgeCommitmentHash *h_age_commitment;
+
+ /**
* Blinding keys used to blind the fresh coin.
*/
union TALER_DenominationBlindingKeyP bks;
@@ -2063,6 +2074,7 @@ typedef void
*
* @param exchange the exchange handle; the exchange must be ready to operate
* @param coin_priv private key to request link data for
+ * @param age_commitment age commitment to the corresponding coin, might be NULL
* @param link_cb the callback to call with the useful result of the
* refresh operation the @a coin_priv was involved in (if any)
* @param link_cb_cls closure for @a link_cb
@@ -2071,6 +2083,7 @@ typedef void
struct TALER_EXCHANGE_LinkHandle *
TALER_EXCHANGE_link (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
+ const struct TALER_AgeCommitment *age_commitment,
TALER_EXCHANGE_LinkCallback link_cb,
void *link_cb_cls);