In order to thank you for all members' support of our website, we are holding new events - Getting Free Samples by Paying Freight only.
Want to get free samples? Please check this post for more details.

How to import a key into MUSCLE card?

The MuscleApplet is capable of generating cryptographic keys on the card, and allows external keys to be inserted onto the card.

Moderator: Ellisun

Tazmania09
Posts: 25
Joined: Mon Nov 30, 2015 3:40 am
Points :178
Contact:

How to import a key into MUSCLE card?

Post by Tazmania09 » Wed Dec 02, 2015 5:05 am

I am trying to import a key into a MUSCLE card.
The operationg procedures are as follows:

1- Upload and install the muscle applet

2- Initialize the applet

3- Verify the pin

4- Create the object with id (FF FF FF FE):
>>B0 5A 00 00 0E FF FF FF FE 00 00 00 44 00 00 00 00 00 00 00
<<90 00

5- Write into the object
>> B0 54 00 00 8D FF FF FF FE 00 00 00 00 84 00 01 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<< 90 00

6- Import key
>> B0 32 04 00 07 00 00 FF FF 00 00 00 00
<< 6F 00

When I import a key into the card, it returns 6F 00. I don't know why this happened.
Could anybody provide a solution for me?

Tarantino
Posts: 101
Joined: Wed Aug 19, 2015 1:56 am
Points :474
Contact:

Re: How to import a key into MUSCLE card?

Post by Tarantino » Thu Dec 03, 2015 4:55 am

7 bytes seems to be a bit high for importing a key. The ACL in the data block is only six bytes. So modify it and try again.
The greatest glory in living lies not in never falling, but in rising every time we fall.--Nelson Mandela

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

Re: How to import a key into MUSCLE card?

Post by UNKNwYSHSA » Thu Dec 03, 2015 5:07 am

Can you give us the commands to install the applet, applet initialization, pin verify?
And we can have the same environment to run this applet.

I guess the persistent memory space of your card is not enough, you can get the persistent memory size before you send the IMPORT KEY command.
sense and simplicity

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

Re: How to import a key into MUSCLE card?

Post by UNKNwYSHSA » Thu Dec 03, 2015 6:16 am

Debug the applet, where the exception occured?
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer