From owner-freebsd-current Sat Jun 10 19:36:12 2000 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 542) id 4DF9B37BE79; Sat, 10 Jun 2000 19:36:10 -0700 (PDT) Date: Sat, 10 Jun 2000 19:36:10 -0700 From: "Andrey A. Chernov" To: Matthew Dillon Cc: "Jeroen C. van Gelderen" , Mark Murray , Kris Kennaway , current@FreeBSD.ORG Subject: Re: mktemp() patch Message-ID: <20000610193610.B99504@freebsd.org> References: <394124C3.221E61BC@vangelderen.org> <200006092002.WAA00773@grimreaper.grondar.za> <20000609155342.B33329@freebsd.org> <39417FA5.F260EAA8@vangelderen.org> <20000609232358.A38967@freebsd.org> <200006100653.XAA17619@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <200006100653.XAA17619@apollo.backplane.com>; from dillon@apollo.backplane.com on Fri, Jun 09, 2000 at 11:53:34PM -0700 Organization: Biomechanoid Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jun 09, 2000 at 11:53:34PM -0700, Matthew Dillon wrote: > :1) Just totally opposite: mixing random with non-random sources you'll get > :into collision much faster then with random source only. 2) Yet, of course, > :the code handles collisions. > : > :-- > :Andrey A. Chernov > : > > Think about it. If you mix a random number with a non-random number, > using xor, what you get is.... a random number. It's neither stronger > nor weaker. No, you'll get weaker random number, it badly affects random distribution. OR or AND will affect more. What you say is true only if second XOR part is 0 or -1 or changed between them or simple constant. I.e. if not _all_ bits XORed in the same way, it affects. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message