Update: Curtis Leach had a similar issue in 2009 and sought help on the internet, with no response to his issue. It is the similar to here. As he pointed out, and I confirmed on my machine, there are four possible combinations here and one of the four fails (unfortunately, it is the critical one for my situation and Curtis').

  1. Encrypt with gpg and decrypt with gpg.
    Works fine, as expected
  2. Encrypt with perl using Crypt::OpenPGP and decrypt with gpg.
    Works fine.
  3. Encrypt with perl using Crypt::OpenPGP and decrypt with perl using Crypt::OpenPGP
    Works fine.
  4. Encrypt with gpg and decrypt with perl using Crypt::OpenPGP
    Failure with "Symkey decrypt failed: Invalid secret key ID" message. This is the situation described above

In fact, for the last combination in my case, the file was encrypted by javascript on another machine. However, if I generated an encrypted file with gpg the same error arises.


In reply to Re: Need help decoding string in Crypt::OpenPGP by jaf0faj
in thread Need help decoding string in Crypt::OpenPGP by jaf0faj

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.