aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h25
-rw-r--r--src/include/taler_exchange_service.h1
-rw-r--r--src/include/taler_json_lib.h27
3 files changed, 46 insertions, 7 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index c02ab4fbd..c6e2185f0 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -1230,13 +1230,12 @@ TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info,
/**
* Compute the hash of a blinded coin.
*
- * @param coin_ev blinded coin
- * @param coin_ev_size number of bytes in @a coin_ev
+ * @param blinded_planchet blinded planchet
* @param[out] bch where to write the hash
+ * @return #GNUNET_OK when successful, #GNUNET_SYSERR if an internal error occured
*/
-void
-TALER_coin_ev_hash (const void *coin_ev,
- size_t coin_ev_size,
+enum GNUNET_GenericReturnValue
+TALER_coin_ev_hash (const struct TALER_BlindedPlanchet *blinded_planchet,
struct TALER_BlindedCoinHash *bch);
@@ -1441,19 +1440,21 @@ TALER_planchet_setup_refresh (const struct TALER_TransferSecretP *secret_seed,
* Setup information for a fresh coin.
*
* @param[out] ps value to initialize
+ * @oaram alg_values WitdrawValues containing cipher
*/
void
TALER_planchet_setup_random (struct TALER_PlanchetSecretsP *ps,
- enum TALER_DenominationCipher cipher);
+ const struct
+ TALER_ExchangeWithdrawValues *alg_values);
/**
* Create a blinding secret @a bs for @a cipher.
*
* @param[out] ps planchet with blinding secret to initialize
+ * @param alg_values withdraw values containing cipher and additional CS values
*/
void
TALER_planchet_blinding_secret_create (struct TALER_PlanchetSecretsP *ps,
- enum TALER_DenominationCipher cipher,
const struct
TALER_ExchangeWithdrawValues *alg_values);
@@ -1477,6 +1478,16 @@ TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk,
/**
+ * Frees blinded message inside blinded planchet depending on blinded_planchet->cipher
+ * Does not free the @a blinded_planchet itself!
+ *
+ * @param blinded_planchet blnded planchet
+ */
+void
+TALER_blinded_planchet_free (struct TALER_BlindedPlanchet *blinded_planchet);
+
+
+/**
* Obtain a coin from the planchet's secrets and the blind signature
* of the exchange.
*
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index b4142d6f9..fcf907c58 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -1461,6 +1461,7 @@ TALER_EXCHANGE_withdraw (
const struct TALER_EXCHANGE_DenomPublicKey *pk,
const struct TALER_ReservePrivateKeyP *reserve_priv,
struct TALER_PlanchetSecretsP *ps,
+ struct TALER_ExchangeWithdrawValues *alg_values,
TALER_EXCHANGE_WithdrawCallback res_cb,
void *res_cb_cls);
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index 51ebe6d90..ea6926226 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -119,6 +119,20 @@ TALER_JSON_pack_blinded_denom_sig (
/**
* Generate packer instruction for a JSON field of type
+ * blinded planchet.
+ *
+ * @param name name of the field to add to the object
+ * @param blinded_planchet blinded planchet
+ * @return json pack specification
+ */
+struct GNUNET_JSON_PackSpec
+TALER_JSON_pack_blinded_planchet (
+ const char *name,
+ const struct TALER_BlindedPlanchet *blinded_planchet);
+
+
+/**
+ * Generate packer instruction for a JSON field of type
* amount.
*
* @param name name of the field to add to the object
@@ -261,6 +275,19 @@ TALER_JSON_spec_blinded_denom_sig (
/**
+ * Generate line in parser specification for a
+ * blinded planchet.
+ *
+ * @param field name of the field
+ * @param[out] blinded_planchet the blinded planchet to initialize
+ * @return corresponding field spec
+ */
+struct GNUNET_JSON_Specification
+TALER_JSON_spec_blinded_planchet (const char *field,
+ struct TALER_BlindedPlanchet *blinded_planchet);
+
+
+/**
* The expected field stores a possibly internationalized string.
* Internationalization means that there is another field "$name_i18n"
* which is an object where the keys are languages. If this is