[OT] Combinatronics WAS Re: /dev/random and linux security issues (kinda long)

aluminumsulfate at earthlink.net aluminumsulfate at earthlink.net
Wed May 18 00:55:01 EDT 2005


   From: clark_k at pannaway.com (Kevin D. Clark)
   Date: Tue, 17 May 2005 08:22:07 -0400

   I sent these to Dave yesterday but I haven't heard any feedback yet.
   I've done a small amount of testing with these and they seem to work
   just fine.  If you find a bug in these, please let me know.

   This code uses "bigint" because, after all, we're dealing with
   integers.

I just love it when someone mails me code and says, "Here, run this
Perl script." :)

On your advice, I changed "use bignum" to "use bigint" in my code, and
the results agree with both your script and my LISP version.  How odd
it is that, using "use bignum", the incorrect output from 10-to-95 can
be fed into 95-to-10 to return the original number. !?!

If you look at the man page for bignum, it's pretty clear that it
claims to use Math::BigInt.  So I don't understand why using bigint
explicitly would change anything (except, perhaps, the need for int()
around the / operation).  Maybe it's a bug in bignum.  Maybe it's a
bug in the documentation.  AFAIK, simply changing bignum to bigint
shouldn't alter program function.

With the exception of printing "0" on receipt of malformed input
(i.e., the null string), your program appears to work correctly.  (And
it didn't appear to infect my system with any wierd number-coded
trojan worm. :)



More information about the gnhlug-discuss mailing list