OpenPGPSmartcard

How to use the OpenPGP smartcard and smartcard reader on Debian wheezy. The card in question is the g10 OpenPGP card version 2.0 and the reader is the Gemalto USB Shell Token v2.

You must first insert the little SIM card into the USB reader. It doesn't quite fit at first--use a knife or a file to trim a bit off the end near the electrical contacts. I found that rather than making the card shorter, it was more important to taper the end so that it would fit under the L-shaped bracket (i.e., make it thinner).

Required software:

# apt-get install gnupg pcscd

Test that you can read the card with the --card-status option:

$ gpg --card-status
gpg: detected reader `Gemalto USB Shell Token V2 00 00'
Application ID ...: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Version ..........: 2.0
Manufacturer .....: ZeitControl
Serial number ....: XXXXXXXX
Name of cardholder: [not set]
Language prefs ...: de
Sex ..............: unspecified
URL of public key : [not set]
Login data .......: [not set]
Private DO 1 .....: [not set]
Private DO 2 .....: [not set]
Signature PIN ....: forced
Key attributes ...: 2048R 2048R 2048R
Max. PIN lengths .: 32 32 32
PIN retry counter : 3 0 3
Signature counter : 0
Signature key ....: [none]
Encryption key....: [none]
Authentication key: [none]
General key info..: [none]
If gpg --card-status gives you the message
gpg: pcsc_establish_context failed: no service (0x8010001d)
gpg: card reader not available
gpg: OpenPGP card not available: general error
then make sure that pcscd is installed and running. GnuPG has a built-in CCID driver which it tries first and which doesn't support this card. You can see what's going wrong with gpg --card-status --debug-ccid-driver. This page finally gave me a clue.

Further reading

Page last modified on July 21, 2012, at 08:07 AM