From de2fdc2a9a12acfc15d631f3406c2ff1cffa12ec Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 13 Nov 2022 19:52:09 +0100 Subject: refactor CS derive API in preparation for batch API --- src/util/crypto_helper_cs.c | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'src/util/crypto_helper_cs.c') diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c index 66ecb26ad..409903b34 100644 --- a/src/util/crypto_helper_cs.c +++ b/src/util/crypto_helper_cs.c @@ -853,13 +853,12 @@ more: enum TALER_ErrorCode TALER_CRYPTO_helper_cs_r_derive_withdraw ( struct TALER_CRYPTO_CsDenominationHelper *dh, - const struct TALER_CsPubHashP *h_cs, - const struct TALER_CsNonce *nonce, + const struct TALER_CRYPTO_CsDeriveRequest *cdr, struct TALER_DenominationCSPublicRPairP *crp) { return helper_cs_r_derive (dh, - h_cs, - nonce, + cdr->h_cs, + cdr->nonce, false, crp); } @@ -868,18 +867,41 @@ TALER_CRYPTO_helper_cs_r_derive_withdraw ( enum TALER_ErrorCode TALER_CRYPTO_helper_cs_r_derive_melt ( struct TALER_CRYPTO_CsDenominationHelper *dh, - const struct TALER_CsPubHashP *h_cs, - const struct TALER_CsNonce *nonce, + const struct TALER_CRYPTO_CsDeriveRequest *cdr, struct TALER_DenominationCSPublicRPairP *crp) { return helper_cs_r_derive (dh, - h_cs, - nonce, + cdr->h_cs, + cdr->nonce, true, crp); } +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) +{ + GNUNET_break (0); // FIXME + return -1; +} + + +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) +{ + GNUNET_break (0); // FIXME + return -1; +} + + void TALER_CRYPTO_helper_cs_disconnect ( struct TALER_CRYPTO_CsDenominationHelper *dh) -- cgit v1.2.3