From owner-freebsd-hackers Tue Aug 1 13:16:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smof.fiawol.org (fiawol.org [209.122.117.89]) by hub.freebsd.org (Postfix) with ESMTP id 354C437BF75; Tue, 1 Aug 2000 13:16:07 -0700 (PDT) (envelope-from jdc@fiawol.org) Received: (from jdc@localhost) by smof.fiawol.org (8.9.3/8.9.3) id QAA34620; Tue, 1 Aug 2000 16:16:00 -0400 (EDT) (envelope-from jdc) From: John Cochran Message-Id: <200008012016.QAA34620@smof.fiawol.org> Subject: Re: How to make *real* random bits. In-Reply-To: <5924.965073661@critter.freebsd.dk> "from Poul-Henning Kamp at Jul 31, 2000 10:01:01 pm" To: Poul-Henning Kamp Date: Tue, 1 Aug 2000 16:16:00 -0400 (EDT) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [snip...] > If I generate true random bits it takes 3 timestamps to get one > bit of randomness: > > T1: Time of event 1 > T2: Time of event 2 > T3: Time of event 3 > > if (T2 - T1 > T3 - T2) > return 0; > else if (T2 - T1 < T3 - T2) > return 1; > else > try again. > > In my rather crude setup it produces about 5 bits per second [3]. It seems to me that if you get about 15 events per second, then you should be able to produce about 7 to 8 random bits per second instead of only 5. What you're looking for is the difference (greater or less) between events. Because of this your T3 value can be considered the T1 value for the next random bit you generate. Also, someone else has already done this to generate truly random bits. Take a look at: http://www.fourmilab.ch/hotbits/ [snip] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message