NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/38883: Replace the algorithm used by random (3) by the Mersenne Twister (mertwist.c)



The following reply was made to PR lib/38883; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: 10.50%free.fr@localhost, gnats-bugs%netbsd.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
        netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/38883: Replace the algorithm used by random (3) by the
        Mersenne Twister (mertwist.c)
Date: Mon, 25 Aug 2008 03:23:54 +0000

 On Sat, Jun 07, 2008 at 12:15:01PM +0000, 10.50%free.fr@localhost wrote:
  > The Mersenne Twister algorithm has a virtually infinite period, a
  > very smooth distribution and meets all but the most stringent
  > requirements (read: cryptographic use) for a pseudorandom (PR)
  > generator. Furthermore it is fast and already implemented in
  > src/sys/lib/libkern/mertwist.c. It is therefore superior to the
  > current random (3) algorithm we use.
  > 
  > Thus, why not implement it as the standard algorithm for random (3)
  > group of calls?
 
 We can't (or at least shouldn't) do this because it would break the
 initstate() and setstate() interface to random(3).
 
 If it's vastly better, it might be worth that breakage, but that's not
 the impression I have.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index