summaryrefslogtreecommitdiff
path: root/src/include/taler_signatures.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_signatures.h')
-rw-r--r--src/include/taler_signatures.h105
1 files changed, 71 insertions, 34 deletions
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index 905d1ed23..8984165e6 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -266,83 +266,120 @@ struct RefreshMeltResponseSignatureBody
};
-
-
-
/**
- * FIXME
+ * Message signed by a coin to indicate that the coin should
+ * be melted.
*/
-struct TALER_MINT_SignKeyIssue
+struct RefreshMeltSignatureBody
{
- struct GNUNET_CRYPTO_EddsaSignature signature;
+ /**
+ * Purpose is #TALER_SIGNATURE_REFRESH_MELT.
+ */
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- struct GNUNET_CRYPTO_EddsaPublicKey master_pub;
- struct GNUNET_TIME_AbsoluteNBO start;
- struct GNUNET_TIME_AbsoluteNBO expire;
- struct GNUNET_CRYPTO_EddsaPublicKey signkey_pub;
+
+ /**
+ * Which melting operation should the coin become a part of.
+ */
+ struct GNUNET_HashCode melt_hash;
+
+ /**
+ * 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;
};
/**
- * FIXME
+ * Message signed during melting committing the client to the
+ * hashed inputs.
*/
-struct TALER_MINT_DenomKeyIssue
+struct RefreshCommitSignatureBody
{
- struct GNUNET_CRYPTO_EddsaSignature signature;
+ /**
+ * Purpose is #TALER_SIGNATURE_REFRESH_COMMIT.
+ */
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- struct GNUNET_CRYPTO_EddsaPublicKey master;
- struct GNUNET_TIME_AbsoluteNBO start;
- struct GNUNET_TIME_AbsoluteNBO expire_withdraw;
- struct GNUNET_TIME_AbsoluteNBO expire_spend;
- // FIXME: does not work like this:
- struct GNUNET_CRYPTO_rsa_PublicKey * denom_pub;
- struct TALER_AmountNBO value;
- struct TALER_AmountNBO fee_withdraw;
- struct TALER_AmountNBO fee_deposit;
- struct TALER_AmountNBO fee_refresh;
+
+ /**
+ * Session state the client commits itself to.
+ */
+ struct GNUNET_HashCode commit_hash;
};
/**
- * FIXME
+ * Message signed by the mint, committing it to a particular
+ * index to not be revealed during the refresh.
*/
-struct RefreshMeltSignatureBody
+struct RefreshCommitResponseSignatureBody
{
+ /**
+ * Purpose is #TALER_SIGNATURE_REFRESH_MELT_RESPONSE.
+ */
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- struct GNUNET_HashCode melt_hash;
+
+ /**
+ * Index that the client will not have to reveal.
+ */
+ uint16_t noreveal_index GNUNET_PACKED;
};
+
/**
- * FIXME
+ * Message signed by the client requesting the final
+ * result of the melting operation.
*/
-struct RefreshCommitSignatureBody
+struct RefreshMeltConfirmSignRequestBody
{
+ /**
+ * Purpose is #TALER_SIGNATURE_REFRESH_MELT_CONFIRM.
+ */
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- struct GNUNET_HashCode commit_hash;
+
+ /**
+ * FIXME.
+ */
+ struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
};
/**
* FIXME
*/
-struct RefreshCommitResponseSignatureBody
+struct TALER_MINT_SignKeyIssue
{
+ struct GNUNET_CRYPTO_EddsaSignature signature;
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- uint16_t noreveal_index;
+ struct GNUNET_CRYPTO_EddsaPublicKey master_pub;
+ struct GNUNET_TIME_AbsoluteNBO start;
+ struct GNUNET_TIME_AbsoluteNBO expire;
+ struct GNUNET_CRYPTO_EddsaPublicKey signkey_pub;
};
-
/**
* FIXME
*/
-struct RefreshMeltConfirmSignRequestBody
+struct TALER_MINT_DenomKeyIssue
{
+ struct GNUNET_CRYPTO_EddsaSignature signature;
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
+ struct GNUNET_CRYPTO_EddsaPublicKey master;
+ struct GNUNET_TIME_AbsoluteNBO start;
+ struct GNUNET_TIME_AbsoluteNBO expire_withdraw;
+ struct GNUNET_TIME_AbsoluteNBO expire_spend;
+ // FIXME: does not work like this:
+ struct GNUNET_CRYPTO_rsa_PublicKey * denom_pub;
+ struct TALER_AmountNBO value;
+ struct TALER_AmountNBO fee_withdraw;
+ struct TALER_AmountNBO fee_deposit;
+ struct TALER_AmountNBO fee_refresh;
};
+
GNUNET_NETWORK_STRUCT_END
#endif