Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Jun 2000 08:29:07 +0200
From:      Mark Murray <mark@grondar.za>
To:        Kris Kennaway <kris@FreeBSD.ORG>
Cc:        current@FreeBSD.ORG
Subject:   Re: mktemp() patch 
Message-ID:  <200006080629.IAA04362@grimreaper.grondar.za>
In-Reply-To: <Pine.BSF.4.21.0006071758550.11848-100000@freefall.freebsd.org> ; from Kris Kennaway <kris@FreeBSD.ORG>  "Wed, 07 Jun 2000 18:11:04 MST."
References:  <Pine.BSF.4.21.0006071758550.11848-100000@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006080629.IAA04362>