Fwd: Do OpenPGP cards support T=0?
squalyl at gmail.com
Mon Mar 7 15:35:31 CET 2011
It's not that difficult, it's based on a set of bitmaps. OK, it's awful, I
I guess the ATR is the one that was posted on the muscle mailing list:
3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C
Here we go:
First byte is Ts, 3B means direct convention (bits on wire are as on
RS-232), 3F means inverse convention (bits on wire are in negative logic and
bit endian is reversed, very few cards use this today)
Then you have T0 = 0xDA. 0xD encodes a Y bitfield and 0xA encodes the
number of historical bytes (10) that will follow the initial sequence of
The Y bitfield is 0xD = 0b1101. That means, this byte is followed by 3
other bytes: TD, TC and TA. TB is not present (deprecated as per
TA = 0x18 : encodes Fi and Di to calculate the baud rate.
TC = 0xFF : encodes N (extra guard time)
TD = 0x81 : Y=1000 -> we now have TD, while TC, TB and TA
are absent. T=1 is supported by default.
TD = 0xB1 : Y = 1011 -> we now have TD, TB, TA, and again T=1
TA = 0xFE : don't know...
TB = 0x75 : don't know...
TD = 0x1F, Y = 0001 -> we have TA and no TD (end of sequence)
and T=15 meaning global info
TA = 0x03 = 0b00 000011, for T=15 this means clock stop is not supported,
classes A and B supported (5 volts and 3.3 volts)
"00 31 C5 73 C0 01 40 00 90 00" are the 10 historical bytes including a
dummy SW "9000"
0C is TCK, the XOR of all bytes in the ATR including TCK shall result in
So as already said, we now have the proof that this card does not claim to
On Mon, Mar 7, 2011 at 2:48 PM, Werner Koch <wk at gnupg.org> wrote:
> On Sun, 6 Mar 2011 19:48, kgo at grant-olson.net said:
> > Thanks for all the info. I suspected the ATR had the info, but the only
> > public doc I could find explaining the ATR format was really difficult
> > to understand.
> The only freely available specs I know of are the EMV specs
> (www.emvco.com). The ISO specs are a bit expensive but even harder to
> read. gnupg/scd/atr.c has a function to print the ATR in a human
> readable format. There is also an old project by me with a very similar
> tool (ftp://ftp.g10code.com/g10code/gscutils/).
> Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
> Gnupg-devel mailing list
> Gnupg-devel at gnupg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gnupg-devel