aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-10 16:34:01 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-10 16:34:01 +0200
commit6a483b51ec6b857982a45d5215834c99a827066f (patch)
treee73657ce26e140a1b18925e8f7335a0432908329 /src/include/taler_crypto_lib.h
parent66f9a5b5e5431b6a24352e8ce95e30c8b00a6d92 (diff)
downloadexchange-6a483b51ec6b857982a45d5215834c99a827066f.tar.xz
fix alignment issue, ensure we hash over packed structure to avoid non-determinism
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 9b0cb604b..ee06f631c 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -6032,4 +6032,56 @@ TALER_age_restriction_from_secret (
struct TALER_AgeCommitmentProof *comm_proof);
+/**
+ * Group of Denominations. These are the common fields of an array of
+ * denominations.
+ *
+ * The corresponding JSON-blob will also contain an array of particular
+ * denominations with only the timestamps, cipher-specific public key and the
+ * master signature.
+ */
+struct TALER_DenominationGroup
+{
+
+ /**
+ * XOR of all SHA-512 hashes of the public keys in this
+ * group.
+ */
+ struct GNUNET_HashCode hash;
+
+ /**
+ * Value of coins in this denomination group.
+ */
+ struct TALER_Amount value;
+
+ /**
+ * Fee structure for all coins in the group.
+ */
+ struct TALER_DenomFeeSet fees;
+
+ /**
+ * Cipher used for the denomination.
+ */
+ enum TALER_DenominationCipher cipher;
+
+ /**
+ * Age mask for the denomiation.
+ */
+ struct TALER_AgeMask age_mask;
+
+};
+
+
+/**
+ * Compute a unique key for the meta data of a denomination group.
+ *
+ * @param dg denomination group to evaluate
+ * @param[out] key key to set
+ */
+void
+TALER_denomination_group_get_key (
+ const struct TALER_DenominationGroup *dg,
+ struct GNUNET_HashCode *key);
+
+
#endif