aboutsummaryrefslogtreecommitdiff
path: root/libcmix-crypto/elgamal/elgamal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix-crypto/elgamal/elgamal.h')
-rw-r--r--libcmix-crypto/elgamal/elgamal.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/libcmix-crypto/elgamal/elgamal.h b/libcmix-crypto/elgamal/elgamal.h
index feac7f5..826ea49 100644
--- a/libcmix-crypto/elgamal/elgamal.h
+++ b/libcmix-crypto/elgamal/elgamal.h
@@ -1,17 +1,46 @@
#pragma once
+/*!
+ * \file
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
#include "api.h"
+/*!
+ * \brief elgamal_create_keypair
+ * \return The new keypair
+ */
extern struct KeyPair elgamal_create_keypair();
+
+/*!
+ * \brief elgamal_keypair_deleter
+ * \param p the keypair to be freed
+ */
extern void elgamal_keypair_deleter(struct KeyPair p);
+/*!
+ * \brief elgamal_derive_shared_key
+ * \param pair Our keypair.
+ * \param pub_key The public key of the other party.
+ * \param swap_pub_order Should we swap the order in which we feed the public keys to the hash function.
+ * \return A Shared key
+ */
extern struct SharedKey elgamal_derive_shared_key(struct KeyPair pair, unsigned char const* pub_key, bool swap_pub_order);
+
+/*!
+ * \brief elgamal_shared_key_deleter
+ * \param s The shared key to be freed.
+ */
extern void elgamal_shared_key_deleter(struct SharedKey s);
+/*!
+ * \brief get_elgamal_implementation
+ * \return
+ */
struct Api get_elgamal_implementation();
#ifdef __cplusplus