Supporting not-so-smart card readers

NIIBE Yutaka gniibe at
Tue Jan 8 09:48:20 CET 2013

On 2013-01-08 at 09:03 +0100, Werner Koch wrote:
> On Tue,  8 Jan 2013 07:59, gniibe at said:
> > (ccid_get_atr): Use 5V for PowerOn when auto_voltage is not supported.
> How should one known which volatge is required?  Is there a chance that
> this change may brick an, say, 1.8V reader?

As far as I know, existing cards and card readers support 5V voltage.
But it will be possible, in future, this code will break some hardware
for some combinations of some card and some reader.

To be conservative, we could take a strategy trying different voltages
from lower to higher.  If card reader supports all voltages (but not
auto), it goes like this until it will success:

	1.8V -> 3.3V -> 5V -> auto

Then, after getting ATR string (and there is preference information
in the ATR), change the voltage again if needed.

But I'm not sure if this is worth implementing, given the situation
GnuPG internal driver is for use of OpenPGP card (mainly).

> > This change is to support more card readers by the internal driver.
> > Tested with 08e6:3478 Gemplus PinPad Smart Card Reader.
> Feel free to push this change to master.

Thanks.  I will.

More information about the Gnupg-devel mailing list