[OpenID] Is there interest in such a Perl module
Martin Foster
martin at ethereal-realms.org
Sat Apr 14 22:08:53 UTC 2007
Chris Drake wrote:
> Hi Martin,
>
> I use Crypt::Random - I think I wrote a fix for some problems it
> encounters during install a while ago... let me know if you're looking
> to try and use it - I might be able to help.
>
> Kind Regards,
> Chris Drake
>
Actually I found the problem, seems to be on how it attempts to generate
the value of G. I had attempted to test this before but it never
materialized until this time.
Essentially given a prime of P and Q:
# Generation of G
print STDERR "\nOpenID: Generating G. " if $v;
my $e = ($p - 1) / $q;
my $h = Math::BigInt->new(2);
my $g;
{
print STDERR "#" if $v;
$g = $h->copy->bmodpow($e, $p);
$h++, redo if $g == 1;
}
print STDERR "\n" if $v;
This makes the code above will loop till hell freezes over. Anyone
know of a good way to prevent that? Or more specifically a quick way of
generating the value of G?
Martin Foster
Creator/Designer Ethereal Realms
martin at ethereal-realms.org
More information about the general
mailing list