diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-12-25 13:56:33 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-12-25 13:56:40 +0100 |
commit | 87376e02eba3f5c2cf83a493446dee0c300565a4 (patch) | |
tree | 18103edb2bdf2b29a773cce2de596b06d8265abb /src/include/taler_crypto_lib.h | |
parent | 2c14d338704f4574055c4b5c51d8a79dd2e22345 (diff) | |
download | exchange-87376e02eba3f5c2cf83a493446dee0c300565a4.tar.gz exchange-87376e02eba3f5c2cf83a493446dee0c300565a4.tar.bz2 exchange-87376e02eba3f5c2cf83a493446dee0c300565a4.zip |
protocol v12 changes (/recoup split, signature changes) plus database sharding plus O(n^2)=>O(n) worst-case complexity reduction on coin balance checks
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r-- | src/include/taler_crypto_lib.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 89e8697d6..03edb4462 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -1860,6 +1860,43 @@ TALER_wallet_recoup_sign ( struct TALER_CoinSpendSignatureP *coin_sig); +/** + * Verify recoup-refresh signature. + * + * @param h_denom_pub hash of the denomiantion public key of the coin + * @param coin_bks blinding factor used when withdrawing the coin + * @param requested_amount amount that is left to be recouped + * @param coin_pub coin key of the coin to be recouped + * @param coin_sig resulting signature + * @return #GNUNET_OK if the signature is valid + */ +enum GNUNET_GenericReturnValue +TALER_wallet_recoup_refresh_verify ( + const struct TALER_DenominationHash *h_denom_pub, + const union TALER_DenominationBlindingKeyP *coin_bks, + const struct TALER_Amount *requested_amount, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_CoinSpendSignatureP *coin_sig); + + +/** + * Create recoup-refresh signature. + * + * @param h_denom_pub hash of the denomiantion public key of the coin + * @param coin_bks blinding factor used when withdrawing the coin + * @param requested_amount amount that is left to be recouped + * @param coin_priv coin key of the coin to be recouped + * @param coin_sig resulting signature + */ +void +TALER_wallet_recoup_refresh_sign ( + const struct TALER_DenominationHash *h_denom_pub, + const union TALER_DenominationBlindingKeyP *coin_bks, + const struct TALER_Amount *requested_amount, + const struct TALER_CoinSpendPrivateKeyP *coin_priv, + struct TALER_CoinSpendSignatureP *coin_sig); + + /* ********************* offline signing ************************** */ |