donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 805db0b4d0dd63f9598001f928356198679adf2d
parent f75bf8c41e2d1eb2d5e44b227ff38c35c95824ed
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  8 Oct 2025 19:00:23 +0200

fix H( taxPayerIdString || 0 || saltString || 0 ) as per revised LSD0013

Diffstat:
Msrc/include/donau_crypto_lib.h | 12++++++------
Msrc/lib/donau_api_handle.c | 4++--
Msrc/util/donau_crypto.c | 10+++++-----
3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/include/donau_crypto_lib.h b/src/include/donau_crypto_lib.h @@ -191,8 +191,8 @@ struct DONAU_UniqueDonorIdentifierNonce }; /** - * Donor's hashed and salted unique donation identifier. - */ + * Donor's hashed and salted unique donation identifier. + */ struct DONAU_HashDonorTaxId { unsigned char hash[512 / 8]; @@ -700,9 +700,9 @@ DONAU_donation_unit_group_get_key ( * @param[out] h_udi where to write the hash */ void -DONAU_unique_donor_id_hash (const struct DONAU_HashDonorTaxId *h_donor_tax_id, - const struct DONAU_UniqueDonorIdentifierNonce *nonce - , - struct DONAU_UniqueDonorIdentifierHashP *h_udi); +DONAU_unique_donor_id_hash ( + const struct DONAU_HashDonorTaxId *h_donor_tax_id, + const struct DONAU_UniqueDonorIdentifierNonce *nonce, + struct DONAU_UniqueDonorIdentifierHashP *h_udi); #endif diff --git a/src/lib/donau_api_handle.c b/src/lib/donau_api_handle.c @@ -560,10 +560,10 @@ DONAU_compute_salted_tax_id_hash (const char *donor_tax_id, crypto_hash_sha512_init (&st); crypto_hash_sha512_update (&st, (const unsigned char *) donor_tax_id, - strlen (donor_tax_id)); + strlen (donor_tax_id) + 1); crypto_hash_sha512_update (&st, (const unsigned char *) salt, - strlen (salt)); + strlen (salt) + 1); crypto_hash_sha512_final (&st, out_hash); return true; diff --git a/src/util/donau_crypto.c b/src/util/donau_crypto.c @@ -139,14 +139,14 @@ DONAU_donation_unit_pub_hash ( void -DONAU_unique_donor_id_hash (const struct DONAU_HashDonorTaxId *h_donor_tax_id, - const struct DONAU_UniqueDonorIdentifierNonce *nonce - , - struct DONAU_UniqueDonorIdentifierHashP *h_udi) +DONAU_unique_donor_id_hash ( + const struct DONAU_HashDonorTaxId *h_donor_tax_id, + const struct DONAU_UniqueDonorIdentifierNonce *nonce, + struct DONAU_UniqueDonorIdentifierHashP *h_udi) { struct GNUNET_HashContext *hash_context; - hash_context = GNUNET_CRYPTO_hash_context_start (); + hash_context = GNUNET_CRYPTO_hash_context_start (); GNUNET_CRYPTO_hash_context_read ( hash_context, h_donor_tax_id,