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.h73
1 files changed, 39 insertions, 34 deletions
diff --git a/src/mint/mint.h b/src/mint/mint.h
index 3f98b368d..b194be687 100644
--- a/src/mint/mint.h
+++ b/src/mint/mint.h
@@ -117,9 +117,9 @@ struct CollectableBlindcoin
117 117
118struct RefreshSession 118struct RefreshSession
119{ 119{
120 int has_commit_sig;
121 struct GNUNET_CRYPTO_EddsaSignature commit_sig; 120 struct GNUNET_CRYPTO_EddsaSignature commit_sig;
122 struct GNUNET_CRYPTO_EddsaPublicKey session_pub; 121 struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
122 int has_commit_sig;
123 uint16_t num_oldcoins; 123 uint16_t num_oldcoins;
124 uint16_t num_newcoins; 124 uint16_t num_newcoins;
125 uint16_t kappa; 125 uint16_t kappa;
@@ -128,46 +128,33 @@ struct RefreshSession
128}; 128};
129 129
130 130
131#define TALER_REFRESH_SHARED_SECRET_LENGTH (sizeof (struct GNUNET_HashCode)) 131/**
132#define TALER_REFRESH_LINK_LENGTH (sizeof (struct LinkData)) 132 * FIXME
133 133 */
134struct RefreshCommitLink 134struct RefreshCommitLink
135{ 135{
136 struct GNUNET_CRYPTO_EddsaPublicKey session_pub; 136 struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
137 struct GNUNET_CRYPTO_EcdsaPublicKey transfer_pub; 137 struct GNUNET_CRYPTO_EcdsaPublicKey transfer_pub;
138 struct GNUNET_HashCode shared_secret;
138 uint16_t cnc_index; 139 uint16_t cnc_index;
139 uint16_t oldcoin_index; 140 uint16_t oldcoin_index;
140 char shared_secret_enc[sizeof (struct GNUNET_HashCode)];
141};
142
143struct LinkData
144{
145 struct GNUNET_CRYPTO_EcdsaPrivateKey coin_priv;
146 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey_enc;
147}; 141};
148 142
149 143
150GNUNET_NETWORK_STRUCT_BEGIN 144/**
151 145 * FIXME
152struct SharedSecretEnc 146 */
153{
154 char data[TALER_REFRESH_SHARED_SECRET_LENGTH];
155};
156
157
158struct LinkDataEnc
159{
160 char data[sizeof (struct LinkData)];
161};
162
163GNUNET_NETWORK_STRUCT_END
164
165struct RefreshCommitCoin 147struct RefreshCommitCoin
166{ 148{
149 /**
150 * Refresh session's public key.
151 */
167 struct GNUNET_CRYPTO_EddsaPublicKey session_pub; 152 struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
168 153
154 struct TALER_RefreshLinkEncrypted refresh_link;
155
169 /** 156 /**
170 * Blinded message to be signed (in envelope). 157 * Blinded message to be signed (in envelope), with @e coin_env_size bytes.
171 */ 158 */
172 char *coin_ev; 159 char *coin_ev;
173 160
@@ -176,22 +163,36 @@ struct RefreshCommitCoin
176 */ 163 */
177 size_t coin_ev_size; 164 size_t coin_ev_size;
178 165
166 /**
167 * FIXME: needed?
168 */
179 uint16_t cnc_index; 169 uint16_t cnc_index;
170
171 /**
172 * FIXME: needed?
173 */
180 uint16_t newcoin_index; 174 uint16_t newcoin_index;
181 char link_enc[sizeof (struct LinkData)]; 175
182}; 176};
183 177
184 178
179/**
180 * FIXME
181 */
185struct KnownCoin 182struct KnownCoin
186{ 183{
187 struct TALER_CoinPublicInfo public_info; 184 struct TALER_CoinPublicInfo public_info;
188 struct TALER_Amount expended_balance; 185
189 int is_refreshed;
190 /** 186 /**
191 * Refreshing session, only valid if 187 * Refreshing session, only valid if
192 * is_refreshed==1. 188 * is_refreshed==1.
193 */ 189 */
194 struct GNUNET_CRYPTO_EddsaPublicKey refresh_session_pub; 190 struct GNUNET_CRYPTO_EddsaPublicKey refresh_session_pub;
191
192 struct TALER_Amount expended_balance;
193
194 int is_refreshed;
195
195}; 196};
196 197
197 198
@@ -356,11 +357,15 @@ TALER_MINT_config_load (const char *mint_base_dir);
356 357
357 358
358int 359int
359TALER_TALER_DB_extract_amount (PGresult *result, unsigned int row, 360TALER_TALER_DB_extract_amount (PGresult *result,
360 int indices[3], struct TALER_Amount *denom); 361 unsigned int row,
362 int indices[3],
363 struct TALER_Amount *denom);
361 364
362int 365int
363TALER_TALER_DB_extract_amount_nbo (PGresult *result, unsigned int row, 366TALER_TALER_DB_extract_amount_nbo (PGresult *result,
364 int indices[3], struct TALER_AmountNBO *denom_nbo); 367 unsigned int row,
368 int indices[3],
369 struct TALER_AmountNBO *denom_nbo);
365 370
366#endif /* _MINT_H */ 371#endif /* _MINT_H */