aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_error_codes.h7
-rw-r--r--src/include/taler_exchangedb_plugin.h14
-rw-r--r--src/include/taler_signatures.h46
3 files changed, 63 insertions, 4 deletions
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index fbd983520..5767a73b2 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -617,7 +617,14 @@ enum TALER_ErrorCode
*/
TALER_EC_REFRESH_REVEAL_FRESH_DENOMINATION_KEY_NOT_FOUND = 1361,
+ /**
+ * The signature made with the coin over the link data is invalid.
+ * This response is provided with HTTP status code
+ * MHD_HTTP_BAD_REQUEST.
+ */
+ TALER_EC_REFRESH_REVEAL_LINK_SIGNATURE_INVALID = 1362,
+
/**
* The coin specified in the link request is unknown to the exchange.
* This response is provided with HTTP status code
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 6f1625dd0..67ebc62fc 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -541,6 +541,12 @@ struct TALER_EXCHANGEDB_LinkDataList
* Signature over the blinded envelope.
*/
struct TALER_DenominationSignature ev_sig;
+
+ /**
+ * Signature of the original coin being refreshed over the
+ * link data, of type #TALER_SIGNATURE_WALLET_COIN_LINK
+ */
+ struct TALER_CoinSpendSignatureP orig_coin_link_sig;
};
@@ -794,6 +800,12 @@ struct TALER_EXCHANGEDB_RefreshRevealedCoin
struct TALER_DenominationPublicKey denom_pub;
/**
+ * Signature of the original coin being refreshed over the
+ * link data, of type #TALER_SIGNATURE_WALLET_COIN_LINK
+ */
+ struct TALER_CoinSpendSignatureP orig_coin_link_sig;
+
+ /**
* Blinded message to be signed (in envelope), with @e coin_env_size bytes.
*/
char *coin_ev;
@@ -1634,7 +1646,7 @@ struct TALER_EXCHANGEDB_Plugin
/**
- * Lookup refresh metl commitment data under the given @a rc.
+ * Lookup refresh melt commitment data under the given @a rc.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param session database handle to use
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index bff73f737..b738e3156 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -130,9 +130,9 @@
#define TALER_SIGNATURE_EXCHANGE_RESERVE_CLOSED 1040
-/*********************/
-/* Wallet signatures */
-/*********************/
+/**********************/
+/* Auditor signatures */
+/**********************/
/**
* Signature where the auditor confirms that he is
@@ -209,6 +209,11 @@
*/
#define TALER_SIGNATURE_WALLET_COIN_PAYBACK 1203
+/**
+ * Signature using a coin key authenticating link data.
+ */
+#define TALER_SIGNATURE_WALLET_COIN_LINK 1204
+
/*******************/
/* Test signatures */
@@ -229,6 +234,41 @@
GNUNET_NETWORK_STRUCT_BEGIN
/**
+ * @brief Format used for to allow the wallet to authenticate
+ * link data provided by the exchange.
+ */
+struct TALER_LinkDataPS
+{
+
+ /**
+ * Purpose must be #TALER_SIGNATURE_WALLET_COIN_LINK.
+ * Used with an EdDSA signature of a `struct TALER_CoinPublicKeyP`.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+ /**
+ * Hash of the denomination public key of the new coin.
+ */
+ struct GNUNET_HashCode h_denom_pub;
+
+ /**
+ * Public key of the old coin being refreshed.
+ */
+ struct TALER_CoinSpendPublicKeyP old_coin_pub;
+
+ /**
+ * Transfer public key (for which the private key was not revealed)
+ */
+ struct TALER_TransferPublicKeyP transfer_pub;
+
+ /**
+ * Hash of the blinded new coin.
+ */
+ struct GNUNET_HashCode coin_envelope_hash;
+};
+
+
+/**
* @brief Format used for to generate the signature on a request to withdraw
* coins from a reserve.
*/