Date: Sun, 25 Feb 2001 08:26:10 -0800 (PST) From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Kris Kennaway <kris@obsecurity.org> Cc: arch@FreeBSD.ORG Subject: Re: cvs commit: ports/astro/xglobe/files patch-random Message-ID: <200102251626.f1PGQAe39000@troutmask.apl.washington.edu> In-Reply-To: <20010225005813.A29124@mollari.cthul.hu> from Kris Kennaway at "Feb 25, 2001 00:58:13 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway wrote: > On Sun, Feb 25, 2001 at 09:52:40AM +0100, Erik Trulsson wrote: > > > No, the algorithm of rand() is not standardized in the C standard. > > > > OTOH, there is an example of a portable implementation of rand() in the > > C standard and FreeBSD uses the same algorithm (as does many other > > implementations of rand()). This is probably what you were thinking of. > > > > As long as rand() and srand() behaves as describe in the man-page for > > rand(3) they confirm to the C standard. (Provided that RAND_MAX is at > > least 32767.) > > That's good to know. I'll look at replacing it with something better > that has the same semantics, so we solve this problem at the source. > > Kris Kris, If you're looking for a candidate algorithm, you might consider the Mersenne Twister (MT). http://www.math.keio.ac.jp/~matumoto/emt.html MT is for Monte Carlos type work. It isn't crypto strong. -- Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102251626.f1PGQAe39000>