summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-06-03 14:49:32 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-06-04 15:05:02 +0800
commita5b151d11cdf8b88ccace32fa0bd23962cbca20a (patch)
tree3bf614ee87ee4a2796e51f3c74f48cde18d12c0c /crypto
parent401e4238f35c7a21d32bc27370d4d045f7019c20 (diff)
downloadlinux-a5b151d11cdf8b88ccace32fa0bd23962cbca20a.tar.gz
linux-a5b151d11cdf8b88ccace32fa0bd23962cbca20a.tar.bz2
linux-a5b151d11cdf8b88ccace32fa0bd23962cbca20a.zip
crypto: rng - Remove krng
This patch removes krng so that DRBG can take its place. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/Makefile1
-rw-r--r--crypto/krng.c61
2 files changed, 0 insertions, 62 deletions
diff --git a/crypto/Makefile b/crypto/Makefile
index e6cf6a5426ab..83b3c4496ec7 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -95,7 +95,6 @@ obj-$(CONFIG_CRYPTO_LZ4) += lz4.o
obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o
obj-$(CONFIG_CRYPTO_842) += 842.o
obj-$(CONFIG_CRYPTO_RNG2) += rng.o
-obj-$(CONFIG_CRYPTO_RNG2) += krng.o
obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o
obj-$(CONFIG_CRYPTO_DRBG) += drbg.o
CFLAGS_jitterentropy.o = -O0
diff --git a/crypto/krng.c b/crypto/krng.c
deleted file mode 100644
index 40ed78e32fa5..000000000000
--- a/crypto/krng.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * RNG implementation using standard kernel RNG.
- *
- * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * any later version.
- *
- */
-
-#include <crypto/internal/rng.h>
-#include <linux/err.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/random.h>
-
-static int krng_generate(struct crypto_rng *tfm,
- const u8 *src, unsigned int slen,
- u8 *rdata, unsigned int dlen)
-{
- get_random_bytes(rdata, dlen);
- return 0;
-}
-
-static int krng_seed(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)
-{
- return 0;
-}
-
-static struct rng_alg krng_alg = {
- .generate = krng_generate,
- .seed = krng_seed,
- .base = {
- .cra_name = "stdrng",
- .cra_driver_name = "krng",
- .cra_priority = 200,
- .cra_module = THIS_MODULE,
- }
-};
-
-
-/* Module initalization */
-static int __init krng_mod_init(void)
-{
- return crypto_register_rng(&krng_alg);
-}
-
-static void __exit krng_mod_fini(void)
-{
- crypto_unregister_rng(&krng_alg);
-}
-
-module_init(krng_mod_init);
-module_exit(krng_mod_fini);
-
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Kernel Random Number Generator");
-MODULE_ALIAS_CRYPTO("stdrng");
-MODULE_ALIAS_CRYPTO("krng");