diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-10 17:00:12 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-10 17:00:12 +0100 |
commit | 7e26ae385896a974d8a90234a155c32b383e70f7 (patch) | |
tree | 1bbcf3e317744c9fa024bba5a6e46c84520dc9e5 /src/include/taler_signatures.h | |
parent | e3b8f5117e8028f3183871ab0efb0c6f2ff959eb (diff) |
clean up refresh logic and use of signatures
Diffstat (limited to 'src/include/taler_signatures.h')
-rw-r--r-- | src/include/taler_signatures.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 9e3068a78..b1b578236 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -65,7 +65,7 @@ * Signature where the refresh session confirms * the commits. */ -#define TALER_SIGNATURE_REFRESH_MELT 6 +#define TALER_SIGNATURE_REFRESH_MELT_SESSION 6 /** * Signature where the mint (current signing key) @@ -221,7 +221,7 @@ struct TALER_DepositConfirmation struct GNUNET_CRYPTO_EcdsaPublicKey coin_pub; /** - * The Merachant's public key. + * The Merchant's public key. */ struct GNUNET_CRYPTO_EddsaPublicKey merchant; @@ -232,7 +232,7 @@ struct TALER_DepositConfirmation * Message signed by a coin to indicate that the coin should * be melted. */ -struct RefreshMeltSignatureBody +struct RefreshMeltCoinSignature { /** * Purpose is #TALER_SIGNATURE_REFRESH_MELT_COIN. @@ -245,42 +245,46 @@ struct RefreshMeltSignatureBody struct GNUNET_HashCode melt_hash; /** - * Signature of the client over the melt request (thereby - * indirectly including all of the information the client - * sent). - */ - struct GNUNET_CRYPTO_EddsaSignature melt_client_signature; - - /** - * Public key of the refresh session for which - * @e melt_client_signature must be a valid signature. - */ - struct GNUNET_CRYPTO_EddsaPublicKey session_key; - - /** * How much of the value of the coin should be melted? * This amount includes the fees, so the final amount contributed * to the melt is this value minus the fee for melting the coin. */ struct TALER_AmountNBO amount; + + /** + * The coin's public key. + */ + struct GNUNET_CRYPTO_EcdsaPublicKey coin_pub; }; /** - * Message signed during melting committing the client to the - * hashed inputs. + * Message signed by a coin to indicate that the coin should + * be melted. */ -struct RefreshCommitSignatureBody +struct RefreshMeltSessionSignature { /** - * Purpose is #TALER_SIGNATURE_REFRESH_MELT. + * Purpose is #TALER_SIGNATURE_REFRESH_MELT_SESSION */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * Session state the client commits itself to. + * Which melting operation should the coin become a part of. + */ + struct GNUNET_HashCode melt_hash; + + /** + * Public key of the refresh session for which + * @e melt_client_signature must be a valid signature. */ - struct GNUNET_HashCode commit_hash; + struct GNUNET_CRYPTO_EddsaPublicKey session_key; + + /** + * What is the total value of the coins created during the + * refresh, excluding fees? + */ + struct TALER_AmountNBO amount; }; |