aboutsummaryrefslogtreecommitdiff
path: root/libcmix
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix')
-rw-r--r--libcmix/cmix.c2
-rw-r--r--libcmix/cmix.h10
2 files changed, 10 insertions, 2 deletions
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"