diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-14 05:34:19 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-14 05:34:19 +0100 |
commit | 053faa252c2afed8ecbb65bdd6fe8ec6f9ad9ef9 (patch) | |
tree | cefe2776cbfb9b9be508158d2be2eec2a1f82d78 /src/exchange/taler-exchange-httpd_keys.h | |
parent | d876a950739e66533af168a55439a8652f018d1f (diff) |
-refactoring in preparation of fixing #7272
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.h')
-rw-r--r-- | src/exchange/taler-exchange-httpd_keys.h | 64 |
1 files changed, 52 insertions, 12 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.h b/src/exchange/taler-exchange-httpd_keys.h index 01ba1f95..24ba1467 100644 --- a/src/exchange/taler-exchange-httpd_keys.h +++ b/src/exchange/taler-exchange-httpd_keys.h @@ -246,40 +246,80 @@ TEH_keys_denomination_by_hash2 ( struct MHD_Connection *conn, MHD_RESULT *mret); +/** + * Information needed to create a blind signature. + */ +struct TEH_CoinSignData +{ + /** + * Hash of key to sign with. + */ + const struct TALER_DenominationHashP *h_denom_pub; + + /** + * Blinded planchet to sign over. + */ + const struct TALER_BlindedPlanchet *bp; +}; + /** - * Request to sign @a msg using the public key corresponding to - * @a h_denom_pub during a withdraw operation. + * Request to sign @a csd for regular withdrawing. * - * @param h_denom_pub hash of the public key to use to sign - * @param bp blinded planchet to sign + * @param csd identifies data to blindly sign and key to sign with * @param[out] bs set to the blind signature on success * @return #TALER_EC_NONE on success */ enum TALER_ErrorCode TEH_keys_denomination_sign_withdraw ( - const struct TALER_DenominationHashP *h_denom_pub, - const struct TALER_BlindedPlanchet *bp, + const struct TEH_CoinSignData *csd, struct TALER_BlindedDenominationSignature *bs); /** - * Request to sign @a msg using the public key corresponding to - * @a h_denom_pub during a refresh operation. + * Request to sign @a csds for regular withdrawing. + * + * @param csds array with data to blindly sign (and keys to sign with) + * @param csds_length length of @a csds array + * @param[out] bss array set to the blind signature on success; must be of length @a csds_length + * @return #TALER_EC_NONE on success + */ +enum TALER_ErrorCode +TEH_keys_denomination_batch_sign_withdraw ( + const struct TEH_CoinSignData *csds, + unsigned int csds_length, + struct TALER_BlindedDenominationSignature *bss); + + +/** + * Request to sign @a csd for melting. * - * @param h_denom_pub hash of the public key to use to sign - * @param bp blinded planchet to sign + * @param csd identifies data to blindly sign and key to sign with * @param[out] bs set to the blind signature on success * @return #TALER_EC_NONE on success */ enum TALER_ErrorCode TEH_keys_denomination_sign_melt ( - const struct TALER_DenominationHashP *h_denom_pub, - const struct TALER_BlindedPlanchet *bp, + const struct TEH_CoinSignData *csd, struct TALER_BlindedDenominationSignature *bs); /** + * Request to sign @a csds for melting. + * + * @param csds array with data to blindly sign (and keys to sign with) + * @param csds_length length of @a csds array + * @param[out] bss array set to the blind signature on success; must be of length @a csds_length + * @return #TALER_EC_NONE on success + */ +enum TALER_ErrorCode +TEH_keys_denomination_batch_sign_melt ( + const struct TEH_CoinSignData *csds, + unsigned int csds_length, + struct TALER_BlindedDenominationSignature *bss); + + +/** * Request to derive CS @a r_pub using the denomination corresponding to @a h_denom_pub * and @a nonce for withdrawing. * |