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.h58
1 files changed, 42 insertions, 16 deletions
diff --git a/src/mint/mint.h b/src/mint/mint.h
index 39dda7d5f..1dc179340 100644
--- a/src/mint/mint.h
+++ b/src/mint/mint.h
@@ -29,7 +29,6 @@
29#include <gnunet/gnunet_common.h> 29#include <gnunet/gnunet_common.h>
30#include <libpq-fe.h> 30#include <libpq-fe.h>
31#include "taler_util.h" 31#include "taler_util.h"
32#include "taler_rsa.h"
33#include "taler_signatures.h" 32#include "taler_signatures.h"
34 33
35#define DIR_SIGNKEYS "signkeys" 34#define DIR_SIGNKEYS "signkeys"
@@ -55,7 +54,7 @@ struct TALER_MINT_DenomKeyIssuePriv
55 * The private key of the denomination. Will be NULL if the private key is 54 * The private key of the denomination. Will be NULL if the private key is
56 * not available. 55 * not available.
57 */ 56 */
58 struct TALER_RSA_PrivateKey *denom_priv; 57 struct GNUNET_CRYPTO_rsa_PrivateKey *denom_priv;
59 58
60 struct TALER_MINT_DenomKeyIssue issue; 59 struct TALER_MINT_DenomKeyIssue issue;
61}; 60};
@@ -75,26 +74,43 @@ struct TALER_CoinPublicInfo
75 /* 74 /*
76 * The public key signifying the coin's denomination. 75 * The public key signifying the coin's denomination.
77 */ 76 */
78 struct TALER_RSA_PublicKeyBinaryEncoded denom_pub; 77 struct GNUNET_CRYPTO_rsa_PublicKey *denom_pub;
79 78
80 /** 79 /**
81 * Signature over coin_pub by denom_pub. 80 * Signature over coin_pub by denom_pub.
82 */ 81 */
83 struct TALER_RSA_Signature denom_sig; 82 struct GNUNET_CRYPTO_rsa_Signature *denom_sig;
84}; 83};
85 84
86 85
87 86
87/**
88 * Information we keep for a withdrawn coin to reproduce
89 * the /withdraw operation if needed, and to have proof
90 * that a reserve was drained by this amount.
91 */
92struct CollectableBlindcoin
93{
88 94
95 /**
96 * Our signature over the (blinded) coin.
97 */
98 struct GNUNET_CRYPTO_rsa_Signature *sig;
89 99
100 /**
101 * Denomination key (which coin was generated).
102 */
103 struct GNUNET_CRYPOT_rsa_PublicKey *denom_pub;
90 104
91 105 /**
92struct CollectableBlindcoin 106 * Public key of the reserve that was drained.
93{ 107 */
94 struct TALER_RSA_BlindedSignaturePurpose ev;
95 struct TALER_RSA_Signature ev_sig;
96 struct TALER_RSA_PublicKeyBinaryEncoded denom_pub;
97 struct GNUNET_CRYPTO_EddsaPublicKey reserve_pub; 108 struct GNUNET_CRYPTO_EddsaPublicKey reserve_pub;
109
110 /**
111 * Signature confirming the withdrawl, matching @e reserve_pub,
112 * @e denom_pub and @e h_blind.
113 */
98 struct GNUNET_CRYPTO_EddsaSignature reserve_sig; 114 struct GNUNET_CRYPTO_EddsaSignature reserve_sig;
99}; 115};
100 116
@@ -127,7 +143,7 @@ struct RefreshCommitLink
127struct LinkData 143struct LinkData
128{ 144{
129 struct GNUNET_CRYPTO_EcdsaPrivateKey coin_priv; 145 struct GNUNET_CRYPTO_EcdsaPrivateKey coin_priv;
130 struct TALER_RSA_BlindingKeyBinaryEncoded bkey_enc; 146 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey_enc;
131}; 147};
132 148
133 149
@@ -149,7 +165,17 @@ GNUNET_NETWORK_STRUCT_END
149struct RefreshCommitCoin 165struct RefreshCommitCoin
150{ 166{
151 struct GNUNET_CRYPTO_EddsaPublicKey session_pub; 167 struct GNUNET_CRYPTO_EddsaPublicKey session_pub;
152 struct TALER_RSA_BlindedSignaturePurpose coin_ev; 168
169 /**
170 * Blinded message to be signed (in envelope).
171 */
172 char *coin_ev;
173
174 /**
175 * Number of bytes in @e coin_ev.
176 */
177 size_t coin_ev_size;
178
153 uint16_t cnc_index; 179 uint16_t cnc_index;
154 uint16_t newcoin_index; 180 uint16_t newcoin_index;
155 char link_enc[sizeof (struct LinkData)]; 181 char link_enc[sizeof (struct LinkData)];
@@ -177,17 +203,17 @@ struct Deposit
177 /* FIXME: should be TALER_CoinPublicInfo */ 203 /* FIXME: should be TALER_CoinPublicInfo */
178 struct GNUNET_CRYPTO_EddsaPublicKey coin_pub; 204 struct GNUNET_CRYPTO_EddsaPublicKey coin_pub;
179 205
180 struct TALER_RSA_PublicKeyBinaryEncoded denom_pub; 206 struct GNUNET_CRYPTO_rsa_PublicKey *denom_pub;
181 207
182 struct TALER_RSA_Signature coin_sig; 208 struct GNUNET_CRYPTO_rsa_Signature *coin_sig;
183 209
184 struct TALER_RSA_Signature ubsig; 210 struct GNUNET_CRYPTO_rsa_Signature *ubsig; // ???
185 211
186 /** 212 /**
187 * Type of the deposit (also purpose of the signature). Either 213 * Type of the deposit (also purpose of the signature). Either
188 * #TALER_SIGNATURE_DEPOSIT or #TALER_SIGNATURE_INCREMENTAL_DEPOSIT. 214 * #TALER_SIGNATURE_DEPOSIT or #TALER_SIGNATURE_INCREMENTAL_DEPOSIT.
189 */ 215 */
190 struct TALER_RSA_SignaturePurpose purpose; 216 // struct TALER_RSA_SignaturePurpose purpose; // FIXME: bad type!
191 217
192 uint64_t transaction_id; 218 uint64_t transaction_id;
193 219