<?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: Is my HAB approach entirely secure? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342596#M47101</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using &lt;SPAN style="font-family: 'andale mono', times;"&gt;/sys/fsl_otp/HW_OCOTP_SRK? as a secret i&lt;/SPAN&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;s insecure because it is just a &lt;/SPAN&gt;hash value that can be computed from your signatures public key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Sep 2015 11:07:07 GMT</pubDate>
    <dc:creator>duellm</dc:creator>
    <dc:date>2015-09-29T11:07:07Z</dc:date>
    <item>
      <title>Is my HAB approach entirely secure?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342594#M47099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We need to encrypt SD card in our i.MX6 board so no one can read it and steal our software. I am surprised there is no tutorial on the web how to do it (only how to sign u-boot &amp;amp; kernel — but what's the point if user-space code can still be substituted?) so here is my approach.&lt;/P&gt;&lt;UL style="list-style-type: square;"&gt;&lt;LI&gt;Board is Hummingboard, so I use &lt;A href="https://github.com/SolidRun/u-boot-imx6" title="https://github.com/SolidRun/u-boot-imx6"&gt;SolidRun/u-boot-imx6 · GitHub&lt;/A&gt; (u-boot 2013, not 2009 that is covered in all tutorials, that consists of SPL and u-boot itself) and &lt;A href="https://github.com/SolidRun/linux-imx6-3.14" title="https://github.com/SolidRun/linux-imx6-3.14"&gt;SolidRun/linux-imx6-3.14 · GitHub&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;The first-stage bootloader that is authenticated by chip itself is SPL — so it is signed as in tutorial.&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #333333; font-family: Menlo, 'Liberation Mono', Consolas, 'Courier New', 'andale mono', 'lucida console', monospace; font-size: 12px; background-color: #d9edf7;"&gt;void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)&lt;/SPAN&gt; is overrided in &lt;SPAN style="color: #555555; font-family: Menlo, 'Liberation Mono', Consolas, 'Courier New', 'andale mono', 'lucida console', monospace; background-color: #eeeeee;"&gt;arch/arm/cpu/armv7/mx6/hab.c&lt;/SPAN&gt; (as it is originally declared weak) to authenticate executed u-boot image&lt;/LI&gt;&lt;LI&gt;kernel and initrd images are authenticated by u-boot in &lt;SPAN style="color: #555555; font-family: Menlo, 'Liberation Mono', Consolas, 'Courier New', 'andale mono', 'lucida console', monospace; background-color: #eeeeee;"&gt;arch/arm/lib/bootm.c&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #d9edf7; font-family: Menlo, 'Liberation Mono', Consolas, 'Courier New', 'andale mono', 'lucida console', monospace;"&gt;static void boot_jump_linux(bootm_headers_t *images, int flag)&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;rootfs is encrypted by luks. Key is supplied by following keyscript: &lt;SPAN style="font-family: 'andale mono', times;"&gt;cat /sys/fsl_otp/HW_OCOTP_SRK? | sed ':a;N;$!ba;s/\n//g'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;No user can log in to our board via tty or ssh as all accounts are either non-login shell or password-protected, there are no other ways for user to execute code via running Linux&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;So no SPL code can be executed except ours, that authenticates u-boot and does not steal SRK fuses values. No u-boot code can be executed except ours, that authenticates kernel and initrd and does not steal SRK fuses values. Kernel and initrd also do not steal SRK fuses values except for internal usage and when kernel is running no other user-space code can be executed as well so SRK fuses values (which should be used to decrypt rootfs) can't be read by user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is my approach correct or are there any security holes left in it that can allow user to extract our rootfs contents?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 05:04:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342594#M47099</guid>
      <dc:creator>themylogin</dc:creator>
      <dc:date>2014-10-22T05:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is my HAB approach entirely secure?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342595#M47100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;&amp;nbsp;&amp;nbsp; Under the HAB technology the SRK fuses contain the hash of the SRK public key and the fuses &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;can be read. This restriction may be overcome if BSP uses GUI, does not support terminal program,&lt;BR /&gt; JTAG is disabled.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;&amp;nbsp; As for encryption boot under i.MX6 : in order to generate a Data Encryption Key (DEK) blob for &lt;BR /&gt; encrypted boot, the OTPMK must be used, so blobs must be generated on the i.MX6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 12.0pt; font-family: 'Verdana','sans-serif';"&gt;Next, this requires the device be in the Closed configuration, so the Mfg Tool U-boot and OS Kernel &lt;BR /&gt; images must be signed - in order to use the OTP Master Key.&amp;nbsp; Today we do not have recommendations &lt;BR /&gt; and tools for customers how to perform it, sorry.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 08:13:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342595#M47100</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2014-10-23T08:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is my HAB approach entirely secure?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342596#M47101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using &lt;SPAN style="font-family: 'andale mono', times;"&gt;/sys/fsl_otp/HW_OCOTP_SRK? as a secret i&lt;/SPAN&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;s insecure because it is just a &lt;/SPAN&gt;hash value that can be computed from your signatures public key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 11:07:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342596#M47101</guid>
      <dc:creator>duellm</dc:creator>
      <dc:date>2015-09-29T11:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is my HAB approach entirely secure?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342597#M47102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where exactly do you think the key for encrypted rootfs should be? Initramfs or eMMC, etc. What is the best practise followed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 12:57:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342597#M47102</guid>
      <dc:creator>satyadamarla</dc:creator>
      <dc:date>2017-03-15T12:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is my HAB approach entirely secure?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342598#M47103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; perhaps, the following helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.matthew.ath.cx/articles/cryptkey" title="http://www.matthew.ath.cx/articles/cryptkey"&gt;Passwordless Encrypted Root in Debian&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 04:44:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342598#M47103</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2017-03-21T04:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is my HAB approach entirely secure?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342599#M47104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yurin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the above link. The above works and I have tested it long time ago but I am looking for a solution like&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Saving a key in RPMB (Reply Protected Memory Block) of eMMC. Using this key to en/decrypt the key &amp;nbsp;and place it in the initramfs (OR)&lt;/LI&gt;&lt;LI&gt;Using the unique Device Secret Key of iMX6 processor and using it to for creating a blob of the rootfs key. Using this key to decrypt the rootfs later.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think the concept of encrypted boot (DEK Blob) can be used for decrypting the key that can decrypt the rootfs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greets,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 12:30:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342599#M47104</guid>
      <dc:creator>satyadamarla</dc:creator>
      <dc:date>2017-03-27T12:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is my HAB approach entirely secure?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342600#M47105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;think "the concept of encrypted boot (DEK Blob) can be used for decrypting the key &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;that can decrypt the rootfs". You can use the rootfs key as part of U-boot (in fixed location).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 06:52:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Is-my-HAB-approach-entirely-secure/m-p/342600#M47105</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2017-03-28T06:52:37Z</dc:date>
    </item>
  </channel>
</rss>

