aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorGian Demarmels <gian@demarmels.org>2022-01-17 09:37:36 +0100
committerGian Demarmels <gian@demarmels.org>2022-02-04 15:37:33 +0100
commitbe50c084f89e8588dd2d4a4aa30c58002053ee31 (patch)
treee6651b08f663446f21c59b9428e57ca46b7b4bab /src/include
parentae5f082c75eb140167dc0254894dd4d57ba62a6d (diff)
fixed nonce check, renamed WithdrawNonce
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h21
-rw-r--r--src/include/taler_exchange_service.h2
2 files changed, 15 insertions, 8 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 870e2a990..9870572b3 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -798,7 +798,7 @@ struct TALER_BlindedRsaPlanchet
/**
* Withdraw nonce for CS denominations
*/
-struct TALER_WithdrawNonce
+struct TALER_CsNonce
{
/**
* 32 bit nonce to include in withdrawals
@@ -821,7 +821,7 @@ struct TALER_BlindedCsPlanchet
/**
* Public Nonce
*/
- struct TALER_WithdrawNonce nonce;
+ struct TALER_CsNonce nonce;
};
/**
@@ -988,7 +988,7 @@ void
TALER_denom_pub_free (struct TALER_DenominationPublicKey *denom_pub);
/**
- * @brief Method to generate withdraw nonce
+ * @brief Method to derive withdraw nonce
*
* @param coin_priv private key of the coin
* @param nonce withdraw nonce included in the request to generate R_0 and R_1
@@ -996,10 +996,18 @@ TALER_denom_pub_free (struct TALER_DenominationPublicKey *denom_pub);
void
TALER_cs_withdraw_nonce_derive (const struct
TALER_CoinSpendPrivateKeyP *coin_priv,
- struct TALER_WithdrawNonce *nonce);
+ struct TALER_CsNonce *nonce);
/**
+ * @brief Method to generate a random withdraw nonce used in refresh protocol
+ *
+ * @param nonce withdraw nonce included in the request to generate R_0 and R_1
+ */
+void
+TALER_cs_withdraw_nonce_generate (struct TALER_CsNonce *nonce);
+
+/**
* Initialize denomination public-private key pair.
*
* For #TALER_DENOMINATION_RSA, an additional "unsigned int"
@@ -1047,7 +1055,7 @@ TALER_denom_sig_free (struct TALER_DenominationSignature *denom_sig);
*/
enum GNUNET_GenericReturnValue
-TALER_denom_cs_derive_r_public (const struct TALER_WithdrawNonce *nonce,
+TALER_denom_cs_derive_r_public (const struct TALER_CsNonce *nonce,
const struct
TALER_DenominationPrivateKey *denom_priv,
struct TALER_DenominationCsPublicR *r_pub);
@@ -1082,7 +1090,6 @@ TALER_denom_blind (const struct TALER_DenominationPublicKey *dk,
* @param[out] denom_sig where to write the signature
* @param denom_priv private key to use for signing
* @param blinded_planchet the planchet already blinded
- * @param ... If CS signature, a TALER_WithdrawNonce is needed
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
@@ -1892,7 +1899,7 @@ TALER_CRYPTO_helper_cs_revoke (
struct TALER_DenominationCsPublicR
TALER_CRYPTO_helper_cs_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh,
const struct TALER_CsPubHashP *h_cs,
- const struct TALER_WithdrawNonce *nonce,
+ const struct TALER_CsNonce *nonce,
enum TALER_ErrorCode *ec);
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index fcf907c58..68c971868 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -1107,7 +1107,7 @@ typedef void
struct TALER_EXCHANGE_CsRHandle *
TALER_EXCHANGE_csr (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_EXCHANGE_DenomPublicKey *pk,
- const struct TALER_WithdrawNonce *nonce,
+ const struct TALER_CsNonce *nonce,
TALER_EXCHANGE_CsRCallback res_cb,
void *res_cb_cls);