Is there any timing specs between APDU/Response pair in smart card?

311 views Asked by At

Command response pair

I couldn't find a clear specification about the period between two consecutive Command/Response Pair (T in the diagram).

for example, If I had sent a command to the card and received a response, What is the maximum period I can wait before the communication is not valid anymore? I need this because I'm willing to make use of this period to give me some flexibility in my design.

2

There are 2 answers

0
guidot On BEST ANSWER

This is the block waiting time (which can be computed from the BWI part of TB3 in the ATR). If the card needs more time, it has to send a Waiting Time Extension (abbreviated WTX), before this elapses, which has to be acknowledged by the other side (typically the reader). If the acknowledge is not given both sides assume a communication error.

Note, that FWI and BWI from TA1 as well as the clock supplied to the card influence the time.

0
Gerhard On

For T=0, This would be the Waiting Time(WT). The ISO7816-3 spec gives the formula as:

WT = WI x 960 x (Fi/f)

Where
   WI = Waiting time factor. Normally this value is 10
   Fi = This value is obtained from TA1 in the ATR. Initially the value is 372
   f  = The clock speed