summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto.c11
-rw-r--r--src/util/crypto_helper_cs.c2
-rw-r--r--src/util/denom.c2
-rw-r--r--src/util/taler-exchange-secmod-cs.h2
-rw-r--r--src/util/test_helper_cs.c2
5 files changed, 14 insertions, 5 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c
index 549ec8b1a..fd309c934 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,
@@ -208,6 +208,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
TALER_ExchangeWithdrawValues *alg_values)
diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c
index 240c13552..593aa0c25 100644
--- a/src/util/crypto_helper_cs.c
+++ b/src/util/crypto_helper_cs.c
@@ -610,7 +610,7 @@ TALER_CRYPTO_helper_cs_revoke (
struct TALER_DenominationCsPublicR
TALER_CRYPTO_helper_cs_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh,
const struct TALER_CsPubHashP *h_cs,
- const struct TALER_WithdrawNonce *nonce,
+ const struct TALER_CsNonce *nonce,
enum TALER_ErrorCode *ec)
{
struct TALER_DenominationCsPublicR r_pub;
diff --git a/src/util/denom.c b/src/util/denom.c
index 43204f09c..fa8909783 100644
--- a/src/util/denom.c
+++ b/src/util/denom.c
@@ -83,7 +83,7 @@ TALER_denom_priv_create (struct TALER_DenominationPrivateKey *denom_priv,
enum GNUNET_GenericReturnValue
-TALER_denom_cs_derive_r_public (const struct TALER_WithdrawNonce *nonce,
+TALER_denom_cs_derive_r_public (const struct TALER_CsNonce *nonce,
const struct
TALER_DenominationPrivateKey *denom_priv,
struct TALER_DenominationCsPublicR *r_pub)
diff --git a/src/util/taler-exchange-secmod-cs.h b/src/util/taler-exchange-secmod-cs.h
index c5f1b7dec..6c3f9232a 100644
--- a/src/util/taler-exchange-secmod-cs.h
+++ b/src/util/taler-exchange-secmod-cs.h
@@ -162,7 +162,7 @@ struct TALER_CRYPTO_CsRDeriveRequest
/**
* Withdraw nonce to derive R from
*/
- struct TALER_WithdrawNonce nonce;
+ struct TALER_CsNonce nonce;
};
/**
diff --git a/src/util/test_helper_cs.c b/src/util/test_helper_cs.c
index 5a41c7fa1..c4e68376b 100644
--- a/src/util/test_helper_cs.c
+++ b/src/util/test_helper_cs.c
@@ -371,7 +371,7 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh)
/* check R derivation does not work if the key is unknown */
{
struct TALER_CsPubHashP rnd;
- struct TALER_WithdrawNonce nonce;
+ struct TALER_CsNonce nonce;
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
&rnd,