Re: Digital Signature Verification

2022-04-08 Thread Werner Koch via Gnupg-users
On Fri,  8 Apr 2022 14:07, Vishal Rana said:

>   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*.*

See gnupg/g10/parse-packet.c
and gnupg/g10/pkglue.c

and please do yourself a favor and start with a simpler project than
implementing OpenPGP.


Salam-Shalom,

   Werner


-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Digital Signature Verification

2022-04-08 Thread Vishal Rana via Gnupg-users
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  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  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*
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Digital Signature Verification

2022-04-08 Thread Vishal Rana via Gnupg-users
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  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*
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users