[Help-gnutls] trouble with OpenPGP DSA MPI extraction and OpenPGP private subkeys

Nikos Mavrogiannopoulos nmav at gnutls.org
Thu Apr 3 19:38:49 CEST 2008


Daniel Kahn Gillmor wrote:
> On Wed 2008-04-02 14:54:35 -0400, Nikos Mavrogiannopoulos wrote:
> 
>> If you have a single (secret) subkey you can call:
>> gnutls_openpgp_privkey_get_subkey_pk_algorithm with index 0 to
>> retrieve the algorithm. You can also convert from key id to index
>> using:
>> gnutls_openpgp_privkey_get_subkey_idx().
>>
>> The idea is that you use gnutls_openpgp_privkey_get_pk to retrieve the
>> main secret key algorithm only.
> 
> OK, this makes sense for just getting the algorithm of a subkey.  But
> what i'm looking to do is to get the secret subkey details directly.
> For instance, if i'm looking at an RSA subkey, and i want to get at
> the raw components of the subkey (prime, modulus, etc), how would i do
> that from GnuTLS? 

There is gnutls_openpgp_privkey_export_subkey_rsa_raw() and 
gnutls_openpgp_privkey_export_subkey_dsa_raw(). Are they suitable for 
what you want to do?


> PS i'm happy having discussions like this on-list, if you'd prefer
>    them to be archived for other folks to find.  i'm replying to this
>    privately because it was sent to me privately, but i won't mind if
>    you choose to publish it anywhere.

It was accidentally not forwarded to the list.

regards,
Nikos






More information about the Gnutls-help mailing list