[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `Random' seed.



-----BEGIN PGP SIGNED MESSAGE-----

    From: Richard Martin <[email protected]>
    Date: Wed, 20 Sep 1995 09:15:49 -0400

    Vaporware which I heard around CFP '95, and have been sort of
    wondering about ever since...

    Some one told me that some one else [possibly Matt Blaze] had been
    looking at how much randomness could be got by forking two child
    processes which would just run as asynchronous clocks: whenever
    the parent program needs a little `random' bit, it queries both
    and gives (clock(A) + clock(B) % 2) or something.

I've played around with something that Matt posted here a while back
which seems to use the same idea.  Matt suggested that this appears to
emit one random bit per second.  I've done some very lightweight
analysis and haven't seen anything to suggest that the output is not
random, but I wouldn't make any bets based on what I've done.

FWIW, I discussed this code briefly with an engineer at Netscape a
while back . . . .

			Rick

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/* -*- Mode: C -*- */

/*********************************************************************

This is from a message on the Cypherpunks mailing list:

 Posted-Date: Fri, 20 Jan 95 03:36:17 -0500
 Message-Id: <[email protected]>
 To: [email protected]
 Subject: Re: Threats in real life - what are we worried about? 
 Date: Fri, 20 Jan 95 03:36:17 -0500
 From: Matt Blaze <[email protected]>

*********************************************************************/

#include <stdio.h>
#include <signal.h>
int count=0;
void printbit()
{
	signal(SIGALRM,printbit);
	alarm(1);
	printf("%1d",count&01);
	fflush(stdout);
}
main()
{
	signal(SIGALRM,printbit);
	alarm(1);
	while (1)
		count++;
}

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMGXhPZNR+/jb2ZlNAQEkdgQAlVBgpN8LLeb9TM0dhy1Bx7KXfHCiIqV6
UoLRm/hoEzsiOnGbJeNlx2n1dyxdmti/Zvacnsi2CAKHhJGAaARcQGy+hWc6uS3v
nbOqOoFkvRlWYyYV6QLgvKckYM+tbYBvrjQgQ/XivpoPQPbzyRI6cW4soLuJ7fpu
xug5C8yYc8A=
=dT9a
-----END PGP SIGNATURE-----