diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-02-18 02:07:38 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-02-18 02:07:38 +0100 |
commit | 71af4c539e341b6ee5c5f05695f834c48a93cbad (patch) | |
tree | ae8712d1403afc6f8db7f9fe25c4600e74ef0992 /src/benchmark/taler-aggregator-benchmark.c | |
parent | f4f502d037a84a38db4bc21a1db06324a05d26aa (diff) | |
download | exchange-71af4c539e341b6ee5c5f05695f834c48a93cbad.tar.xz |
-reducing FIXMEs re: age restriction
- deposit info now carries h_age_commitment
- benchmark does age commitment, too
Diffstat (limited to 'src/benchmark/taler-aggregator-benchmark.c')
-rw-r--r-- | src/benchmark/taler-aggregator-benchmark.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/benchmark/taler-aggregator-benchmark.c b/src/benchmark/taler-aggregator-benchmark.c index 3eb6e7e94..dde8ad401 100644 --- a/src/benchmark/taler-aggregator-benchmark.c +++ b/src/benchmark/taler-aggregator-benchmark.c @@ -493,6 +493,7 @@ run (void *cls, struct TALER_PlanchetMasterSecretP ps; struct TALER_ExchangeWithdrawValues alg_values; struct TALER_CoinSpendPublicKeyP coin_pub; + struct TALER_AgeCommitmentHash hac; union TALER_DenominationBlindingKeyP bks; RANDOMIZE (&coin_pub); @@ -525,10 +526,31 @@ run (void *cls, TALER_planchet_blinding_secret_create (&ps, &alg_values, &bks); + + { + uint32_t seed; + struct TALER_AgeMask mask = { + .mask = 1 || 1 << 8 || 1 << 12 || 1 << 16 || 1 << 18 + }; + struct TALER_AgeCommitment ac = {0}; + + seed = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, + UINT32_MAX); + + GNUNET_assert (GNUNET_OK == + TALER_age_restriction_commit ( + &mask, + 13, + seed, + &ac)); + + TALER_age_commitment_hash (&ac, &hac); + } + GNUNET_assert (GNUNET_OK == TALER_denom_blind (&denom_pub, &bks, - NULL, /* FIXME-oec */ + &hac, &coin_pub, &alg_values, &c_hash, |