Mailing List Archive

decrypting string
Hi...

I'm trying to implement rsa algorithm into my program by using libgcrypt
functions.I had a look at some examples under the test directory but i still
have some doubts about encrypting and decrypting.Where i can find some
more example on how to encrypt and decrypt strings with gcry_pk(encrypt|
decrypt)?? I have also some doubts on how to save key on files;what format
should i use?!

Thanks in advance

Salvo
Re: decrypting string [ In reply to ]
At Wed, 14 Jul 2004 01:37:18 +0200, salvatore wrote:

> I have also some doubts on how to save key on files;what format
> should i use?!

Well, it's your decision. Libgcrypt does not implement formats like
OpenPGP or SSH key blobs (although you could implement them on top of
Libgcrypt). Storing the key material (i.e. the MPI values) is easy to
do; another approach, which is used by gpg-agent, is to store complete
S-Expressions.

moritz
Re: decrypting string [ In reply to ]
I stored them as S-exp in CANON format and it seems they work absolutely fine

Thanks

On Sunday 18 July 2004 14:48, you wrote:
> At Wed, 14 Jul 2004 01:37:18 +0200, salvatore wrote:
>
> > I have also some doubts on how to save key on files;what format
> > should i use?!
>
> Well, it's your decision. Libgcrypt does not implement formats like
> OpenPGP or SSH key blobs (although you could implement them on top of
> Libgcrypt). Storing the key material (i.e. the MPI values) is easy to
> do; another approach, which is used by gpg-agent, is to store complete
> S-Expressions.
>
> moritz
>