#pragma once #include "api.h" #ifdef __cplusplus extern "C" { #endif /*! * \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 } #endif