Hi,

The first encryption has to be SHA-1.
Using the prompt command 'openssl dgst -sha1'
gives a different result compared to the Digest::SHA1

'openssl dgst -sha-1' code results in:
$string:0021232117891234AcquirerStatusRes2004-11-02T15:05:03.750ZSuccess| (64 chars)
|$sha1:|SHA1(./ctx)= 0d1d60ffb10663e6d50cda8280015efb7b06154 | (54 chars)
'Digest::SHA1 results:
|$string:0021232117891234AcquirerStatusRes2004-11-02T15:05:03.750ZSuccess| (64 chars)
|Digest::SHA1: @ÑÖûf>mPͨ(ï·°aT| (20 chars)

The result had to be a 160 bits output. (160 bites is 20 chars)

In the iDeal manual (sorry but it's in Dutch) http://www.rabobank.nl/images/handleiding_ideal_professional_2966322.pdf (page 26) there is a part where a signature is made using the command:
echo "test" | openssl dgst -sha1 -verify cert.pem -signature test.sig
where cert.pem is my certificate and test.sig is the output.
It give an error: 'unable to load key file', although the file exists and is accessible

Should I use the openssl command or perform the 3 encryption steps by my self?

In reply to Re^2: RSA encryption for (Ducth) iDeal payment by Eric66
in thread RSA encryption for (Ducth) iDeal payment by Eric66

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.