-simplify

This commit is contained in:
Christian Grothoff 2023-07-10 15:26:53 +02:00
parent f4abc1c369
commit 66f9a5b5e5
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 4 additions and 14 deletions

View File

@ -2379,15 +2379,12 @@ finish_keys_response (struct TEH_KeyStateHandle *ksh)
json_array_append_new ( json_array_append_new (
grouped_denominations, grouped_denominations,
group->json)); group->json));
/* Build the running XOR over all hash(_xor) */ /* Build the running XOR over all hash(_xor) */
GNUNET_CRYPTO_hash_xor (&group->hash_xor, GNUNET_CRYPTO_hash_xor (&group->hash_xor,
&grouped_hash_xor, &grouped_hash_xor,
&grouped_hash_xor); &grouped_hash_xor);
GNUNET_free (group); GNUNET_free (group);
} }
GNUNET_CONTAINER_multihashmap_iterator_destroy (iter); GNUNET_CONTAINER_multihashmap_iterator_destroy (iter);
} }

View File

@ -825,17 +825,10 @@ decode_keys_json (const json_t *resp_obj,
&key_data->master_pub, &key_data->master_pub,
check_sig ? &hash_xor : NULL)); check_sig ? &hash_xor : NULL));
/* Build the running xor of the SHA512-hash of the public keys */ /* Build the running xor of the SHA512-hash of the public keys for the group */
{ GNUNET_CRYPTO_hash_xor (&dk.h_key.hash,
struct TALER_DenominationHashP hc;
TALER_denom_pub_hash (&dk.key,
&hc);
GNUNET_CRYPTO_hash_xor (&hc.hash,
&group_hash_xor, &group_hash_xor,
&group_hash_xor); &group_hash_xor);
}
for (unsigned int j = 0; for (unsigned int j = 0;
j<key_data->num_denom_keys; j<key_data->num_denom_keys;
j++) j++)