diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2022-03-20 02:39:28 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2022-03-20 02:39:28 +0100 |
commit | 1bb5a77c8da3e460b45b3faa49ed10ab6ae9190d (patch) | |
tree | cc747d8392222aff169f218d5d3cb9164bf0d863 /src/include/taler_crypto_lib.h | |
parent | c83892ba29526280431f781b3fae16ee24beac39 (diff) | |
download | exchange-1bb5a77c8da3e460b45b3faa49ed10ab6ae9190d.tar.xz |
add new reserve status/history signatures
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r-- | src/include/taler_crypto_lib.h | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 5f091e771..8786a3783 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -2778,7 +2778,7 @@ TALER_wallet_recoup_verify ( * @param h_denom_pub hash of the denomiantion public key of the coin * @param coin_bks blinding factor used when withdrawing the coin * @param coin_priv coin key of the coin to be recouped - * @param coin_sig resulting signature + * @param[out] coin_sig resulting signature */ void TALER_wallet_recoup_sign ( @@ -2811,7 +2811,7 @@ TALER_wallet_recoup_refresh_verify ( * @param h_denom_pub hash of the denomiantion public key of the coin * @param coin_bks blinding factor used when withdrawing the coin * @param coin_priv coin key of the coin to be recouped - * @param coin_sig resulting signature + * @param[out] coin_sig resulting signature */ void TALER_wallet_recoup_refresh_sign ( @@ -2821,6 +2821,68 @@ TALER_wallet_recoup_refresh_sign ( struct TALER_CoinSpendSignatureP *coin_sig); +/** + * Verify reserve history request signature. + * + * @param ts timestamp used + * @param history_fee how much did the wallet say it would pay + * @param reserve_pub reserve the history request was for + * @param reserve_sig resulting signature + * @return #GNUNET_OK if the signature is valid + */ +enum GNUNET_GenericReturnValue +TALER_wallet_reserve_history_verify ( + const struct GNUNET_TIME_Timestamp ts, + const struct TALER_Amount *history_fee, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_ReserveSignatureP *reserve_sig); + + +/** + * Create reserve history request signature. + * + * @param ts timestamp used + * @param history_fee how much do we expect to pay + * @param reserve_pub reserve the history request is for + * @param[out] reserve_sig resulting signature + */ +void +TALER_wallet_reserve_history_sign ( + const struct GNUNET_TIME_Timestamp ts, + const struct TALER_Amount *history_fee, + const struct TALER_ReservePrivateKeyP *reserve_priv, + struct TALER_ReserveSignatureP *reserve_sig); + + +/** + * Verify reserve status request signature. + * + * @param ts timestamp used + * @param reserve_pub reserve the status request was for + * @param reserve_sig resulting signature + * @return #GNUNET_OK if the signature is valid + */ +enum GNUNET_GenericReturnValue +TALER_wallet_reserve_status_verify ( + const struct GNUNET_TIME_Timestamp ts, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_ReserveSignatureP *reserve_sig); + + +/** + * Create reserve status request signature. + * + * @param ts timestamp used + * @param reserve_pub reserve the status request is for + * @param[out] reserve_sig resulting signature + */ +void +TALER_wallet_reserve_status_sign ( + const struct GNUNET_TIME_Timestamp ts, + const struct TALER_ReservePrivateKeyP *reserve_priv, + struct TALER_ReserveSignatureP *reserve_sig); + + /* ********************* merchant signing ************************** */ |