diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/crypto.c | 7 | ||||
-rw-r--r-- | src/util/denom.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c index 84d20d6ba..445b820aa 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -319,6 +319,7 @@ TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk, return GNUNET_SYSERR; } + pd->blinded_planchet.cipher = dk->cipher; TALER_denom_pub_hash (dk, &pd->denom_pub_hash); return GNUNET_OK; @@ -335,6 +336,12 @@ TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk, { struct TALER_DenominationSignature sig; + if (dk->cipher != blind_sig->cipher) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + switch (dk->cipher) { case TALER_DENOMINATION_RSA: diff --git a/src/util/denom.c b/src/util/denom.c index 908302600..a4965c050 100644 --- a/src/util/denom.c +++ b/src/util/denom.c @@ -112,6 +112,13 @@ TALER_denom_sign_blinded (struct TALER_BlindedDenominationSignature *denom_sig, memset (denom_sig, 0, sizeof (*denom_sig)); + + if (blinded_planchet->cipher != denom_priv->cipher) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + switch (denom_priv->cipher) { case TALER_DENOMINATION_INVALID: @@ -394,6 +401,7 @@ TALER_denom_pub_verify (const struct TALER_DenominationPublicKey *denom_pub, GNUNET_break (0); return GNUNET_SYSERR; } + switch (denom_pub->cipher) { case TALER_DENOMINATION_INVALID: |