linux/crypto/rng.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Cryptographic API.
 *
 * RNG operations.
 *
 * Copyright (c) 2008 Neil Horman <[email protected]>
 * Copyright (c) 2015 Herbert Xu <[email protected]>
 */

#include <crypto/internal/rng.h>
#include <linux/atomic.h>
#include <linux/cryptouser.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/random.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <net/netlink.h>

#include "internal.h"

static DEFINE_MUTEX(crypto_default_rng_lock);
struct crypto_rng *crypto_default_rng;
EXPORT_SYMBOL_GPL();
static int crypto_default_rng_refcnt;

int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)
{}
EXPORT_SYMBOL_GPL();

static int crypto_rng_init_tfm(struct crypto_tfm *tfm)
{}

static unsigned int seedsize(struct crypto_alg *alg)
{}

static int __maybe_unused crypto_rng_report(
	struct sk_buff *skb, struct crypto_alg *alg)
{}

static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
	__maybe_unused;
static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
{}

static const struct crypto_type crypto_rng_type =;

struct crypto_rng *crypto_alloc_rng(const char *alg_name, u32 type, u32 mask)
{}
EXPORT_SYMBOL_GPL();

int crypto_get_default_rng(void)
{}
EXPORT_SYMBOL_GPL();

void crypto_put_default_rng(void)
{}
EXPORT_SYMBOL_GPL();

#if defined(CONFIG_CRYPTO_RNG) || defined(CONFIG_CRYPTO_RNG_MODULE)
int crypto_del_default_rng(void)
{}
EXPORT_SYMBOL_GPL();
#endif

int crypto_register_rng(struct rng_alg *alg)
{}
EXPORT_SYMBOL_GPL();

void crypto_unregister_rng(struct rng_alg *alg)
{}
EXPORT_SYMBOL_GPL();

int crypto_register_rngs(struct rng_alg *algs, int count)
{}
EXPORT_SYMBOL_GPL();

void crypto_unregister_rngs(struct rng_alg *algs, int count)
{}
EXPORT_SYMBOL_GPL();

MODULE_LICENSE();
MODULE_DESCRIPTION();