From owner-freebsd-current Wed Jun 7 23:29:14 2000 Delivered-To: freebsd-current@freebsd.org Received: from grimreaper.grondar.za (grimreaper.grondar.za [196.7.18.138]) by hub.freebsd.org (Postfix) with ESMTP id 0E42D37B835; Wed, 7 Jun 2000 23:29:01 -0700 (PDT) (envelope-from mark@grondar.za) Received: from grimreaper.grondar.za (localhost [127.0.0.1]) by grimreaper.grondar.za (8.9.3/8.9.3) with ESMTP id IAA04362; Thu, 8 Jun 2000 08:29:07 +0200 (SAST) (envelope-from mark@grimreaper.grondar.za) Message-Id: <200006080629.IAA04362@grimreaper.grondar.za> To: Kris Kennaway Cc: current@FreeBSD.ORG Subject: Re: mktemp() patch References: In-Reply-To: ; from Kris Kennaway "Wed, 07 Jun 2000 18:11:04 MST." Date: Thu, 08 Jun 2000 08:29:07 +0200 From: Mark Murray Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi > + /* Encode the PID (with 1 bit of randomness) into 3 base-64 chars */ > + pid = getpid() | (arc4random() & 0x00020000); What is the purpose of this? It looks hugely wasteful to me. If you really need a single random bit, it is not good to waste a block of hard-gained gryptographic randomness; can you not use a pseudo-random bit-generator? M -- Mark Murray Join the anti-SPAM movement: http://www.cauce.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message