aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2021-12-27 23:24:48 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2021-12-27 23:24:48 +0100
commitef4238874f6628a9ee4464ad3b70a7fde96d518b (patch)
tree27ba7f32c4d32bce4c821ba6c6a2ed8791d2c30b /src/include/taler_crypto_lib.h
parent070f442a1182c7c2a09c42e94ce202509ade1b77 (diff)
downloadexchange-ef4238874f6628a9ee4464ad3b70a7fde96d518b.tar.xz
[age restriction] progress 9/n
More worke towards support for extensions and age restriction: - taler-exchange-httpd_management_extensions.c almost completed - handling of request implemented - stub "set_extensions" for database transaction added - utility functions added - TALER_exchange_offline_extension_agemask_{sign,verify} - TALER_agemask_parse_json
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index e6c5e2a4d..4ffee54c9 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -2518,4 +2518,36 @@ TALER_merchant_wire_signature_make (
struct TALER_MerchantSignatureP *merch_sig);
+/* **************** /management/extensions offline signing **************** */
+
+/**
+ * Create a signature for age restriction groups
+ *
+ * @param mask The bitmask representing age groups
+ * @param master_priv private key to sign with
+ * @param[out] master_sig where to write the signature
+ */
+void
+TALER_exchange_offline_extension_agemask_sign (
+ const struct TALER_AgeMask mask,
+ const struct TALER_MasterPrivateKeyP *master_priv,
+ struct TALER_MasterSignatureP *master_sig);
+
+
+/**
+ * Verify the signature in @a master_sig.
+ *
+ * @param mask bit mask representing an age group for age restriction
+ * @param master_pub master public key of the exchange
+ * @param master_sig signature of the exchange
+ * @return #GNUNET_OK if signature is valid
+ */
+enum GNUNET_GenericReturnValue
+TALER_exchange_offline_extension_agemask_verify (
+ const struct TALER_AgeMask mask,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_MasterSignatureP *master_sig
+ );
+
+
#endif