<?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: S32N55 HSE2 - Debug Authorization Challenge-Response Algorithm Details in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32N55-HSE2-Debug-Authorization-Challenge-Response-Algorithm/m-p/2362144#M58428</link>
    <description>&lt;P&gt;Hello again&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243574"&gt;@EddiePark&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The only current implementation I was able to find is by using a smart card, for example with the TRACE32 version we use internally the only cmm script for secure debugging requires an smart card to be installed.&lt;/P&gt;
&lt;P&gt;As I mentioned a different conversation we had, my expertise regarding the S32N55 (an the expertise of other engineers that take care of the community) is very limited since the chips has not been completely released yet. Furthermore the documentation is still being actively worked on a regular basis and all the information is subject to change.&lt;/P&gt;
&lt;P&gt;Now, regarding the challenge-response, please check the HSE API Reference manual, in particular section&amp;nbsp;&lt;EM&gt;17 HSE Debug Authorization Protocol&lt;/EM&gt;, there you can see all the technical details. You can also check the&amp;nbsp;&lt;EM&gt;S32N5 Security Reference Manual&lt;/EM&gt;, particularly &lt;EM&gt;Chapter 21 Secure Debug&lt;/EM&gt;, note that this last reference is a secure document and you will need to contact your NXP representative to get access to it. You should be able to get all the information you require in the API reference manual.&lt;/P&gt;
&lt;P&gt;Please note that the S32K3 uses HSE (1) and the S32N55 uses HSE2 the process might not be translatable, I don't know the details on how the S32K3 challenge-response works, however, it has a very different architecture, particularly considering the existence of debug domains in the S32N55 and all the isolation configurations available, which are not present in the S32K3.&lt;/P&gt;
&lt;P&gt;Regarding your final question, we do not have a python implementation nor a pseudo-code description on how to perform the challenge-response, for now the only delivered solution is the cmm script I mentioned above.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you need more information.&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2026 00:48:06 GMT</pubDate>
    <dc:creator>alejandro_e</dc:creator>
    <dc:date>2026-05-08T00:48:06Z</dc:date>
    <item>
      <title>S32N55 HSE2 - Debug Authorization Challenge-Response Algorithm Details</title>
      <link>https://community.nxp.com/t5/S32K/S32N55-HSE2-Debug-Authorization-Challenge-Response-Algorithm/m-p/2361738#M58418</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We have successfully provisioned the ADKP (32 bytes) on S32N55 using HSE_FW_S32N5_1_0_24_0 via HSE_OTP_FOEM_ADKP_ATTR_ID SetAttribute service, and confirmed it is programmed via GetAttribute (returns SHA3_384 reference, E_OK).&lt;/P&gt;&lt;P&gt;Now we need to implement the Challenge-Response debug authorization algorithm for S32N55 without using a smart card (volkano.exe requires smart card which we do not have).&lt;/P&gt;&lt;P&gt;We would like to implement this in Python (similar to our S32K3xx implementation) by directly computing the response.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;## Environment&lt;/P&gt;&lt;P&gt;- Platform: S32N55 EVB&lt;BR /&gt;- HSE FW Version: HSE_FW_S32N5_1_0_24_0&lt;BR /&gt;- GrayVIP Version: SW32N5_GRAYVIP_1_0_22_0&lt;BR /&gt;- Debug Tool: TRACE32 (Lauterbach)&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;## S32K3xx Challenge-Response Algorithm (Our Working Implementation)&lt;/P&gt;&lt;P&gt;```python&lt;BR /&gt;# S32K3xx - Working implementation&lt;BR /&gt;def ChallengeResponse(ADKP, UID, Challenge):&lt;BR /&gt;# 1. Hash UID (64-bit)&lt;BR /&gt;HUID = SHA256(UID) # 32 bytes&lt;BR /&gt;# 2. Hash ADKP master (16 bytes)&lt;BR /&gt;ADKPM = SHA256(ADKP) # 32 bytes&lt;BR /&gt;# 3. Derive ADKP using AES-128-ECB&lt;BR /&gt;dADKP = AES128_ECB_ENC(key=ADKPM, data=HUID[0:16]) # 16 bytes&lt;BR /&gt;# 4. Compute Response using AES-128-ECB&lt;BR /&gt;Response = AES128_ECB_ENC(key=dADKP, data=Challenge) # 16 bytes&lt;BR /&gt;return Response&lt;/P&gt;&lt;P&gt;Key parameters:&lt;BR /&gt;ADKP size : 16 bytes (AES-128)&lt;BR /&gt;UID size : 64-bit (2 x 32-bit words)&lt;BR /&gt;Challenge : 128-bit (16 bytes)&lt;BR /&gt;Response : 128-bit (16 bytes)&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;## S32N55 Key Differences&lt;/P&gt;&lt;P&gt;1. ADKP size : 32 bytes (HSE_OTP_FOEM_KEY_SIZE = 32U in hse_srv_attr.h)&lt;BR /&gt;2. UID size : 128-bit (vs 64-bit in S32K3xx)&lt;BR /&gt;3. Debug I/F : CoreSight SDC-600 (CHIP.SecureChallenge() in TRACE32)&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;## Critical Questions&lt;/P&gt;&lt;P&gt;### 1. Challenge Size&lt;BR /&gt;Is the Challenge size on S32N55 16 bytes (128-bit) or 32 bytes (256-bit)?&lt;/P&gt;&lt;P&gt;S32K3xx: Challenge = 128-bit (16 bytes)&lt;BR /&gt;S32N55: Challenge = ??? bytes&lt;/P&gt;&lt;P&gt;This determines how many CHIP.SecureChallenge() indices are used for the Challenge:&lt;/P&gt;&lt;P&gt;CHIP.SecureChallenge(0) = UID[63:0]&lt;BR /&gt;CHIP.SecureChallenge(1) = UID[127:64]&lt;BR /&gt;CHIP.SecureChallenge(2) = Challenge word 0&lt;BR /&gt;CHIP.SecureChallenge(3) = Challenge word 1&lt;BR /&gt;CHIP.SecureChallenge(4) = Challenge word 2 ← only if Challenge &amp;gt; 128-bit&lt;BR /&gt;CHIP.SecureChallenge(5) = Challenge word 3 ← only if Challenge &amp;gt; 256-bit&lt;/P&gt;&lt;P&gt;Could you please confirm the exact index mapping for CHIP.SecureChallenge() on S32N55?&lt;/P&gt;&lt;P&gt;### 2. Hash Algorithm for UID&lt;BR /&gt;Is SHA256 still used for UID hashing on S32N55 (128-bit UID)?&lt;/P&gt;&lt;P&gt;S32K3xx: HUID = SHA256(UID_64bit) → 32 bytes&lt;BR /&gt;S32N55: HUID = SHA256(UID_128bit)? → 32 bytes&lt;BR /&gt;or SHA3_384(UID_128bit)? → 48 bytes&lt;/P&gt;&lt;P&gt;### 3. AES Mode&lt;BR /&gt;Since ADKP is 32 bytes on S32N55, is AES-256-ECB used instead of AES-128-ECB?&lt;/P&gt;&lt;P&gt;S32K3xx: AES-128-ECB (16-byte key)&lt;BR /&gt;S32N55: AES-256-ECB (32-byte key)?&lt;/P&gt;&lt;P&gt;### 4. Derivation Algorithm&lt;BR /&gt;Is the overall derivation algorithm the same as S32K3xx?&lt;/P&gt;&lt;P&gt;Proposed S32N55 algorithm:&lt;BR /&gt;HUID = SHA256(UID_128bit) # 32 bytes&lt;BR /&gt;ADKPM = SHA256(ADKP_32bytes) # 32 bytes&lt;BR /&gt;dADKP = AES256_ECB_ENC(key=ADKPM,&lt;BR /&gt;data=HUID) # 32 bytes&lt;BR /&gt;Response = AES256_ECB_ENC(key=dADKP,&lt;BR /&gt;data=Challenge) # 32 bytes&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P&gt;### 5. Response Format&lt;BR /&gt;How is the Response sent to S32N55 via TRACE32?&lt;/P&gt;&lt;P&gt;SYStem.Option KEYCODE %Byte &amp;lt;response_bytes&amp;gt;&lt;/P&gt;&lt;P&gt;What is the expected byte order (little endian / big endian)?&lt;/P&gt;&lt;P&gt;### 6. Debug Authorization Mode&lt;BR /&gt;Which attribute controls the Challenge-Response vs Password mode?&lt;/P&gt;&lt;P&gt;HSE_OTP_APP_DEBUG_AUTH_MODE_ATTR_ID (63U) - OTP fuse based&lt;BR /&gt;HSE_APP_DEBUG_AUTH_MODE_ATTR_ID (106U) - NVM based&lt;/P&gt;&lt;P&gt;Is there anything that needs to be configured before the Challenge-Response can work?&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;A complete Python implementation or pseudocode for S32N55 Challenge-Response would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2026 09:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32N55-HSE2-Debug-Authorization-Challenge-Response-Algorithm/m-p/2361738#M58418</guid>
      <dc:creator>EddiePark</dc:creator>
      <dc:date>2026-05-07T09:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: S32N55 HSE2 - Debug Authorization Challenge-Response Algorithm Details</title>
      <link>https://community.nxp.com/t5/S32K/S32N55-HSE2-Debug-Authorization-Challenge-Response-Algorithm/m-p/2362144#M58428</link>
      <description>&lt;P&gt;Hello again&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243574"&gt;@EddiePark&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The only current implementation I was able to find is by using a smart card, for example with the TRACE32 version we use internally the only cmm script for secure debugging requires an smart card to be installed.&lt;/P&gt;
&lt;P&gt;As I mentioned a different conversation we had, my expertise regarding the S32N55 (an the expertise of other engineers that take care of the community) is very limited since the chips has not been completely released yet. Furthermore the documentation is still being actively worked on a regular basis and all the information is subject to change.&lt;/P&gt;
&lt;P&gt;Now, regarding the challenge-response, please check the HSE API Reference manual, in particular section&amp;nbsp;&lt;EM&gt;17 HSE Debug Authorization Protocol&lt;/EM&gt;, there you can see all the technical details. You can also check the&amp;nbsp;&lt;EM&gt;S32N5 Security Reference Manual&lt;/EM&gt;, particularly &lt;EM&gt;Chapter 21 Secure Debug&lt;/EM&gt;, note that this last reference is a secure document and you will need to contact your NXP representative to get access to it. You should be able to get all the information you require in the API reference manual.&lt;/P&gt;
&lt;P&gt;Please note that the S32K3 uses HSE (1) and the S32N55 uses HSE2 the process might not be translatable, I don't know the details on how the S32K3 challenge-response works, however, it has a very different architecture, particularly considering the existence of debug domains in the S32N55 and all the isolation configurations available, which are not present in the S32K3.&lt;/P&gt;
&lt;P&gt;Regarding your final question, we do not have a python implementation nor a pseudo-code description on how to perform the challenge-response, for now the only delivered solution is the cmm script I mentioned above.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you need more information.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2026 00:48:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32N55-HSE2-Debug-Authorization-Challenge-Response-Algorithm/m-p/2362144#M58428</guid>
      <dc:creator>alejandro_e</dc:creator>
      <dc:date>2026-05-08T00:48:06Z</dc:date>
    </item>
  </channel>
</rss>

