Creating Rsa Public Key self signature

Rubis Paul rubis.paul at gmail.com
Thu Aug 17 06:40:23 CEST 2006


Hi,
I am generating one RSA key pair using libgcrypt.As per the project
requirement ,i want to store the RSa public key as self
signaure(signed by corresponding rsa private key).
The rsa public key is of type gcry_ac_key_t ,but the input type for
gcry_ac_data_sign is of type gcry_mpi_t .so how can i create a self
signature using libgcrypt ?.
i trying like this ...is this correct

data = gcry_ac_key_data_get(KeyToBeSigned);
for (i = 0; i < gcry_ac_data_length(data); i++)
{
gcry_ac_data_get_index(data,0, i,&mpiName,&mpiTemp);
GcryptErrValue = gcry_ac_data_sign(GcryptRsaHd ,SecKey,mpiTemp,&KeySignature);
}

if i do like this , i will get the signature for each mpi value [ for
public key there will be 2 mpi (n,e) values].
so how can i create a self signature for rsa public key ?

I am using AES keys to encrypt some file contents.The AES keys used
for file encryption is encrypted using RSA Keys.I am creating RSA Key
pairs for different users.According to my project requirement i want
to encrypt /sign an RSA key of one user using Rsa key of other
user.How can i encrypt /sign the RSA private of one user with the
another RSa key of other user ?
I have gone through the Libgcrypt manuel.But I couldn't find ..Is this
possible ?


Thanks,
Rubis Paul



More information about the Gnupg-users mailing list