Importing a PKCS#1 RSAPublicKey structure into a gnutls_pubkey_t

Nikos Mavrogiannopoulos nmav at gnutls.org
Thu Aug 9 14:49:13 CEST 2012


On Tue, Aug 7, 2012 at 9:11 AM, René Korthaus <r.korthaus at sirrix.com> wrote:
> Thanks for the clarification. Then is there a reason that gnutls offers no
> method to import a PKCS#1 RSAPublicKey structure - given that it is a
> standard format and almost all smartcards speak it plus RSAPublicKey is very
> similar to RSAPrivateKey and gnutls can already decode RSAPrivateKey
> structures with _gnutls_privkey_decode_pkcs1_rsa_key. From the code I've
> seen it should be fairly easy to implement and would make us very happy. :)

The problem is that RSAPublicKey structure is RSA specific. GnuTLS
supports the generic SubjectPublicKeyInfo structure for public keys
which may contain RSA, DSA, or ECDSA keys. If however you provide a
simple patch that reads the structure for an gnutls_pubkey_t, I'll be
happy to include it in the 3.1 release.

regards,
Nikos




More information about the Gnutls-help mailing list