From be50c084f89e8588dd2d4a4aa30c58002053ee31 Mon Sep 17 00:00:00 2001 From: Gian Demarmels Date: Mon, 17 Jan 2022 09:37:36 +0100 Subject: fixed nonce check, renamed WithdrawNonce --- src/util/crypto.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/util/crypto.c') diff --git a/src/util/crypto.c b/src/util/crypto.c index 549ec8b1..fd309c93 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -191,7 +191,7 @@ cs_blinding_seed_derive (const struct void TALER_cs_withdraw_nonce_derive (const struct TALER_CoinSpendPrivateKeyP *coin_priv, - struct TALER_WithdrawNonce *nonce) + struct TALER_CsNonce *nonce) { GNUNET_assert (GNUNET_YES == GNUNET_CRYPTO_hkdf (nonce, @@ -207,6 +207,15 @@ TALER_cs_withdraw_nonce_derive (const struct } +void +TALER_cs_withdraw_nonce_generate (struct TALER_CsNonce *nonce) +{ + GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG, + nonce, + sizeof (*nonce)); +} + + void TALER_planchet_blinding_secret_create (struct TALER_PlanchetSecretsP *ps, const struct -- cgit v1.2.3