<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>NFCのトピックDesfire Ev1 questions</title>
    <link>https://community.nxp.com/t5/NFC/Desfire-Ev1-questions/m-p/793672#M3901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thing first: I have allready created an account on the NXP docstore, and waiting for my account to be validated (via NDAs probably). I have also notified my local sales rep here in france (which happens to be AVNET).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, here is the situation. I am working on a project with a kinetis (cortex M0) MCU, and a PN7150 chip. The final aim of this configuration is to read a dozen bytes, encrypted in an DESFIRE EV1 card. I have successfully implemented big parts of the communication protocol. For example, I am able to read NDEF records from a blank MIFARE DESFIRE EV1 card, on which i have written a "Hello World" text record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, so good.&lt;/P&gt;&lt;P&gt;Now, I am trying to get the authentication part working, and to say the least, it's painful without any descent documentation. I know, i should probably wait until I get the NDA and more documents from NXP, but I need to get that project up and running ASAP, so i would really appreciate if you bare with me and give any hints that would fall out of the scope of the NDA to get me moving.&lt;/P&gt;&lt;P&gt;As you may probably know, the code in NXP's SDK (the one available without NDA) does not provide any DESFIRE authentication examples. So, I have built my own code for that, which is inspired from the &lt;A href="https://github.com/nfc-tools/libfreefare" rel="nofollow noopener noreferrer" target="_blank"&gt;LibFreeFare&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;As very simple test to begin with, I am trying to authenticate key 0 (master key), with the key {00,00,00,00,00,00,00,00} on a blank mifare DesFire card.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the full authentication tractions, which leads at the end to an "AE" response, which i've come to understand it means "Authentication Error":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;MCU -- 00 00 02 1a 00
TAG -- 60 06 03 01 00 01
TAG -- 00 00 09 af 57 d2 fc d6 a2 5f 4f 73
MCU -- 00 00 11 af 8c a6 4d e9 c1 b1 23 a7 fe bf 9c 9d 25 a3 f6 4b
TAG -- 60 06 03 01 00 01
TAG -- 00 00 01 ae‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Questions:&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1- Is it right to try and authenticate a blank card, and is it supposed to work? I am wondering if the authentication error is normal since no authentication is needed?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;2- How can I know if i should use the command 0x0A, 0x1A or 0xAA to request RNDB ? They seem to represent different encryption algorithms, right? Is there a default command that should be safely used on a blank card?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;3- Is there a tool to which I can feed the number (RNDB) that can calculate the correct "RNDA+RNDB" that need to be sent back to device? I would like to at least know if it's just a cypher error or a protocol error?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;4- Does it seem crazy to anyone here to run such a project on a cortex M0 MCU? Just curious about your point of view.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for any hints that can get me moving forward!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps: the same post exists in the mifare forum, but since mifare forum doesn't allow me to edit or even delete and repost my question, i couldn't correct some mitakes in my initial question, that why i am posting again here. I wouldn't do that otherwize..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2018 07:34:56 GMT</pubDate>
    <dc:creator>i_kamal</dc:creator>
    <dc:date>2018-08-16T07:34:56Z</dc:date>
    <item>
      <title>Desfire Ev1 questions</title>
      <link>https://community.nxp.com/t5/NFC/Desfire-Ev1-questions/m-p/793672#M3901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thing first: I have allready created an account on the NXP docstore, and waiting for my account to be validated (via NDAs probably). I have also notified my local sales rep here in france (which happens to be AVNET).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, here is the situation. I am working on a project with a kinetis (cortex M0) MCU, and a PN7150 chip. The final aim of this configuration is to read a dozen bytes, encrypted in an DESFIRE EV1 card. I have successfully implemented big parts of the communication protocol. For example, I am able to read NDEF records from a blank MIFARE DESFIRE EV1 card, on which i have written a "Hello World" text record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, so good.&lt;/P&gt;&lt;P&gt;Now, I am trying to get the authentication part working, and to say the least, it's painful without any descent documentation. I know, i should probably wait until I get the NDA and more documents from NXP, but I need to get that project up and running ASAP, so i would really appreciate if you bare with me and give any hints that would fall out of the scope of the NDA to get me moving.&lt;/P&gt;&lt;P&gt;As you may probably know, the code in NXP's SDK (the one available without NDA) does not provide any DESFIRE authentication examples. So, I have built my own code for that, which is inspired from the &lt;A href="https://github.com/nfc-tools/libfreefare" rel="nofollow noopener noreferrer" target="_blank"&gt;LibFreeFare&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;As very simple test to begin with, I am trying to authenticate key 0 (master key), with the key {00,00,00,00,00,00,00,00} on a blank mifare DesFire card.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the full authentication tractions, which leads at the end to an "AE" response, which i've come to understand it means "Authentication Error":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;MCU -- 00 00 02 1a 00
TAG -- 60 06 03 01 00 01
TAG -- 00 00 09 af 57 d2 fc d6 a2 5f 4f 73
MCU -- 00 00 11 af 8c a6 4d e9 c1 b1 23 a7 fe bf 9c 9d 25 a3 f6 4b
TAG -- 60 06 03 01 00 01
TAG -- 00 00 01 ae‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Questions:&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1- Is it right to try and authenticate a blank card, and is it supposed to work? I am wondering if the authentication error is normal since no authentication is needed?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;2- How can I know if i should use the command 0x0A, 0x1A or 0xAA to request RNDB ? They seem to represent different encryption algorithms, right? Is there a default command that should be safely used on a blank card?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;3- Is there a tool to which I can feed the number (RNDB) that can calculate the correct "RNDA+RNDB" that need to be sent back to device? I would like to at least know if it's just a cypher error or a protocol error?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;4- Does it seem crazy to anyone here to run such a project on a cortex M0 MCU? Just curious about your point of view.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for any hints that can get me moving forward!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps: the same post exists in the mifare forum, but since mifare forum doesn't allow me to edit or even delete and repost my question, i couldn't correct some mitakes in my initial question, that why i am posting again here. I wouldn't do that otherwize..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 07:34:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Desfire-Ev1-questions/m-p/793672#M3901</guid>
      <dc:creator>i_kamal</dc:creator>
      <dc:date>2018-08-16T07:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Desfire Ev1 questions</title>
      <link>https://community.nxp.com/t5/NFC/Desfire-Ev1-questions/m-p/793673#M3902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The information you are requesting is under NDA for which it is needed to get approval on DocStore for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your comprehension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ivan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 20:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Desfire-Ev1-questions/m-p/793673#M3902</guid>
      <dc:creator>IvanRuiz</dc:creator>
      <dc:date>2018-08-21T20:38:36Z</dc:date>
    </item>
  </channel>
</rss>

