summaryrefslogtreecommitdiff
path: root/src/mint/mint.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-27 18:35:17 +0100
committerChristian Grothoff <christian@grothoff.org>2015-01-27 18:35:17 +0100
commitc3731d0df7e03561c7da777b5f75ba53206a38b5 (patch)
tree751e00e70f0fde8a7c11faf6fd0a46ed2aaad361 /src/mint/mint.h
parent16817ef0d12ee1b51203f96b0dd3708c1dae3509 (diff)
downloadexchange-c3731d0df7e03561c7da777b5f75ba53206a38b5.tar.gz
exchange-c3731d0df7e03561c7da777b5f75ba53206a38b5.tar.bz2
exchange-c3731d0df7e03561c7da777b5f75ba53206a38b5.zip
implementing varsize link data
Diffstat (limited to 'src/mint/mint.h')
-rw-r--r--src/mint/mint.h76
1 files changed, 56 insertions, 20 deletions
diff --git a/src/mint/mint.h b/src/mint/mint.h
index b194be687..010ff4d5f 100644
--- a/src/mint/mint.h
+++ b/src/mint/mint.h
@@ -115,43 +115,89 @@ struct CollectableBlindcoin
};
+/**
+ * Global information for a refreshing session.
+ */
struct RefreshSession
{
+ /**
+ * Signature over the commitments by the client.
+ */
struct GNUNET_CRYPTO_EddsaSignature commit_sig;
+
+ /**
+ * Public key of the refreshing session, used to sign
+ * the client's commit message.
+ */
struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
- int has_commit_sig;
+
+ /**
+ * Number of coins we are melting.
+ */
uint16_t num_oldcoins;
+
+ /**
+ * Number of new coins we are creating.
+ */
uint16_t num_newcoins;
+
+ /**
+ * Number of parallel operations we perform for the cut and choose.
+ * (must be greater or equal to three for security).
+ */
uint16_t kappa;
+
+ /**
+ * Index (smaller @e kappa) which the mint has chosen to not
+ * have revealed during cut and choose.
+ */
uint16_t noreveal_index;
+
+ /**
+ * FIXME.
+ */
+ int has_commit_sig;
+
+ /**
+ * FIXME.
+ */
uint8_t reveal_ok;
};
/**
- * FIXME
+ * For each (old) coin being melted, we have a `struct
+ * RefreshCommitLink` that allows the user to find the shared secret
+ * to decrypt the respective refresh links for the new coins in the
+ * `struct RefreshCommitCoin`.
*/
struct RefreshCommitLink
{
- struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
+ /**
+ * Transfer public key (FIXME: explain!)
+ */
struct GNUNET_CRYPTO_EcdsaPublicKey transfer_pub;
+
+ /**
+ * FIXME: this can't be exactly the shared secret, must
+ * be a commitment to it or something.
+ */
struct GNUNET_HashCode shared_secret;
- uint16_t cnc_index;
- uint16_t oldcoin_index;
};
/**
- * FIXME
+ * We have as many `struct RefreshCommitCoin` as there are new
+ * coins being created by the refresh.
*/
struct RefreshCommitCoin
{
+
/**
- * Refresh session's public key.
+ * Encrypted data allowing those able to decrypt it to derive
+ * the private keys of the new coins created by the refresh.
*/
- struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
-
- struct TALER_RefreshLinkEncrypted refresh_link;
+ struct TALER_RefreshLinkEncrypted *refresh_link;
/**
* Blinded message to be signed (in envelope), with @e coin_env_size bytes.
@@ -163,16 +209,6 @@ struct RefreshCommitCoin
*/
size_t coin_ev_size;
- /**
- * FIXME: needed?
- */
- uint16_t cnc_index;
-
- /**
- * FIXME: needed?
- */
- uint16_t newcoin_index;
-
};