summaryrefslogtreecommitdiff
path: root/src/util/taler-exchange-secmod-cs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/taler-exchange-secmod-cs.h')
-rw-r--r--src/util/taler-exchange-secmod-cs.h87
1 files changed, 68 insertions, 19 deletions
diff --git a/src/util/taler-exchange-secmod-cs.h b/src/util/taler-exchange-secmod-cs.h
index c71c3b9af..0321335da 100644
--- a/src/util/taler-exchange-secmod-cs.h
+++ b/src/util/taler-exchange-secmod-cs.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2020 Taler Systems SA
+ Copyright (C) 2020-2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -26,17 +26,21 @@
#define TALER_HELPER_CS_MT_PURGE 1
#define TALER_HELPER_CS_MT_AVAIL 2
-#define TALER_HELPER_CS_MT_REQ_INIT 4
+#define TALER_HELPER_CS_MT_REQ_INIT 3
+#define TALER_HELPER_CS_MT_REQ_BATCH_SIGN 4
#define TALER_HELPER_CS_MT_REQ_SIGN 5
#define TALER_HELPER_CS_MT_REQ_REVOKE 6
-#define TALER_HELPER_CS_MT_REQ_RDERIVE 7
+#define TALER_HELPER_CS_MT_REQ_BATCH_RDERIVE 7
+#define TALER_HELPER_CS_MT_REQ_RDERIVE 8
-#define TALER_HELPER_CS_MT_RES_SIGNATURE 8
-#define TALER_HELPER_CS_MT_RES_SIGN_FAILURE 9
-#define TALER_HELPER_CS_MT_RES_RDERIVE 10
-#define TALER_HELPER_CS_MT_RES_RDERIVE_FAILURE 11
+#define TALER_HELPER_CS_MT_RES_SIGNATURE 9
+#define TALER_HELPER_CS_MT_RES_SIGN_FAILURE 10
+#define TALER_HELPER_CS_MT_RES_BATCH_SIGN_FAILURE 11
+#define TALER_HELPER_CS_MT_RES_RDERIVE 12
+#define TALER_HELPER_CS_MT_RES_RDERIVE_FAILURE 13
+#define TALER_HELPER_CS_MT_RES_BATCH_RDERIVE_FAILURE 14
-#define TALER_HELPER_CS_SYNCED 12
+#define TALER_HELPER_CS_SYNCED 15
GNUNET_NETWORK_STRUCT_BEGIN
@@ -114,7 +118,7 @@ struct TALER_CRYPTO_CsKeyPurgeNotification
/**
* Message sent if a signature is requested.
*/
-struct TALER_CRYPTO_CsSignRequest
+struct TALER_CRYPTO_CsSignRequestMessage
{
/**
* Type is #TALER_HELPER_CS_MT_REQ_SIGN.
@@ -132,13 +136,35 @@ struct TALER_CRYPTO_CsSignRequest
struct TALER_CsPubHashP h_cs;
/**
- * Planchet containing message to sign
- * and nonce to derive R from
+ * Message to sign.
*/
- struct TALER_BlindedCsPlanchet planchet;
+ struct GNUNET_CRYPTO_CsBlindedMessage message;
};
+
+/**
+ * Message sent if a batch of signatures is requested.
+ */
+struct TALER_CRYPTO_BatchSignRequest
+{
+ /**
+ * Type is #TALER_HELPER_CS_MT_REQ_BATCH_SIGN.
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Number of signatures to create, in NBO.
+ */
+ uint32_t batch_size;
+
+ /*
+ * Followed by @e batch_size batch sign requests.
+ */
+
+};
+
+
/**
* Message sent if a signature is requested.
*/
@@ -162,9 +188,32 @@ struct TALER_CRYPTO_CsRDeriveRequest
/**
* Withdraw nonce to derive R from
*/
- struct TALER_CsNonce nonce;
+ struct GNUNET_CRYPTO_CsSessionNonce nonce;
+};
+
+
+/**
+ * Message sent if a batch of derivations is requested.
+ */
+struct TALER_CRYPTO_BatchDeriveRequest
+{
+ /**
+ * Type is #TALER_HELPER_CS_MT_REQ_BATCH_RDERIVE.
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Number of derivations to create, in NBO.
+ */
+ uint32_t batch_size;
+
+ /*
+ * Followed by @e batch_size derive requests.
+ */
+
};
+
/**
* Message sent if a key was revoked.
*/
@@ -199,14 +248,14 @@ struct TALER_CRYPTO_SignResponse
struct GNUNET_MessageHeader header;
/**
- * For now, always zero.
+ * The chosen 'b' (0 or 1).
*/
- uint32_t reserved;
+ uint32_t b;
/**
- * Contains the blindided s and the chosen b
+ * Contains the blindided s.
*/
- struct TALER_BlindedDenominationCsSignAnswer cs_answer;
+ struct GNUNET_CRYPTO_CsBlindS cs_answer;
};
/**
@@ -225,9 +274,9 @@ struct TALER_CRYPTO_RDeriveResponse
uint32_t reserved;
/**
- * derived R
+ * Pair of derived R values
*/
- struct TALER_DenominationCSPublicRPairP r_pub;
+ struct GNUNET_CRYPTO_CSPublicRPairP r_pub;
};