summaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-04-02 17:25:04 +0200
committerChristian Grothoff <grothoff@gnunet.org>2022-04-02 17:25:18 +0200
commit6f027fc13099f870e359aaf295f5e4051801c321 (patch)
tree62dae9c5d11ed52f35bc5b7581e93f283dcd24c4 /src/include/taler_crypto_lib.h
parentcaabee9e9482b0e2553172ce17676a0ad89b38ff (diff)
downloadexchange-6f027fc13099f870e359aaf295f5e4051801c321.tar.gz
exchange-6f027fc13099f870e359aaf295f5e4051801c321.tar.bz2
exchange-6f027fc13099f870e359aaf295f5e4051801c321.zip
add additinal signature
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 6b554dfb1..5f425341e 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -2727,6 +2727,43 @@ TALER_wallet_purse_create_verify (
/**
+ * Sign a request to upload an encrypted contract.
+ *
+ * @param econtract encrypted contract
+ * @param econtract_size number of bytes in @a econtract
+ * @param contract_pub public key for the DH-encryption
+ * @param purse_priv key identifying the purse
+ * @param[out] purse_sig resulting signature
+ */
+void
+TALER_wallet_econtract_upload_sign (
+ const void *econtract,
+ size_t econtract_size,
+ const struct TALER_ContractDiffiePublicP *contract_pub,
+ const struct TALER_PurseContractPrivateKeyP *purse_priv,
+ struct TALER_PurseContractSignatureP *purse_sig);
+
+
+/**
+ * Verify a signature over encrypted contract.
+ *
+ * @param econtract encrypted contract
+ * @param econtract_size number of bytes in @a econtract
+ * @param contract_pub public key for the DH-encryption
+ * @param purse_pub purse’s public key
+ * @param purse_sig the signature made with purpose #TALER_SIGNATURE_WALLET_PURSE_CREATE
+ * @return #GNUNET_OK if the signature is valid
+ */
+enum GNUNET_GenericReturnValue
+TALER_wallet_econtract_upload_verify (
+ const void *econtract,
+ size_t econtract_size,
+ const struct TALER_ContractDiffiePublicP *contract_pub,
+ const struct TALER_PurseContractPublicKeyP *purse_pub,
+ const struct TALER_PurseContractSignatureP *purse_sig);
+
+
+/**
* Sign a request to inquire about a purse's status.
*
* @param purse_priv key identifying the purse