Resend: Creating Rsa Public Key self signature

Rubis Paul rubis.paul at
Fri Aug 18 22:22:48 CEST 2006

I have generated  an RSA key pair using libgcrypt.As per the project
requirement ,i have to encrypt this Rsa key with another master RSA key.

gcry_ac_data_encrypt () expects input type as gcry_mpi_t. But RSA key
it self is of type gcry_ac_key_t. Now, I am planning to do the
convertion in the below given way..

data = gcry_ac_key_data_get(KeyToBeEncrypted);
for (i = 0; i < gcry_ac_data_length(data); i++)
gcry_ac_data_get_index(data,0, i,&mpiName,&mpiTemp);
GcryptErrValue = gcry_ac_data_encrypt(GcryptRsaHd

Is this a correct way of doing this ?

Is there any other way by which i can encrypt the entire key , rather
than manipulating with each encrypted MPI values ?

Rubis Paul

More information about the Gnupg-users mailing list