aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-02-22 14:27:15 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2022-02-22 14:34:47 +0100
commit26158fc72505be6323282dc39509fd531c10a290 (patch)
tree117e5b7a580c056717a0303fc9f82c391207ff67 /src/include/taler_crypto_lib.h
parent0141a8216162a33b4656f95a2d5305843ca4aeba (diff)
downloadexchange-26158fc72505be6323282dc39509fd531c10a290.tar.xz
[age restriction] progress 16/n - refresh/reveal/link tests
Age restriction works now with withdraw, melt/refresh/reveal and link, including tests. However, there is still a problem with the tests: The melting operation "refresh-melt-failing-age" that should fail (because of conflict), but currently fails for other reasons. I decided to disable that particular test (and the next) and submit the patch I have so far.
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 20b9ff303..a49b9eb5f 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -2419,6 +2419,7 @@ TALER_wallet_deposit_verify (
* @param melt_fee the melt fee we expect to pay
* @param rc refresh session we are committed to
* @param h_denom_pub hash of the coin denomination's public key
+ * @param h_age_commitment hash of the age commitment (may be NULL)
* @param coin_priv coin’s private key
* @param[out] coin_sig set to the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_MELT
*/
@@ -2428,6 +2429,7 @@ TALER_wallet_melt_sign (
const struct TALER_Amount *melt_fee,
const struct TALER_RefreshCommitmentP *rc,
const struct TALER_DenominationHashP *h_denom_pub,
+ const struct TALER_AgeCommitmentHash *h_age_commitment,
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
struct TALER_CoinSpendSignatureP *coin_sig);
@@ -3346,7 +3348,7 @@ TALER_age_commitment_hash (
*
* @param mask The age mask the defines the age groups
* @param age The actual age for which an age commitment is generated
- * @param seed The seed that goes into the key generation. MUST be choosen uniformly random.
+ * @param salt The salt that goes into the key generation. MUST be choosen uniformly random.
* @param commitment[out] The generated age commitment, ->priv and ->pub allocated via GNUNET_malloc on success
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
@@ -3354,21 +3356,21 @@ enum GNUNET_GenericReturnValue
TALER_age_restriction_commit (
const struct TALER_AgeMask *mask,
const uint8_t age,
- const uint32_t seed,
+ const uint64_t salt,
struct TALER_AgeCommitment *commitment);
/*
* @brief Derives another, equivalent age commitment for a given one.
*
* @param orig Original age commitment
- * @param seed Used to move the points on the elliptic curve in order to generate another, equivalent commitment.
+ * @param salt Salt to randomly move the points on the elliptic curve in order to generate another, equivalent commitment.
* @param derived[out] The resulting age commitment, ->priv and ->pub allocated via GNUNET_malloc on success.
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
enum GNUNET_GenericReturnValue
TALER_age_commitment_derive (
const struct TALER_AgeCommitment *orig,
- const uint32_t seed,
+ const uint64_t salt,
struct TALER_AgeCommitment *derived);
/*