<?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: i.MX8MP Secure boot - HAB errors using HSM Signatures in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2149224#M239985</link>
    <description>&lt;P&gt;So, here an update.&lt;BR /&gt;&lt;BR /&gt;It appears that when using 4 certificates, the SRK_TABLE is bigger.&lt;BR /&gt;As our signature are big, this leads on big CSF Binary and get overlapped as some Memory zone are used for other functions.&lt;BR /&gt;&lt;BR /&gt;We need to try to reduce the CMS content as it was recommended.&lt;BR /&gt;&lt;BR /&gt;I will update the ticket here once this is done.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Aug 2025 13:11:59 GMT</pubDate>
    <dc:creator>se_cguerr</dc:creator>
    <dc:date>2025-08-08T13:11:59Z</dc:date>
    <item>
      <title>i.MX8MP Secure boot - HAB errors using HSM Signatures</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2122229#M238680</link>
      <description>&lt;P&gt;Hi NXP,&lt;/P&gt;&lt;P&gt;I'm working on enabling secure boot on a board based on the i.MX8M Plus.&lt;/P&gt;&lt;P&gt;Secure boot works correctly when using certificates, keys, and signatures generated with the CST Tool version 4.0.0. Running&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;hab_status&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;shows no events in this case.&lt;/P&gt;&lt;P&gt;However, on another board, when we attempt the secure boot process using certificates, keys, and signatures generated in our internal PKI environment,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;hab_status&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;reports multiple errors.&lt;/P&gt;&lt;P&gt;Below, I’ve included the CSF files and the HAB events we’re encountering. We are using "HSM Mode" and have configured the signature size accordingly.&lt;/P&gt;&lt;P&gt;We would like to understand which options or parameters we should use when generating signatures—particularly if we want to simulate the process using an OpenSSL command.&lt;/P&gt;&lt;P&gt;Thank you in advance for your support.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Christophe Guerreiro&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 12:27:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2122229#M238680</guid>
      <dc:creator>se_cguerr</dc:creator>
      <dc:date>2025-06-24T12:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MP Secure boot - HAB errors using HSM Signatures</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2122290#M238681</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not able to see the CSF files and HAB events mentioned in the description. Could you please confirm if you have followed the procedure described in CST UG in chapter&amp;nbsp;&lt;EM&gt;Using CST with Hardware Security Module&lt;/EM&gt;? If not, is anything that requires a different approach on your side? Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anda&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 14:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2122290#M238681</guid>
      <dc:creator>anda_despotovici</dc:creator>
      <dc:date>2025-06-24T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MP Secure boot - HAB errors using HSM Signatures</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2122315#M238682</link>
      <description>&lt;P&gt;See below files mentionned in my first post.&lt;BR /&gt;&lt;BR /&gt;I've read the UG10106.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We are using the CST in HSM mode while we get a signature request. We inject back the signature on the appropriate unique tag and rebuild the flash.bin file.&lt;BR /&gt;&lt;BR /&gt;This&amp;nbsp; procedure works with certificates/keys generated from CST.&lt;BR /&gt;&lt;BR /&gt;We don't use PKCS#11 in our case. We are using a signing room.&lt;BR /&gt;&lt;BR /&gt;Thanks for your fast reply.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Christophe&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 14:51:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2122315#M238682</guid>
      <dc:creator>se_cguerr</dc:creator>
      <dc:date>2025-06-24T14:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MP Secure boot - HAB errors using HSM Signatures</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2128644#M238996</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/249357"&gt;@se_cguerr&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;CC&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/75320"&gt;@anda_despotovici&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/30991"&gt;@ZeeFrench&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Following our call yesterday, we were able to successfully simulate your use case, and we have a properly signed image.&lt;/P&gt;
&lt;P&gt;To answer your questions above, here is example command to generate CMS signature with OpenSSL:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;openssl cms -sign -md sha256 -outform DER -nosmimecap -nocerts -binary -in ${csf_sigreq_file} -out ${csf_sig_file} -signer ${csf_crt} -inkey ${csf_key} -passin file:../keys/key_pass.txt&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I assume for this one you have the same command as shown during the call.&lt;/P&gt;
&lt;P&gt;As per your request here is the command to verify the generated signature:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;openssl cms -verify -in ${csf_sig_file} -inform DER -binary -content ${csf_sigreq_file} -certsout /dev/null -certfile ${csf_crt} -noverify -out verified_csf_output.txt&lt;/LI-CODE&gt;
&lt;P&gt;Duplicate these commands for IMG.&lt;/P&gt;
&lt;P&gt;Duplicate signing process for SPL &amp;amp; FIT.&lt;/P&gt;
&lt;P&gt;In my case, the size of&amp;nbsp;output signature size is 509 bytes.&lt;/P&gt;
&lt;P&gt;Therefore I modify my CSF headers and set&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Header]
&amp;lt;snip&amp;gt;
   Signature Size = 509
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Regarding the current limitation of your signing room—which only supports signing a provided hash and not raw content, there’s an important update worth noting. As of OpenSSL &amp;gt;= 3.2, an undocumented feature allows you to pass a precomputed hash using the -digest option.&lt;/P&gt;
&lt;P&gt;I’ve tested this on my side, and it works as expected.&lt;/P&gt;
&lt;P&gt;Updated Signing Process:&lt;/P&gt;
&lt;P&gt;Compute the hash of the content externally.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;csf_sigreq_digest=$(openssl dgst -sha256 ${csf_sigreq_file} | awk '{printf $2}')&lt;/LI-CODE&gt;
&lt;P&gt;Sign the precomputed hash using the -digest option.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$OPENSSL_PATH/openssl cms -sign -md sha256 -outform DER -nosmimecap -nocerts -binary -digest ${csf_sigreq_digest} -out ${csf_sig_file} -signer ${csf_crt} -inkey ${csf_key} -passin file:../keys/key_pass.txt&lt;/LI-CODE&gt;
&lt;P&gt;Verify:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$OPENSSL_PATH/openssl cms -verify -in ${csf_sig_file} -inform DER -binary -content ${csf_sigreq_file} -certsout /dev/null -certfile ${csf_crt} -noverify -out verified_csf_output.txt&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;I hope this helps. Let us know if this works for you.&lt;/P&gt;
&lt;P&gt;Best&lt;BR /&gt;Maro&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2025 10:50:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2128644#M238996</guid>
      <dc:creator>marouene_boubakri</dc:creator>
      <dc:date>2025-07-04T10:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MP Secure boot - HAB errors using HSM Signatures</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2149224#M239985</link>
      <description>&lt;P&gt;So, here an update.&lt;BR /&gt;&lt;BR /&gt;It appears that when using 4 certificates, the SRK_TABLE is bigger.&lt;BR /&gt;As our signature are big, this leads on big CSF Binary and get overlapped as some Memory zone are used for other functions.&lt;BR /&gt;&lt;BR /&gt;We need to try to reduce the CMS content as it was recommended.&lt;BR /&gt;&lt;BR /&gt;I will update the ticket here once this is done.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 13:11:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-Secure-boot-HAB-errors-using-HSM-Signatures/m-p/2149224#M239985</guid>
      <dc:creator>se_cguerr</dc:creator>
      <dc:date>2025-08-08T13:11:59Z</dc:date>
    </item>
  </channel>
</rss>

