Submitted By:            ??
Date:                    ??
Initial Package Version: 2.6.18
Upstream Status:         Not submitted
Description:             Increases security as well as randomizer's randomness.

--- linux-2.6.18/drivers/char/Kconfig.orig	2006-09-20 21:03:25.000000000 -0500
+++ linux-2.6.18/drivers/char/Kconfig	2006-09-20 21:13:29.000000000 -0500
@@ -95,6 +95,7 @@
 
 	  Most people can say N here.
 
+
 config COMPUTONE
 	tristate "Computone IntelliPort Plus serial support"
 	depends on SERIAL_NONSTANDARD
@@ -689,6 +690,34 @@
 
 source "drivers/char/hw_random/Kconfig"
 
+config SELECT_ENTROPY_POOL_SIZE
+       def_bool y
+choice
+       prompt "Entropy pool size"
+       default SMALL_ENTROPY_POOL
+
+config SMALL_ENTROPY_POOL_SIZE
+       bool "Small size entropy pool"
+       help
+         This option keeps entropy DEFAULT_POOL_SIZE at the default of
+         512 bytes.
+
+config MEDIUM_ENTROPY_POOL_SIZE
+       bool "Medium size entropy pool"
+       help
+         The option increases the DEFAULT_POOL_SIZE from 512 to 1024 bytes,
+         the SECONDARY_POOL_SIZE from 128 to 256 bytes, and BATCH_ENTROPY_SIZE
+         from 256 to 512 bytes.
+
+config LARGE_ENTROPY_POOL_SIZE
+       bool "Large size entropy pool"
+       help
+         The option increases the DEFAULT_POOL_SIZE from 512 to 2048 bytes,
+         the SECONDARY_POOL_SIZE from 128 to 256 bytes, and BATCH_ENTROPY_SIZE
+         from 256 to 512 bytes.
+
+endchoice
+
 config NVRAM
 	tristate "/dev/nvram support"
 	depends on ATARI || X86 || ARM || GENERIC_NVRAM
--- linux-2.6.18/drivers/char/random.c.orig	2006-09-19 22:42:06.000000000 -0500
+++ linux-2.6.18/drivers/char/random.c	2006-09-20 21:17:44.000000000 -0500
@@ -248,8 +248,17 @@
 /*
  * Configuration information
  */
+#if defined(CONFIG_MEDIUM_ENTROPY_POOL_SIZE)
+#define INPUT_POOL_WORDS 256
+#define OUTPUT_POOL_WORDS 64
+#elif defined(CONFIG_LARGE_ENTROPY_POOL_SIZE)
+#define INPUT_POOL_WORDS 512
+#define OUTPUT_POOL_WORDS 128
+#else
+/* Default to vanilla pool size. */
 #define INPUT_POOL_WORDS 128
 #define OUTPUT_POOL_WORDS 32
+#endif
 #define SEC_XFER_SIZE 512
 
 /*
