-->

SIM Card Authentication

2019-05-27 14:23发布

问题:

I'm new to SIM Cards and I'm trying to authenticate to a SIM Card using Gemalto JCardManager (part of Gemalto Developer Suite), with Gemplus USB SmartCard Reader.

Aparently, i have all the necessary keys (kic, kid and kik), but i can't authenticate.

In fact, i have two SIM's: one SIM Card R5 and one USIM Card R5.

I have configured the keys files for both of them, but when i try to authenticate to the SIM Card R5, the following message appears:

[ERROR  ] <-   6D 00
Command Exception on command: Authenticate. Authentication failed : INITIALIZE UPDATE : unknown response : VOP sw=6D00

And when i try to authenticate to the USIM Card R5, the following message appears:

[ERROR  ] <-   6D 00
[ERROR  ] <-   Invalid instruction. 

Does anyone know what this messages means?

回答1:

Not all cards supports mutual authentication. Most probably yours doesn't support it. Is your card gemalto one? If yes, do you have ADM keys of the card? Actually gemalto has 3 types of cards:

  1. Fully native cards without GP at all.
  2. Middle range cards, these cards support partially GP but no mutual authentication. On these cards verification of ADM key is enough.
  3. High-end cards, these cards support all latest technos.

To verify ADM key you have to send:

00 20 00 <adm key number> 08 <adm key value>

If you know which keyset hold ADM key, you can send proprietary Verify key command:

F0 2A 00 <keyset number> 08 <adm key value>


回答2:

The message is an ISO 7816-4 specified status word in hexadecimals. It means "INS not supported". This is an indication that that specific authentication command is not supported. This could be because the card is not according to the specifications (you are expecting it to have) or because it is in the wrong life-cycle state.