FryingFinn has asked for the wisdom of the Perl Monks concerning the following question:

I started to try encrypting files. As my 1st attempt I installed Crypt::RSA module -- which downloaded & installed the PARI software. The latter generated large numbers of warnings but apparently installed ok. But when I run the simple script below I get this error..
PARI: *** exponent overflow at /Library/Perl/5.12/Crypt/Primes.pm 

Mac OSX 10.8.5

This is perl 5, version 12, subversion 4 (v5.12.4) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
#!/usr/bin/perl use Crypt::RSA; my $rsa = new Crypt::RSA; my ($public, $private) = $rsa->keygen ( Identity => 'Lord Macbeth <macbeth@glamis.com>', Size => 256, Password => 'A day so foul & fair', Verbosity => 1, ) or die $rsa->errstr(); print $public;
I not sure what to do ?

Replies are listed 'Best First'.
Re: Primes.pm exponent overflow
by kcott (Archbishop) on Jan 24, 2014 at 12:19 UTC

    G'day FryingFinn,

    Modifying the system Perl is a bad idea. Changes you make may affect how the OS operates. Updates to the OS may affect how your programs work.

    There are various options available for Mac OSX. I've been using Perlbrew for some years without any problems. Not only does this avoid interference with the system Perl, it also allows you to install more recent versions (5.18.2 is the current stable version).

    I recommend you install a version of Perl for your own use before following the advice to update modules.

    -- Ken

Re: Primes.pm exponent overflow
by Anonymous Monk on Jan 23, 2014 at 22:50 UTC

    I not sure what to do ?

    Try upgrading to latest version of modules ... to see if that fixes it

    Make a bug report in the appropriate place :)