lkml.org 
[lkml]   [1996]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: random() in kernel
On Mon, 27 May 1996, Pedro Roque Marques wrote:

>
> Hi,
>
> I need to obtain random numbers in the kernel, to be more clear i'm
> looking for statistic random numbers. Since there are a lot of people
> out there that got some handly algorithms i would like a pointer to
> them. The generator doesn't need to be very good, size and speed are
> major concerns. The reason why the phisical event counter based
> entropy is not too good for my purposes is that the generator will be
> called right after system initialization and the fact that the
> objective is obtaining equally distributed numbers.
>
> What is in question here is the right time to send packets to the
> network to avoid colisions.
>
> ./Pedro.

You can use dd to pull a 1k block from /dev/urandom at startup and save it
to a file, and you can cat file > /dev/random to 'seed' the generator... I
think it's described more in the /usr/src/linux/*/random.c wherever it is.

__kmb203@psu.edu_________________________Debian__1.1___Linux__1.99.7___
"Love is a snowmobile racing across the tundra and then suddenly it
flips over, pinning you underneath. At night, the ice weasels come."
-- Matt Groening



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.076 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site