From 55959bd01d636d324077d4201df0beca676e8d58 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 24 Mar 2015 16:56:06 +0100 Subject: address #3708: melt_hash => session_hash, use session_hash for DB access, not session_pub --- src/include/taler_crypto_lib.h | 48 ++++++++++++++++++++++++++---------------- src/include/taler_signatures.h | 4 ++-- 2 files changed, 32 insertions(+), 20 deletions(-) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 0c0ad8865..a7e902777 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -27,6 +27,8 @@ /* ****************** Coin crypto primitives ************* */ +GNUNET_NETWORK_STRUCT_BEGIN + /** * Type of public keys for Taler reserves. */ @@ -269,6 +271,10 @@ struct TALER_CoinSpendSignature }; +GNUNET_NETWORK_STRUCT_END + + + /** * Type of blinding keys for Taler. */ @@ -358,6 +364,9 @@ TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info); /* ****************** Refresh crypto primitives ************* */ + +GNUNET_NETWORK_STRUCT_BEGIN + /** * Secret used to decrypt the key to decrypt link secrets. */ @@ -397,45 +406,48 @@ struct TALER_EncryptedLinkSecret /** - * Representation of an encrypted refresh link. + * Representation of an refresh link in cleartext. */ -struct TALER_RefreshLinkEncrypted +struct TALER_RefreshLinkDecrypted { /** - * Encrypted blinding key with @e blinding_key_enc_size bytes, - * must be allocated at the end of this struct. - */ - const char *blinding_key_enc; - - /** - * Number of bytes in @e blinding_key_enc. + * Private key of the coin. */ - size_t blinding_key_enc_size; + struct TALER_CoinSpendPrivateKey coin_priv; /** - * Encrypted private key of the coin. + * Blinding key. */ - char coin_priv_enc[sizeof (struct TALER_CoinSpendPrivateKey)]; + struct TALER_DenominationBlindingKey blinding_key; }; +GNUNET_NETWORK_STRUCT_END + + /** - * Representation of an refresh link in cleartext. + * Representation of an encrypted refresh link. */ -struct TALER_RefreshLinkDecrypted +struct TALER_RefreshLinkEncrypted { /** - * Private key of the coin. + * Encrypted blinding key with @e blinding_key_enc_size bytes, + * must be allocated at the end of this struct. */ - struct TALER_CoinSpendPrivateKey coin_priv; + const char *blinding_key_enc; /** - * Blinding key. + * Number of bytes in @e blinding_key_enc. */ - struct TALER_DenominationBlindingKey blinding_key; + size_t blinding_key_enc_size; + + /** + * Encrypted private key of the coin. + */ + char coin_priv_enc[sizeof (struct TALER_CoinSpendPrivateKey)]; }; diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 51134bf26..fa713dc42 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -253,9 +253,9 @@ struct RefreshMeltCoinSignature struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * Which melting operation should the coin become a part of. + * Which melting session should the coin become a part of. */ - struct GNUNET_HashCode melt_hash; + struct GNUNET_HashCode session_hash; /** * How much of the value of the coin should be melted? This amount -- cgit v1.2.3