crypto: prng - Deterministic CPRNG
authorNeil Horman <nhorman@tuxdriver.com>
Mon, 7 Jul 2008 14:41:31 +0000 (22:41 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jul 2008 12:35:18 +0000 (20:35 +0800)
This patch adds a cryptographic pseudo-random number generator
based on CTR(AES-128).  It is meant to be used in cases where a
deterministic CPRNG is required.

One of the first applications will be as an input in the IPsec IV
generation process.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Kconfig
crypto/Makefile
crypto/prng.c [new file with mode: 0644]
crypto/prng.h [new file with mode: 0644]

index 795e31c..43b7473 100644 (file)
@@ -666,6 +666,15 @@ config CRYPTO_LZO
        help
          This is the LZO algorithm.
 
+comment "Random Number Generation"
+
+config CRYPTO_PRNG
+       tristate "Pseudo Random Number Generation for Cryptographic modules"
+       help
+         This option enables the generic pseudo random number generator
+         for cryptographic modules.  Uses the Algorithm specified in
+         ANSI X9.31 A.2.4
+
 source "drivers/crypto/Kconfig"
 
 endif  # if CRYPTO
index d4f3ed8..ef61b3b 100644 (file)
@@ -69,7 +69,7 @@ obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
 obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
 obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o
 obj-$(CONFIG_CRYPTO_LZO) += lzo.o
-
+obj-$(CONFIG_CRYPTO_PRNG) += prng.o
 obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
 
 #
diff --cc crypto/prng.c
Simple merge
diff --cc crypto/prng.h
Simple merge