Page 1 of 1

DESFire application

Posted: Tue Aug 30, 2016 11:26 pm
by Pf6KINE
Hello everybody,

Our team need to develop an applet on NXP J3D081 card and call the DESFire application within another applet in Java card.

That is to say we program the card by contactless interface (create application with AID XXXXXX) and install the applet with AID YYYYYY on Java card. Then we want to call the “XXXXXX” from inside the "YYYYYY" and use the benefits of the DESFire files “value file”, "record file".

Does anybody work on this? If anyone can send me one sample code, I will be much appreciated.

Re: DESFire application

Posted: Thu Sep 01, 2016 2:15 am
by mabel
The sample applet is attached to this post.

The following are some basic instructions and responses.

Code: Select all

// Authenticate(keyNo), keyNo = 0x00;
Send: 00 00 00 00 02 0A 00 00
Recv: AF 15 B3 CB B7 CA DC 6D E5 90 00

// GetKeySettings(),
Send: 00 00 00 00 01 45 00
// 0x00 + key settings: 0x0F + max No of keys: 0x01;
Recv: 00 0F 01 90 00

// GetKeyVersion(KeyNo), keyNo = 0x00;
Send: 00 00 00 00 02 64 00 00
Recv: 00 00 90 00

// GetApplicationIDs()
Send: 00 00 00 00 01 6A 00
// 00 + AID (2F 01 F4);
Recv: 00 2F 01 F4 90 00

// SelectApplication(AID), AID: 2F 01 F4;
Send: 00 00 00 00 04 5A 2F 01 F4 00
Recv: 00 90 00

// GetVersion;
Send: 00 00 00 00 01 60 00
// 0xAF + Vend or ID (04) + type (0x81) + sub type(0x01) + ...;
Recv: AF 04 81 01 01 00 1A 05 90 00

Re: DESFire application

Posted: Thu Sep 01, 2016 3:53 am
by Pf6KINE
Much appreciated, mabel.

Thank you for your detailed answer. I will have a try.