From c9082aa07394e15cd800bd5ad396c37a2334c98d Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sun, 16 Oct 2016 21:38:43 +0200 Subject: made the code base more consistent and fixes some small TU issues. --- libcmix/cmix.c | 2 +- libcmix/cmix.h | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'libcmix') diff --git a/libcmix/cmix.c b/libcmix/cmix.c index db385c6..e0256cf 100644 --- a/libcmix/cmix.c +++ b/libcmix/cmix.c @@ -29,7 +29,7 @@ enum cmix_error set_message(char const* message, struct CMixBuffer b, unsigned i return no_error; } -enum cmix_error calculate_shared_secret(struct Bignum* result, struct Bignum partial_shared, struct Bignum my_share, struct Bignum mod) +enum cmix_error calculate_shared_key_part(struct Bignum* result, struct Bignum partial_shared, struct Bignum my_share, struct Bignum mod) { if(multiply_mod(result, partial_shared, my_share, mod) != NoError) { return cmix_bignum_error; diff --git a/libcmix/cmix.h b/libcmix/cmix.h index 96d578f..e0d9961 100644 --- a/libcmix/cmix.h +++ b/libcmix/cmix.h @@ -53,7 +53,15 @@ enum cmix_error get_message(char* message, struct CMixBuffer b, unsigned int ind */ enum cmix_error set_message(char const* message, struct CMixBuffer b, unsigned int index); -enum cmix_error calculate_shared_secret(struct Bignum* result, struct Bignum partial_shared, struct Bignum my_share, struct Bignum mod); +/*! + * \brief calculate_shared_key_part Calculates (partly) the shared key which is needed by all the nodes. + * \param result Storage for the result + * \param partial_shared The shared key so far. + * \param my_share My part to add to the key. + * \param mod The modulus of the group we are in. + * \return An error_code. + */ +enum cmix_error calculate_shared_key_part(struct Bignum* result, struct Bignum partial_shared, struct Bignum my_share, struct Bignum mod); #ifdef __cplusplus } // extern "C" -- cgit v1.2.3-70-g09d2