Page 1 of 1

Change Card Manager AID on JavaCard 3.x

Posted: Wed Aug 23, 2017 11:19 am
by james
I'm trying to change the card manager AID on a JavaCard 3.x smartcard by using a STORE DATA command. The current card manager AID is the factory default of A0 00 00 01 51 00 00 00. After authenticating with the card manager, the command I'm sending is:

Code: Select all

=> 80 E2 80 00 0A 4F 08 A0 00 00 00 03 00 00 00
<= 6A 88


This command executes successfully on a JavaCard 2.2.x card - has this feature been deprecated on JC 3.x?

Re: Change Card Manager AID on JavaCard 3.x

Posted: Thu Aug 24, 2017 1:33 am
by mabel
Try to use 80 e2 80 00 0d 0070 0a 4f 08 a000000151000000 instead of the command you wrote.

Related commands:

RESET; 00a4040000; AUTH 3; 80e280000d00700a4f08a000000151000000; RESET;

Hope this can help.

Re: Change Card Manager AID on JavaCard 3.x

Posted: Thu Aug 24, 2017 4:35 am
by james
The extra 00 70 bytes in there specify DGI formatting I believe? I have also tried this option, and it fails with a different error:

Code: Select all

=> 80 E2 80 00 0C 00 70 4F 08 A0 00 00 00 03 00 00 00
<= 6A 80

Re: Change Card Manager AID on JavaCard 3.x

Posted: Fri Aug 25, 2017 1:37 am
by mabel
You forgot the data length after 0070. It should be 0070 Length XXXXXX.

>> 80 E2 80 00 0C 00 70 0A 4F 08 A0 00 00 00 03 00 00 00

Re: Change Card Manager AID on JavaCard 3.x

Posted: Fri Aug 25, 2017 7:32 am
by james
Great spot, thanks. The DGI-formatted command was being generated by the JCOP Tools, so I had assumed it was in the right format!