summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_keys.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-20 21:51:41 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-20 21:51:46 +0100
commit19624fd776f28812354f7e2b50b26e984ff077ab (patch)
tree625d0019650cb88d42bbf7f5ac0c1ef51fabac70 /src/exchange/taler-exchange-httpd_keys.h
parentdbc5adba7f22fb9568be29479ac9cf19463d471f (diff)
downloadexchange-19624fd776f28812354f7e2b50b26e984ff077ab.tar.gz
exchange-19624fd776f28812354f7e2b50b26e984ff077ab.tar.bz2
exchange-19624fd776f28812354f7e2b50b26e984ff077ab.zip
-ensure different HKDF is used in melt vs. withdraw
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.h')
-rw-r--r--src/exchange/taler-exchange-httpd_keys.h47
1 files changed, 41 insertions, 6 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.h b/src/exchange/taler-exchange-httpd_keys.h
index a329c4f12..7c6fb3e33 100644
--- a/src/exchange/taler-exchange-httpd_keys.h
+++ b/src/exchange/taler-exchange-httpd_keys.h
@@ -169,22 +169,57 @@ TEH_keys_denomination_by_hash2 (
/**
* Request to sign @a msg using the public key corresponding to
- * @a h_denom_pub.
+ * @a h_denom_pub during a withdraw operation.
*
* @param h_denom_pub hash of the public key to use to sign
* @param bp blinded planchet to sign
+ * @param is_melt should we use the KDF for melting?
* @param[out] bs set to the blind signature on success
* @return #TALER_EC_NONE on success
*/
enum TALER_ErrorCode
-TEH_keys_denomination_sign (const struct TALER_DenominationHash *h_denom_pub,
- const struct TALER_BlindedPlanchet *bp,
- struct TALER_BlindedDenominationSignature *bs);
+TEH_keys_denomination_sign_withdraw (
+ const struct TALER_DenominationHash *h_denom_pub,
+ const struct TALER_BlindedPlanchet *bp,
+ struct TALER_BlindedDenominationSignature *bs);
+
+
+/**
+ * Request to sign @a msg using the public key corresponding to
+ * @a h_denom_pub during a refresh operation.
+ *
+ * @param h_denom_pub hash of the public key to use to sign
+ * @param bp blinded planchet to sign
+ * @param is_melt should we use the KDF for melting?
+ * @param[out] bs set to the blind signature on success
+ * @return #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TEH_keys_denomination_sign_melt (
+ const struct TALER_DenominationHash *h_denom_pub,
+ const struct TALER_BlindedPlanchet *bp,
+ struct TALER_BlindedDenominationSignature *bs);
+
+
+/**
+ * Request to derive CS @a r_pub using the denomination corresponding to @a h_denom_pub
+ * and @a nonce for withdrawing.
+ *
+ * @param h_denom_pub hash of the public key to use to derive r_pub
+ * @param nonce withdraw/refresh nonce
+ * @param[out] r_pub where to write the result
+ * @return #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TEH_keys_denomination_cs_r_pub_withdraw (
+ const struct TALER_DenominationHash *h_denom_pub,
+ const struct TALER_CsNonce *nonce,
+ struct TALER_DenominationCSPublicRPairP *r_pub);
/**
* Request to derive CS @a r_pub using the denomination corresponding to @a h_denom_pub
- * and @a nonce.
+ * and @a nonce for melting.
*
* @param h_denom_pub hash of the public key to use to derive r_pub
* @param nonce withdraw/refresh nonce
@@ -192,7 +227,7 @@ TEH_keys_denomination_sign (const struct TALER_DenominationHash *h_denom_pub,
* @return #TALER_EC_NONE on success
*/
enum TALER_ErrorCode
-TEH_keys_denomination_cs_r_pub (
+TEH_keys_denomination_cs_r_pub_melt (
const struct TALER_DenominationHash *h_denom_pub,
const struct TALER_CsNonce *nonce,
struct TALER_DenominationCSPublicRPairP *r_pub);