aboutsummaryrefslogtreecommitdiff
path: root/src/mint/mint.h
diff options
context:
space:
mode:
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
115}; 115};
116 116
117 117
118/**
119 * Global information for a refreshing session.
120 */
118struct RefreshSession 121struct RefreshSession
119{ 122{
123 /**
124 * Signature over the commitments by the client.
125 */
120 struct GNUNET_CRYPTO_EddsaSignature commit_sig; 126 struct GNUNET_CRYPTO_EddsaSignature commit_sig;
127
128 /**
129 * Public key of the refreshing session, used to sign
130 * the client's commit message.
131 */
121 struct GNUNET_CRYPTO_EddsaPublicKey session_pub; 132 struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
122 int has_commit_sig; 133
134 /**
135 * Number of coins we are melting.
136 */
123 uint16_t num_oldcoins; 137 uint16_t num_oldcoins;
138
139 /**
140 * Number of new coins we are creating.
141 */
124 uint16_t num_newcoins; 142 uint16_t num_newcoins;
143
144 /**
145 * Number of parallel operations we perform for the cut and choose.
146 * (must be greater or equal to three for security).
147 */
125 uint16_t kappa; 148 uint16_t kappa;
149
150 /**
151 * Index (smaller @e kappa) which the mint has chosen to not
152 * have revealed during cut and choose.
153 */
126 uint16_t noreveal_index; 154 uint16_t noreveal_index;
155
156 /**
157 * FIXME.
158 */
159 int has_commit_sig;
160
161 /**
162 * FIXME.
163 */
127 uint8_t reveal_ok; 164 uint8_t reveal_ok;
128}; 165};
129 166
130 167
131/** 168/**
132 * FIXME 169 * For each (old) coin being melted, we have a `struct
170 * RefreshCommitLink` that allows the user to find the shared secret
171 * to decrypt the respective refresh links for the new coins in the
172 * `struct RefreshCommitCoin`.
133 */ 173 */
134struct RefreshCommitLink 174struct RefreshCommitLink
135{ 175{
136 struct GNUNET_CRYPTO_EddsaPublicKey session_pub; 176 /**
177 * Transfer public key (FIXME: explain!)
178 */
137 struct GNUNET_CRYPTO_EcdsaPublicKey transfer_pub; 179 struct GNUNET_CRYPTO_EcdsaPublicKey transfer_pub;
180
181 /**
182 * FIXME: this can't be exactly the shared secret, must
183 * be a commitment to it or something.
184 */
138 struct GNUNET_HashCode shared_secret; 185 struct GNUNET_HashCode shared_secret;
139 uint16_t cnc_index;
140 uint16_t oldcoin_index;
141}; 186};
142 187
143 188
144/** 189/**
145 * FIXME 190 * We have as many `struct RefreshCommitCoin` as there are new
191 * coins being created by the refresh.
146 */ 192 */
147struct RefreshCommitCoin 193struct RefreshCommitCoin
148{ 194{
195
149 /** 196 /**
150 * Refresh session's public key. 197 * Encrypted data allowing those able to decrypt it to derive
198 * the private keys of the new coins created by the refresh.
151 */ 199 */
152 struct GNUNET_CRYPTO_EddsaPublicKey session_pub; 200 struct TALER_RefreshLinkEncrypted *refresh_link;
153
154 struct TALER_RefreshLinkEncrypted refresh_link;
155 201
156 /** 202 /**
157 * Blinded message to be signed (in envelope), with @e coin_env_size bytes. 203 * Blinded message to be signed (in envelope), with @e coin_env_size bytes.
@@ -163,16 +209,6 @@ struct RefreshCommitCoin
163 */ 209 */
164 size_t coin_ev_size; 210 size_t coin_ev_size;
165 211
166 /**
167 * FIXME: needed?
168 */
169 uint16_t cnc_index;
170
171 /**
172 * FIXME: needed?
173 */
174 uint16_t newcoin_index;
175
176}; 212};
177 213
178 214