#ifndef CURVE25519_H
#define CURVE25519_H
#include <crypto/algapi.h>
#include <linux/types.h>
#include <linux/random.h>
enum curve25519_lengths { … };
extern const u8 curve25519_null_point[];
extern const u8 curve25519_base_point[];
void curve25519_generic(u8 out[CURVE25519_KEY_SIZE],
const u8 scalar[CURVE25519_KEY_SIZE],
const u8 point[CURVE25519_KEY_SIZE]);
void curve25519_arch(u8 out[CURVE25519_KEY_SIZE],
const u8 scalar[CURVE25519_KEY_SIZE],
const u8 point[CURVE25519_KEY_SIZE]);
void curve25519_base_arch(u8 pub[CURVE25519_KEY_SIZE],
const u8 secret[CURVE25519_KEY_SIZE]);
bool curve25519_selftest(void);
static inline
bool __must_check curve25519(u8 mypublic[CURVE25519_KEY_SIZE],
const u8 secret[CURVE25519_KEY_SIZE],
const u8 basepoint[CURVE25519_KEY_SIZE])
{ … }
static inline bool
__must_check curve25519_generate_public(u8 pub[CURVE25519_KEY_SIZE],
const u8 secret[CURVE25519_KEY_SIZE])
{ … }
static inline void curve25519_clamp_secret(u8 secret[CURVE25519_KEY_SIZE])
{ … }
static inline void curve25519_generate_secret(u8 secret[CURVE25519_KEY_SIZE])
{ … }
#endif