linux/net/xfrm/xfrm_algo.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * xfrm algorithm interface
 *
 * Copyright (c) 2002 James Morris <[email protected]>
 */

#include <crypto/aead.h>
#include <crypto/hash.h>
#include <crypto/skcipher.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pfkeyv2.h>
#include <linux/crypto.h>
#include <linux/scatterlist.h>
#include <net/xfrm.h>
#if IS_ENABLED(CONFIG_INET_ESP) || IS_ENABLED(CONFIG_INET6_ESP)
#include <net/esp.h>
#endif

/*
 * Algorithms supported by IPsec.  These entries contain properties which
 * are used in key negotiation and xfrm processing, and are used to verify
 * that instantiated crypto transforms have correct parameters for IPsec
 * purposes.
 */
static struct xfrm_algo_desc aead_list[] =;

static struct xfrm_algo_desc aalg_list[] =;

static struct xfrm_algo_desc ealg_list[] =;

static struct xfrm_algo_desc calg_list[] =;

static inline int aalg_entries(void)
{}

static inline int ealg_entries(void)
{}

static inline int calg_entries(void)
{}

struct xfrm_algo_list {};

static const struct xfrm_algo_list xfrm_aead_list =;

static const struct xfrm_algo_list xfrm_aalg_list =;

static const struct xfrm_algo_list xfrm_ealg_list =;

static const struct xfrm_algo_list xfrm_calg_list =;

static struct xfrm_algo_desc *xfrm_find_algo(
	const struct xfrm_algo_list *algo_list,
	int match(const struct xfrm_algo_desc *entry, const void *data),
	const void *data, int probe)
{}

static int xfrm_alg_id_match(const struct xfrm_algo_desc *entry,
			     const void *data)
{}

struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id)
{}
EXPORT_SYMBOL_GPL();

struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id)
{}
EXPORT_SYMBOL_GPL();

struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id)
{}
EXPORT_SYMBOL_GPL();

static int xfrm_alg_name_match(const struct xfrm_algo_desc *entry,
			       const void *data)
{}

struct xfrm_algo_desc *xfrm_aalg_get_byname(const char *name, int probe)
{}
EXPORT_SYMBOL_GPL();

struct xfrm_algo_desc *xfrm_ealg_get_byname(const char *name, int probe)
{}
EXPORT_SYMBOL_GPL();

struct xfrm_algo_desc *xfrm_calg_get_byname(const char *name, int probe)
{}
EXPORT_SYMBOL_GPL();

struct xfrm_aead_name {};

static int xfrm_aead_name_match(const struct xfrm_algo_desc *entry,
				const void *data)
{}

struct xfrm_algo_desc *xfrm_aead_get_byname(const char *name, int icv_len, int probe)
{}
EXPORT_SYMBOL_GPL();

struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx)
{}
EXPORT_SYMBOL_GPL();

struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx)
{}
EXPORT_SYMBOL_GPL();

/*
 * Probe for the availability of crypto algorithms, and set the available
 * flag for any algorithms found on the system.  This is typically called by
 * pfkey during userspace SA add, update or register.
 */
void xfrm_probe_algs(void)
{}
EXPORT_SYMBOL_GPL();

int xfrm_count_pfkey_auth_supported(void)
{}
EXPORT_SYMBOL_GPL();

int xfrm_count_pfkey_enc_supported(void)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();