Forum Stats

  • 3,741,184 Users
  • 2,248,385 Discussions
  • 7,861,667 Comments

Discussions

Mifare DESfire card Authentication!!!!!

843851
843851 Member Posts: 19,484
edited Jun 30, 2009 11:08AM in Java Card
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.
«1

Comments

  • 843851
    843851 Member Posts: 19,484
    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
    843851 Member Posts: 19,484
    Thats Great Sir
    Thank you
    Thanks for the help
  • 843851
    843851 Member Posts: 19,484
    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
    843851 Member Posts: 19,484
    Hi,can u please send me that 3DES decrypting algorithm for that 3-pass mutual Authentication.my mail id is [email protected]
  • 843851
    843851 Member Posts: 19,484
    edited Jun 20, 2008 12:51AM
    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
    843851 Member Posts: 19,484
    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
    843851 Member Posts: 19,484
    Hello.

    Write you e-mail. I will send for you DesFire card documents.
  • 843851
    843851 Member Posts: 19,484
    Hi can someone please send this document: "Mifare DES Fire Features and Hints V1.0". on email [email protected]
    Thanks
  • 843851
    843851 Member Posts: 19,484
    HI Can someone send me the "Mifare DES Fire Features and Hints V1.0". doc also to ftb06600 at gmail.com

    thanks
  • 843851
    843851 Member Posts: 19,484
    Hello All,

    Could you give me the Mifare DESFire document??? Thanks
    email: [email protected]
  • 843851
    843851 Member Posts: 19,484
    Hello All
    Could you give me Mifare DES Fire Features and Hints V1.0 document
    at my email address [email protected]

    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
    843851 Member Posts: 19,484
    hi all,
    Can someone send me the Mifare DES Fire Features and Hints V1.0 ?
    my email address is [email protected]
    THanks alot!!
    Kelvin
  • 843851
    843851 Member Posts: 19,484
    Hi.

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

    best regards.
  • 843851
    843851 Member Posts: 19,484
    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: [email protected]
    Thanks
  • 843851
    843851 Member Posts: 19,484
    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
    843851 Member Posts: 19,484
    can you please send me desfire documents on [email protected]
    "Mifare DES fire Features and hints v1.0" also please
  • 843851
    843851 Member Posts: 19,484
    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
    843851 Member Posts: 19,484
    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
    843851 Member Posts: 19,484
    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
    843851 Member Posts: 19,484
    HELLO,can someone please send this document: "Mifare DES Fire Features and Hints V1.0". on email [email protected]
    Thanks
  • 843851
    843851 Member Posts: 19,484
    Hello, somebody could send the same document: "Mifare DES Fire Features and Hints V1.0". to ruben.garcia at telvent.com
    Thanks
  • 843851
    843851 Member Posts: 19,484
    Hello, somebody could send the same document: "Mifare DES Fire Features and Hints V1.0". to [email protected]
    Using acr122

    thanks in advance
  • 843851
    843851 Member Posts: 19,484
    edited May 16, 2009 6:31PM
    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 - [email protected]

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

    Edited by: bigbefour on May 16, 2009 3:30 PM
  • 843851
    843851 Member Posts: 19,484
    You can also try to contact NXP and get the latest version. What country and company you're from?
  • 843851
    843851 Member Posts: 19,484
    edited Jun 7, 2009 10:01AM
    Please, someone could send the document "Mifare DES Fire Features and Hints V1.0" to my e-mail: [email protected]

    thank you

    Edited by: YONA0511 on Jun 7, 2009 7:01 AM
This discussion has been closed.