aboutsummaryrefslogtreecommitdiff
path: root/libcmix-crypto/curve25519
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-09-28 13:18:18 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-09-28 13:18:18 +0200
commit3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375 (patch)
tree345583aaf457ce5076d0d5f7c158628dfd971360 /libcmix-crypto/curve25519
parent85d25eebd38bb278ad598a291a007938854945a4 (diff)
downloadcmix-3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375.tar.gz
cmix-3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375.tar.bz2
cmix-3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375.zip
Finally made a initial doxygen documentation pass over all files.
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