<?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>topic HMAC-SHA256 with Se05x_API_WriteSymmKey in Secure Authentication</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/HMAC-SHA256-with-Se05x-API-WriteSymmKey/m-p/1788083#M1492</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to insert a 32 byte HMAC to the SE05X and I following code:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const byte hmac_key[32] = {
  0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
  0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
};

Se05x_API_WriteSymmKey(&amp;amp;_se05x_session, NULL, 3, objectId, SE05x_KeyID_KEK_NONE, hmac_key, sizeof(hmac_key), kSE05x_INS_NA, kSE05x_SymmKeyType_HMAC);&lt;/LI-CODE&gt;&lt;P&gt;This returns 0x6A80.&lt;/P&gt;&lt;P&gt;objectId, in this case, is a free slot, without any objects in this place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if I change&amp;nbsp;&lt;STRONG&gt;kSE05x_SymmKeyType_HMAC&lt;/STRONG&gt; to &lt;STRONG&gt;kSE05x_SymmKeyType_AES&lt;/STRONG&gt;, the command works as it should.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I import an AES key as a KEK and give the KEK_ID to this command, the error code stays the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a proper solution (maybe without key wrapping)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2024 14:38:41 GMT</pubDate>
    <dc:creator>jowin202</dc:creator>
    <dc:date>2024-01-12T14:38:41Z</dc:date>
    <item>
      <title>HMAC-SHA256 with Se05x_API_WriteSymmKey</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/HMAC-SHA256-with-Se05x-API-WriteSymmKey/m-p/1788083#M1492</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to insert a 32 byte HMAC to the SE05X and I following code:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const byte hmac_key[32] = {
  0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
  0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
};

Se05x_API_WriteSymmKey(&amp;amp;_se05x_session, NULL, 3, objectId, SE05x_KeyID_KEK_NONE, hmac_key, sizeof(hmac_key), kSE05x_INS_NA, kSE05x_SymmKeyType_HMAC);&lt;/LI-CODE&gt;&lt;P&gt;This returns 0x6A80.&lt;/P&gt;&lt;P&gt;objectId, in this case, is a free slot, without any objects in this place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if I change&amp;nbsp;&lt;STRONG&gt;kSE05x_SymmKeyType_HMAC&lt;/STRONG&gt; to &lt;STRONG&gt;kSE05x_SymmKeyType_AES&lt;/STRONG&gt;, the command works as it should.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I import an AES key as a KEK and give the KEK_ID to this command, the error code stays the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a proper solution (maybe without key wrapping)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 14:38:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/HMAC-SHA256-with-Se05x-API-WriteSymmKey/m-p/1788083#M1492</guid>
      <dc:creator>jowin202</dc:creator>
      <dc:date>2024-01-12T14:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: HMAC-SHA256 with Se05x_API_WriteSymmKey</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/HMAC-SHA256-with-Se05x-API-WriteSymmKey/m-p/1788628#M1494</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/228095"&gt;@jowin202&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please don't specify the&amp;nbsp;maximum number of attempts to a secure object which can not be used for authentication. It works for AES key as AES key can be used for authentication.&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;</description>
      <pubDate>Mon, 15 Jan 2024 08:21:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/HMAC-SHA256-with-Se05x-API-WriteSymmKey/m-p/1788628#M1494</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2024-01-15T08:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: HMAC-SHA256 with Se05x_API_WriteSymmKey</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/HMAC-SHA256-with-Se05x-API-WriteSymmKey/m-p/1788699#M1496</link>
      <description>&lt;P&gt;Thank you very much. It works now&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 09:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/HMAC-SHA256-with-Se05x-API-WriteSymmKey/m-p/1788699#M1496</guid>
      <dc:creator>jowin202</dc:creator>
      <dc:date>2024-01-15T09:47:39Z</dc:date>
    </item>
  </channel>
</rss>

