crypto: implement new prng, Vegard's PRNG
PATCH 1/1 crypto: implement new prng, Vegard's PRNG
Quoted 1 line
From
0dea4a79c856eb5d0897fa3c83fd7b4aa1b5150fMon Sep 17 00:00:00 2001
From: Vegard Nossum <[email protected]>
Date: Fri, 23 Jan 2009 20:17:08 +0100
Subject: [PATCH] crypto: implement new prng, Vegard's PRNG
Hi,
I realize that submitting a non-cryptographically secure algorithm to a crypto mailing list might not make too much sense. On the other hand, it shouldn't hurt either, and I've written this, so why not? I don't know if this is actually useful for anything at all, so this patch is more of an "it exists" rather than a serious patch submission.
The only obvious property of this algorithm is its fixed, known sequence period.
(Note: I didn't actually test the code either, so it could all be wrong.)
--- crypto/Kconfig | 7 ++ crypto/Makefile | 1 + crypto/vprng.c | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+), 0 deletions(-) create mode 100644 crypto/vprng.c
crypto/Kconfig +7 -0
@@ -734,6 +734,13 @@ config CRYPTO_ANSI_CPRNG for cryptographic modules. Uses the Algorithm specified in ANSI X9.31 A.2.4 +config CRYPTO_VPRNG + tristate "Vegard's Pseudo-Random Number Generator" + select CRYPTO_RNG + help + A very simple PRNG. WARNING: This algorithm is not + cryptographically secure! + source "drivers/crypto/Kconfig" endif # if CRYPTO
crypto/Makefile +1 -0
@@ -77,6 +77,7 @@ obj-$(CONFIG_CRYPTO_LZO) += lzo.o obj-$(CONFIG_CRYPTO_RNG2) += rng.o obj-$(CONFIG_CRYPTO_RNG2) += krng.o obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o +obj-$(CONFIG_CRYPTO_VPRNG) += vprng.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o #
crypto/vprng.c new file +179 -0
179 lines not on this page · raw message
Signature · 1 line
1.6.0.6
Herbert Xu
maintainerQuoted 7 lines · Vegard Nossum
I realize that submitting a non-cryptographically secure algorithm to a crypto mailing list might not make too much sense. On the other hand, it shouldn't hurt either, and I've written this, so why not? I don't know if this is actually useful for anything at all, so this patch is more of an "it exists" rather than a serious patch submission.
Quoted 6 lines
The only obvious property of this algorithm is its fixed, known sequence period.
(Note: I didn't actually test the code either, so it could all be wrong.)
Signed-off-by Vegard Nossum <[email protected]>
If we actually had an in-kernel user for this then I'd be more than happy to add this :)
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt