Digital Signature Verification

Vishal Rana vishal.rana118 at gmail.com
Fri Apr 8 10:37:20 CEST 2022


Hi Team,

Verify API in libgcrypt is expecting all arguments in * gcry_sexp_t *data type.

gcry_error_t  *gcry_pk_verify (**gcry_sexp_t* sig*, **gcry_sexp_t
*data*, **gcry_sexp_t
*pkey*) .*

  But my received signed image is some unreadable  "--detach-sign" file .
 How I am able to make a received signed image to  * gcry_sexp_t *please
suggest*.*

*Regards,*
*Vishal Rana*

Regards,
Vishal Rana



On Fri, Apr 8, 2022 at 1:05 PM Vishal Rana <vishal.rana118 at gmail.com> wrote:

> Hi Team,
>
> Thank you Shalom, above suggestion is working.
> But Digital signature verify is still not working.
>
> > I am signing image using *gnupg* from server side using "--detach-sign"
> and getting *"image.sig*" file.
> > Which I am trying to verify on another machine using libgcrypt. On the
> verification side I am having "image.bin",image.sig, "PublicKey".
> I am applying a hashing func on "image.bin" at the verification side to
> get MsgDigest_of_RxMsg.
> I am passing arguments to _gcry_pk_verify ( "Rx_image.sig",
> MsgDigest_of_RxMsg , Public_key).
>
> Please suggest it to me if I am missing any step. Like any conversion or
> decoding is required for "image.sig" before passing it to _gcry_pk_verify
> ().
>
>
> Regards,
> Vishal Rana.
>
>
>
>
>
>
> On Thu, Apr 7, 2022 at 7:44 PM Werner Koch <wk at gnupg.org> wrote:
>
>> On Thu,  7 Apr 2022 15:26, Vishal Rana said:
>>
>> > Please suggest to me how to proceed.
>>
>> Most GnuPG tools feature a debug option
>>
>> --debug mpi
>> --debug crypto
>>
>> which shows you lots of debug info. For example the raw RSA parameters.
>> Use "--debug help" to see all debug classes. But always remember that
>> these are debug options and the output is not a stable API in any way.
>>
>>
>> Shalom-Salam,
>>
>>    Werner
>>
>>
>> --
>> The pioneers of a warless world are the youth that
>> refuse military service.             - A. Einstein
>>
>
>
> --
>
>
>
>
> *Thanks & Regards,Vishal RanaMobile :09422123401*
>


-- 




*Thanks & Regards,Vishal RanaMobile :09422123401*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20220408/5e73c0f7/attachment-0001.html>


More information about the Gnupg-users mailing list