summaryrefslogtreecommitdiff
path: root/src/util/denom.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-09 10:49:10 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-09 10:49:10 +0100
commit12290af8450497ea2ec82e71d566e792132c21ef (patch)
treec9bf056a31493a069fb76a171126c5ba1356ae15 /src/util/denom.c
parentd559610da76f9bf08983fd576fb17fdfa2cc6252 (diff)
downloadexchange-12290af8450497ea2ec82e71d566e792132c21ef.tar.gz
exchange-12290af8450497ea2ec82e71d566e792132c21ef.tar.bz2
exchange-12290af8450497ea2ec82e71d566e792132c21ef.zip
-clean up crypto
Diffstat (limited to 'src/util/denom.c')
-rw-r--r--src/util/denom.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/denom.c b/src/util/denom.c
index 4382a9df3..b0982c008 100644
--- a/src/util/denom.c
+++ b/src/util/denom.c
@@ -170,6 +170,8 @@ TALER_denom_sig_unblind (
struct TALER_DenominationSignature *denom_sig,
const struct TALER_BlindedDenominationSignature *bdenom_sig,
const union TALER_DenominationBlindingKeyP *bks,
+ const struct TALER_CoinPubHash *c_hash,
+ const struct TALER_ExchangeWithdrawValues *alg_values,
const struct TALER_DenominationPublicKey *denom_pub)
{
if (bdenom_sig->cipher != denom_pub->cipher)
@@ -198,9 +200,21 @@ TALER_denom_sig_unblind (
case TALER_DENOMINATION_CS:
{
struct GNUNET_CRYPTO_CsBlindingSecret bs[2];
+ struct GNUNET_CRYPTO_CsC c[2];
+ 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,
+ &denom_pub->details.cs_public_key,
+ &c_hash->hash,
+ sizeof(struct GNUNET_HashCode),
+ c,
+ r_pub_blind.r_pub);
+ denom_sig->details.cs_signature.r_point
+ = r_pub_blind.r_pub[bdenom_sig->details.blinded_cs_answer.b];
GNUNET_CRYPTO_cs_unblind (&bdenom_sig->details.blinded_cs_answer.s_scalar,
&bs[bdenom_sig->details.blinded_cs_answer.b],
&denom_sig->details.cs_signature.s_scalar);