aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_util.h')
-rw-r--r--src/include/taler_util.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
index ab5ee11df..5ee90a6cc 100644
--- a/src/include/taler_util.h
+++ b/src/include/taler_util.h
@@ -251,6 +251,47 @@ TALER_data_to_string_alloc (const void *buf,
251 size_t size); 251 size_t size);
252 252
253 253
254/* ****************** Coin crypto primitives ************* */
255
256/**
257 * Public information about a coin (including the public key
258 * of the coin, the denomination key and the signature with
259 * the denomination key).
260 */
261struct TALER_CoinPublicInfo
262{
263 /**
264 * The coin's public key.
265 */
266 struct GNUNET_CRYPTO_EcdsaPublicKey coin_pub;
267
268 /**
269 * Public key representing the denomination of the coin
270 * that is being deposited.
271 */
272 struct GNUNET_CRYPTO_rsa_PublicKey *denom_pub;
273
274 /**
275 * (Unblinded) signature over @e coin_pub with @e denom_pub,
276 * which demonstrates that the coin is valid.
277 */
278 struct GNUNET_CRYPTO_rsa_Signature *denom_sig;
279};
280
281
282/**
283 * Check if a coin is valid; that is, whether the denomination key exists,
284 * is not expired, and the signature is correct.
285 *
286 * @param coin_public_info the coin public info to check for validity
287 * @return #GNUNET_YES if the coin is valid,
288 * #GNUNET_NO if it is invalid
289 * #GNUNET_SYSERROR if an internal error occured
290 */
291int
292TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info);
293
294
254/* ****************** Refresh crypto primitives ************* */ 295/* ****************** Refresh crypto primitives ************* */
255 296
256/** 297/**