summaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-07 13:14:25 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-07 13:14:25 +0100
commitb2e6fcae1a9b96f086c61f13f4c2c98338c4e414 (patch)
tree6c5c8c264ca674dd8c0e303daf3207bbaff65315 /src/include/taler_crypto_lib.h
parentb9ea075d61dcd47951b2f7f962025476c045aa57 (diff)
downloadexchange-b2e6fcae1a9b96f086c61f13f4c2c98338c4e414.tar.gz
exchange-b2e6fcae1a9b96f086c61f13f4c2c98338c4e414.tar.bz2
exchange-b2e6fcae1a9b96f086c61f13f4c2c98338c4e414.zip
fix DB API for generic blinded planchet storage
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h58
1 files changed, 34 insertions, 24 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index b3e4ba264..189d4b063 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -461,7 +461,6 @@ struct TALER_RsaPubHashP
struct GNUNET_HashCode hash;
};
-GNUNET_NETWORK_STRUCT_BEGIN
/**
* Master key material for the deriviation of
@@ -478,29 +477,6 @@ struct TALER_PlanchetSecretsP
};
-GNUNET_NETWORK_STRUCT_END
-
-
-/**
- * Hash @a rsa.
- *
- * @param rsa key to hash
- * @param[out] h_rsa where to write the result
- */
-void
-TALER_rsa_pub_hash (const struct GNUNET_CRYPTO_RsaPublicKey *rsa,
- struct TALER_RsaPubHashP *h_rsa);
-
-/**
- * Hash @a cs.
- *
- * @param cs key to hash
- * @param[out] h_cs where to write the result
- */
-void
-TALER_cs_pub_hash (const struct GNUNET_CRYPTO_CsPublicKey *cs,
- struct TALER_CsPubHashP *h_cs);
-
/**
* Hash used to represent a denomination public key
* and associated age restrictions (if any).
@@ -633,6 +609,27 @@ GNUNET_NETWORK_STRUCT_END
/**
+ * Hash @a rsa.
+ *
+ * @param rsa key to hash
+ * @param[out] h_rsa where to write the result
+ */
+void
+TALER_rsa_pub_hash (const struct GNUNET_CRYPTO_RsaPublicKey *rsa,
+ struct TALER_RsaPubHashP *h_rsa);
+
+/**
+ * Hash @a cs.
+ *
+ * @param cs key to hash
+ * @param[out] h_cs where to write the result
+ */
+void
+TALER_cs_pub_hash (const struct GNUNET_CRYPTO_CsPublicKey *cs,
+ struct TALER_CsPubHashP *h_cs);
+
+
+/**
* Types of public keys used for denominations in Taler.
*/
enum TALER_DenominationCipher
@@ -1259,6 +1256,19 @@ TALER_blinded_denom_sig_cmp (
/**
+ * Compare two blinded planchets.
+ *
+ * @param sig1 first blinded planchet
+ * @param sig2 second blinded planchet
+ * @return 0 if the keys are equal, otherwise -1 or 1
+ */
+int
+TALER_blinded_planchet_cmp (
+ const struct TALER_BlindedPlanchet *bp1,
+ const struct TALER_BlindedPlanchet *bp2);
+
+
+/**
* Obtain denomination public key from a denomination private key.
*
* @param denom_priv private key to convert