Specifications

Smart Cards Lab COMPGA12 University College London
GET RESPONSE
CLA INS P1 P2 Le
A0 C0 00 00
The answer is the FCI of the DF
GSM
directory.
Handling Errors
All the above should work for any 2G SIM card and for many if not all 3G
cards.
In case we recall some standard error messages:
.
Specific products and specific commands also frequently have special
error codes, one example will be seen below.
Decoding of Certain Bytes
According to GSM specs we can here look at certain bytes in FCI.
Byte 14 =
Byte 19 =
From these we learn that: The most significant bits of is 0 if an only
if PIN1 is disabled.
Th byte 19 = is the ”CHV1 status” Typically the value of this byte
is ’83’ where 8 means that the PIN1 has been initialized, and that there are
3 cardholder verification attempts left for this PIN.
14.3 Cardholder Verification
This should be done ONLY if the PIN1 is enabled, i.e. is bigger than
’80’. Otherwise we skip this subsection.
GSM VERIFY CHV1
CLA INS P1 P2 Le CHV
A0 20 00 01 08
where the PIN is encoded in ASCIII and extended to 8 bytes by FF FF
FF FF. For example the PIN 1234 is encoded as 31 32 33 34 FF FF FF FF.
The answer should be:
.
After 3 presentations of an incorrect PIN (that can be in different ses-
sions, this counter is preserved in non-volatile memory) the card will be
blocked (but can be unblocked with UNBLOCK CHV function).
c
Nicolas T. Courtois 2009-10