aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-31 12:38:14 +0100
committerChristian Grothoff <christian@grothoff.org>2017-10-31 12:38:14 +0100
commita491a4709a6444868b8881067c99d6ccc15554c2 (patch)
tree8c1b50c52ca41b2ec3fca04de2ebaf988af30e4b /src
parenta946dc30bb53fa09e0a42cadd1e483b69ef2e349 (diff)
rename: TALER_FreshCoinP -> TALER_PlanchetSecretsP, and TALER_setup_fresh_coin -> TALER_setup_planchet
Diffstat (limited to 'src')
-rw-r--r--src/exchange-lib/exchange_api_refresh.c30
-rw-r--r--src/exchange-lib/exchange_api_refresh_link.c4
-rw-r--r--src/exchange/taler-exchange-httpd_refresh_reveal.c4
-rw-r--r--src/include/taler_crypto_lib.h8
-rw-r--r--src/util/crypto.c4
-rw-r--r--src/util/test_crypto.c10
6 files changed, 30 insertions, 30 deletions
diff --git a/src/exchange-lib/exchange_api_refresh.c b/src/exchange-lib/exchange_api_refresh.c
index 79381f3bd..51273160d 100644
--- a/src/exchange-lib/exchange_api_refresh.c
+++ b/src/exchange-lib/exchange_api_refresh.c
@@ -117,7 +117,7 @@ struct MeltDataP
1) struct MeltedCoinP melted_coins[num_melted_coins];
2) struct TALER_EXCHANGE_DenomPublicKey fresh_pks[num_fresh_coins];
3) TALER_CNC_KAPPA times:
- 3a) struct TALER_FreshCoinP fresh_coins[num_fresh_coins];
+ 3a) struct TALER_PlanchetSecretsP fresh_coins[num_fresh_coins];
*/
};
@@ -204,7 +204,7 @@ struct MeltData
* Arrays of @e num_fresh_coins with information about the fresh
* coins to be created, for each cut-and-choose dimension.
*/
- struct TALER_FreshCoinP *fresh_coins[TALER_CNC_KAPPA];
+ struct TALER_PlanchetSecretsP *fresh_coins[TALER_CNC_KAPPA];
};
@@ -490,15 +490,15 @@ deserialize_denomination_key (struct TALER_DenominationPublicKey *dk,
* @a buf is NULL, number of bytes required
*/
static size_t
-serialize_fresh_coin (const struct TALER_FreshCoinP *fc,
+serialize_fresh_coin (const struct TALER_PlanchetSecretsP *fc,
char *buf,
size_t off)
{
if (NULL != buf)
memcpy (&buf[off],
fc,
- sizeof (struct TALER_FreshCoinP));
- return sizeof (struct TALER_FreshCoinP);
+ sizeof (struct TALER_PlanchetSecretsP));
+ return sizeof (struct TALER_PlanchetSecretsP);
}
@@ -512,12 +512,12 @@ serialize_fresh_coin (const struct TALER_FreshCoinP *fc,
* @return number of bytes read from @a buf, 0 on error
*/
static size_t
-deserialize_fresh_coin (struct TALER_FreshCoinP *fc,
+deserialize_fresh_coin (struct TALER_PlanchetSecretsP *fc,
const char *buf,
size_t size,
int *ok)
{
- if (size < sizeof (struct TALER_FreshCoinP))
+ if (size < sizeof (struct TALER_PlanchetSecretsP))
{
GNUNET_break (0);
*ok = GNUNET_NO;
@@ -525,8 +525,8 @@ deserialize_fresh_coin (struct TALER_FreshCoinP *fc,
}
memcpy (fc,
buf,
- sizeof (struct TALER_FreshCoinP));
- return sizeof (struct TALER_FreshCoinP);
+ sizeof (struct TALER_PlanchetSecretsP));
+ return sizeof (struct TALER_PlanchetSecretsP);
}
@@ -617,7 +617,7 @@ deserialize_melt_data (const char *buf,
struct TALER_DenominationPublicKey);
for (i=0;i<TALER_CNC_KAPPA;i++)
md->fresh_coins[i] = GNUNET_new_array (md->num_fresh_coins,
- struct TALER_FreshCoinP);
+ struct TALER_PlanchetSecretsP);
off = sizeof (struct MeltDataP);
ok = GNUNET_YES;
off += deserialize_melted_coin (&md->melted_coin,
@@ -753,10 +753,10 @@ TALER_EXCHANGE_refresh_prepare (const struct TALER_CoinSpendPrivateKeyP *melt_pr
for (i=0;i<TALER_CNC_KAPPA;i++)
{
md.fresh_coins[i] = GNUNET_new_array (fresh_pks_len,
- struct TALER_FreshCoinP);
+ struct TALER_PlanchetSecretsP);
for (j=0;j<fresh_pks_len;j++)
{
- TALER_setup_fresh_coin (&trans_sec[i],
+ TALER_setup_planchet (&trans_sec[i],
j,
&md.fresh_coins[i][j]);
}
@@ -824,7 +824,7 @@ TALER_EXCHANGE_refresh_prepare (const struct TALER_CoinSpendPrivateKeyP *melt_pr
{
for (j = 0; j < fresh_pks_len; j++)
{
- const struct TALER_FreshCoinP *fc; /* coin this is about */
+ const struct TALER_PlanchetSecretsP *fc; /* coin this is about */
struct TALER_CoinSpendPublicKeyP coin_pub;
struct GNUNET_HashCode coin_hash;
char *coin_ev; /* blinded message to be signed (in envelope) for each coin */
@@ -1293,7 +1293,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
tmp = json_array ();
for (i=0;i<md->num_fresh_coins;i++)
{
- const struct TALER_FreshCoinP *fc = &md->fresh_coins[j][i];
+ const struct TALER_PlanchetSecretsP *fc = &md->fresh_coins[j][i];
struct TALER_CoinSpendPublicKeyP coin_pub;
struct GNUNET_HashCode coin_hash;
char *coin_ev; /* blinded message to be signed (in envelope) for each coin */
@@ -1506,7 +1506,7 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshRevealHandle *rrh,
}
for (i=0;i<rrh->md->num_fresh_coins;i++)
{
- const struct TALER_FreshCoinP *fc;
+ const struct TALER_PlanchetSecretsP *fc;
struct TALER_DenominationPublicKey *pk;
json_t *jsonai;
struct GNUNET_CRYPTO_RsaSignature *blind_sig;
diff --git a/src/exchange-lib/exchange_api_refresh_link.c b/src/exchange-lib/exchange_api_refresh_link.c
index 5b7f68674..2c2340eff 100644
--- a/src/exchange-lib/exchange_api_refresh_link.c
+++ b/src/exchange-lib/exchange_api_refresh_link.c
@@ -99,7 +99,7 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh,
GNUNET_JSON_spec_end()
};
struct TALER_TransferSecretP secret;
- struct TALER_FreshCoinP fc;
+ struct TALER_PlanchetSecretsP fc;
/* parse reply */
if (GNUNET_OK !=
@@ -114,7 +114,7 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh,
TALER_link_recover_transfer_secret (trans_pub,
&rlh->coin_priv,
&secret);
- TALER_setup_fresh_coin (&secret,
+ TALER_setup_planchet (&secret,
coin_num,
&fc);
diff --git a/src/exchange/taler-exchange-httpd_refresh_reveal.c b/src/exchange/taler-exchange-httpd_refresh_reveal.c
index 5d857fcae..57ced9bf6 100644
--- a/src/exchange/taler-exchange-httpd_refresh_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refresh_reveal.c
@@ -171,13 +171,13 @@ check_commitment (struct MHD_Connection *connection,
/* Check that the commitments for all new coins were correct */
for (unsigned int j = 0; j < num_newcoins; j++)
{
- struct TALER_FreshCoinP fc;
+ struct TALER_PlanchetSecretsP fc;
struct TALER_CoinSpendPublicKeyP coin_pub;
struct GNUNET_HashCode h_msg;
char *buf;
size_t buf_len;
- TALER_setup_fresh_coin (&transfer_secret,
+ TALER_setup_planchet (&transfer_secret,
j,
&fc);
GNUNET_CRYPTO_eddsa_key_get_public (&fc.coin_priv.eddsa_priv,
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 9e9352f54..90f6f1407 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -522,7 +522,7 @@ TALER_link_recover_transfer_secret (const struct TALER_TransferPublicKeyP *trans
* Header for serializations of coin-specific information about the
* fresh coins we generate during a melt.
*/
-struct TALER_FreshCoinP
+struct TALER_PlanchetSecretsP
{
/**
@@ -548,9 +548,9 @@ struct TALER_FreshCoinP
* @param[out] fc value to initialize
*/
void
-TALER_setup_fresh_coin (const struct TALER_TransferSecretP *secret_seed,
- unsigned int coin_num_salt,
- struct TALER_FreshCoinP *fc);
+TALER_setup_planchet (const struct TALER_TransferSecretP *secret_seed,
+ unsigned int coin_num_salt,
+ struct TALER_PlanchetSecretsP *fc);
diff --git a/src/util/crypto.c b/src/util/crypto.c
index ce5bfac82..527aecbf2 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -178,9 +178,9 @@ TALER_link_recover_transfer_secret (const struct TALER_TransferPublicKeyP *trans
* @param[out] fc value to initialize
*/
void
-TALER_setup_fresh_coin (const struct TALER_TransferSecretP *secret_seed,
+TALER_setup_planchet (const struct TALER_TransferSecretP *secret_seed,
unsigned int coin_num_salt,
- struct TALER_FreshCoinP *fc)
+ struct TALER_PlanchetSecretsP *fc)
{
uint32_t be_salt = htonl (coin_num_salt);
uint8_t *p;
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c
index f28ae8003..76ab5fd25 100644
--- a/src/util/test_crypto.c
+++ b/src/util/test_crypto.c
@@ -40,8 +40,8 @@ test_high_level ()
struct TALER_TransferPublicKeyP trans_pub;
struct TALER_TransferSecretP secret;
struct TALER_TransferSecretP secret2;
- struct TALER_FreshCoinP fc1;
- struct TALER_FreshCoinP fc2;
+ struct TALER_PlanchetSecretsP fc1;
+ struct TALER_PlanchetSecretsP fc2;
pk = GNUNET_CRYPTO_eddsa_key_create ();
coin_priv.eddsa_priv = *pk;
@@ -70,16 +70,16 @@ test_high_level ()
memcmp (&secret,
&secret2,
sizeof (secret)));
- TALER_setup_fresh_coin (&secret,
+ TALER_setup_planchet (&secret,
0,
&fc1);
- TALER_setup_fresh_coin (&secret,
+ TALER_setup_planchet (&secret,
1,
&fc2);
GNUNET_assert (0 !=
memcmp (&fc1,
&fc2,
- sizeof (struct TALER_FreshCoinP)));
+ sizeof (struct TALER_PlanchetSecretsP)));
return 0;
}