Skip Menu |

This queue is for tickets about the Crypt-DSA CPAN distribution.

Report information
The Basics
Id: 14281
Status: open
Priority: 0/
Queue: Crypt-DSA

People
Owner: Nobody in particular
Requestors: bricas [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.13
Fixed in: (no value)



Subject: makerandom() not portable
Hi, Crypt::DSA version 0.13 introducted a new utility method: makerandom(). However, this method tries to open '/dev/random' which is obviously not portable. Also, on Trustix 3.0, reading from '/dev/random' seems to take forever (it eventually works -- the test suite took 10 minutes to run through though :)! -Brian
From: emmanuel.rodriguez-santiago [...] hp.com
I am experiencing the same problem. The version 0.12 works fine but version 0.13 doesn't work at all. My environment is HPUX 11.11 with perl 5.8.7. I am not able to perform the tests, as they go into an infinite loop printing: Use of uninitialized value in numeric eq (==) at blib/lib/Crypt/DSA/KeyChain.pm line 128. Under HPUX the devices /dev/random and /dev/urandom don't exist. There is a patch that will provide the kernel module and that will create the devices but it requires a reboot. As you can understand I can't even propose to install the patch on some hosts! The version 0.12 is using Crypt::Random which is able to deal with the systems that lack a random generator device. Is it possible to revert back to use Crypt::Random?
From: emmanuel.rodriguez-santiago [...] hp.com
Show quoted text
> The version 0.12 is using Crypt::Random which is able to deal with the > systems that lack a random generator device. > Is it possible to revert back to use Crypt::Random?
It seems that using Crypt::Random works. I modified the file lib/Crypt/DSA/KeyChain.pm by adding the folling include: use Crypt::Random; Then I replaced the function makerandom with this one: sub makerandom { my $random = Crypt::Random::makerandom(@_); Math::BigInt->new($random); } It's important to wrap the results of Crypt::Random::makerandom in a Math::BigInt->new otherwise we will end up with the following errors: `copy' is not a Pari function name at Math/Pari.pm line 977. With this patch the unit tests pass, therefore I am assuming that it works.
From: emmanuel.rodriguez-santiago [...] hp.com
Show quoted text
> It seems that using Crypt::Random works. I modified the file > lib/Crypt/DSA/KeyChain.pm by adding the folling include: > use Crypt::Random;
I made a mistake, the file to modify is lib/Crypt/DSA/Util.pm, the modications are the one's provided in my last comment.
From: anon [...] nowhere.com
On Fri Feb 24 07:45:20 2006, guest wrote: Show quoted text
> > It seems that using Crypt::Random works. I modified the file > > lib/Crypt/DSA/KeyChain.pm by adding the folling include: > > use Crypt::Random;
> > I made a mistake, the file to modify is lib/Crypt/DSA/Util.pm, the > modications are the one's provided in my last comment.
This has resolved my problem on HP-UX 11.11. Thanks for the solution. I have been having multiple issues getting this to work.