aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto.c39
-rw-r--r--src/util/crypto_helper_cs.c8
-rw-r--r--src/util/denom.c53
-rw-r--r--src/util/taler-exchange-secmod-cs.c31
-rw-r--r--src/util/taler-exchange-secmod-cs.h12
-rw-r--r--src/util/test_crypto.c10
-rw-r--r--src/util/test_helper_cs.c91
-rw-r--r--src/util/test_helper_rsa.c2
8 files changed, 129 insertions, 117 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c
index 664d75aa6..e64547f0f 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -209,7 +209,9 @@ TALER_cs_withdraw_nonce_derive (const struct
void
TALER_planchet_blinding_secret_create (struct TALER_PlanchetSecretsP *ps,
- enum TALER_DenominationCipher cipher)
+ enum TALER_DenominationCipher cipher,
+ const struct
+ TALER_ExchangeWithdrawValues *alg_values)
{
switch (cipher)
{
@@ -225,7 +227,7 @@ TALER_planchet_blinding_secret_create (struct TALER_PlanchetSecretsP *ps,
case TALER_DENOMINATION_CS:
{
cs_blinding_seed_derive (&ps->coin_priv,
- ps->cs_r_pub.r_pub,
+ alg_values->details.cs_values.r_pub.r_pub,
&ps->blinding_key.nonce);
return;
}
@@ -253,7 +255,7 @@ TALER_planchet_setup_random (struct TALER_PlanchetSecretsP *ps,
GNUNET_break (0);
return;
case TALER_DENOMINATION_RSA:
- TALER_planchet_blinding_secret_create (ps, TALER_DENOMINATION_RSA);
+ TALER_planchet_blinding_secret_create (ps, TALER_DENOMINATION_RSA, NULL);
return;
case TALER_DENOMINATION_CS:
// Will be set in a later stage for Clause Blind Schnorr Scheme
@@ -266,6 +268,7 @@ TALER_planchet_setup_random (struct TALER_PlanchetSecretsP *ps,
enum GNUNET_GenericReturnValue
TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk,
+ const struct TALER_ExchangeWithdrawValues *alg_values,
struct TALER_PlanchetSecretsP *ps,
struct TALER_CoinPubHash *c_hash,
struct TALER_PlanchetDetail *pd)
@@ -283,6 +286,7 @@ TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk,
&ps->blinding_key,
NULL, /* FIXME-Oec */
&coin_pub,
+ NULL, /* RSA has no alg Values */
c_hash,
&pd->blinded_planchet))
{
@@ -296,10 +300,9 @@ TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk,
&ps->blinding_key,
NULL, /* FIXME-Oec */
&coin_pub,
+ alg_values,
c_hash,
- &pd->blinded_planchet,
- &ps->cs_r_pub,
- &ps->cs_r_pub_blinded))
+ &pd->blinded_planchet))
{
GNUNET_break (0);
return GNUNET_SYSERR;
@@ -323,11 +326,13 @@ TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk,
TALER_BlindedDenominationSignature *blind_sig,
const struct TALER_PlanchetSecretsP *ps,
const struct TALER_CoinPubHash *c_hash,
+ const struct TALER_ExchangeWithdrawValues *alg_values,
struct TALER_FreshCoin *coin)
{
struct TALER_DenominationSignature sig;
- if (dk->cipher != blind_sig->cipher)
+ if (dk->cipher != blind_sig->cipher
+ && dk->cipher != alg_values->cipher)
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -347,12 +352,28 @@ TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk,
}
break;
case TALER_DENOMINATION_CS:
+ struct GNUNET_CRYPTO_CsC c[2];
+ struct GNUNET_CRYPTO_CsBlindingSecret bs[2];
+ struct TALER_DenominationCsPublicR r_pub_blind;
+
+ GNUNET_CRYPTO_cs_blinding_secrets_derive (&ps->blinding_key.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);
+
+ 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,
&ps->blinding_key,
- dk,
- &ps->cs_r_pub_blinded))
+ dk))
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c
index c24815a6a..240c13552 100644
--- a/src/util/crypto_helper_cs.c
+++ b/src/util/crypto_helper_cs.c
@@ -175,7 +175,6 @@ handle_mt_avail (struct TALER_CRYPTO_CsDenominationHelper *dh,
= (const struct TALER_CRYPTO_CsKeyAvailableNotification *) hdr;
const char *buf = (const char *) &kan[1];
const char *section_name;
- uint16_t ps;
uint16_t snl;
if (sizeof (*kan) > ntohs (hdr->size))
@@ -183,9 +182,8 @@ handle_mt_avail (struct TALER_CRYPTO_CsDenominationHelper *dh,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- ps = ntohs (kan->pub_size);
snl = ntohs (kan->section_name_len);
- if (ntohs (hdr->size) != sizeof (*kan) + ps + snl)
+ if (ntohs (hdr->size) != sizeof (*kan) + snl)
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -195,7 +193,7 @@ handle_mt_avail (struct TALER_CRYPTO_CsDenominationHelper *dh,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- section_name = &buf[ps];
+ section_name = buf;
if ('\0' != section_name[snl - 1])
{
GNUNET_break_op (0);
@@ -207,8 +205,8 @@ handle_mt_avail (struct TALER_CRYPTO_CsDenominationHelper *dh,
struct TALER_CsPubHashP h_cs;
denom_pub.cipher = TALER_DENOMINATION_CS;
+ denom_pub.details.cs_public_key = kan->denom_pub;
- memcpy (&denom_pub.details.cs_public_key, buf, ntohs (kan->pub_size));
TALER_cs_pub_hash (&denom_pub.details.cs_public_key, &h_cs);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Received CS key %s (%s)\n",
diff --git a/src/util/denom.c b/src/util/denom.c
index c7cf62c3e..43204f09c 100644
--- a/src/util/denom.c
+++ b/src/util/denom.c
@@ -170,8 +170,7 @@ TALER_denom_sig_unblind (
struct TALER_DenominationSignature *denom_sig,
const struct TALER_BlindedDenominationSignature *bdenom_sig,
const union TALER_DenominationBlindingKeyP *bks,
- const struct TALER_DenominationPublicKey *denom_pub,
- ...)
+ const struct TALER_DenominationPublicKey *denom_pub)
{
if (bdenom_sig->cipher != denom_pub->cipher)
{
@@ -198,25 +197,35 @@ TALER_denom_sig_unblind (
return GNUNET_OK;
case TALER_DENOMINATION_CS:
{
- va_list ap;
- va_start (ap, denom_pub);
- struct TALER_DenominationCsPublicR *r_pub_blind;
- r_pub_blind = va_arg (ap, struct TALER_DenominationCsPublicR *);
-
struct GNUNET_CRYPTO_CsBlindingSecret bs[2];
+ // struct TALER_DenominationCsPublicR r_pub_blind;
+ // struct GNUNET_CRYPTO_CsC c[2];
+ // struct TALER_CoinPubHash c_hash;
+
+ // TALER_coin_pub_hash (coin_pub,
+ // age_commitment_hash,
+ // c_hash);
+
GNUNET_CRYPTO_cs_blinding_secrets_derive (&bks->nonce, bs);
+ // GNUNET_CRYPTO_cs_calc_blinded_c (bs,
+ // &alg_values->r_pub,
+ // &denom_pub->details.cs_public_key,
+ // &c_hash->hash,
+ // sizeof(struct GNUNET_HashCode),
+ // c,
+ // r_pub_blind->r_pub);
+
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);
- GNUNET_memcpy (&denom_sig->details.cs_signature.r_point,
- &r_pub_blind->r_pub[bdenom_sig->details.blinded_cs_answer.b
- ],
- sizeof(struct GNUNET_CRYPTO_CsRPublic));
+ // GNUNET_memcpy (&denom_sig->details.cs_signature.r_point,
+ // &r_pub_blind.r_pub[bdenom_sig->details.blinded_cs_answer.b
+ // ],
+ // sizeof(struct GNUNET_CRYPTO_CsRPublic));
denom_sig->cipher = TALER_DENOMINATION_CS;
- va_end (ap);
return GNUNET_OK;
}
default:
@@ -333,9 +342,9 @@ TALER_denom_blind (const struct TALER_DenominationPublicKey *dk,
const union TALER_DenominationBlindingKeyP *coin_bks,
const struct TALER_AgeHash *age_commitment_hash,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_ExchangeWithdrawValues *alg_values,
struct TALER_CoinPubHash *c_hash,
- struct TALER_BlindedPlanchet *blinded_planchet,
- ...)
+ struct TALER_BlindedPlanchet *blinded_planchet)
{
TALER_coin_pub_hash (coin_pub,
age_commitment_hash,
@@ -361,27 +370,19 @@ TALER_denom_blind (const struct TALER_DenominationPublicKey *dk,
case TALER_DENOMINATION_CS:
{
blinded_planchet->cipher = dk->cipher;
- va_list ap;
- va_start (ap, blinded_planchet);
- struct TALER_DenominationCsPublicR *r_pub;
- struct TALER_DenominationCsPublicR *blinded_r_pub;
-
- r_pub = va_arg (ap, struct TALER_DenominationCsPublicR *);
- blinded_r_pub = va_arg (ap, struct TALER_DenominationCsPublicR *);
-
+ struct TALER_DenominationCsPublicR blinded_r_pub;
struct GNUNET_CRYPTO_CsBlindingSecret bs[2];
+
GNUNET_CRYPTO_cs_blinding_secrets_derive (&coin_bks->nonce, bs);
GNUNET_CRYPTO_cs_calc_blinded_c (bs,
- r_pub->r_pub,
+ alg_values->details.cs_values.r_pub.r_pub,
&dk->details.cs_public_key,
&c_hash->hash,
sizeof(struct GNUNET_HashCode),
blinded_planchet->details.
cs_blinded_planchet.c,
- blinded_r_pub->r_pub);
-
- va_end (ap);
+ blinded_r_pub.r_pub);
return GNUNET_OK;
}
default:
diff --git a/src/util/taler-exchange-secmod-cs.c b/src/util/taler-exchange-secmod-cs.c
index d7624a0b9..8ff8dc79b 100644
--- a/src/util/taler-exchange-secmod-cs.c
+++ b/src/util/taler-exchange-secmod-cs.c
@@ -242,15 +242,15 @@ generate_response (struct DenominationKey *dk)
GNUNET_assert (sizeof(dk->denom_pub) < UINT16_MAX);
GNUNET_assert (nlen < UINT16_MAX);
- tlen = sizeof(dk->denom_pub) + nlen + sizeof (*an);
+ tlen = nlen + sizeof (*an);
GNUNET_assert (tlen < UINT16_MAX);
an = GNUNET_malloc (tlen);
an->header.size = htons ((uint16_t) tlen);
an->header.type = htons (TALER_HELPER_CS_MT_AVAIL);
- an->pub_size = htons ((uint16_t) sizeof(dk->denom_pub));
an->section_name_len = htons ((uint16_t) nlen);
an->anchor_time = GNUNET_TIME_timestamp_hton (dk->anchor);
an->duration_withdraw = GNUNET_TIME_relative_hton (denom->duration_withdraw);
+ an->denom_pub = dk->denom_pub;
TALER_exchange_secmod_cs_sign (&dk->h_cs,
denom->section,
dk->anchor,
@@ -260,9 +260,6 @@ generate_response (struct DenominationKey *dk)
an->secm_pub = TES_smpub;
p = (void *) &an[1];
memcpy (p,
- &dk->denom_pub,
- sizeof(dk->denom_pub));
- memcpy (p + sizeof(dk->denom_pub),
denom->section,
nlen);
dk->an = an;
@@ -1078,8 +1075,7 @@ update_denominations (void *cls)
static void
parse_key (struct Denomination *denom,
const char *filename,
- const void *buf,
- size_t buf_size)
+ const struct GNUNET_CRYPTO_CsPrivateKey *priv)
{
char *anchor_s;
char dummy;
@@ -1117,27 +1113,15 @@ parse_key (struct Denomination *denom,
filename);
return;
}
-
- const struct GNUNET_CRYPTO_CsPrivateKey priv
- = *((struct GNUNET_CRYPTO_CsPrivateKey *) buf);
-// memcpy (&priv, buf, sizeof(priv));
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "privkey %zu\n",
- sizeof(priv));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "privkey %zu\n",
- buf_size);
-
{
struct GNUNET_CRYPTO_CsPublicKey pub;
struct DenominationKey *dk;
struct DenominationKey *before;
// TODO: Add check if pubkey is set?
- GNUNET_CRYPTO_cs_private_key_get_public (&priv, &pub);
+ GNUNET_CRYPTO_cs_private_key_get_public (priv, &pub);
dk = GNUNET_new (struct DenominationKey);
- dk->denom_priv = priv;
+ dk->denom_priv = *priv;
dk->denom = denom;
dk->anchor = anchor;
dk->filename = GNUNET_strdup (filename);
@@ -1270,7 +1254,7 @@ import_key (void *cls,
GNUNET_break (0 == close (fd));
return GNUNET_OK;
}
- if (sbuf.st_size > 16 * 1024)
+ if (sbuf.st_size != sizeof(struct GNUNET_CRYPTO_CsPrivateKey))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"File `%s' too big to be a private key\n",
@@ -1292,8 +1276,7 @@ import_key (void *cls,
}
parse_key (denom,
filename,
- ptr,
- (size_t) sbuf.st_size);
+ (const struct GNUNET_CRYPTO_CsPrivateKey *) ptr);
GNUNET_DISK_file_unmap (map);
GNUNET_DISK_file_close (fh);
return GNUNET_OK;
diff --git a/src/util/taler-exchange-secmod-cs.h b/src/util/taler-exchange-secmod-cs.h
index 121690e38..c5f1b7dec 100644
--- a/src/util/taler-exchange-secmod-cs.h
+++ b/src/util/taler-exchange-secmod-cs.h
@@ -52,14 +52,9 @@ struct TALER_CRYPTO_CsKeyAvailableNotification
struct GNUNET_MessageHeader header;
/**
- * Number of bytes of the public key.
- */
- uint16_t pub_size;
-
- /**
* Number of bytes of the section name.
*/
- uint16_t section_name_len;
+ uint32_t section_name_len;
/**
* When does the key become available?
@@ -82,7 +77,10 @@ struct TALER_CRYPTO_CsKeyAvailableNotification
*/
struct TALER_SecurityModuleSignatureP secm_sig;
- /* followed by @e pub_size bytes of the CS public key */
+ /**
+ * Denomination Public key
+ */
+ struct GNUNET_CRYPTO_CsPublicKey denom_pub;
/* followed by @e section_name bytes of the configuration section name
of the denomination of this key */
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c
index 9ddd6cfd4..28352a678 100644
--- a/src/util/test_crypto.c
+++ b/src/util/test_crypto.c
@@ -111,6 +111,7 @@ test_planchets_rsa (void)
TALER_planchet_setup_random (&ps, TALER_DENOMINATION_RSA);
GNUNET_assert (GNUNET_OK ==
TALER_planchet_prepare (&dk_pub,
+ NULL, /* not needed in RSA*/
&ps,
&c_hash,
&pd));
@@ -123,6 +124,7 @@ test_planchets_rsa (void)
&blind_sig,
&ps,
&c_hash,
+ NULL, /* Not needed in RSA case */
&coin));
TALER_blinded_denom_sig_free (&blind_sig);
TALER_denom_sig_free (&coin.sig);
@@ -148,6 +150,7 @@ test_planchets_cs (void)
struct TALER_CoinPubHash c_hash;
struct TALER_BlindedDenominationSignature blind_sig;
struct TALER_FreshCoin coin;
+ struct TALER_ExchangeWithdrawValues alg_values;
GNUNET_assert (GNUNET_OK ==
TALER_denom_priv_create (&dk_priv,
@@ -162,13 +165,15 @@ test_planchets_cs (void)
TALER_denom_cs_derive_r_public (
&pd.blinded_planchet.details.cs_blinded_planchet.nonce,
&dk_priv,
- &ps.cs_r_pub));
+ &alg_values.details.cs_values.r_pub));
// TODO: eliminate r_pubs parameter
TALER_planchet_blinding_secret_create (&ps,
- TALER_DENOMINATION_CS);
+ TALER_DENOMINATION_CS,
+ &alg_values);
GNUNET_assert (GNUNET_OK ==
TALER_planchet_prepare (&dk_pub,
+ &alg_values,
&ps,
&c_hash,
&pd));
@@ -183,6 +188,7 @@ test_planchets_cs (void)
&blind_sig,
&ps,
&c_hash,
+ &alg_values,
&coin));
TALER_blinded_denom_sig_free (&blind_sig);
diff --git a/src/util/test_helper_cs.c b/src/util/test_helper_cs.c
index 8ce380d46..22f39b34f 100644
--- a/src/util/test_helper_cs.c
+++ b/src/util/test_helper_cs.c
@@ -268,6 +268,7 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh)
bool success = false;
struct TALER_PlanchetSecretsP ps;
struct TALER_CoinPubHash c_hash;
+ struct TALER_ExchangeWithdrawValues values;
TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS);
for (unsigned int i = 0; i<MAX_KEYS; i++)
@@ -286,12 +287,14 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh)
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Requesting R derivation with key %s\n",
GNUNET_h2s (&keys[i].h_cs.hash));
- ps.cs_r_pub = TALER_CRYPTO_helper_cs_r_derive (dh,
- &keys[i].h_cs,
- &pd.blinded_planchet.
- details.
- cs_blinded_planchet.nonce,
- &ec);
+
+ values.details.cs_values.r_pub
+ = TALER_CRYPTO_helper_cs_r_derive (dh,
+ &keys[i].h_cs,
+ &pd.blinded_planchet.
+ details.
+ cs_blinded_planchet.nonce,
+ &ec);
}
switch (ec)
{
@@ -320,9 +323,11 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh)
GNUNET_h2s (&keys[i].h_cs.hash));
TALER_planchet_blinding_secret_create (&ps,
- TALER_DENOMINATION_CS);
+ TALER_DENOMINATION_CS,
+ &values);
GNUNET_assert (GNUNET_OK ==
TALER_planchet_prepare (&keys[i].denom_pub,
+ &values,
&ps,
&c_hash,
&pd));
@@ -373,10 +378,10 @@ test_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh)
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
&nonce,
sizeof (nonce));
- ps.cs_r_pub = TALER_CRYPTO_helper_cs_r_derive (dh,
- &rnd,
- &nonce,
- &ec);
+ TALER_CRYPTO_helper_cs_r_derive (dh,
+ &rnd,
+ &nonce,
+ &ec);
if (TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN != ec)
{
GNUNET_break (0);
@@ -404,6 +409,8 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh)
bool success = false;
struct TALER_PlanchetSecretsP ps;
struct TALER_CoinPubHash c_hash;
+ struct TALER_ExchangeWithdrawValues values;
+
TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS);
for (unsigned int i = 0; i<MAX_KEYS; i++)
@@ -418,17 +425,20 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh)
TALER_cs_withdraw_nonce_derive (&ps.coin_priv,
&pd.blinded_planchet.details.
cs_blinded_planchet.nonce);
- ps.cs_r_pub = TALER_CRYPTO_helper_cs_r_derive (dh,
- &keys[i].h_cs,
- &pd.blinded_planchet.
- details.
- cs_blinded_planchet.nonce,
- &ec);
+ values.details.cs_values.r_pub
+ = TALER_CRYPTO_helper_cs_r_derive (dh,
+ &keys[i].h_cs,
+ &pd.blinded_planchet.
+ details.
+ cs_blinded_planchet.nonce,
+ &ec);
TALER_planchet_blinding_secret_create (&ps,
- TALER_DENOMINATION_CS);
+ TALER_DENOMINATION_CS,
+ &values);
GNUNET_assert (GNUNET_YES ==
TALER_planchet_prepare (&keys[i].denom_pub,
+ &values,
&ps,
&c_hash,
&pd));
@@ -463,30 +473,18 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh)
return 5;
}
{
- struct TALER_DenominationSignature rs;
-
+ struct TALER_FreshCoin coin;
if (GNUNET_OK !=
- TALER_denom_sig_unblind (&rs,
- &ds,
- &ps.blinding_key,
- &keys[i].denom_pub,
- &ps.cs_r_pub_blinded))
+ TALER_planchet_to_coin (&keys[i].denom_pub,
+ &ds,
+ &ps,
+ &c_hash,
+ &values,
+ &coin))
{
GNUNET_break (0);
return 6;
}
- TALER_blinded_denom_sig_free (&ds);
- if (GNUNET_OK !=
- TALER_denom_pub_verify (&keys[i].denom_pub,
- &rs,
- &c_hash))
- {
- /* signature invalid */
- GNUNET_break (0);
- TALER_denom_sig_free (&rs);
- return 7;
- }
- TALER_denom_sig_free (&rs);
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Received valid signature for key %s\n",
@@ -536,6 +534,7 @@ test_signing (struct TALER_CRYPTO_CsDenominationHelper *dh)
pd.blinded_planchet.cipher = TALER_DENOMINATION_CS;
GNUNET_assert (GNUNET_YES ==
TALER_planchet_prepare (&keys[0].denom_pub,
+ &values,
&ps,
&c_hash,
&pd));
@@ -597,6 +596,7 @@ perf_signing (struct TALER_CRYPTO_CsDenominationHelper *dh,
{
struct TALER_CoinPubHash c_hash;
struct TALER_PlanchetDetail pd;
+ struct TALER_ExchangeWithdrawValues values;
pd.blinded_planchet.cipher = TALER_DENOMINATION_CS;
@@ -604,17 +604,20 @@ perf_signing (struct TALER_CRYPTO_CsDenominationHelper *dh,
&pd.blinded_planchet.details.
cs_blinded_planchet.nonce);
- ps.cs_r_pub = TALER_CRYPTO_helper_cs_r_derive (dh,
- &keys[i].h_cs,
- &pd.blinded_planchet.
- details.
- cs_blinded_planchet.nonce,
- &ec);
+ values.details.cs_values.r_pub
+ = TALER_CRYPTO_helper_cs_r_derive (dh,
+ &keys[i].h_cs,
+ &pd.blinded_planchet.
+ details.
+ cs_blinded_planchet.nonce,
+ &ec);
TALER_planchet_blinding_secret_create (&ps,
- TALER_DENOMINATION_CS);
+ TALER_DENOMINATION_CS,
+ &values);
GNUNET_assert (GNUNET_YES ==
TALER_planchet_prepare (&keys[i].denom_pub,
+ &values,
&ps,
&c_hash,
&pd));
diff --git a/src/util/test_helper_rsa.c b/src/util/test_helper_rsa.c
index e51fa26e1..8cfea4bef 100644
--- a/src/util/test_helper_rsa.c
+++ b/src/util/test_helper_rsa.c
@@ -282,6 +282,7 @@ test_signing (struct TALER_CRYPTO_RsaDenominationHelper *dh)
GNUNET_assert (GNUNET_YES ==
TALER_planchet_prepare (&keys[i].denom_pub,
+ NULL, /* not needed in RSA*/
&ps,
&c_hash,
&pd));
@@ -451,6 +452,7 @@ perf_signing (struct TALER_CRYPTO_RsaDenominationHelper *dh,
GNUNET_assert (GNUNET_YES ==
TALER_planchet_prepare (&keys[i].denom_pub,
+ NULL, /* not needed in RSA*/
&ps,
&c_hash,
&pd));