From owner-freebsd-hackers Sat Mar 13 23: 2:45 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from gratis.grondar.za (gratis.grondar.za [196.7.18.65]) by hub.freebsd.org (Postfix) with ESMTP id C6DED14E90 for ; Sat, 13 Mar 1999 23:02:39 -0800 (PST) (envelope-from mark@grondar.za) Received: from greenpeace.grondar.za (greenpeace.grondar.za [196.7.18.132]) by gratis.grondar.za (8.9.2/8.9.2) with ESMTP id JAA15079; Sun, 14 Mar 1999 09:02:20 +0200 (SAST) (envelope-from mark@grondar.za) Received: from grondar.za (localhost [127.0.0.1]) by greenpeace.grondar.za (8.9.3/8.9.3) with ESMTP id JAA02264; Sun, 14 Mar 1999 09:02:22 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <199903140702.JAA02264@greenpeace.grondar.za> To: Greg Lehey Cc: hackers@FreeBSD.ORG Subject: Re: Randomness and vnodes In-Reply-To: Your message of " Sun, 14 Mar 1999 17:15:29 +1030." <19990314171529.Z429@lemis.com> References: <199903131704.TAA97969@greenpeace.grondar.za> <19990314112807.K429@lemis.com> <199903140618.IAA64577@greenpeace.grondar.za> <19990314171529.Z429@lemis.com> Date: Sun, 14 Mar 1999 09:02:20 +0200 From: Mark Murray Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg Lehey wrote: > > For interrupts, the interrupt number is used; for the keyboard, scancodes; > > the available environmental stuff in the namei cache is centred around > > vnodes, so I'm looking for dirt in them. Heck - I may just xor the whole > > thing into an int to get some junk if necessary. > > I don't think xoring would be very random, given the number of fields > with predictable content. That's my main concern with using vnodes in > the first place, but if you want to use them, you should at least > divide and get a remainder. Ah! There is a theorem (sez Schneier) that says that if you xor two bits and only one of them is truly random, then the result is truly random. By xor'ing the lot, I shall get any randomness that is anywhere in the structure. However, I may lose some, and I may waste time if only a subset of the struct is random enough. M -- Mark Murray Join the anti-SPAM movement: http://www.cauce.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message