summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_keys.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.h')
-rw-r--r--src/exchange/taler-exchange-httpd_keys.h64
1 files changed, 52 insertions, 12 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.h b/src/exchange/taler-exchange-httpd_keys.h
index 01ba1f951..24ba1467c 100644
--- a/src/exchange/taler-exchange-httpd_keys.h
+++ b/src/exchange/taler-exchange-httpd_keys.h
@@ -246,40 +246,80 @@ TEH_keys_denomination_by_hash2 (
struct MHD_Connection *conn,
MHD_RESULT *mret);
+/**
+ * Information needed to create a blind signature.
+ */
+struct TEH_CoinSignData
+{
+ /**
+ * Hash of key to sign with.
+ */
+ const struct TALER_DenominationHashP *h_denom_pub;
+
+ /**
+ * Blinded planchet to sign over.
+ */
+ const struct TALER_BlindedPlanchet *bp;
+};
+
/**
- * Request to sign @a msg using the public key corresponding to
- * @a h_denom_pub during a withdraw operation.
+ * Request to sign @a csd for regular withdrawing.
*
- * @param h_denom_pub hash of the public key to use to sign
- * @param bp blinded planchet to sign
+ * @param csd identifies data to blindly sign and key to sign with
* @param[out] bs set to the blind signature on success
* @return #TALER_EC_NONE on success
*/
enum TALER_ErrorCode
TEH_keys_denomination_sign_withdraw (
- const struct TALER_DenominationHashP *h_denom_pub,
- const struct TALER_BlindedPlanchet *bp,
+ const struct TEH_CoinSignData *csd,
struct TALER_BlindedDenominationSignature *bs);
/**
- * Request to sign @a msg using the public key corresponding to
- * @a h_denom_pub during a refresh operation.
+ * Request to sign @a csds for regular withdrawing.
+ *
+ * @param csds array with data to blindly sign (and keys to sign with)
+ * @param csds_length length of @a csds array
+ * @param[out] bss array set to the blind signature on success; must be of length @a csds_length
+ * @return #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TEH_keys_denomination_batch_sign_withdraw (
+ const struct TEH_CoinSignData *csds,
+ unsigned int csds_length,
+ struct TALER_BlindedDenominationSignature *bss);
+
+
+/**
+ * Request to sign @a csd for melting.
*
- * @param h_denom_pub hash of the public key to use to sign
- * @param bp blinded planchet to sign
+ * @param csd identifies data to blindly sign and key to sign with
* @param[out] bs set to the blind signature on success
* @return #TALER_EC_NONE on success
*/
enum TALER_ErrorCode
TEH_keys_denomination_sign_melt (
- const struct TALER_DenominationHashP *h_denom_pub,
- const struct TALER_BlindedPlanchet *bp,
+ const struct TEH_CoinSignData *csd,
struct TALER_BlindedDenominationSignature *bs);
/**
+ * Request to sign @a csds for melting.
+ *
+ * @param csds array with data to blindly sign (and keys to sign with)
+ * @param csds_length length of @a csds array
+ * @param[out] bss array set to the blind signature on success; must be of length @a csds_length
+ * @return #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TEH_keys_denomination_batch_sign_melt (
+ const struct TEH_CoinSignData *csds,
+ unsigned int csds_length,
+ struct TALER_BlindedDenominationSignature *bss);
+
+
+/**
* Request to derive CS @a r_pub using the denomination corresponding to @a h_denom_pub
* and @a nonce for withdrawing.
*