From 390d241019c0c2695bae1532bf857e1c278d7747 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 13 Nov 2022 20:20:19 +0100 Subject: implement CS batch operations in libtalerutil --- src/include/taler_crypto_lib.h | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 010a5bc71..30a652682 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -2632,6 +2632,30 @@ TALER_CRYPTO_helper_cs_r_derive_withdraw ( struct TALER_DenominationCSPublicRPairP *crp); +/** + * Ask the helper to derive R using the information + * from @a cdrs. + * + * This operation will block until the R 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 to process connection + * @param cdrs array with derivation input data + * @param cdrs_length length of the @a cdrs array + * @param[out] crp array set to the pair of R values, must be of length @a cdrs_length + * @return set to the error code (or #TALER_EC_NONE on success) + */ +enum TALER_ErrorCode +TALER_CRYPTO_helper_cs_r_batch_derive_withdraw ( + struct TALER_CRYPTO_CsDenominationHelper *dh, + const struct TALER_CRYPTO_CsDeriveRequest *cdrs, + unsigned int cdrs_length, + struct TALER_DenominationCSPublicRPairP *crps); + + /** * Ask the helper to derive R using the information * from @a cdr. @@ -2654,6 +2678,30 @@ TALER_CRYPTO_helper_cs_r_derive_melt ( struct TALER_DenominationCSPublicRPairP *crp); +/** + * Ask the helper to derive R using the information + * from @a cdrs. + * + * This operation will block until the R 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 to process connection + * @param cdrs array with derivation input data + * @param cdrs_length length of the @a cdrs array + * @param[out] crps array set to the pair of R values, must be of length @a cdrs_length + * @return set to the error code (or #TALER_EC_NONE on success) + */ +enum TALER_ErrorCode +TALER_CRYPTO_helper_cs_r_batch_derive_melt ( + struct TALER_CRYPTO_CsDenominationHelper *dh, + const struct TALER_CRYPTO_CsDeriveRequest *cdrs, + unsigned int cdrs_length, + struct TALER_DenominationCSPublicRPairP *crps); + + /** * Close connection to @a dh. * -- cgit v1.2.3