]> git.karo-electronics.de Git - karo-tx-linux.git/commit
random32: seeding improvement
authorStephen Hemminger <shemminger@vyatta.com>
Wed, 30 Jul 2008 23:29:19 +0000 (16:29 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:05:05 +0000 (11:05 -0700)
commitc6ff0921d313ec31aed068b456f132a005dce59f
tree119fbb0705d092ef5f6d5b5a0fe047fa4fec1e66
parent689dafca8f3a1e442aa8f1005bca54dcea38f8ba
random32: seeding improvement

[ Upstream commit 697f8d0348a652593d195a13dd1067d9df911a82 ]

The rationale is:
   * use u32 consistently
   * no need to do LCG on values from (better) get_random_bytes
   * use more data from get_random_bytes for secondary seeding
   * don't reduce state space on srandom32()
   * enforce state variable initialization restrictions

Note: the second paper has a version of random32() with even longer period
and a version of random64() if needed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
lib/random32.c