<?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 Re: AES and ECDH key exchange in Secure Authentication</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1742529#M1399</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224071"&gt;@WorkerEmbedded&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For symmetric key types such as AES key, it is not possible to use the generation functions, as the symmetric keys are not allowed to be read out when they are stored in the SE05x, so if they are generated inside, the host would never know what they are. You have to generate the AES key value from host, and then use set function to write the AES key into the SE.&lt;/P&gt;
&lt;P&gt;Please refer to the demo of&amp;nbsp;ex_sss_symmetric for more details.&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>Thu, 19 Oct 2023 03:25:42 GMT</pubDate>
    <dc:creator>Kan_Li</dc:creator>
    <dc:date>2023-10-19T03:25:42Z</dc:date>
    <item>
      <title>AES and ECDH key exchange</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1741434#M1397</link>
      <description>&lt;P&gt;Hi! i'm tryna to modify a demo of se050 devboard running on LPC55S69 that make ECDH simulation with the integration of AES generation key, the added code is:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN&gt; aesKey[16] = {0};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;size_t&lt;/SPAN&gt;&lt;SPAN&gt; aesKeyLen = &lt;/SPAN&gt;&lt;SPAN&gt;sizeof&lt;/SPAN&gt;&lt;SPAN&gt;(aesKey);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;size_t&lt;/SPAN&gt;&lt;SPAN&gt; aesKeyBitLen = &lt;/SPAN&gt;&lt;SPAN&gt;sizeof&lt;/SPAN&gt;&lt;SPAN&gt;(aesKey) * 8;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sss_object_t&lt;/SPAN&gt;&lt;SPAN&gt; keySingle = {0};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;status = sss_key_object_init(&amp;amp;keySingle, &amp;amp;pCtx-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;ks&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ENSURE_OR_GO_CLEANUP(status == &lt;/SPAN&gt;&lt;SPAN&gt;kStatus_SSS_Success&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;status = sss_key_object_allocate_handle(&amp;amp;keySingle,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MAKE_TEST_ID(__LINE__),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;kSSS_KeyPart_Default&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;kSSS_CipherType_NONE&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;16,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;kKeyObject_Mode_Persistent&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ENSURE_OR_GO_CLEANUP(status == &lt;/SPAN&gt;&lt;SPAN&gt;kStatus_SSS_Success&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;status = sss_key_store_generate_key(&amp;amp;pCtx-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;ks&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;amp;keySingle, AES_KEY_BIT_LENGTH, 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ENSURE_OR_GO_CLEANUP(status == &lt;/SPAN&gt;&lt;SPAN&gt;kStatus_SSS_Success&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;status = sss_key_store_get_key(&amp;amp;pCtx-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;ks&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;amp;keySingle, aesKey, &amp;amp;aesKeyLen, &amp;amp;aesKeyBitLen);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ENSURE_OR_GO_CLEANUP(status == &lt;/SPAN&gt;&lt;SPAN&gt;kStatus_SSS_Success&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOG_MAU8_I(&lt;/SPAN&gt;&lt;SPAN&gt;"AES Key"&lt;/SPAN&gt;&lt;SPAN&gt;, aesKey, aesKeyLen);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I recived this error:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sss :WARN :nxEnsure:'keyObject-&amp;gt;objectType == kSSS_KeyPart_Pair' failed. At Line:3493 Function:sss_se05x_key_store_generate_key&lt;BR /&gt;App :WARN :nxEnsure:'status == kStatus_SSS_Success' failed. At Line:93 Function:ex_sss_entry&lt;BR /&gt;App :ERROR:ex_sss_ecdh Example Failed !!!...&lt;BR /&gt;App :INFO :ex_sss Finished&lt;BR /&gt;App :ERROR:ex_sss_entry Failed&lt;BR /&gt;App :ERROR:!ERROR! ret != 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Somebody can help me?&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Oct 2023 15:36:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1741434#M1397</guid>
      <dc:creator>WorkerEmbedded</dc:creator>
      <dc:date>2023-10-17T15:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: AES and ECDH key exchange</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1741435#M1398</link>
      <description>&lt;P&gt;i've already modify&amp;nbsp;&lt;SPAN&gt;kSSS_CipherType_NONE in&amp;nbsp;kSSS_CipherType_AES but nothing...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 15:37:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1741435#M1398</guid>
      <dc:creator>WorkerEmbedded</dc:creator>
      <dc:date>2023-10-17T15:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: AES and ECDH key exchange</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1742529#M1399</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224071"&gt;@WorkerEmbedded&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For symmetric key types such as AES key, it is not possible to use the generation functions, as the symmetric keys are not allowed to be read out when they are stored in the SE05x, so if they are generated inside, the host would never know what they are. You have to generate the AES key value from host, and then use set function to write the AES key into the SE.&lt;/P&gt;
&lt;P&gt;Please refer to the demo of&amp;nbsp;ex_sss_symmetric for more details.&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>Thu, 19 Oct 2023 03:25:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1742529#M1399</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2023-10-19T03:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: AES and ECDH key exchange</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1742927#M1401</link>
      <description>&lt;P&gt;Thanks, i've another question... i'm trying to generate an ECC KeyPair with the&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;sss_key_store_generate_key() functions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've see on the MW documentation that this function allow the return of the only PK,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;what i'm supposed to recive is a 65 bytes but i noticed that are 91... I think that is a DER rapresentation of it an that i've to extract the pk&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 12:45:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1742927#M1401</guid>
      <dc:creator>WorkerEmbedded</dc:creator>
      <dc:date>2023-10-19T12:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: AES and ECDH key exchange</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1744044#M1403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224071"&gt;@WorkerEmbedded&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry, but are you referring to&amp;nbsp;&lt;SPAN&gt;sss_key_store_get_key instead? Is it possible to have your code for a review?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 02:02:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/AES-and-ECDH-key-exchange/m-p/1744044#M1403</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2023-10-23T02:02:33Z</dc:date>
    </item>
  </channel>
</rss>

