summaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-10 00:54:12 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-10 00:54:12 +0100
commitca66a1d1af2412e3ad04c18150db7a259dc69b5e (patch)
tree83421873e49eec67f7012b4e21b21f31a3c9fa3a /src/include/taler_crypto_lib.h
parent02ecf68a3d9edde9ef48650f64b7332af845beee (diff)
downloadexchange-ca66a1d1af2412e3ad04c18150db7a259dc69b5e.tar.gz
exchange-ca66a1d1af2412e3ad04c18150db7a259dc69b5e.tar.bz2
exchange-ca66a1d1af2412e3ad04c18150db7a259dc69b5e.zip
fix major bug with SQL statement missing ORDER BY freshcoin_index resulting in possible link failures (but usually lucky with old DB schema)
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 70e49697..4ea845b4 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -1050,6 +1050,47 @@ TALER_CRYPTO_helper_esign_disconnect (
struct TALER_CRYPTO_ExchangeSignHelper *esh);
+/* ********************* wallet signing ************************** */
+
+/**
+ * Sign link data.
+ *
+ * @param h_denom_pub hash of the denomiantion public key of the new coin
+ * @param transfer_pub transfer public key
+ * @param coin_ev coin envelope
+ * @param coin_ev_size number of bytes in @a coin_ev
+ * @param old_coin_priv private key to sign with
+ * @param[out] coin_sig resulting signature
+ */
+void
+TALER_wallet_link_sign (const struct GNUNET_HashCode *h_denom_pub,
+ const struct TALER_TransferPublicKeyP *transfer_pub,
+ const void *coin_ev,
+ size_t coin_ev_size,
+ const struct TALER_CoinSpendPrivateKeyP *old_coin_priv,
+ struct TALER_CoinSpendSignatureP *coin_sig);
+
+
+/**
+ * Verify link signature.
+ *
+ * @param h_denom_pub hash of the denomiantion public key of the new coin
+ * @param transfer_pub transfer public key
+ * @param coin_ev coin envelope
+ * @param coin_ev_size number of bytes in @a coin_ev
+ * @param old_coin_priv private key to sign with
+ * @param coin_sig resulting signature
+ * @return #GNUNET_OK if the signature is valid
+ */
+enum GNUNET_GenericReturnValue
+TALER_wallet_link_verify (
+ const struct GNUNET_HashCode *h_denom_pub,
+ const struct TALER_TransferPublicKeyP *transfer_pub,
+ const void *coin_ev,
+ size_t coin_ev_size,
+ const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
+ const struct TALER_CoinSpendSignatureP *coin_sig);
+
/* ********************* offline signing ************************** */