Page 1 of 1

How to import a key into MUSCLE card?

Posted: Wed Dec 02, 2015 5:05 am
by Tazmania09
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?

Re: How to import a key into MUSCLE card?

Posted: Thu Dec 03, 2015 4:55 am
by Tarantino
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.

Re: How to import a key into MUSCLE card?

Posted: Thu Dec 03, 2015 5:07 am
by UNKNwYSHSA
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.

Re: How to import a key into MUSCLE card?

Posted: Thu Dec 03, 2015 6:16 am
by UNKNwYSHSA
Debug the applet, where the exception occured?