From owner-freebsd-hackers Tue Oct 29 15:43:16 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA10179 for hackers-outgoing; Tue, 29 Oct 1996 15:43:16 -0800 (PST) Received: from gatekeeper.ray.com (gatekeeper.ray.com [138.125.162.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA10161 for ; Tue, 29 Oct 1996 15:42:59 -0800 (PST) From: Gregory_D_Moncreaff@ccmail.ed.ray.com Received: (mailer@localhost) by gatekeeper.ray.com (8.7.5/8.7.3) id SAA27797 for ; Tue, 29 Oct 1996 18:41:49 -0500 Received: from zeus.ed.ray.com by gatekeeper.ray.com; Tue Oct 29 18:41:09 1996 Received: from ccmail.ed.ray.com by ZEUS.ED.RAY.COM (PMDF V4.2-10 #4335) id <01IB84DD7JV4001TG9@ZEUS.ED.RAY.COM>; Tue, 29 Oct 1996 18:43:15 EST Date: Tue, 29 Oct 1996 18:24 -0500 (EST) Subject: A better kernel random() ?? To: freebsd-hackers@FreeBSD.org Message-id: <01IB84DEEOQM001TG9@ZEUS.ED.RAY.COM> MIME-version: 1.0 Content-transfer-encoding: 7BIT Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk I need a random (psuedo or otherwise) number generator for use in kernel network protocols (collision backoff, jitter, etc). I looked, at libkern/random.c and the seed is constant. I am looking for suggestions/algorithims for getting a more random sequence of numbers. The two machines are running the same kernel and are timed synced. I am thinking that a utility program could be written to change this seed value via a kernel memory write based on some combination of information, such as process id, address of a network interface, ??? Should the result of such a computaion have any numeric properties: number of bits set, oddness, not divisible by a single digit prime number, etc? Any other, better hopefully, ideas? thanks, g