On Thu, Dec 12, 2013 at 1:09 PM, José Vázquez Fernández <
ppvazquez...@gmail.com> wrote:

> A couple of days ago found an old patch that adds rngd in busybox:
> http://lists.busybox.net/pipermail/busybox/2008-August/066784.html
> Because it is 5 years old will need some rework, but could be a good
> alternative to rng-tools.
> Also made a patch that has the option to select between /dev/hwrng
> or /dev/urandom in the mentioned package.
> The question is: which is the best option?
>
>  http://www.issihosts.com/haveged/
Always the best option. Never run out of entropy ever.

Also, ripped out of grsec ages ago:
$ cat /proc/sys/kernel/random/poolsize
16384
$ cat /proc/sys/kernel/random/entropy_avail
10253
$ cat /usr/src/linux/myPatches/001-entropy-poolsize.patch
--- linux-3.2.0-gentoo/drivers/char/random.c    2012-01-04
18:55:44.000000000 -0500
+++ linux/drivers/char/random.c    2012-01-06 04:23:56.683632647 -0500
@@ -261,8 +261,8 @@
 /*
  * Configuration information
  */
-#define INPUT_POOL_WORDS 128
-#define OUTPUT_POOL_WORDS 32
+#define INPUT_POOL_WORDS 512
+#define OUTPUT_POOL_WORDS 128
 #define SEC_XFER_SIZE 512
 #define EXTRACT_SIZE 10

@@ -300,10 +300,10 @@
     int poolwords;
     int tap1, tap2, tap3, tap4, tap5;
 } poolinfo_table[] = {
-    /* x^128 + x^103 + x^76 + x^51 +x^25 + x + 1 -- 105 */
+    /* x^512 + x^411 + x^308 + x^208 +x^104 + x + 1 -- 225 */
+    { 512,    411,    308,    208,    104,    1 },
+    /* x^128 + x^103 + x^76 + x^51 + x^25 + x + 1 -- 105 */
     { 128,    103,    76,    51,    25,    1 },
-    /* x^32 + x^26 + x^20 + x^14 + x^7 + x + 1 -- 15 */
-    { 32,    26,    20,    14,    7,    1 },
 #if 0
     /* x^2048 + x^1638 + x^1231 + x^819 + x^411 + x + 1  -- 115 */
     { 2048,    1638,    1231,    819,    411,    1 },
@@ -1228,7 +1214,7 @@
 #include <linux/sysctl.h>

 static int min_read_thresh = 8, min_write_thresh;
-static int max_read_thresh = INPUT_POOL_WORDS * 32;
+static int max_read_thresh = OUTPUT_POOL_WORDS * 32;
 static int max_write_thresh = INPUT_POOL_WORDS * 32;
 static char sysctl_bootid[16];
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to