<div dir="ltr">Hi Team,<div><br></div><div>Digital signature verification is failing. Getting "<b>Bad signature</b>" error. How to debug this??</div><div><br></div><div>Having some observations.</div><div><b>scenario 1</b>: Using 2 machines.</div><div>1 for signing message file. using ($ gpg --version gpg (GnuPG) 2.2.19 libgcrypt 1.8.5 ).</div><div>another machine for sign verification with (libgcrypt 1.8.5.)</div><div>Getting "<b>Bad signature</b>" error for <b>gcry_pk_verify (</b><i style="font-weight:bold">gcry_sexp_t</i><b> </b>sig<b>, </b><i style="font-weight:bold">gcry_sexp_t </i>data<b>, </b><i style="font-weight:bold">gcry_sexp_t </i>pkey<b>) .</b><br></div><div><br></div><div><b>scenario 2:</b> Using 1 machine only for signing and verification with (libgcrypt 1.8.5.).<br></div><div>Getting "<b> Signature Verified</b>". Success.<br></div><div><br></div><div>In both scenario's I am using the same "message file", same set of RSA "private/public keys" and same sha512 hash.</div><div>But observation is generated signature,"image.sig" files on both scenarios are different. means hexdump for image.sig in both scenario is different.</div><div><br></div><div>Please suggest how to test or debug this.</div><div><br></div><div>Regards,</div><div>Vishal Rana.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 8, 2022 at 2:34 PM Werner Koch <<a href="mailto:wk@gnupg.org" target="_blank">wk@gnupg.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 8 Apr 2022 14:07, Vishal Rana said:<br>
<br>
> But my received signed image is some unreadable "--detach-sign" file .<br>
> How I am able to make a received signed image to * gcry_sexp_t *please<br>
> suggest*.*<br>
<br>
See gnupg/g10/parse-packet.c<br>
and gnupg/g10/pkglue.c<br>
<br>
and please do yourself a favor and start with a simpler project than<br>
implementing OpenPGP.<br>
<br>
<br>
Salam-Shalom,<br>
<br>
Werner<br>
<br>
<br>
-- <br>
The pioneers of a warless world are the youth that<br>
refuse military service. - A. Einstein<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><span style="color:rgb(102,102,204);font-family:garamond,serif"> </span><div style="text-align:justify"><span style="color:rgb(64,49,82);font-size:10pt"><font face="Courier New"><font style="font-family:verdana,sans-serif" size="2"><b><font style="font-family:garamond,serif;color:rgb(51,51,255)"><span style="color:rgb(0,0,0);font-family:verdana,sans-serif">Thanks & Regards,</span><br><br></font><font color="#000099"><font style="color:rgb(51,51,255);font-family:verdana,sans-serif">Vishal Rana<br>Mobile :09422123401</font></font></b></font><b><font color="#000099" face="georgia,serif" size="4"><br></font></b></font></span></div></div>