Bug#537952: Use more random random seed than localtime

Damyan Ivanov dmn at debian.org
Wed Jul 22 08:35:03 UTC 2009


-=| Jonathan Yu, Tue, Jul 21, 2009 at 10:43:33PM -0400 |=-
> On Tue, Jul 21, 2009 at 7:03 PM, Don Armstrong<don at debian.org> 
> wrote:
> > Package: libmath-random-perl
> > Severity: normal
> >
> > Math::Random has its random number only based on localtime:
> >
> > $ for a in $(seq 1 20); do perl -MMath::Random=random_uniform -e 'print join(q( ),random_uniform(4)),qq(\n)'; done;
> > 0.489988645840918 0.579920159789368 0.993361818807086 0.955731167568429
> > 0.489988645840918 0.579920159789368 0.993361818807086
> > [...]
> 
> Maybe a simpler solution (which doesn't require changes to the local
> Math::Random) would be to use a module like Math::TrulyRandom to get

Yeah, right. (not)

I believe the patch Don is about to send will require smaller changes. 
Having some conditional code would be nice so that it doesn't break 
5.8 installs, but that's it. Then we forward it upstream and let them 
decide.

> some truly random data, or otherwise get the data from, say,
> /dev/random, to use as your seed. You can then set Math::Random's seed
> using random_set_seed(@seed)

Which is outsiide of the scope of this particular module, I believe.

-- 
dam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090722/45f4c9ac/attachment.pgp>


More information about the pkg-perl-maintainers mailing list