Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Mifare DESfire card Authentication!!!!!

843851Aug 4 2004 — edited Jun 30 2009
Does the Philips Mifare DESfire card authentication (3 pass) follows the standard CBC DES\3DES
en-\decipher operations or are there some modifications.
Any idea of CBC DES "send mode" & "receive mode" as stated in the card spec.

Comments

843851 Aug 4 2004
Look in "Mifare DES Fire Features and Hints V1.0". Chapter 2.3.3 contains the DES algorithms used by the DES Fire Card. If you use these algorithms an authentication will be possible.
Be careful with the resultig session key. If you authenticate with a single DES the session key will also be a single DES. (Copy the first 8 Bytes into the following 8 Bytes)

Good luck!
843851 Aug 5 2004
Thats Great Sir
Thank you
Thanks for the help
843851 Sep 29 2005
Important observation: it is not the usual CBC computation.

The second block of data is XOR'd before the DES. (I was told it is 'inverted CBC' -- RSA's site says

there are over 7 ways to do triple DES!). My CBC algorithms all XOR'd the data with previous block after

the DES. The Philips documentation diagrams it correctly, but it's not obvious.

So although your first block (rndA) will be correct (because ICV is 0's), your rndB' will not - and you get AE,

authentication error.
843851 Sep 20 2007
Hi,can u please send me that 3DES decrypting algorithm for that 3-pass mutual Authentication.my mail id is sinu_ev@yahoo.com
843851 Jun 20 2008 — edited on Jun 20 2008
Hello
I need help. I working with DesFire card.
I want to authenticate a card. Specifics of desfire card says that master key of card is 0x00(16 Bytes).So it means i have to use DES for enciphering/deciphering.

1-) Authenticate = > Send 0x0A(command) 0x00(KeyNo) Response => AF 91 79 BA 9A AE 1C 71 F2

So RNDB which enciphered with masterkey is => 91 79 BA 9A AE 1C 71 F2

2-)Then i deciphered RNDB(i used DES with init-vector 0x00(8 Bytes), master-key 0x00(8 Bytes)) so clear RNDB = > 0F 67 06 85 0E 2F A4 03

3-) Then I rotated left RNDB. RNDB' = > 67 06 85 0E 2F A4 03 0F

4-) I selected RNDA as 11 22 33 44 55 66 77 88

5-) (RNDA + RNDB') = > 11 22 33 44 55 66 77 88 67 06 85 0E 2F A4 03 0F

5-) I deciphered (RNDA + RNDB') value with using DES function mode CBC-1 and i obtained CD 72 DF C6 E6 D0 40 A4 63 15 30 22 6F 75 4F 8D

6-)As a final i sent this last value with 0xAF => AF CD 72 DF C6 E6 D0 40 A4 63 15 30 22 6F 75 4F 8D
and i got 0xAE that it means authenticate error.

Can You check this values? I don't know where is the fault.

Thanks very much for helping.
843851 Sep 11 2008
Hello all,

Could you please help me with DESFire command set? I was not able to find any documents describing DESFire command set anywhere, If you have such document could you please let me know where I can get it.

Thanks in advance
843851 Sep 17 2008
Hello.

Write you e-mail. I will send for you DesFire card documents.
843851 Oct 7 2008
Hi can someone please send this document: "Mifare DES Fire Features and Hints V1.0". on email tsoldo@gmail.com
Thanks
843851 Oct 23 2008
HI Can someone send me the "Mifare DES Fire Features and Hints V1.0". doc also to ftb06600 at gmail.com

thanks
843851 Dec 3 2008
Hello All,

Could you give me the Mifare DESFire document??? Thanks
email: nganphanthu@gmail.com
843851 Dec 21 2008
Hello All
Could you give me Mifare DES Fire Features and Hints V1.0 document
at my email address ym.albert.ks@gmail.com

because I cannot solve reading desfire ev1
using iso 14443
i already select the card an get the 7 digit serial number
and it done.
But when i am doing RATS command and APDU command it doesnt work.

I am using ACR120U reader and i Already succeess reading mifare philps 4k using the API.
But when i do it in the DESfire EV1 thats cannot worked
this are the steps that i done:

import acs.jni.ACR120U;

public class ConnectDesfire {

ACR120U deviceReadDesf;
byte rSerialNumber;

public ConnectDesfire()
{
deviceReadDesf = new ACR120U();
rSerialNumber = new byte[10];


short conn= deviceReadDesf.open(ACR120U.ACR120_USB1); // succsess
if(conn != 0) System.out.println("Error with code "+conn);

short valueSelect = deviceReadDesf.select(conn, new byte[1],
new byte[1], rSerialNumber); // Success
if(valueSelect != 0) System.out.println("Error with code "+valueSelect );

// rats
byte fsdi = 1 ;
byte atslen[] = new byte[1];
byte[] ats = new byte[16];
short resRats = deviceReadDesf.rATS(conn, fsdi, atslen, ats); // failed dont khow why error -3030
if(resRats != 0) System.out.println("Res Rats failed = " + resRats);

//apdu
byte rData[] = new byte[16];
xLen[0] = 0;
xData[0] = (byte) Integer.valueOf("60", 16).shortValue();
rLen[0] = 0;
rData[0] = 0;
short resAPDU=deviceReadDesf.xchAPDU(ACR120U.ACR120_USB1, true, xLen, xData, rLen, rData);
if(resAPDU !=0) System.out.println("Failed xchAPDU val= "+con);
// failed error -13.... sory i forgot the code

closeConnection(ACR120U.ACR120_USB1);
}

public static void main(String[] args)
{

ConnectDesfire a = new ConnectDesfire();
}
}


So could you share the document Mifare DES Fire Features and Hints V1.0 to me?
843851 Jan 14 2009
hi all,
Can someone send me the Mifare DES Fire Features and Hints V1.0 ?
my email address is swekuang@gmail.com
THanks alot!!
Kelvin
843851 Jan 15 2009
Hi.

Send me please the Mifare DESFire Features and Hints V1.0 email address is green_troll(at)rambler.ru

best regards.
843851 Mar 1 2009
Hi,
I need some help with mifare desfire application commands.
Can someone please send this document to me:
"Mifare DES Fire Features and Hints V1.0"
email: irena@otiglobal.com
Thanks
843851 Mar 6 2009
Hi,

I'm also interested in the document
"Mifare DES Fire Features and Hints V1.0"

Can someone give me a hint where to get it
or email it to me.
email: schinger(at)gmx.de

thanks
843851 Mar 29 2009
can you please send me desfire documents on dosabry49@hotmail.com
"Mifare DES fire Features and hints v1.0" also please
843851 Mar 31 2009
Hi,
I need to acces a DESfire Card through the PC/SC interface, I can't find any usefull information.
It would be nice if somebody sends me the "Mifare DES Fire Features and Hints V1.0" document and some Information on which APDUs to use to s25534 (at) fh-aschaffenburg.de

regards lukas
843851 Mar 31 2009
Hi choege, can you email any document about DESfire card? I need for my final project. I try search google but I didn't found "Mifare DES Fire Features and Hints V1.0". or something like that.
my email : suriva.25 at gmail dot com

Thank in advance

Suriva
843851 Apr 2 2009
M094510 - Mifare DESFire Feature and Hints
M075040 - DESFire DataSheet


Both document will help you work on DESfire card. To apply the documents you should go through NXP's rep or Vendor who you got card from. They are not public document.
843851 Apr 16 2009
HELLO,can someone please send this document: "Mifare DES Fire Features and Hints V1.0". on email bilel.kamoun@gmail.com
Thanks
843851 Apr 27 2009
Hello, somebody could send the same document: "Mifare DES Fire Features and Hints V1.0". to ruben.garcia at telvent.com
Thanks
843851 May 13 2009
Hello, somebody could send the same document: "Mifare DES Fire Features and Hints V1.0". to bigbefour@gmail.com
Using acr122

thanks in advance
843851 May 16 2009 — edited on May 16 2009
I asked for Hints for DESfire etc, hoping I would recieve it by mail.
Is there somebody who knows if there will be a response or is this just asking,getting nothing ;-)

Still hoping - bigbefour@gmail.com

Edited by: bigbefour on May 16, 2009 3:29 PM

Edited by: bigbefour on May 16, 2009 3:30 PM
843851 May 29 2009
You can also try to contact NXP and get the latest version. What country and company you're from?
843851 Jun 7 2009 — edited on Jun 7 2009
Please, someone could send the document "Mifare DES Fire Features and Hints V1.0" to my e-mail: yenfrynieves@gmail.com

thank you

Edited by: YONA0511 on Jun 7, 2009 7:01 AM
843851 Jun 20 2009
Hi everybody!!!! I'm working on a reader for Desfire cards and i tried to find "Mifare DESFire Features and Hints V1.0" but I can't find it. Could someone please send this document to me if you have it . My e-mail: fritzlemarc@yahoo.fr
THANKS
843851 Jun 30 2009
Hi All,

I am looking for Mifare DES Fire Features and Hints V1.0.
Would you please send it to me at fitramsbr@yahoo.com.

Thanks & Best Regards,
Fitra
PhHein Jun 30 2009
Jeebus. I'm locking this flypaper thread now.
1 - 28
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 28 2009
Added on Aug 4 2004
28 comments
6,526 views