smartcardjavacardglobalplatform

ATR is change automatically after two reset


I have a JCOP V2.4.2 r3 Java Card. When I insert it in my ACR38 reader and send two consecutive ATR request with OpenSC-Tool, I receive two different ATR! Is that OK?

Look:

CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f0:13:00:00:81:31:fe:45:e8

CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f9:13:00:00:81:31:fe:45:4a:43:4f:50:32:34:32:52:33:a2

If I repeat my request without delay, I will receive the second ATR again and again :

CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f9:13:00:00:81:31:fe:45:4a:43:4f:50:32:34:32:52:33:a2

CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f9:13:00:00:81:31:fe:45:4a:43:4f:50:32:34:32:52:33:a2

CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f9:13:00:00:81:31:fe:45:4a:43:4f:50:32:34:32:52:33:a2

But if I wait about 1 minutes (and don't remove the card from the reader), and then request for ATR again, I receive the first short ATR :

CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f9:13:00:00:81:31:fe:45:4a:43:4f:50:32:34:32:52:33:a2

// Waiting about 1 minutes while card is inserted in the reader.
CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f0:13:00:00:81:31:fe:45:e8

//Requesting ATR again and without delay.
CommandLine> OSC.exe -a
Using reader with a card: ACS CCID USB Reader 0
3b:f9:13:00:00:81:31:fe:45:4a:43:4f:50:32:34:32:52:33:a2

Solution

  • Without the mentioned reader my best guess is, that you experience the difference between a cold reset and a warm reset, see ISO 7816-3.

    But since the only difference is, that in the short version no historical bytes are provided and in the long the 9 historical bytes indicate "JCOP242R3", this is surely of minor importance.