diff options
Diffstat (limited to 'src/util/crypto.c')
-rw-r--r-- | src/util/crypto.c | 24 |
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: |