diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-07 12:33:35 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-07 12:33:35 +0100 |
commit | fb9ba5b1d2970e24643d179338b34c8915d2072d (patch) | |
tree | de1ad14127b9e213fcbf88c62097783583a1acb5 /src/util/crypto.c | |
parent | 0d03f55282f5954050a66a38209a3a9aed33f884 (diff) | |
download | exchange-fb9ba5b1d2970e24643d179338b34c8915d2072d.tar.xz |
-rename fest
Diffstat (limited to 'src/util/crypto.c')
-rw-r--r-- | src/util/crypto.c | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c index 9a913afeb..c239f7970 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -156,10 +156,10 @@ TALER_planchet_setup_random ( void -TALER_planchet_setup_refresh (const struct TALER_TransferSecretP *secret_seed, - uint32_t coin_num_salt, - struct TALER_PlanchetSecretsP *ps) - +TALER_transfer_secret_to_planchet_secret ( + const struct TALER_TransferSecretP *secret_seed, + uint32_t coin_num_salt, + struct TALER_PlanchetSecretsP *ps) { uint32_t be_salt = htonl (coin_num_salt); @@ -381,14 +381,14 @@ TALER_blinded_planchet_free (struct TALER_BlindedPlanchet *blinded_planchet) enum GNUNET_GenericReturnValue -TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk, - const struct - TALER_BlindedDenominationSignature *blind_sig, - const union TALER_DenominationBlindingKeyP *bks, - const struct TALER_CoinSpendPrivateKeyP *coin_priv, - const struct TALER_CoinPubHash *c_hash, - const struct TALER_ExchangeWithdrawValues *alg_values, - struct TALER_FreshCoin *coin) +TALER_planchet_to_coin ( + const struct TALER_DenominationPublicKey *dk, + const struct TALER_BlindedDenominationSignature *blind_sig, + const union TALER_DenominationBlindingKeyP *bks, + const struct TALER_CoinSpendPrivateKeyP *coin_priv, + const struct TALER_CoinPubHash *c_hash, + const struct TALER_ExchangeWithdrawValues *alg_values, + struct TALER_FreshCoin *coin) { struct TALER_DenominationSignature sig; @@ -416,21 +416,20 @@ TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk, { struct GNUNET_CRYPTO_CsC c[2]; struct GNUNET_CRYPTO_CsBlindingSecret bs[2]; - struct TALER_DenominationCsPublicR r_pub_blind; - - GNUNET_CRYPTO_cs_blinding_secrets_derive (&bks->nonce, bs); - - GNUNET_CRYPTO_cs_calc_blinded_c (bs, - alg_values->details.cs_values.r_pub.r_pub, - &dk->details.cs_public_key, - &c_hash->hash, - sizeof(struct GNUNET_HashCode), - c, - r_pub_blind.r_pub); - + struct TALER_DenominationCSPublicRPairP r_pub_blind; + + GNUNET_CRYPTO_cs_blinding_secrets_derive (&bks->nonce, + bs); + GNUNET_CRYPTO_cs_calc_blinded_c ( + bs, + alg_values->details.cs_values.r_pub_pair.r_pub, + &dk->details.cs_public_key, + &c_hash->hash, + sizeof(struct GNUNET_HashCode), + c, + r_pub_blind.r_pub); sig.details.cs_signature.r_point = r_pub_blind.r_pub[blind_sig->details.blinded_cs_answer.b]; - if (GNUNET_OK != TALER_denom_sig_unblind (&sig, blind_sig, |