in reply to PRNG: Modules/Testing

Sounds like a nice idea.

You might also want to look at Math::Random::MT, Math::Random::TT800 and Crypt::OpenSSL::Random

While not PRNG you might also be interested in looking at Math::RandomOrg and Math::TrulyRandom.

Implementation wise, I would build it with Test::Builder so it can happily work with the rest of the happy band of Perl testing modules.

Replies are listed 'Best First'.
Re: Re: PRNG: Modules/Testing
by OverlordQ (Hermit) on Jun 01, 2003 at 22:28 UTC
    I'll have to check those other 4 modules, but still I'm having problems with Math::TrulyRandom. I forced the install of the module, ignoreing make test not working, and when the truly_random_value() sub get's called, that's when it usually hangs, eats cpu, and does nothing.

      Works fine on my box (Mac OS X, perl 5.8). I'm afraid I don't have enough XS-fu to offer any advice on getting it running. Might be worth submitting a bug report.

      May not be what you're looking for anyway... from the C source:

      /* * WARNING: depending on the particular platform, truerand() output ma +y * be biased or correlated. In general, you can expect about 16 bits +of * "pseudo-entropy" out of each 32 bit word returned by truerand(), * but it may not be uniformly diffused. You should therefore run * the output through some post-whitening function (like MD5 or DES or * whatever) before using it to generate key material. (RSAREF's * random package does this for you when you feed truerand() bits to t +he * seed input function.) * * Test these assumptions on your own platform before fielding a syste +m * based on this software or these techniques. * * This software seems to work well (at 16 bits per truerand() call) o +n * a Sun Sparc-20 under SunOS 4.1.3 and on a P100 under BSDI 2.0. You +'re * on your own elsewhere. */