Revised patch to support the SmartCard-HSM in scdaemon

NIIBE Yutaka gniibe at
Thu Jul 9 07:50:16 CEST 2015


This is a reply to your message sent last year.

On 07/23/2014 06:04 AM, Andreas Schwier wrote:
> please find attached [1] the revised patch to GnuPG master, adding
> support for the SmartCard-HSM to scdaemon.

Recently, we received a post to gnupg-users about using the
SmartCard-HSM for OpenPGP.

IIUC, the driver you submitted is intended to be used with gpgsm,
perhaps.  Please correct me if I'm wrong.

Do you have a plan to add the READKEY method so that it can work
for OpenPGP?

In gnupg/scd/app-openpgp.c, we have:
/* Handle the READKEY command for OpenPGP.  On success a canonical
   encoded S-expression with the public key will get stored at PK and
   its length (for assertions) at PKLEN; the caller must release that
   buffer. On error PK and PKLEN are not changed and an error code is
   returned.  */
static gpg_error_t
do_readkey (app_t app, const char *keyid, unsigned char **pk, size_t *pklen)

When it's available, gpg frontend can ask card for signing/decipher
for OpenPGP.

Creating OpenPGP from the public key in the card, we will need some
tool, though.

More information about the Gnupg-devel mailing list