Openpgp card handling depending on manufacturer?

Klaus Flittner klaus at flittner.org
Mon Nov 5 19:54:54 CET 2012


NIIBE Yutaka schrieb:

> On 2012-11-05 at 08:34 +0100, Klaus Flittner wrote:
> > The only difference between the working and non-working case is the
> > manufacturer value. And as far is i understand the only software in the
> > chain (reader firmware, libccid, pcsc, gpg) that uses this value or
> > even now about it is gpg.
> 
> I'd understand your theory.  Note that it is also possible the bug were
> not related to your change of manufacturer value.
> 
> Are you sure that the error is by timeout?  Did you see
> libusb_block_transfer really returns ETIMEOUT?

Yes. libusb_block_transfer really returns LIBUSB_ERROR_TIMEOUT. The
logfiles contain the following if the error occurs: The value -7 in the
first line corresponds to LIBUSB_ERROR_TIMEOUT.
-----
  pcscd: ccid_usb.c:699:ReadUSB() read failed (7/2): -7 Success
  pcscd: ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
  pcscd: winscard.c:1532:SCardTransmit() Card not transacted: 0x80100016
-----

What is really strange is the fact that the generation of a 3072-bit
key on the same card also takes longer than 10 seconds (approximately
30-40 seconds), but in that case no timeout occurs even on the card
with the manufacturer value of 1 or 2.
Therefore it seems also correlated to the key lengths being 4096 bit in
addition to the manufacturer value.

> If your smartcard reader is supported by GnuPG's in-stock CCID driver,
> it is also worth a try with no pcsc and libccid.
 
I will try this if i figure out how to use the internal driver.
Deinstalling pcscd is not enough and in the man page there is only an
option to disable the internal ccid driver, not to enable it...

Regards,
Klaus Flittner



More information about the Gnupg-devel mailing list