From 9838e0fc33c0e21cac4b238ae2ab78e386d7d9c2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 13 Nov 2022 15:05:48 +0100 Subject: API refactoring towards batch CS --- src/include/taler_crypto_lib.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'src/include/taler_crypto_lib.h') 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 @@ -2466,6 +2466,23 @@ void 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); -- cgit v1.2.3