<?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: Issue with KeyDerivation in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Issue-with-KeyDerivation/m-p/2105244#M49252</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/249628"&gt;@kerti1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see that you configured targetKeyHandle as HSE_KEY_TYPE_AES. However, it should be HSE_ KEY_ TYPE_ SHARED_ SECRET. Here is a screenshot from the HSE Service API reference manual:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1748343704597.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/339951iF9EF2CE5BF7BA65F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1748343704597.png" alt="lukaszadrapa_0-1748343704597.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So, the result of this operation is another shared secret. If you need AES key, you need to extract such key using mentioned hseKeyDeriveCopyKeySrv_t service as shown in the demo example. Derived key is stored directly to slot defined by keyhandle, you are not supposed to import it manually by yourself.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Tue, 27 May 2025 11:02:19 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2025-05-27T11:02:19Z</dc:date>
    <item>
      <title>Issue with KeyDerivation</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-KeyDerivation/m-p/2104518#M49204</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with the ECDH using the example project of Demo_examples of Demoapp_sessionkeys as reference. I am able to generate the ECC pair keys, import the peer public key and generate the common shared key which are stored in GET_KEY_HANDLE(HSE_KEY_CATALOG_ID_RAM, 0, 0) for ECC pair keys;&lt;/P&gt;&lt;P&gt;GET_KEY_HANDLE(HSE_KEY_CATALOG_ID_RAM, 1, 0) for Peer Public Key and&lt;/P&gt;&lt;P&gt;GET_KEY_HANDLE(HSE_KEY_CATALOG_ID_RAM, 2, 0) for DH shared key. So I assigned the same as srcKeyHandle paramter in the derivekey function with the same DH shared key slot and new slot for the target key. But i get invalid params. I did not clearly understand about the keyderive even after going through reference manual. Please find the attached snippets. And also is it needed to import the derived key?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KeerthiT_0-1748270110090.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/339739i56BC420A45FF41F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KeerthiT_0-1748270110090.png" alt="KeerthiT_0-1748270110090.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KeerthiT_1-1748270599226.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/339740iFBEC9B6E241189D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KeerthiT_1-1748270599226.png" alt="KeerthiT_1-1748270599226.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for the support.&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 14:45:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-KeyDerivation/m-p/2104518#M49204</guid>
      <dc:creator>kerti1</dc:creator>
      <dc:date>2025-05-26T14:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with KeyDerivation</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-KeyDerivation/m-p/2105244#M49252</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/249628"&gt;@kerti1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see that you configured targetKeyHandle as HSE_KEY_TYPE_AES. However, it should be HSE_ KEY_ TYPE_ SHARED_ SECRET. Here is a screenshot from the HSE Service API reference manual:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1748343704597.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/339951iF9EF2CE5BF7BA65F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1748343704597.png" alt="lukaszadrapa_0-1748343704597.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So, the result of this operation is another shared secret. If you need AES key, you need to extract such key using mentioned hseKeyDeriveCopyKeySrv_t service as shown in the demo example. Derived key is stored directly to slot defined by keyhandle, you are not supposed to import it manually by yourself.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 11:02:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-KeyDerivation/m-p/2105244#M49252</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-05-27T11:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with KeyDerivation</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-KeyDerivation/m-p/2105268#M49255</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the solution. But I already have defined {HSE_ALL_MU_MASK, HSE_KEY_OWNER_ANY, HSE_KEY_TYPE_SHARED_SECRET, &lt;STRONG&gt;2U&lt;/STRONG&gt;, HSE_KEY638_BITS} 2 keys slots i thought it would be okay for derived key.&lt;/P&gt;&lt;P&gt;And also we should import our public key in order to share to the peer persons. But the key generated is changing every time when I run the program i think it is because of RAM keys. If i want to have constant key. I hope using NVM keys is sufficient. Sorry for asking basic questions. But I lack clarity in these topics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 11:28:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-KeyDerivation/m-p/2105268#M49255</guid>
      <dc:creator>kerti1</dc:creator>
      <dc:date>2025-05-27T11:28:02Z</dc:date>
    </item>
  </channel>
</rss>

