aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-02-04 19:29:52 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-02-04 19:30:15 +0100
commit03fd154a69212df740cf3b09567a1bb081b64873 (patch)
tree0441bff7f146771a04162d587bc995240a8b5b22 /src/util
parent7d2a1a596a8502dd040ed47eb0dd17bb0610cc08 (diff)
messing with CS/RSA fixes
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c
index fee3f31ea..18f809e34 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -245,19 +245,23 @@ TALER_planchet_blinding_secret_create (struct TALER_PlanchetSecretsP *ps,
}
-/**
- * @brief setup a random planchet
- * In Case of RSA planchet, the bks gets set
- * In Case of Clause Schnorr this will be set in future
- */
void
-TALER_planchet_setup_random (struct TALER_PlanchetSecretsP *ps,
- const struct
- TALER_ExchangeWithdrawValues *alg_values)
+TALER_planchet_setup_coin_priv (
+ struct TALER_CoinSpendPrivateKeyP *coin_priv)
{
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG,
- &ps->coin_priv,
- sizeof (struct TALER_CoinSpendPrivateKeyP));
+ coin_priv,
+ sizeof (*coin_priv));
+ // FIXME-jeff/dold: Clamping?
+}
+
+
+void
+TALER_planchet_setup_random (
+ struct TALER_PlanchetSecretsP *ps,
+ const struct TALER_ExchangeWithdrawValues *alg_values)
+{
+ TALER_planchet_setup_coin_priv (&ps->coin_priv);
switch (alg_values->cipher)
{
case TALER_DENOMINATION_INVALID: