<?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>i.MX ProcessorsのトピックRe: IMX6s Encrypted kernel with HAB</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX6s-Encrypted-kernel-with-HAB/m-p/678471#M104716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, don't say anything...next time I will tell it to my dog and then I know the answer too....&lt;BR /&gt;Blob_Address is wrong...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 May 2017 14:11:01 GMT</pubDate>
    <dc:creator>andreasschuler</dc:creator>
    <dc:date>2017-05-13T14:11:01Z</dc:date>
    <item>
      <title>IMX6s Encrypted kernel with HAB</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6s-Encrypted-kernel-with-HAB/m-p/678469#M104714</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 try to authenticate and encrypt my kernel image with HABv4. I'm working on a customers imx6 platform with U-Boot 2005.10. U-Boot is signed, I have no hab events and my board is closed.&lt;/P&gt;&lt;P&gt;Now I want to load and decrypt a kernel image.&lt;/P&gt;&lt;P&gt;For this I generated a CSF-File as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Header]&lt;BR /&gt;Version = 4.1&lt;BR /&gt;Hash Algorithm = sha256&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Certificate Format = X509&lt;BR /&gt;Signature Format = CMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Install SRK]&lt;BR /&gt;File = "/done/crts/SRK_1_2_3_4_table.bin"&lt;BR /&gt;Source index = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Install CSFK]&lt;BR /&gt;File = "/done/crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate CSF]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Install Key]&lt;BR /&gt;# Key slot index used to authenticate the key to be installed&lt;BR /&gt;Verification index = 0&lt;BR /&gt;# Key to install&lt;BR /&gt;Target index = 2&lt;BR /&gt;File = "/done/crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Authenticate Data]&lt;BR /&gt;Verification index = 2&lt;BR /&gt;Blocks = 0x1255b000 0x0055b000 0x20 "zImage_fsl_3.10.17_ivt"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Install Secret Key]&lt;BR /&gt;Verification index = 0&lt;BR /&gt;Target index = 0&lt;BR /&gt;Key = "./dek.bin"&lt;BR /&gt;Key Length = 128&lt;BR /&gt;Blob address = 0x0055d000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Decrypt Data]&lt;BR /&gt;Verification index = 0&lt;BR /&gt;Mac Bytes = 16&lt;BR /&gt;Blocks = 0x12000000 0x0 0x0055b000 "zImage_fsl_3.10.17_ivt"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I generate a signature of zImage_fsl_3.10.17 by&lt;/P&gt;&lt;P&gt;./cst --o zImage_fsl_3.10.17_sig --i zImage_fsl_3.10.17_ivt.csf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I pad the zImage to the size of 0x55b000, hang the signature behind that and pad to 0x55d000.&lt;/P&gt;&lt;P&gt;The generated dek.bin do I blob in U-Boot on the target with this commands:&lt;/P&gt;&lt;P&gt;ext2load mmc 1:1 0x18000000 dek.bin&lt;BR /&gt;dek_blob 0x18000000 0x18001000 128&lt;BR /&gt;ext4write mmc 1:1 0x18001000 /dek_blob.bin 0x48&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I hang the dek_blob.bin behind on the image on offset 0x55d000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I load the image to the RAM in U-Boot I have the following IVT&lt;/P&gt;&lt;P&gt;=&amp;gt; md.b 0x1255b000&lt;BR /&gt;1255b000: d1 00 20 41 00 00 00 12 00 00 00 00 00 00 00 00&amp;nbsp;&amp;nbsp;&amp;nbsp; .. A............&lt;BR /&gt;1255b010: 00 00 00 00 00 b0 55 12 20 b0 55 12 00 00 00 00&amp;nbsp;&amp;nbsp;&amp;nbsp; ......U. .U.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The signature starts here:&lt;BR /&gt;1255b020: d4 00 70 41 be 00 0c 00 03 17 00 00 00 00 00 70&amp;nbsp;&amp;nbsp;&amp;nbsp; ..pA...........p&lt;BR /&gt;1255b030: be 00 0c 02 09 00 00 01 00 00 08 b0 ca 00 0c 00&amp;nbsp;&amp;nbsp;&amp;nbsp; ................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dek_blob.bin is in the RAM at&lt;/P&gt;&lt;P&gt;=&amp;gt; md.b 0x1255d000&lt;BR /&gt;1255d000: 81 00 48 41 66 55 10 00 91 64 60 d4 54 19 16 33&amp;nbsp;&amp;nbsp;&amp;nbsp; ..HAfU...d`.T..3&lt;BR /&gt;1255d010: 58 d0 d4 cb 7b 2e 7e 57 47 80 ff 96 64 e8 7b 3a&amp;nbsp;&amp;nbsp;&amp;nbsp; X...{.~WG...d.{:&lt;/P&gt;&lt;P&gt;1255d020: 94 ec e0 e9 75 ca 3e a0 ba db 2a 76 1c f1 e1 f3&amp;nbsp;&amp;nbsp;&amp;nbsp; ....u.&amp;gt;...*v....&lt;BR /&gt;1255d030: bf 2a 76 dc 85 a9 a3 0b 59 57 13 ec 5d 62 cb 08&amp;nbsp;&amp;nbsp;&amp;nbsp; .*v.....YW..]b..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to authenticate the image...&lt;/P&gt;&lt;P&gt;=&amp;gt; hab_auth_img 0x12000000 0x55b000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Authenticate image from DDR location 0x12000000...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...it will hang here and reboots 128s after that through the watchdog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm doing wrong ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 May 2017 12:50:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6s-Encrypted-kernel-with-HAB/m-p/678469#M104714</guid>
      <dc:creator>andreasschuler</dc:creator>
      <dc:date>2017-05-13T12:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6s Encrypted kernel with HAB</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6s-Encrypted-kernel-with-HAB/m-p/678470#M104715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I removed the [Decrypt Data]-Block and had the same issue until I removed the [Install Secret Key]-Block too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 May 2017 14:01:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6s-Encrypted-kernel-with-HAB/m-p/678470#M104715</guid>
      <dc:creator>andreasschuler</dc:creator>
      <dc:date>2017-05-13T14:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6s Encrypted kernel with HAB</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6s-Encrypted-kernel-with-HAB/m-p/678471#M104716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, don't say anything...next time I will tell it to my dog and then I know the answer too....&lt;BR /&gt;Blob_Address is wrong...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 May 2017 14:11:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6s-Encrypted-kernel-with-HAB/m-p/678471#M104716</guid>
      <dc:creator>andreasschuler</dc:creator>
      <dc:date>2017-05-13T14:11:01Z</dc:date>
    </item>
  </channel>
</rss>

