diff options
Diffstat (limited to 'libcmix-crypto/curve25519/curve25519.h')
| -rw-r--r-- | libcmix-crypto/curve25519/curve25519.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/libcmix-crypto/curve25519/curve25519.h b/libcmix-crypto/curve25519/curve25519.h index fde317a..5d004cf 100644 --- a/libcmix-crypto/curve25519/curve25519.h +++ b/libcmix-crypto/curve25519/curve25519.h @@ -11,15 +11,38 @@ extern "C" { */ /*! + * \brief curve25519_initialize initilalize curve25519 library + */ +extern void curve25519_initialize(void); + +/*! * \brief curve25519_create_keypair * \return A curve25519 keypair. */ -extern struct KeyPair curve25519_create_keypair(); +extern struct KeyPair curve25519_create_keypair(void); + /*! * \brief curve25519_keypair_deleter * \param p The keypair to free. */ -extern void curve25519_keypair_deleter(struct KeyPair p); +extern void curve25519_keypair_deleter(struct KeyPair* p); + +/*! + * \brief curve25519_get_pubkey_array + * \param pubkey + * \param buffer + * \param len + */ +extern void curve25519_get_key_array(char** buffer, size_t* len, void* pubkey); + +/*! + * \brief curve25519_add_public_share + * \param buffer + * \param out_len + * \param share + * \param pubkey + */ +extern void curve25519_add_public_share(char** buffer, size_t* out_len, char const* share, size_t in_len, void* pubkey); /*! * \brief curve25519_derive_shared_key @@ -28,12 +51,15 @@ extern void curve25519_keypair_deleter(struct KeyPair p); * \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 const* pub_key, bool swap_pub_order); +extern struct SharedKey curve25519_derive_shared_key(struct KeyPair pair, void const* 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); +extern void curve25519_shared_key_deleter(struct SharedKey* s); + +extern void curve25519_deinitialize(void); /*! * \brief get_curve25519_implementation |
