summaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-13 19:03:52 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-13 19:03:52 +0100
commit18aba0abbb427a2e0e76ae88f95fef493e74032d (patch)
treeb0697930108889d89ddbcf5c6c4ab2b40737de69 /src/include/taler_crypto_lib.h
parent9838e0fc33c0e21cac4b238ae2ab78e386d7d9c2 (diff)
downloadexchange-18aba0abbb427a2e0e76ae88f95fef493e74032d.tar.gz
exchange-18aba0abbb427a2e0e76ae88f95fef493e74032d.tar.bz2
exchange-18aba0abbb427a2e0e76ae88f95fef493e74032d.zip
add batch logic to taler-exchange-secmod-cs
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h52
1 files changed, 48 insertions, 4 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 2f12a47ba..8027181fd 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -2484,8 +2484,7 @@ struct TALER_CRYPTO_CsSignRequest
/**
- * Request helper @a dh to sign @a msg using the public key corresponding to
- * @a h_denom_pub.
+ * Request helper @a dh to sign @a req.
*
* This operation will block until the signature has been obtained. Should
* this process receive a signal (that is not ignored) while the operation is
@@ -2506,8 +2505,30 @@ TALER_CRYPTO_helper_cs_sign_melt (
/**
- * Request helper @a dh to sign @a msg using the public key corresponding to
- * @a h_denom_pub.
+ * Request helper @a dh to batch sign batch @a reqs.
+ *
+ * This operation will block until the signature has been obtained. Should
+ * this process receive a signal (that is not ignored) while the operation is
+ * pending, the operation will fail. Note that the helper may still believe
+ * that it created the signature. Thus, signals may result in a small
+ * differences in the signature counters. Retrying in this case may work.
+ *
+ * @param dh helper process connection
+ * @param reqs array with information about the keys to sign with and the values to sign
+ * @param reqs_length length of the @a reqs array
+ * @param[out] bss array set to the blind signatures, must be of length @a reqs_length!
+ * @return #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TALER_CRYPTO_helper_cs_batch_sign_melt (
+ struct TALER_CRYPTO_CsDenominationHelper *dh,
+ const struct TALER_CRYPTO_CsSignRequest *reqs,
+ unsigned int reqs_length,
+ struct TALER_BlindedDenominationSignature *bss);
+
+
+/**
+ * Request helper @a dh to sign @a req.
*
* This operation will block until the signature has been obtained. Should
* this process receive a signal (that is not ignored) while the operation is
@@ -2528,6 +2549,29 @@ TALER_CRYPTO_helper_cs_sign_withdraw (
/**
+ * Request helper @a dh to sign batch of @a reqs requests.
+ *
+ * This operation will block until the signature has been obtained. Should
+ * this process receive a signal (that is not ignored) while the operation is
+ * pending, the operation will fail. Note that the helper may still believe
+ * that it created the signature. Thus, signals may result in a small
+ * differences in the signature counters. Retrying in this case may work.
+ *
+ * @param dh helper process connection
+ * @param reqs information about the keys to sign with and the values to sign
+ * @param reqs_length length of the @a reqs array
+ * @param[out] bs array set to the blind signatures, must be of length @a reqs_length!
+ * @return #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TALER_CRYPTO_helper_cs_batch_sign_withdraw (
+ struct TALER_CRYPTO_CsDenominationHelper *dh,
+ const struct TALER_CRYPTO_CsSignRequest *reqs,
+ unsigned int reqs_length,
+ struct TALER_BlindedDenominationSignature *bss);
+
+
+/**
* Ask the helper to revoke the public key associated with @a h_cs.
* Will cause the helper to tell all clients that the key is now unavailable,
* and to create a replacement key.