#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/scatterlist.h>
#include <linux/crypto.h>
#include <crypto/hash.h>
#include <crypto/kpp.h>
#include <crypto/dh.h>
#include <crypto/kdf_sp800108.h>
#include <keys/user-type.h>
#include "internal.h"
static ssize_t dh_data_from_key(key_serial_t keyid, const void **data)
{ … }
static void dh_free_data(struct dh *dh)
{ … }
static int kdf_alloc(struct crypto_shash **hash, char *hashname)
{ … }
static void kdf_dealloc(struct crypto_shash *hash)
{ … }
static int keyctl_dh_compute_kdf(struct crypto_shash *hash,
char __user *buffer, size_t buflen,
uint8_t *kbuf, size_t kbuflen)
{ … }
long __keyctl_dh_compute(struct keyctl_dh_params __user *params,
char __user *buffer, size_t buflen,
struct keyctl_kdf_params *kdfcopy)
{ … }
long keyctl_dh_compute(struct keyctl_dh_params __user *params,
char __user *buffer, size_t buflen,
struct keyctl_kdf_params __user *kdf)
{ … }