Now I remember why I linked Crypt OpenPGP Brain twister, its a Short, Self Contained, Correct Example, in otherwords, more effective :)

If you modify Crypt-OpenPGP-1.06\t\12-sign.t at the first verify call, you can see that this is to be expected

my( $signer , $sigobj ) = $pgp->verify( Signature => $sig ); use DDS; die Dump( [ $key_id , $sigobj->key_id, unpack('H*', $sigo +bj->key_id ) , pack('H*',$key_id) ] );

$ARRAY1 = [ '39F560A90D7F1559', "9\365`\251\r\177\25Y", '39f560a90d7f1559', "9\365`\251\r\177\25Y" ];

I don't know if keyid is supposed to be 8 or 10 or 16, but the round trip with pack seems to work , so key_id is correct, and the hex representation is correct

AFAIK printf would actually try to convert it, which might overflow as in

$ perl -le " print 0x39f560a90d7f1559 Integer overflow in hexadecimal number at -e line 1. 4.17635050864817e+018

Maybe this is the private key, and you're looking for the public key? Maybe it depends on algorithm? :)


In reply to Re^5: Stumped by Crypt::OpenPGP::Signature->key_id by Anonymous Monk
in thread Stumped by Crypt::OpenPGP::Signature->key_id by mhi

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.