summaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-13 15:05:48 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-13 15:05:48 +0100
commit9838e0fc33c0e21cac4b238ae2ab78e386d7d9c2 (patch)
tree0f987b9bde98b88f5e6c0afdee21fff5b4141e7a /src/include/taler_crypto_lib.h
parentb93b9dd074cf347c978b7c58c3ce71d55aa669fd (diff)
downloadexchange-9838e0fc33c0e21cac4b238ae2ab78e386d7d9c2.tar.gz
exchange-9838e0fc33c0e21cac4b238ae2ab78e386d7d9c2.tar.bz2
exchange-9838e0fc33c0e21cac4b238ae2ab78e386d7d9c2.zip
API refactoring towards batch CS
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index b0d6cbf28..2f12a47ba 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -2467,6 +2467,23 @@ TALER_CRYPTO_helper_cs_poll (struct TALER_CRYPTO_CsDenominationHelper *dh);
/**
+ * Information about what we should sign over.
+ */
+struct TALER_CRYPTO_CsSignRequest
+{
+ /**
+ * Hash of the CS public key to use to sign.
+ */
+ const struct TALER_CsPubHashP *h_cs;
+
+ /**
+ * Blinded planchet containing c and the nonce.
+ */
+ const struct TALER_BlindedCsPlanchet *blinded_planchet;
+};
+
+
+/**
* Request helper @a dh to sign @a msg using the public key corresponding to
* @a h_denom_pub.
*
@@ -2477,16 +2494,14 @@ TALER_CRYPTO_helper_cs_poll (struct TALER_CRYPTO_CsDenominationHelper *dh);
* differences in the signature counters. Retrying in this case may work.
*
* @param dh helper process connection
- * @param h_cs hash of the CS public key to use to sign
- * @param blinded_planchet blinded planchet containing c and nonce
+ * @param req information about the key to sign with and the value to sign
* @param[out] bs set to the blind signature
* @return #TALER_EC_NONE on success
*/
enum TALER_ErrorCode
TALER_CRYPTO_helper_cs_sign_melt (
struct TALER_CRYPTO_CsDenominationHelper *dh,
- const struct TALER_CsPubHashP *h_cs,
- const struct TALER_BlindedCsPlanchet *blinded_planchet,
+ const struct TALER_CRYPTO_CsSignRequest *req,
struct TALER_BlindedDenominationSignature *bs);
@@ -2501,16 +2516,14 @@ TALER_CRYPTO_helper_cs_sign_melt (
* differences in the signature counters. Retrying in this case may work.
*
* @param dh helper process connection
- * @param h_cs hash of the CS public key to use to sign
- * @param blinded_planchet blinded planchet containing c and nonce
+ * @param req information about the key to sign with and the value to sign
* @param[out] bs set to the blind signature
* @return #TALER_EC_NONE on success
*/
enum TALER_ErrorCode
TALER_CRYPTO_helper_cs_sign_withdraw (
struct TALER_CRYPTO_CsDenominationHelper *dh,
- const struct TALER_CsPubHashP *h_cs,
- const struct TALER_BlindedCsPlanchet *blinded_planchet,
+ const struct TALER_CRYPTO_CsSignRequest *req,
struct TALER_BlindedDenominationSignature *bs);