Error encrypting string data

Moritz Schulte moritz@duesseldorf.ccc.de
Mon, 21 Jul 2003 13:52:18 +0200


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

> Now, I have another conversion problem :-) I want to store the keys
> I generate with gcry_ac_key_pair_generate in a database. My idea was
> to encode them base64 and store them in a VARCHAR field.

As I said before, Libgcrypt provides the functions gcry_mpi_print and
gcry_mpi_scan that can be used for converting MPI values between the
internal and various external representations.

For iterating through all named MPIs contained in a data set, you have
to use gcry_ac_data_length() and gcry_ac_data_get_index().  Soon I
will commit a patch that implements the gcry_ac_key_data_get()
functions, which is needed for extracting the `data set' from a `key'.
With these functions and the included MPI functions you should be able
to convert a complete data set in a way that fits your needs.

Maybe the ac Interface will contain high-level functions for this
purpose in the future; at the moment you have to do the work yourself.

> What is the HAC? Where can I find it?

Handbook of Applied Cryptography, I do not have an URL at hand but it
should be easily to find via Google.

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