Date: Sat, 10 Jun 2000 09:13:30 +0200 From: Mark Murray <mark@grondar.za> To: "Andrey A. Chernov" <ache@FreeBSD.ORG> Cc: Mark Murray <mark@grondar.za>, "Jeroen C. van Gelderen" <jeroen@vangelderen.org>, Kris Kennaway <kris@FreeBSD.ORG>, current@FreeBSD.ORG Subject: Re: mktemp() patch Message-ID: <200006100713.JAA04771@grimreaper.grondar.za> In-Reply-To: <20000609155342.B33329@freebsd.org> ; from "Andrey A. Chernov" <ache@FreeBSD.ORG> "Fri, 09 Jun 2000 15:53:42 MST." References: <20000609155342.B33329@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Why not just XOR the whole lot into the current ${randomnumber}? > > That way, at least the effort of the whole calculation is not wasted > > as much. > > Why to XOR true random bits from arc4random() with non-random bits from > getpid()? It only weakens. Better way is just remove any getpid() code and > left arc4random() only. Rubbish. A XOR B is random if at least one of A or B is random. That is a pretty fundamental theorem of Cryptography. My suggestion _strengthens_ the random number. All you lose is one bit if it turns out that BOTH A and B are random, because they get combined into one. 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?200006100713.JAA04771>