<?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 Encrypt and Sign Linux zImage with HABv4 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Encrypt-and-Sign-Linux-zImage-with-HABv4/m-p/1832789#M221585</link>
    <description>&lt;P&gt;I am getting the following error when encrypting and signing linux image:&lt;/P&gt;&lt;P&gt;Calling authenticate_image in ROM&lt;BR /&gt;ivt_offset = 0x2670000&lt;BR /&gt;start = 0x40000000&lt;BR /&gt;bytes = 0x2672020&lt;/P&gt;&lt;P&gt;Secure boot enabled&lt;/P&gt;&lt;P&gt;HAB Configuration: 0xcc, HAB State: 0x99&lt;/P&gt;&lt;P&gt;--------- HAB Event 1 -----------------&lt;BR /&gt;event data:&lt;BR /&gt;0xdb 0x00 0x14 0x45 0x33 0x18 0xc0 0xff&lt;BR /&gt;0xca 0x00 0x0c 0x00 0x01 0xc5 0x1d 0x00&lt;BR /&gt;0x00 0x00 0x16 0x88&lt;/P&gt;&lt;P&gt;STS = HAB_FAILURE (0x33)&lt;BR /&gt;RSN = HAB_INV_SIGNATURE (0x18)&lt;BR /&gt;CTX = HAB_CTX_COMMAND (0xC0)&lt;BR /&gt;ENG = HAB_ENG_SW (0xFF)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;--------- HAB Event 2 -----------------&lt;BR /&gt;event data:&lt;BR /&gt;0xdb 0x00 0x14 0x45 0x33 0x18 0xc0 0xff&lt;BR /&gt;0xca 0x00 0x0c 0x00 0x01 0xc5 0x1d 0x00&lt;BR /&gt;0x00 0x00 0x16 0x88&lt;/P&gt;&lt;P&gt;STS = HAB_FAILURE (0x33)&lt;BR /&gt;RSN = HAB_INV_SIGNATURE (0x18)&lt;BR /&gt;CTX = HAB_CTX_COMMAND (0xC0)&lt;BR /&gt;ENG = HAB_ENG_SW (0xFF)&lt;/P&gt;&lt;P&gt;Authenticate Image Fail, Please check&lt;/P&gt;&lt;P&gt;There isn't much information in this events... The csf used are:&lt;/P&gt;&lt;P&gt;To encrypt -&amp;gt;&lt;/P&gt;&lt;P&gt;[Header]&lt;BR /&gt;Version = 4.5&lt;BR /&gt;Hash Algorithm = sha256&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Certificate Format = X509&lt;BR /&gt;Signature Format = CMS&lt;BR /&gt;Engine = CAAM&lt;/P&gt;&lt;P&gt;[Install SRK]&lt;BR /&gt;# Index of the key location in the SRK table to be installed&lt;BR /&gt;File = "/../crts/SRK_1_2_3_4_table.bin"&lt;BR /&gt;Source index = 0&lt;/P&gt;&lt;P&gt;[Install CSFK]&lt;BR /&gt;# Key used to authenticate the CSF data&lt;BR /&gt;File = "/../crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate CSF]&lt;/P&gt;&lt;P&gt;[Unlock]&lt;BR /&gt;# Leave Job Ring and DECO master ID registers Unlocked&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Features = MID&lt;BR /&gt;&lt;BR /&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;# Target key slot in HAB key store where key will be installed&lt;BR /&gt;Target Index = 2&lt;BR /&gt;# Key to install&lt;BR /&gt;File = "/../crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate Data]&lt;BR /&gt;# Key slot index used to authenticate the image data&lt;BR /&gt;Verification index = 2&lt;BR /&gt;# Authenticate Start Address, Offset, Length and file&lt;BR /&gt;Blocks = 0x42670000 0x02670000 0x00000020 "./Image_pad_ivt"&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_kernel.bin"&lt;BR /&gt;Key Length = 128&lt;BR /&gt;Blob Address = 0x42672020&lt;/P&gt;&lt;P&gt;[Decrypt Data]&lt;BR /&gt;Verification Index = 0&lt;BR /&gt;Mac Bytes = 16&lt;BR /&gt;Blocks = 0x40000040 0x00000040 0x0266ffc0 "./Image_pad_ivt"&lt;/P&gt;&lt;P&gt;To sign -&amp;gt;&lt;/P&gt;&lt;P&gt;[Header]&lt;BR /&gt;Version = 4.3&lt;BR /&gt;Hash Algorithm = sha256&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Certificate Format = X509&lt;BR /&gt;Signature Format = CMS&lt;BR /&gt;Engine = CAAM&lt;/P&gt;&lt;P&gt;[Install SRK]&lt;BR /&gt;# Index of the key location in the SRK table to be installed&lt;BR /&gt;File = "/../crts/SRK_1_2_3_4_table.bin"&lt;BR /&gt;Source index = 0&lt;/P&gt;&lt;P&gt;[Install CSFK]&lt;BR /&gt;# Key used to authenticate the CSF data&lt;BR /&gt;File = "/../crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate CSF]&lt;BR /&gt;&lt;BR /&gt;[Unlock]&lt;BR /&gt;# Leave Job Ring and DECO master ID registers Unlocked&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Features = MID&lt;BR /&gt;&lt;BR /&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;# Target key slot in HAB key store where key will be installed&lt;BR /&gt;Target Index = 2&lt;BR /&gt;# Key to install&lt;BR /&gt;File = "/../crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate Data]&lt;BR /&gt;# Key slot index used to authenticate the image data&lt;BR /&gt;Verification index = 2&lt;BR /&gt;# Authenticate Start Address, Offset, Length and file&lt;BR /&gt;Blocks = 0x40000000 0x0 0x02670020 "./Image_pad_ivt"&lt;BR /&gt;[Install Secret Key]&lt;BR /&gt;Verification Index = 0&lt;BR /&gt;Target Index = 0&lt;BR /&gt;Key = "dek_kernel_dummy.bin"&lt;BR /&gt;Key Length = 128&lt;BR /&gt;Blob Address = 0x42672020&lt;/P&gt;&lt;P&gt;[Decrypt Data]&lt;BR /&gt;Verification Index = 0&lt;BR /&gt;Mac Bytes = 16&lt;BR /&gt;Blocks = 0x40000040 0x00000040 0x0266ffc0&amp;nbsp; "./Image_pad_ivt_dummy"&lt;/P&gt;&lt;P&gt;I find really strange the ENG used. Any ideas why Im getting this error?. I checked the binaries and it seems all right&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2024 08:52:04 GMT</pubDate>
    <dc:creator>jmmorenog</dc:creator>
    <dc:date>2024-03-21T08:52:04Z</dc:date>
    <item>
      <title>Encrypt and Sign Linux zImage with HABv4</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encrypt-and-Sign-Linux-zImage-with-HABv4/m-p/1832789#M221585</link>
      <description>&lt;P&gt;I am getting the following error when encrypting and signing linux image:&lt;/P&gt;&lt;P&gt;Calling authenticate_image in ROM&lt;BR /&gt;ivt_offset = 0x2670000&lt;BR /&gt;start = 0x40000000&lt;BR /&gt;bytes = 0x2672020&lt;/P&gt;&lt;P&gt;Secure boot enabled&lt;/P&gt;&lt;P&gt;HAB Configuration: 0xcc, HAB State: 0x99&lt;/P&gt;&lt;P&gt;--------- HAB Event 1 -----------------&lt;BR /&gt;event data:&lt;BR /&gt;0xdb 0x00 0x14 0x45 0x33 0x18 0xc0 0xff&lt;BR /&gt;0xca 0x00 0x0c 0x00 0x01 0xc5 0x1d 0x00&lt;BR /&gt;0x00 0x00 0x16 0x88&lt;/P&gt;&lt;P&gt;STS = HAB_FAILURE (0x33)&lt;BR /&gt;RSN = HAB_INV_SIGNATURE (0x18)&lt;BR /&gt;CTX = HAB_CTX_COMMAND (0xC0)&lt;BR /&gt;ENG = HAB_ENG_SW (0xFF)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;--------- HAB Event 2 -----------------&lt;BR /&gt;event data:&lt;BR /&gt;0xdb 0x00 0x14 0x45 0x33 0x18 0xc0 0xff&lt;BR /&gt;0xca 0x00 0x0c 0x00 0x01 0xc5 0x1d 0x00&lt;BR /&gt;0x00 0x00 0x16 0x88&lt;/P&gt;&lt;P&gt;STS = HAB_FAILURE (0x33)&lt;BR /&gt;RSN = HAB_INV_SIGNATURE (0x18)&lt;BR /&gt;CTX = HAB_CTX_COMMAND (0xC0)&lt;BR /&gt;ENG = HAB_ENG_SW (0xFF)&lt;/P&gt;&lt;P&gt;Authenticate Image Fail, Please check&lt;/P&gt;&lt;P&gt;There isn't much information in this events... The csf used are:&lt;/P&gt;&lt;P&gt;To encrypt -&amp;gt;&lt;/P&gt;&lt;P&gt;[Header]&lt;BR /&gt;Version = 4.5&lt;BR /&gt;Hash Algorithm = sha256&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Certificate Format = X509&lt;BR /&gt;Signature Format = CMS&lt;BR /&gt;Engine = CAAM&lt;/P&gt;&lt;P&gt;[Install SRK]&lt;BR /&gt;# Index of the key location in the SRK table to be installed&lt;BR /&gt;File = "/../crts/SRK_1_2_3_4_table.bin"&lt;BR /&gt;Source index = 0&lt;/P&gt;&lt;P&gt;[Install CSFK]&lt;BR /&gt;# Key used to authenticate the CSF data&lt;BR /&gt;File = "/../crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate CSF]&lt;/P&gt;&lt;P&gt;[Unlock]&lt;BR /&gt;# Leave Job Ring and DECO master ID registers Unlocked&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Features = MID&lt;BR /&gt;&lt;BR /&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;# Target key slot in HAB key store where key will be installed&lt;BR /&gt;Target Index = 2&lt;BR /&gt;# Key to install&lt;BR /&gt;File = "/../crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate Data]&lt;BR /&gt;# Key slot index used to authenticate the image data&lt;BR /&gt;Verification index = 2&lt;BR /&gt;# Authenticate Start Address, Offset, Length and file&lt;BR /&gt;Blocks = 0x42670000 0x02670000 0x00000020 "./Image_pad_ivt"&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_kernel.bin"&lt;BR /&gt;Key Length = 128&lt;BR /&gt;Blob Address = 0x42672020&lt;/P&gt;&lt;P&gt;[Decrypt Data]&lt;BR /&gt;Verification Index = 0&lt;BR /&gt;Mac Bytes = 16&lt;BR /&gt;Blocks = 0x40000040 0x00000040 0x0266ffc0 "./Image_pad_ivt"&lt;/P&gt;&lt;P&gt;To sign -&amp;gt;&lt;/P&gt;&lt;P&gt;[Header]&lt;BR /&gt;Version = 4.3&lt;BR /&gt;Hash Algorithm = sha256&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Certificate Format = X509&lt;BR /&gt;Signature Format = CMS&lt;BR /&gt;Engine = CAAM&lt;/P&gt;&lt;P&gt;[Install SRK]&lt;BR /&gt;# Index of the key location in the SRK table to be installed&lt;BR /&gt;File = "/../crts/SRK_1_2_3_4_table.bin"&lt;BR /&gt;Source index = 0&lt;/P&gt;&lt;P&gt;[Install CSFK]&lt;BR /&gt;# Key used to authenticate the CSF data&lt;BR /&gt;File = "/../crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate CSF]&lt;BR /&gt;&lt;BR /&gt;[Unlock]&lt;BR /&gt;# Leave Job Ring and DECO master ID registers Unlocked&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Features = MID&lt;BR /&gt;&lt;BR /&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;# Target key slot in HAB key store where key will be installed&lt;BR /&gt;Target Index = 2&lt;BR /&gt;# Key to install&lt;BR /&gt;File = "/../crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate Data]&lt;BR /&gt;# Key slot index used to authenticate the image data&lt;BR /&gt;Verification index = 2&lt;BR /&gt;# Authenticate Start Address, Offset, Length and file&lt;BR /&gt;Blocks = 0x40000000 0x0 0x02670020 "./Image_pad_ivt"&lt;BR /&gt;[Install Secret Key]&lt;BR /&gt;Verification Index = 0&lt;BR /&gt;Target Index = 0&lt;BR /&gt;Key = "dek_kernel_dummy.bin"&lt;BR /&gt;Key Length = 128&lt;BR /&gt;Blob Address = 0x42672020&lt;/P&gt;&lt;P&gt;[Decrypt Data]&lt;BR /&gt;Verification Index = 0&lt;BR /&gt;Mac Bytes = 16&lt;BR /&gt;Blocks = 0x40000040 0x00000040 0x0266ffc0&amp;nbsp; "./Image_pad_ivt_dummy"&lt;/P&gt;&lt;P&gt;I find really strange the ENG used. Any ideas why Im getting this error?. I checked the binaries and it seems all right&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 08:52:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encrypt-and-Sign-Linux-zImage-with-HABv4/m-p/1832789#M221585</guid>
      <dc:creator>jmmorenog</dc:creator>
      <dc:date>2024-03-21T08:52:04Z</dc:date>
    </item>
  </channel>
</rss>

