0

I am working on a "JCOP3 SecID P60 CS" smart card.

I am trying to download the cap file using pyAPDUToolbut, I get the: 6D 00 answer (Invalid Instruction).

enter image description here

The same result with 'gp'

enter image description here

Could please any one told me where is the problem?

soth
  • 31
  • 3
  • You might need to pre-personalize your card...see e.g. [here](https://stackoverflow.com/a/59315735/5128464) – vlp May 27 '21 at 14:56

2 Answers2

1

The applet AID you are using for initially selecting the issuer security domain (ISD) is not given. 00 A4 04 00 00 is a SELECT command with no data (last byte Lc = 0, here the applet AID of the ISD would be expected). Use here A000000003000000 or A0000001510000. I guess "select Card Manager" is setting this.

k_o_
  • 5,143
  • 1
  • 34
  • 43
  • I would like firstly to thank you for your response. Do you mean that i have to send it as apdu in PyApduTool? or to insert it as a command line using 'gp'? – soth May 20 '21 at 14:09
  • I have never used PyApduTool. But have you clicked "Start in Select Card Manager" like I said? Maybe it gives you an option to select the AID. You can also use gp, but I have not found a switch how to pass the AID. If you are not successful with the tool, then try a different tool. I'm also running an OS project called "gpshell" (https://kaoh.github.io/globalplatform/) and I had successful downloads for JCOP 3. – k_o_ May 20 '21 at 22:27
  • Seems to be a different question. Why are you compiling this now? In the initial questions you had a binary. Could you pass the AID of the ISD to the install command? Have you clicked "Start" in "Select Card Manager" to select the ISD = Card Manager. Have you tried an alternative tool, e.g. GPShell? – k_o_ May 25 '21 at 17:51
  • Sorry, i made the wrong comment. That was the error message i get before this error. i've clicked "Start in Select Card Manager" but it returns the same 6D00. Same for GpShell and Gp ! even when i tap >gp -info I get the 6D00 message – soth May 26 '21 at 09:19
  • Interesting then if this also happens after setting the ISD AID. Can you please execute this (I see you are using Windows): 1. Download latest release GPShell: https://github.com/kaoh/globalplatform/releases and extract it. Change to the bin folder where you will see gpshell binary. 2. Use this script file: https://gist.github.com/kaoh/3cfbc450c1cb7f36d2f6bc5e97ff17ab and save it locally in the bin folder 3. Run `gpshell installOsiris.txt` – k_o_ May 26 '21 at 15:03
  • I would like to thank you for your response. I have done what you are asking me to do, and i get the following response: enable_trace establish_context mode_201 enable_trace establish_context card_connect * reader name Gemalto SIM Pro Smart Card Reader 0 select -AID a000000003000000 Command --> 00A4040008A000000003000000 Wrapped command --> 00A4040008A000000003000000 Response <-- 6D00 Unwrapped response <-- 6D00 select_application() returns 0x80206D00 (6D00: Invalid instruction byte / Command not supported or invalid.) – soth May 27 '21 at 09:23
  • It seems like i insert a wrong AID? How could i define the right AID of my card please? – soth May 27 '21 at 10:17
  • This might shed some light on your situation. The SELECT command is somehow not understood. This explains why all tools are failing. This is very strange. Can it be that your card is locked, e.g. because you tried to authenticate with then incorrect keys? Or is the card not initialized? – k_o_ May 27 '21 at 18:39
  • It's clear that my card is not fused. So a pre-personalization must be mandatory to access the root applet. The Transport Key is given from the NXP. – soth Jun 01 '21 at 10:58
  • Then ask NXP how to pre-personalize the card to be able to unlock all features and define session keys. – k_o_ Jun 01 '21 at 13:26
  • I have already contact them. I am just waiting for their response. – soth Jun 01 '21 at 14:50
0

I am using an unfused JCOP card. I took the Transport Key from the NXP and all works good. If you are facing the same issue, contact them directly.

soth
  • 31
  • 3