#/opt/perl/bin/perl -E 'use Crypt::RSA::Key; my($pari,$big) = ($Math::Pari::VERSION, $Math::BigInt::VERSION); my $lib = Math::BigInt->config()->{lib} if $big; printf "Using %s\n", $pari ? "Pari $pari" : $big ? "BigInt with $lib" : "???";' Using BigInt with Math::BigInt::GMP #### my $ct = $pgp->encrypt( Filename => 'plain.txt', Recipients => $key, Cipher => 'DES3' ) or die "Encryption failed: ", $pgp->errstr; #### #truss ./encrypt_openpgp.pl 2>&1 | grep open | grep Pari open64("/opt/perl-5.26.0/lib/site_perl/5.26.0/sun4-solaris-thread-multi/Math/Pari.pm", O_RDONLY) = 4 open("/opt/perl-5.26.0/lib/site_perl/5.26.0/sun4-solaris-thread-multi/auto/Math/Pari/Pari.so", O_RDONLY) = 4 #### ./encrypt_openpgp.pl No random source available! at /opt/perl-5.26.0/lib/site_perl/5.26.0/Crypt/OpenPGP/Util.pm line 111. #### sub get_random_bytes { 103 my $length = shift; 104 if (eval 'require Crypt::Random; 1;') { 105 return Crypt::Random::makerandom_octet( Length => $length); 106 } 107 elsif (eval 'require Bytes::Random::Secure; 1;') { 108 return Bytes::Random::Secure::random_bytes($length); 109 } 110 else { 111 die "No random source available!"; 112 } 113 }