GPG, OpenPGP card, ACS ACR30U card reader

Tony Whitmore tony at tonywhitmore.co.uk
Sun Jul 30 19:31:39 CEST 2006


Further to my mails earlier this month, I've been trying to get GPG
working with my card reader and PC/SC.

pcscd recognises my card reader and the card that is inserted into it.
GnuPG returns the expected output from the --card-status command. I have
been able to set the language on the card, following the instructions on
the HOWTO. However, whenever I try to set my name on the card, GnuPG
exits with an error and pcscd segfaults.

$ gpg --disable-ccid --debug-all -vv --card-edit
Command> admin
Admin commands are allowed
Command> name
Cardholder's surname: Whitmore
Cardholder's given name: Antony
gpg: DBG: send apdu: c=00 i=CA p0=00 p1=C4 lc=-1 le=256
gpg: DBG:   PCSC_data: 00 CA 00 C4 00
gpg: DBG:  response: sw=9000  datalen=7
gpg: DBG:       dump:  00 FE FE FE 03 03 03
gpg: 3 Admin PIN attempts remaining before card is permanently locked

Admin PIN
gpg: DBG: send apdu: c=00 i=20 p0=00 p1=83 lc=8 le=-1
gpg: DBG:   PCSC_data: 00 20 00 83 08 31 32 33 34 35 36 37 38
gpg: DBG:  response: sw=9000  datalen=0
gpg: DBG:      dump:
gpg: DBG: send apdu: c=00 i=DA p0=00 p1=5B lc=16 le=-1
gpg: DBG:   PCSC_data: 00 DA 00 5B 10 57 68 69 74 6D 6F 72 65 3C 3C 41
6E 74 6F 6E 79
gpg: pcsc_transmit failed: comm error (0x80100013)
gpg: apdu_send_simple(0) failed: card I/O error
gpg: failed to set `DISP-NAME': general error
gpg: error setting Name: general error

pcscd produces this (output from after enter is hit after entering the
admin PIN):

APDU: 00 20 00 83 08 31 32 33 34 35 36 37 38
T=1 -> 0 20 0 83 8 31 32 33 34 35 36 37 38
T=1 <- 90 0
SW: 90 00
APDU: 00 DA 00 5B 10 57 68 69 74 6D 6F 72 65 3C 3C 41 6E 74 6F 6E 79
T=1 -> 0 da 0 5b 10 57 68 69 74 6d 6f 72 65 3c 3c 41 6e 74 6f 6e 79
Segmentation fault

I'd appreciate any advice as to where to look next. As I see it, this
could either be a bug in GnuPG, a bug in pcscd or a bug in the driver
for my card reader. But I'm not experienced enough to know where to look
to find out more.

Thanks in advance,

Tony

P.S. As per Jonathan Rockway's e-mail, the output of pcsc_scan on my
system (with pcscd running and the card inserted) is:

$ pcsc_scan
PC/SC device scanner
V 1.4.1 (c) 2001-2004, Ludovic Rousseau <ludovic.rousseau at free.fr>
Compiled with PC/SC lite version: 1.2.9-beta7
Scanning present readers
0: ACS ACR 30u 00 00

Sun Jul 30 18:22:15 2006
 Reader 0 (ACS ACR 30u 00 00)
        Card state: Card inserted,
        ATR: 3B FA 13 00 FF 81 31 80 45 00 31 C1 73 C0 01 00 00 90 00 B1

ATR: 3B FA 13 00 FF 81 31 80 45 00 31 C1 73 C0 01 00 00 90 00 B1
+ TS = 3B --> Direct Convention
+ T0 = FA, Y(1): 1111, K: 10 (historical bytes)
  TA(1) = 13 --> Fi=372, Di=4, 93.000 cycles/ETU
  TB(1) = 00 --> Programming Param P: 0 Volts, I: 0 milli-Ampres
  TC(1) = FF --> Extra guard time: 255
  TD(1) = 81 --> Y(i+1) = 1000, Protocol T = 1
-----
  TD(2) = 31 --> Y(i+1) = 0011, Protocol T = 1
-----
  TA(3) = 80 --> IFSC: 128
  TB(3) = 45 --> Block Waiting Integer: 4 - Character Waiting Integer: 5
+ Historical bytes: 00 31 C1 73 C0 01 00 00 90 00 B1

Possibly identified card (using /usr/lib/pcsc/smartcard_list.txt):
3B FA 13 00 FF 81 31 80 45 00 31 C1 73 C0 01 00 00 90 00 B1
        OpenPGP


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : /pipermail/attachments/20060730/1e91901f/signature.pgp


More information about the Gnupg-users mailing list