How to use it

Moritz Schulte moritz@duesseldorf.ccc.de
Wed, 16 Jul 2003 10:00:03 +0200


Ralf Schneider <ralf@tapfere-schneiderleins.de> writes:

> 1. How can I influence the key generation with the last argument of
> gcry_ac_key_pair_generate? I did not find any hint in the docs.

True, I did not document this in the manual yet; I'll work on this
today.

> 2. How can I convert the generated keys from gcry_ac_key_t to anything else 
> that can be stored in a database? Which data type should I use for that (SAP 
> DB)?

Well, libgcrypt contains functions for printing and scanning MPI
values, which could be used for storing and reading the key material.
Maybe it makes sense to to have high level functions for storing and
reading data sets in the ac interface.

> 3. If I understood the example in ac.c correctly, an unsigned int value is 
> encrypted. How can I pass a string to gcry_ac_data_encrypt for
> encryting it?

The data must be encoded in a MPI value.  I think it makes sense to
have a function for this purpose in the ac interface.  Until that is
implemented you could have a look at how GnuPG does it (I think it's
in g10/encode.c; it is used for converting `session keys' into MPI
values).

		moritz
-- 
((gpg-key-id . "6F984199")
 (email      . "moritz@duesseldorf.ccc.de")
 (webpage    . "http://duesseldorf.ccc.de/~moritz/"))