Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Help verifying RSA PSS signature in Perl with Crypt::RSA and Crypt::RSA::SS::PSS

by Athanasius (Abbot)
on Mar 31, 2013 at 04:01 UTC ( #1026327=note: print w/ replies, xml ) Need Help??


in reply to Help verifying RSA PSS signature in Perl with Crypt::RSA and Crypt::RSA::SS::PSS

Hello cryptques, and welcome to the Monastery!

I've tested those two modules and I *am* able to generate and verify a PSS signature in Perl...

Are you sure it’s working correctly? When I run your script with the line:

print ($verify ? 'verified' : 'failed'), "\n";

added at the end, I get an intermittent error:

13:17 >perl 592_SoPW.pl verified 13:17 >perl 592_SoPW.pl verified 13:17 >perl 592_SoPW.pl verified 13:18 >perl 592_SoPW.pl PARI: *** forbidden division t_INT % t_REAL. at C:/Perl/Strawberry +/spp-spec-64int-5.16.0.1-beta3-32bit-portable/perl/vendor/lib/Crypt/R +SA/Key/Private.pm line 127. 13:18 >

I’m running the latest version (1.99) of Crypt::RSA.

With a little detective work using eval and Carp, it appears the error is generated by the line:

$signature = $pss->sign ( Message => $message, Key => $private ) || die $pss->errstr;

Maybe some other monk knows of a fix or workaround?

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


Comment on Re: Help verifying RSA PSS signature in Perl with Crypt::RSA and Crypt::RSA::SS::PSS
Select or Download Code
Re^2: Help verifying RSA PSS signature in Perl with Crypt::RSA and Crypt::RSA::SS::PSS
by cryptques (Novice) on Mar 31, 2013 at 09:19 UTC

    Yikes, you're right, Athanasius! It fails intermittently!

    When I run the script several times consecutively it sometimes fails with the same PARI "forbidden division" error that you point out. I hadn't seen that before.

    Sounds like a bug in Math::Pari, which I had to build in order to build Crypt::RSA :-(

    Thanks for your help and for taking time to try it out. I'll have to figure out some other way of doing this...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (15)
As of 2015-07-01 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (12 votes), past polls