#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 } #endif