<?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: RT117x to execute both encypted and plain-text executable in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1777229#M28090</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;RT1051 vs RT1170 Encryped XiP implementation is different.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once Ecnrypted XiP is enabled on RT1170, all mandatory structures must be present on an external memory (Valid OTFAD KeyBlob along with PUF Keystore if enabled). Otherwise device will not boot.&lt;/P&gt;
&lt;P&gt;You can refer to AN13250 + SW to check how it is implemented and what steps must be performed.&lt;/P&gt;
&lt;P&gt;ON RT1051 if the BEE config structures are not present on the external memory, the boot flow continues, thus why you can boot plain image. This corresponds with image created using "&lt;SPAN&gt;XIP_BOOT_HEADER_ENABLE=1&lt;/SPAN&gt;" enabled in SDK. This doesn't include structures for encrypted xip, just the base ones as FCB and IVT.&lt;/P&gt;
&lt;P&gt;Only way how to run plain image on RT1170 with encrypted XiP enabled is to disable OTFAD decrypt in configuration.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;set BASE_ADDR=0x30000000&lt;BR /&gt;set OTFAD_KEY1=6def5a17e01e0f9ced272ac96dd8faba&lt;BR /&gt;set CTR1=0020406001030507&lt;BR /&gt;set START1=0x30001000&lt;BR /&gt;set LENGTH1=0x6000 -&amp;gt; &lt;STRONG&gt;This must be set to 0, then OTFAD will not decrypt the flash content and plain application can boot.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;NOTE:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Encrypted XiP must be always enabled along with HAB (device closed) to ensure integrity, authenticity and confidentiality of your application image.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Martin H&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2023 14:17:07 GMT</pubDate>
    <dc:creator>martin_hrncarek</dc:creator>
    <dc:date>2023-12-19T14:17:07Z</dc:date>
    <item>
      <title>RT117x to execute both encypted and plain-text executable</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1764879#M27777</link>
      <description>&lt;P&gt;on RT1051 we are able to run an encrypted FW or even a plain-text FW.&lt;/P&gt;&lt;P&gt;The fuses we write to RT1051 are as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;BT_FUSE_SEL&lt;/STRONG&gt; 0x460[4]: Boot from fuse&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SW_GP2&lt;/STRONG&gt; 0x690 0x6a0 0x6b0 0x6c0: decryption key&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ENCRYPTED_XIP_EN&lt;/STRONG&gt; 0x450[1]: as per name&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;BEE_KEY0_SEL&lt;/STRONG&gt; 0x460[13:12]: 0b11 BEE KEY0 taken from SW_GP2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The rest I keep to default (boot is from NOR on FLexSPI, SEC_CONFIG is Open, etc.).&lt;/P&gt;&lt;P&gt;In this way if the FW is encrypted (with the right key) the micro executes it. But if there is a plain-text FW in the flash, the micro runs it anyway.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;On RT117x we are unable to start a plain-text FW.&lt;/P&gt;&lt;P&gt;the fuses I wrote are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;BT_FUSE_SEL&lt;/STRONG&gt; 0x960[4]: Boot from fuse&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ENCRYPT_XIP_EN&lt;/STRONG&gt; 0x940[1]: as per name&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;USER_KEY5 &lt;/STRONG&gt;0x1000 0x1010 0x1020 0x1030: Key encryption key&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;I keep the rest at default (OTFAD key taken from USER_KEY5, boot takes place from NOR on FLexSPI, SEC_CONFIG is Open, etc.)&lt;BR /&gt;Well in this way I can run an encrypted FW. But not a plain-text FW.&lt;BR /&gt;The documentation suggests there might be a way, but we're not finding it. In fact, if I understand correctly, OTFAD would try to decipher the keyblob, which a plain-text image does not have, so the operation should fail, and OTFAD should be turned off. And when OTFAD is turned off the data on the bus passes without being modified. Then the FW should be able to run. But that's not the case&lt;/P&gt;&lt;P&gt;We would like to know if there is a way to replicate the same functionality that we use on the RT1051.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:01:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1764879#M27777</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2023-11-28T15:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: RT117x to execute both encypted and plain-text executable</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768019#M27849</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On RT117x, when encrypted XIP is enabled, key blob is always needed. Please kindly refer to the following for details.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kan_Li_0-1701674844859.png" style="width: 561px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/252824iB50E659AAA9300FB/image-dimensions/561x318?v=v2" width="561" height="318" role="button" title="Kan_Li_0-1701674844859.png" alt="Kan_Li_0-1701674844859.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Kan_Li_0-1701674844859.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please kindly refer to&amp;nbsp;Figure 10-3. FlexSPI NOR boot flow in RM for more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that makes sense,&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>Mon, 04 Dec 2023 07:28:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768019#M27849</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2023-12-04T07:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: RT117x to execute both encypted and plain-text executable</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768034#M27850</link>
      <description>&lt;P&gt;But isn't this the same thing that occurs in RT105x? At least limited to the portion of flowchart you highlighted, RT105x has only BEE. If what you say is true it should also apply to RT105x, but it doesn't.&lt;BR /&gt;So:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;either explain to me in detail the difference between RT117x and RT105x, which justifies the different behavior.&lt;/LI&gt;&lt;LI&gt;Or help me find a way to make RT117x behave like RT105x.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 07:47:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768034#M27850</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2023-12-04T07:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: RT117x to execute both encypted and plain-text executable</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768770#M27867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually as far as I know,&amp;nbsp;RT1051 and RT1170 should only run encrypted image under&amp;nbsp;BT_FUSE_SEL==1 and&amp;nbsp;ENCRYPTED_XIP_EN==1. OTFAD can't turn on/off automatically, it is configured by ROM code according to&amp;nbsp;ENCRYPTED_XIP_EN == 1,&amp;nbsp;OTFAD only unwrap the keyblob by itself. In RT1051, BEE replaces of OTFAD, and all of configuration and EKIB/EPRDB unwrapping are finished by ROM code according to&amp;nbsp;ENCRYPTED_XIP_EN==1. May I have more info regarding the RT1051 on your hands?&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>Tue, 05 Dec 2023 06:39:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768770#M27867</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2023-12-05T06:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: RT117x to execute both encypted and plain-text executable</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768814#M27870</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;May I have more info regarding the RT1051 on your hands?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't know more than what I've already told you, but you can easily try on your own (as long as you sacrifice an EVKB)&lt;/P&gt;&lt;P&gt;The fuses you need to write are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;BT_FUSE_SEL&lt;/STRONG&gt; 0x460[4]: Boot from fuse&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SW_GP2&lt;/STRONG&gt; 0x690 0x6a0 0x6b0 0x6c0: decryption key&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ENCRYPTED_XIP_EN&lt;/STRONG&gt; 0x450[1]&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;BEE_KEY0_SEL&lt;/STRONG&gt; 0x460[13:12]: 0b11 BEE KEY0 taken from SW_GP2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I keep to default all the others (our boards boot from NOR on FLexSPI, I keep SEC_CONFIG Open, etc.).&lt;/P&gt;&lt;P&gt;At this point you can either run an encrypted image, or a plaintext image. The plain-text image can be an example of the SDK compiled with all boot headers (XIP_BOOT_HEADER_ENABLE=1). And this happens without changing the boot pin configurations. For example, on my boards I have BOOT[01]=0b00 (boot from fuse).&lt;/P&gt;&lt;P&gt;please try to see for yourself&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 07:29:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1768814#M27870</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2023-12-05T07:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: RT117x to execute both encypted and plain-text executable</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1777229#M28090</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;RT1051 vs RT1170 Encryped XiP implementation is different.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once Ecnrypted XiP is enabled on RT1170, all mandatory structures must be present on an external memory (Valid OTFAD KeyBlob along with PUF Keystore if enabled). Otherwise device will not boot.&lt;/P&gt;
&lt;P&gt;You can refer to AN13250 + SW to check how it is implemented and what steps must be performed.&lt;/P&gt;
&lt;P&gt;ON RT1051 if the BEE config structures are not present on the external memory, the boot flow continues, thus why you can boot plain image. This corresponds with image created using "&lt;SPAN&gt;XIP_BOOT_HEADER_ENABLE=1&lt;/SPAN&gt;" enabled in SDK. This doesn't include structures for encrypted xip, just the base ones as FCB and IVT.&lt;/P&gt;
&lt;P&gt;Only way how to run plain image on RT1170 with encrypted XiP enabled is to disable OTFAD decrypt in configuration.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;set BASE_ADDR=0x30000000&lt;BR /&gt;set OTFAD_KEY1=6def5a17e01e0f9ced272ac96dd8faba&lt;BR /&gt;set CTR1=0020406001030507&lt;BR /&gt;set START1=0x30001000&lt;BR /&gt;set LENGTH1=0x6000 -&amp;gt; &lt;STRONG&gt;This must be set to 0, then OTFAD will not decrypt the flash content and plain application can boot.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;NOTE:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Encrypted XiP must be always enabled along with HAB (device closed) to ensure integrity, authenticity and confidentiality of your application image.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Martin H&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 14:17:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT117x-to-execute-both-encypted-and-plain-text-executable/m-p/1777229#M28090</guid>
      <dc:creator>martin_hrncarek</dc:creator>
      <dc:date>2023-12-19T14:17:07Z</dc:date>
    </item>
  </channel>
</rss>

