Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

I want to unlock my javacard applet

JavaCard Applet Development Related Questions and Answers.
sla1023
Posts: 7
Joined: Mon Feb 13, 2017 12:00 am
Points :78
Contact:

I want to unlock my javacard applet

Post by sla1023 » Wed Feb 15, 2017 1:43 am

Hello

I locked the applet via GPSystem.SetCardContentState (GPSystem.APPLICATION_LOCK)

But I do not know how to unlock the applet again.

Some people ask you to use ISD, but I do not know how to choose ISD.

Please tell me how to unlock the locked applet

Thank you

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: I want to unlock my javacard applet

Post by UNKNwYSHSA » Wed Feb 15, 2017 4:31 am

What's the model of your card?
sense and simplicity

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: I want to unlock my javacard applet

Post by UNKNwYSHSA » Wed Feb 15, 2017 4:47 am

1 Select the ISD; (Ask your card provider for the ISD AID value, or try to send SELECT command without ISD AID: "00 A4 04 00 00")
2 GP auth;
3 Send SET STATUS command: "80 F0 40 XX LC YY YY YY YY ...", XX is the new status value according to the definition "Application Life Cycle Coding", YY is the AID of your applet instance.
sense and simplicity

sla1023
Posts: 7
Joined: Mon Feb 13, 2017 12:00 am
Points :78
Contact:

Re: I want to unlock my javacard applet

Post by sla1023 » Thu Feb 23, 2017 11:20 am

thank you for your answer

but i still don't know how to get gp auth

please explain gp auth using apdu

thank you

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: I want to unlock my javacard applet

Post by UNKNwYSHSA » Thu Feb 23, 2017 10:30 pm

1 pyApdutool

2 GPShell
open_sc command
3 pyResMan

4 GlobalPlatformPro
gp.exe --unlock-applet <AID>
Note: Use gp.exe -h for usage informations.
5 Commands:

Code: Select all

    INITIALIZE UPDATE
    EXTERNAL AUTHENTICATE

Note: For the details, see GlobalPlatform specification.
6 Write code:
Refer to the code of opensource tools: GPShell(C lanaguage)/GlobalPlatformPro(java language)/pyResMan(python language)/....
You do not have the required permissions to view the files attached to this post. Please login first.
sense and simplicity

sla1023
Posts: 7
Joined: Mon Feb 13, 2017 12:00 am
Points :78
Contact:

Re: I want to unlock my javacard applet

Post by sla1023 » Fri Feb 24, 2017 1:03 am

thank you for your answer

i only use number 5

but i don't know how to use

i send command

0x80, 0x50, 0x00, 0x00, 0x08, 0xF2, 0xA5, 0xFA, 0x8B, 0xEF, 0x9F, 0x8A, 0x51, 0x00
and
0x84, 0x82, 0x03, 0x00, 0x10 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

first command receive 9000

but second receive 69 85

so please explain how to use second command using apdu

thank you for your help

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: I want to unlock my javacard applet

Post by UNKNwYSHSA » Fri Feb 24, 2017 1:34 am


This command needs "Host cryptogram and MAC". Both these datas can be calculated following globalplatform specification. this process is cumbersome, and the value can be used once.
The steps:
1 Send INITIALIZE UPDATE command with host challenge, the card challenge got;
2 Calculate Host cryptogram with host challenge + card challenge + other data and the command MAC;
3 Send EXTERNAL AUTHENTICATE command with Host cryptogram and MAC;

It is recommanded that use one tool to send these commands.
You do not have the required permissions to view the files attached to this post. Please login first.
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 51 guests

JavaCard OS : Disclaimer