From b2e6fcae1a9b96f086c61f13f4c2c98338c4e414 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 7 Feb 2022 13:14:25 +0100 Subject: fix DB API for generic blinded planchet storage --- src/include/taler_crypto_lib.h | 58 +++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'src/include/taler_crypto_lib.h') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index b3e4ba26..189d4b06 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). @@ -632,6 +608,27 @@ struct TALER_ExtensionConfigHash 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. */ @@ -1258,6 +1255,19 @@ TALER_blinded_denom_sig_cmp ( const struct TALER_BlindedDenominationSignature *sig2); +/** + * 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. * -- cgit v1.2.3