aboutsummaryrefslogtreecommitdiff
path: root/libcmix-crypto/curve25519
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix-crypto/curve25519')
-rw-r--r--libcmix-crypto/curve25519/curve25519.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/libcmix-crypto/curve25519/curve25519.h b/libcmix-crypto/curve25519/curve25519.h
index 19c68e6..8e2ad4e 100644
--- a/libcmix-crypto/curve25519/curve25519.h
+++ b/libcmix-crypto/curve25519/curve25519.h
@@ -1,17 +1,44 @@
#pragma once
+#include "api.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "api.h"
+/*!
+ * \file
+ */
+/*!
+ * \brief curve25519_create_keypair
+ * \return A curve25519 keypair.
+ */
extern struct KeyPair curve25519_create_keypair();
+/*!
+ * \brief curve25519_keypair_deleter
+ * \param p The keypair to free.
+ */
extern void curve25519_keypair_deleter(struct KeyPair p);
+/*!
+ * \brief curve25519_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 curve25519_derive_shared_key(struct KeyPair pair, unsigned char* pub_key, bool swap_pub_order);
+/*!
+ * \brief curve25519_shared_key_deleter
+ * \param s the Shared key to free.
+ */
extern void curve25519_shared_key_deleter(struct SharedKey s);
+/*!
+ * \brief get_curve25519_implementation
+ * \return An Api struct filled with a curve25519 implementation.
+ */
struct Api get_curve25519_implementation();
#ifdef __cplusplus