<?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: hab_auth_image with IVT offset 0 possible ?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/hab-auth-image-with-IVT-offset-0-possible/m-p/758555#M117956</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 class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; You may look at Figure 1 (Typical memory layout of a signed image) of app note AN4581, Rev. 1, 10/2015.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28468i60BE2F71203F2922/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; All shown data structures, from free region (partition table for instance) till &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Command Sequence File (commands + SRK table +signatures + certificates)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;must be signed with a digital signature. Image Vector Table has 0x400 offset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; As for encrypted boot:&amp;nbsp; sorry, but this information&amp;nbsp; is treated as confidential info at this time&lt;/P&gt;&lt;P&gt;and requires a signed NDA (Non-Disclosure Agreement). We cannot discuss this with you in public anyway,&lt;/P&gt;&lt;P&gt;this requires to be handled as a Service Request (SR). Be aware that to give you remote support through a SR,&lt;/P&gt;&lt;P&gt;we will still need the confirmation that the NDA is in place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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, 09 Nov 2017 06:37:46 GMT</pubDate>
    <dc:creator>Yuri</dc:creator>
    <dc:date>2017-11-09T06:37:46Z</dc:date>
    <item>
      <title>hab_auth_image with IVT offset 0 possible ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/hab-auth-image-with-IVT-offset-0-possible/m-p/758554#M117955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I try to authenticate a encrypted image with 'hab_auth_image'.&lt;/P&gt;&lt;P&gt;This is working perfectly when I have the IVT in memory behind the encrypted binary. Now I want to have it at offset 0, so I don't need to change anything in u-boot configuration when the images changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this generally possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My csf:&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;&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 = 0x12000000 0 0x20 "zImage_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 = "./zImage_dek.bin"&lt;BR /&gt;Key Length = 128&lt;BR /&gt;Blob address = 0x12671000&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 = 0x12001000 0x1000 0x0066d930 "zImage_ivt"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Layout of my encrypted image:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset 0: IVT&lt;/P&gt;&lt;P&gt;0000 0000: D1 00 20 41 00 10 00 12&amp;nbsp; 00 00 00 00 00 00 00 00&amp;nbsp; .. A.... ........ &amp;nbsp;&lt;BR /&gt;0000 0010: 00 00 00 00 00 00 00 12&amp;nbsp; 00 F0 66 12 00 00 00 00&amp;nbsp; ........ ..f.....&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset 0x1000: encrypted binary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset 0x66f000: signature&lt;/P&gt;&lt;P&gt;0066 F000: D4 00 70 41 BE 00 0C 00&amp;nbsp; 03 17 00 00 00 00 00 70&amp;nbsp; ..pA.... .......p &amp;nbsp;&lt;BR /&gt;0066 F010: BE 00 0C 02 09 00 00 01&amp;nbsp; 00 00 08 B0 CA 00 0C 00&amp;nbsp; ........ ........&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Offset 0x671000: keyblob&lt;/P&gt;&lt;P&gt;0067 1000: 81 00 48 41 66 55 10 00&amp;nbsp; C8 D7 50 C7 A1 01 8E 3D&amp;nbsp; ..HAfU.. ..P....= &amp;nbsp;&lt;BR /&gt;0067 1010: 8A DA C1 87 E0 A7 D2 B8&amp;nbsp; 32 88 C7 1C E3 C1 3B F2&amp;nbsp; ........ 2.....;. &amp;nbsp;&lt;BR /&gt;0067 1020: FA 6F 4A 4B 97 76 EB D1&amp;nbsp; 23 AC 4E 01 69 88 A0 6F&amp;nbsp; .oJK.v.. #.N.i..o &amp;nbsp;&lt;BR /&gt;0067 1030: C5 A0 CC 52 42 B7 04 1B&amp;nbsp; 34 78 2A 61 29 D9 79 5D&amp;nbsp; ...RB... 4x*a).y] &amp;nbsp;&lt;BR /&gt;0067 1040: 14 38 F2 A7 B5 E6 65 4D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .8....eM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;0067 1050:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to authenticate the image I get:&lt;/P&gt;&lt;P&gt;=&amp;gt; ext4load usb 0:1 0x12000000 zImage_encblob&lt;BR /&gt;6754376 bytes read in 271 ms (23.8 MiB/s)&lt;BR /&gt;=&amp;gt; hab_auth_img 0x12000000 0&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;Secure boot enabled&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HAB Configuration: 0xcc, HAB State: 0x99&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------- HAB Event 1 -----------------&lt;BR /&gt;event data:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xdb 0x00 0x08 0x41 0x33 0x22 0x0a 0x00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STS = HAB_FAILURE (0x33)&lt;BR /&gt;RSN = HAB_INV_ADDRESS (0x22)&lt;BR /&gt;CTX = HAB_CTX_AUTHENTICATE (0x0A)&lt;BR /&gt;ENG = HAB_ENG_ANY (0x00)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any need for a new DCD when I have the IVT before the encrypted image ?&lt;/P&gt;&lt;P&gt;I have no problems with the other layout, so it can't be a problem of keys or hardware-configuration.&lt;/P&gt;&lt;P&gt;My device is closed and the u-boot is signed correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 03:23:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/hab-auth-image-with-IVT-offset-0-possible/m-p/758554#M117955</guid>
      <dc:creator>andreasschuler</dc:creator>
      <dc:date>2017-11-08T03:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: hab_auth_image with IVT offset 0 possible ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/hab-auth-image-with-IVT-offset-0-possible/m-p/758555#M117956</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 class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; You may look at Figure 1 (Typical memory layout of a signed image) of app note AN4581, Rev. 1, 10/2015.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28468i60BE2F71203F2922/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; All shown data structures, from free region (partition table for instance) till &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Command Sequence File (commands + SRK table +signatures + certificates)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;must be signed with a digital signature. Image Vector Table has 0x400 offset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; As for encrypted boot:&amp;nbsp; sorry, but this information&amp;nbsp; is treated as confidential info at this time&lt;/P&gt;&lt;P&gt;and requires a signed NDA (Non-Disclosure Agreement). We cannot discuss this with you in public anyway,&lt;/P&gt;&lt;P&gt;this requires to be handled as a Service Request (SR). Be aware that to give you remote support through a SR,&lt;/P&gt;&lt;P&gt;we will still need the confirmation that the NDA is in place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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, 09 Nov 2017 06:37:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/hab-auth-image-with-IVT-offset-0-possible/m-p/758555#M117956</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2017-11-09T06:37:46Z</dc:date>
    </item>
  </channel>
</rss>

