aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorGian Demarmels <gian@demarmels.org>2021-12-22 11:45:22 +0100
committerGian Demarmels <gian@demarmels.org>2022-02-04 15:31:48 +0100
commit385eb51e93e39842c0ccb2a6b12b87c66c7fbe26 (patch)
treeabd54908cf87994fe27e873202d9ddac5c0dcbcf /src/include
parentf3fb7c29e69d38ee77d6214cf001f8e18fa00f2b (diff)
CS planchet create and withdraw create
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h39
1 files changed, 31 insertions, 8 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 2e0674fb1..8e5df1fca 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -760,17 +760,11 @@ struct TALER_BlindedRsaPlanchet
struct TALER_BlindedCsPlanchet
{
/**
- * Withdraw or refresh nonce used for derivation
- */
- struct GNUNET_CRYPTO_CsNonce nonce;
-
- /**
* The Clause Schnorr c_0 and c_1 containing the blinded message
*/
struct GNUNET_CRYPTO_CsC c[2];
};
-
/**
* @brief Type including Parameters to create blinded signature
*
@@ -800,6 +794,21 @@ struct TALER_BlindedPlanchet
} details;
};
+struct TALER_WithdrawNonce
+{
+ /**
+ * 32 bit nonce to include in withdrawals
+ */
+ struct GNUNET_CRYPTO_CsNonce nonce;
+};
+
+struct TALER_RefreshNonce
+{
+ /**
+ * 32 bit nonce to include in withdrawals
+ */
+ struct GNUNET_CRYPTO_CsNonce nonce;
+};
/**
* @brief RSA Parameters to create blinded messages
@@ -868,6 +877,11 @@ struct TALER_PlanchetDeriveCsBlindingSecrets
* size of the secret to derive blinding secrets from
*/
size_t secret_len;
+
+ /**
+ * public R_0 and R_1 are hashed too
+ */
+ struct GNUNET_CRYPTO_CsRPublic r_pub[2];
};
/**
@@ -938,6 +952,16 @@ struct TALER_TrackTransferDetails
void
TALER_denom_pub_free (struct TALER_DenominationPublicKey *denom_pub);
+/**
+ * @brief Method to generate 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
+ */
+void
+TALER_cs_withdraw_nonce_derive (const struct
+ TALER_CoinSpendPrivateKeyP *coin_priv,
+ struct TALER_WithdrawNonce *nonce);
/**
* Create a blinding secret @a bs for @a cipher.
@@ -1397,8 +1421,7 @@ TALER_planchet_setup_refresh (const struct TALER_TransferSecretP *secret_seed,
*/
void
TALER_planchet_setup_random (struct TALER_PlanchetSecretsP *ps,
- enum TALER_DenominationCipher cipher,
- ...);
+ enum TALER_DenominationCipher cipher);
/**