aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-03-13 00:31:49 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2023-03-13 00:31:49 +0100
commit187ae6f8a2231628be944ae43ef53f47b8428d12 (patch)
tree40298af848d265e79ab5bf8e7271e7dc3f7abe67 /src/util
parent62da9cca275d7a37a640a962c0d04278288986f6 (diff)
WIP: age-withdraw, continue verify_commitment_and_max_age, 7/n
- coin, blinding, nonce and age restriction now derived from TALER_PlanchetMasterSecretP - use max_age instead than max_age_group as argument - Also, docs updated in other repo.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/age_restriction.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c
index 594e1d464..beb68e5a6 100644
--- a/src/util/age_restriction.c
+++ b/src/util/age_restriction.c
@@ -585,10 +585,10 @@ TALER_age_mask_to_string (
enum GNUNET_GenericReturnValue
-TALER_age_restriction_commit_from_base (
- const struct TALER_CoinSpendPrivateKeyP *coin_priv,
+TALER_age_restriction_from_secret (
+ const struct TALER_PlanchetMasterSecretP *secret,
const struct TALER_AgeMask *mask,
- uint8_t max_age,
+ const uint8_t max_age,
struct TALER_AgeCommitmentProof *ncp)
{
struct GNUNET_HashCode seed_i = {0};
@@ -596,7 +596,7 @@ TALER_age_restriction_commit_from_base (
uint8_t num_priv;
GNUNET_assert (NULL != mask);
- GNUNET_assert (NULL != coin_priv);
+ GNUNET_assert (NULL != secret);
GNUNET_assert (NULL != ncp);
GNUNET_assert (mask->bits & 1); /* fist bit must have been set */
@@ -629,7 +629,7 @@ TALER_age_restriction_commit_from_base (
const char *label = i < num_priv ? "age-commitment" : "age-factor";
ret = GNUNET_CRYPTO_kdf (&seed_i, sizeof(seed_i),
- coin_priv, sizeof(*coin_priv),
+ secret, sizeof(*secret),
label, strlen (label),
&i, sizeof(i),
NULL, 0);