<?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>Secure Authentication中的主题 AES key session authentication</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1171629#M384</link>
    <description>&lt;P&gt;I am using msp430f5994 and se050. I want to create a AES key on the smart card.&lt;/P&gt;&lt;P&gt;I first created an AESKey using WriteSymmKey command from se050 APDU specification document. But for session authentication I have to follow global platform authentication steps.&lt;/P&gt;&lt;P&gt;1. Initialize Update command&lt;/P&gt;&lt;P&gt;2. External authenticate command&lt;/P&gt;&lt;P&gt;In initialize update command, I have to send host challenge to the smartcard and the card will create its own card challenge, internal session keys and card cryptogram, and send it back to microcontroller. Now, I have to generate also the same session keys on the microcontroller for comparison.&lt;/P&gt;&lt;P&gt;According to the global platform SCP document, I have to do 3DES encryption technique in ECB mode to generate those keys. I don't know how to implement this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone of you&amp;nbsp; has some experience in this, I would be really thankful for your help.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2020 07:30:08 GMT</pubDate>
    <dc:creator>Raza</dc:creator>
    <dc:date>2020-10-22T07:30:08Z</dc:date>
    <item>
      <title>AES key session authentication</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1171629#M384</link>
      <description>&lt;P&gt;I am using msp430f5994 and se050. I want to create a AES key on the smart card.&lt;/P&gt;&lt;P&gt;I first created an AESKey using WriteSymmKey command from se050 APDU specification document. But for session authentication I have to follow global platform authentication steps.&lt;/P&gt;&lt;P&gt;1. Initialize Update command&lt;/P&gt;&lt;P&gt;2. External authenticate command&lt;/P&gt;&lt;P&gt;In initialize update command, I have to send host challenge to the smartcard and the card will create its own card challenge, internal session keys and card cryptogram, and send it back to microcontroller. Now, I have to generate also the same session keys on the microcontroller for comparison.&lt;/P&gt;&lt;P&gt;According to the global platform SCP document, I have to do 3DES encryption technique in ECB mode to generate those keys. I don't know how to implement this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone of you&amp;nbsp; has some experience in this, I would be really thankful for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 07:30:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1171629#M384</guid>
      <dc:creator>Raza</dc:creator>
      <dc:date>2020-10-22T07:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: AES key session authentication</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1172076#M388</link>
      <description>&lt;P&gt;&lt;A href="https://github.com/martinpaljak/GlobalPlatformPro" target="_blank"&gt;https://github.com/martinpaljak/GlobalPlatformPro&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Martin Paljak has written a pretty good Global Platform library that includes (in the source) the various key expansion/derivation steps necessary to derive a session key set from a static key set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/products/security-and-authentication/authentication/edgelock-se050-plug-trust-secure-element-family-enhanced-iot-security-with-maximum-flexibility:SE050?tab=Design_Tools_Tab" target="_blank"&gt;https://www.nxp.com/products/security-and-authentication/authentication/edgelock-se050-plug-trust-secure-element-family-enhanced-iot-security-with-maximum-flexibility:SE050?tab=Design_Tools_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also the se050 middleware package has an implementation.&amp;nbsp; Near as i can tell, api&amp;gt;src&amp;gt;ax_scp.c may be where you want to start.&lt;/P&gt;&lt;P&gt;Re AES key vs SCP - you want to take a look at the SCP03 documentation, not the SCP02 doc.&amp;nbsp; SCP03 does not use DES for anything and SCP02 does not use AES for anything.&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 23:38:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1172076#M388</guid>
      <dc:creator>msjcard</dc:creator>
      <dc:date>2020-10-22T23:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: AES key session authentication</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1172242#M390</link>
      <description>&lt;P&gt;Thank you so much for your reply.&lt;BR /&gt;I have already sent the INITIALIZEUPDATE command to se050 and it gave the following as a response&lt;BR /&gt;1. key diversification data&lt;/P&gt;&lt;P&gt;2. key information&lt;/P&gt;&lt;P&gt;3. card challenge&lt;/P&gt;&lt;P&gt;4. card cryptogram&lt;/P&gt;&lt;P&gt;Now, I need to know the following:&lt;/P&gt;&lt;P&gt;1. what static K-ENC key is used by the card to generate the card cryptogram?&lt;/P&gt;&lt;P&gt;2. How can I generate the card cryptogram, session S-ENC key and finally the host cryptogram that will be sent to the se050 in EXTERNAL AUTHENTICATE command?&lt;/P&gt;&lt;P&gt;3. I have a C code in code composer studio to send APDUs from msp430 to se050. How can I generate the above mentioned things in C, so that I can formulate the EXTERNAL AUTHENTICATE command?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 07:07:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1172242#M390</guid>
      <dc:creator>Raza</dc:creator>
      <dc:date>2020-10-23T07:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: AES key session authentication</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1173728#M396</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/179415"&gt;@Raza&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Platform &lt;SPAN class="highlighted"&gt;SCP&lt;/SPAN&gt;03 keys provisioned in SE050 are as follows:&lt;/P&gt;
&lt;UL class="simple"&gt;
&lt;LI&gt;
&lt;P&gt;ENC is &lt;CODE class="docutils literal notranslate"&gt;&lt;SPAN class="pre"&gt;35C29245895EA34F6136155F8209D6CD&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;MAC is &lt;CODE class="docutils literal notranslate"&gt;&lt;SPAN class="pre"&gt;AF172D5D54F7C0D5C10A05B9F1207F78&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;DEK is &lt;CODE class="docutils literal notranslate"&gt;&lt;SPAN class="pre"&gt;A2BC8438BF77015B361A4425F239FA29&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;and we have provide source code for platform SCP communication in the MW, which contains APIS, for example,&amp;nbsp;SCP_HostLocal_CalculateSessionKeys(),&amp;nbsp;SCP_HostLocal_CalculateHostCryptogram(), and you may find them in the folder of "simw-top\hostlib\hostLib\api\src", in the file of "ax_scp.c", just as mentioned by&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/165840"&gt;@msjcard&lt;/a&gt;&amp;nbsp;. You may use them as a reference for your own application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 09:07:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-key-session-authentication/m-p/1173728#M396</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2020-10-27T09:07:02Z</dc:date>
    </item>
  </channel>
</rss>

