Mailing List Archive

Public Key encryption
hi again,
now my gcry_pk_genkey() wrapper works. But when I use my function I get the
output

[open]
[data="key-data"]
and so on

How can I stop this?

But what is now the public key and what is teh private key?
Which functions do I need to sign/check or encrypt/decrypt with this key?
Re: Public Key encryption [ In reply to ]
On Thu, 9 May 2002 12:29:29 +0200, RĂ¼diger Sonderfeld said:

> [open]
> [data="key-data"]
> and so on

> How can I stop this?

That is some debug output. Have a look at newpg/agent/genkey.c to see
what you should do.

> But what is now the public key and what is teh private key?

You get both in one S-expression back.

> Which functions do I need to sign/check or encrypt/decrypt with this key?

gcry_pk_sign, gcry_pk_verify, gcry_pk_encrypt, gcry_pk_decrypt.

Werner
Re: Public Key encryption [ In reply to ]
Am Freitag, 10. Mai 2002 13:06 schrieben Sie:
> That is some debug output. Have a look at newpg/agent/genkey.c to see
> what you should do.

I don't find this file :(

> gcry_pk_sign, gcry_pk_verify, gcry_pk_encrypt, gcry_pk_decrypt.

I wrote a wrapper function for gcry_pk_encrypt

typedef GCRY_SEXP pkkey;
/*...*/
int crypto_ppencrypt(unsigned char*data,unsigned char*to,pkkey pkey)
{
return gcry_pk_encrypt((GCRY_SEXP*)&to,(GCRY_SEXP)data,pkey);
}

But the output is the same as the input! Isn't it really possible to convert
from unsigned char * to GCRY_SEXP?