[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 10/24: add token issue signature methods
From: |
gnunet |
Subject: |
[taler-exchange] 10/24: add token issue signature methods |
Date: |
Thu, 13 Jun 2024 17:04:00 +0200 |
This is an automated email from the git hooks/post-receive script.
christian-blaettler pushed a commit to branch master
in repository exchange.
commit 002b4bf117c73ad6fca1731e23b6816a0d2800c2
Author: Christian Blättler <blatc2@bfh.ch>
AuthorDate: Thu Apr 25 16:27:10 2024 +0200
add token issue signature methods
---
src/include/taler_crypto_lib.h | 38 +++++++++++++++++++++++++++++++++++---
src/util/tokens.c | 2 +-
2 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 00f93c26d..e2f377448 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -2302,7 +2302,7 @@ struct TALER_TokenIssueBlindSignatureP
/**
* The public key of a token. An EdDSA public key generated by the wallet
- * and blindly signed by the merchant using the @struct
TALER_TokenIssuePrivateKey.
+ * and blindly signed by the merchant using the @struct
TALER_TokenIssuePrivateKeyP.
*/
struct TALER_TokenUsePublicKeyP
{
@@ -2328,6 +2328,17 @@ struct TALER_TokenUseSignatureP
struct GNUNET_CRYPTO_EddsaSignature signature;
};
+/**
+ * The blinded token use public key of a token. Ready to be signed by the
merchant.
+ */
+struct TALER_TokenEnvelopeP
+{
+ /**
+ * Blinded public key of the token.
+ */
+ struct GNUNET_CRYPTO_BlindedMessage blinded_pub;
+};
+
/**
* Free internals of @a issue_sig, but not @a issue_sig itself.
@@ -3913,12 +3924,33 @@ TALER_merchant_refund_verify (
const struct TALER_MerchantSignatureP *merchant_sig);
+/**
+ * Issue a new token by signing a token envelope, that contains the
+ * blinded public key provided by the wallet.
+ *
+ * @param envelope the token envelope to sign
+ * @param issue_priv token issue private key to sign with
+ * @param[out] blind_sig where to write the blinded issue signature
+ */
void
-TALER_merchant_token_issue_sign ();
+TALER_merchant_token_issue_sign (
+ const struct TALER_TokenEnvelopeP *envelope,
+ const struct TALER_TokenIssuePrivateKeyP *issue_priv,
+ struct TALER_TokenIssueBlindSignatureP *blind_sig);
+/**
+ * Verify a token issue signature.
+ *
+ * @param use_pub token use public key
+ * @param issue_pub token issue public key
+ * @param ub_sig unblinded signature
+ */
enum GNUNET_GenericReturnValue
-TALER_merchant_token_issue_verify ();
+TALER_merchant_token_issue_verify (
+ const struct TALER_TokenUsePublicKeyP *use_pub,
+ const struct TALER_TokenIssuePublicKeyP *issue_pub,
+ const struct TALER_TokenIssueSignatureP *ub_sig);
/* ********************* exchange deposit signing ************************* */
diff --git a/src/util/tokens.c b/src/util/tokens.c
index 61fe40501..3086d8777 100644
--- a/src/util/tokens.c
+++ b/src/util/tokens.c
@@ -23,7 +23,7 @@
void
-TALER_token_issue_sig_free (struct TALER_TokenIssueSignature *issue_sig)
+TALER_token_issue_sig_free (struct TALER_TokenIssueSignatureP *issue_sig)
{
if (NULL != issue_sig->signature)
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] 16/24: work on tokens, (continued)
- [taler-exchange] 16/24: work on tokens, gnunet, 2024/06/13
- [taler-exchange] 12/24: add pack helper for token issue signature, gnunet, 2024/06/13
- [taler-exchange] 23/24: use query param helper from gnunet, gnunet, 2024/06/13
- [taler-exchange] 22/24: bump gana, gnunet, 2024/06/13
- [taler-exchange] 14/24: json pack token envelope, gnunet, 2024/06/13
- [taler-exchange] 18/24: use new gnunet json spec functions, gnunet, 2024/06/13
- [taler-exchange] 17/24: fix typo, gnunet, 2024/06/13
- [taler-exchange] 20/24: use gnunget query param helper, gnunet, 2024/06/13
- [taler-exchange] 05/24: bump gana, gnunet, 2024/06/13
- [taler-exchange] 07/24: bump gana, gnunet, 2024/06/13
- [taler-exchange] 10/24: add token issue signature methods,
gnunet <=
- [taler-exchange] 21/24: bump gana, gnunet, 2024/06/13
- [taler-exchange] 19/24: use gnunet json helper for blinded signature, gnunet, 2024/06/13
- [taler-exchange] 13/24: add json spec for token envelope, gnunet, 2024/06/13