<?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 while generating HAB4 PKI Tree,hab4_pki_tree script giving error 140453821149632:error:2406F079:rand in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1374976#M183363</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to install Softhsm for ubuntu18.4 . when I generate tree structure for HAB4&amp;nbsp; by the hab4_pki_tree.sh script it gives error random number generator:RAND_load_file:Cannot open file.&lt;/P&gt;&lt;P&gt;here is full log.&lt;/P&gt;&lt;P&gt;sudo ./hab4_pki_tree.sh&lt;BR /&gt;[sudo] password for acclivis:&lt;/P&gt;&lt;P&gt;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;This script is a part of the Code signing tools for Freescale's&lt;BR /&gt;High Assurance Boot. It generates a basic PKI tree. The PKI&lt;BR /&gt;tree consists of one or more Super Root Keys (SRK), with each&lt;BR /&gt;SRK having two subordinate keys:&lt;BR /&gt;+ a Command Sequence File (CSF) key&lt;BR /&gt;+ Image key.&lt;BR /&gt;Additional keys can be added to the PKI tree but a separate&lt;BR /&gt;script is available for this. This this script assumes openssl&lt;BR /&gt;is installed on your system and is included in your search&lt;BR /&gt;path. Finally, the private keys generated are password&lt;BR /&gt;protectedwith the password provided by the file key_pass.txt.&lt;BR /&gt;The format of the file is the password repeated twice:&lt;BR /&gt;my_password&lt;BR /&gt;my_password&lt;BR /&gt;All private keys in the PKI tree are in PKCS #8 format will be&lt;BR /&gt;protected by the same password.&lt;/P&gt;&lt;P&gt;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;Do you want to use an existing CA key (y/n)?: n&lt;BR /&gt;Do you want to use Elliptic Curve Cryptography (y/n)?: n&lt;BR /&gt;Enter key length in bits for PKI tree: 2048&lt;BR /&gt;Enter PKI tree duration (years): 10&lt;BR /&gt;How many Super Root Keys should be generated? 4&lt;BR /&gt;Do you want the SRK certificates to have the CA flag set? (y/n)?: y&lt;/P&gt;&lt;P&gt;+++++++++++++++++++++++++++++++++++++&lt;BR /&gt;+ Generating CA key and certificate +&lt;BR /&gt;+++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Generating a RSA private key&lt;BR /&gt;.....................................................................................................................................................................................+++++&lt;BR /&gt;...........................+++++&lt;BR /&gt;writing new private key to 'temp_ca.pem'&lt;BR /&gt;-----&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;+ Generating SRK key and certificate 1 +&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Generating RSA private key, 2048 bit long modulus (2 primes)&lt;BR /&gt;.............................................................................................................................+++++&lt;BR /&gt;........................................+++++&lt;BR /&gt;e is 65537 (0x010001)&lt;BR /&gt;Can't load /home/acclivis/.rnd into RNG&lt;BR /&gt;140080975962560:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/acclivis/.rnd&lt;BR /&gt;Using configuration from ../ca/openssl.cnf&lt;BR /&gt;Check that the request matches the signature&lt;BR /&gt;Signature ok&lt;BR /&gt;The Subject's Distinguished Name is as follows&lt;BR /&gt;commonName :ASN.1 12:'SRK1_sha256_2048_65537_v3_ca'&lt;BR /&gt;Certificate is to be certified until Nov 20 11:08:48 2031 GMT (3650 days)&lt;/P&gt;&lt;P&gt;Write out database with 1 new entries&lt;BR /&gt;Data Base Updated&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;+ Generating CSF key and certificate 1 +&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Generating RSA private key, 2048 bit long modulus (2 primes)&lt;BR /&gt;..............................................+++++&lt;BR /&gt;...........................................................+++++&lt;BR /&gt;e is 65537 (0x010001)&lt;BR /&gt;Can't load /home/acclivis/.rnd into RNG&lt;BR /&gt;140207436272064:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/acclivis/.rnd&lt;BR /&gt;Using configuration from ../ca/openssl.cnf&lt;BR /&gt;Check that the request matches the signature&lt;BR /&gt;Signature ok&lt;BR /&gt;The Subject's Distinguished Name is as follows&lt;BR /&gt;commonName :ASN.1 12:'CSF1_1_sha256_2048_65537_v3_usr'&lt;BR /&gt;Certificate is to be certified until Nov 20 11:08:48 2031 GMT (3650 days)&lt;/P&gt;&lt;P&gt;Write out database with 1 new entries&lt;BR /&gt;Data Base Updated&lt;/P&gt;&lt;P&gt;Please guide me on this.Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 11:11:13 GMT</pubDate>
    <dc:creator>pawar_123_y</dc:creator>
    <dc:date>2021-11-22T11:11:13Z</dc:date>
    <item>
      <title>while generating HAB4 PKI Tree,hab4_pki_tree script giving error 140453821149632:error:2406F079:rand</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1374976#M183363</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to install Softhsm for ubuntu18.4 . when I generate tree structure for HAB4&amp;nbsp; by the hab4_pki_tree.sh script it gives error random number generator:RAND_load_file:Cannot open file.&lt;/P&gt;&lt;P&gt;here is full log.&lt;/P&gt;&lt;P&gt;sudo ./hab4_pki_tree.sh&lt;BR /&gt;[sudo] password for acclivis:&lt;/P&gt;&lt;P&gt;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;This script is a part of the Code signing tools for Freescale's&lt;BR /&gt;High Assurance Boot. It generates a basic PKI tree. The PKI&lt;BR /&gt;tree consists of one or more Super Root Keys (SRK), with each&lt;BR /&gt;SRK having two subordinate keys:&lt;BR /&gt;+ a Command Sequence File (CSF) key&lt;BR /&gt;+ Image key.&lt;BR /&gt;Additional keys can be added to the PKI tree but a separate&lt;BR /&gt;script is available for this. This this script assumes openssl&lt;BR /&gt;is installed on your system and is included in your search&lt;BR /&gt;path. Finally, the private keys generated are password&lt;BR /&gt;protectedwith the password provided by the file key_pass.txt.&lt;BR /&gt;The format of the file is the password repeated twice:&lt;BR /&gt;my_password&lt;BR /&gt;my_password&lt;BR /&gt;All private keys in the PKI tree are in PKCS #8 format will be&lt;BR /&gt;protected by the same password.&lt;/P&gt;&lt;P&gt;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;Do you want to use an existing CA key (y/n)?: n&lt;BR /&gt;Do you want to use Elliptic Curve Cryptography (y/n)?: n&lt;BR /&gt;Enter key length in bits for PKI tree: 2048&lt;BR /&gt;Enter PKI tree duration (years): 10&lt;BR /&gt;How many Super Root Keys should be generated? 4&lt;BR /&gt;Do you want the SRK certificates to have the CA flag set? (y/n)?: y&lt;/P&gt;&lt;P&gt;+++++++++++++++++++++++++++++++++++++&lt;BR /&gt;+ Generating CA key and certificate +&lt;BR /&gt;+++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Generating a RSA private key&lt;BR /&gt;.....................................................................................................................................................................................+++++&lt;BR /&gt;...........................+++++&lt;BR /&gt;writing new private key to 'temp_ca.pem'&lt;BR /&gt;-----&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;+ Generating SRK key and certificate 1 +&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Generating RSA private key, 2048 bit long modulus (2 primes)&lt;BR /&gt;.............................................................................................................................+++++&lt;BR /&gt;........................................+++++&lt;BR /&gt;e is 65537 (0x010001)&lt;BR /&gt;Can't load /home/acclivis/.rnd into RNG&lt;BR /&gt;140080975962560:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/acclivis/.rnd&lt;BR /&gt;Using configuration from ../ca/openssl.cnf&lt;BR /&gt;Check that the request matches the signature&lt;BR /&gt;Signature ok&lt;BR /&gt;The Subject's Distinguished Name is as follows&lt;BR /&gt;commonName :ASN.1 12:'SRK1_sha256_2048_65537_v3_ca'&lt;BR /&gt;Certificate is to be certified until Nov 20 11:08:48 2031 GMT (3650 days)&lt;/P&gt;&lt;P&gt;Write out database with 1 new entries&lt;BR /&gt;Data Base Updated&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;+ Generating CSF key and certificate 1 +&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Generating RSA private key, 2048 bit long modulus (2 primes)&lt;BR /&gt;..............................................+++++&lt;BR /&gt;...........................................................+++++&lt;BR /&gt;e is 65537 (0x010001)&lt;BR /&gt;Can't load /home/acclivis/.rnd into RNG&lt;BR /&gt;140207436272064:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/acclivis/.rnd&lt;BR /&gt;Using configuration from ../ca/openssl.cnf&lt;BR /&gt;Check that the request matches the signature&lt;BR /&gt;Signature ok&lt;BR /&gt;The Subject's Distinguished Name is as follows&lt;BR /&gt;commonName :ASN.1 12:'CSF1_1_sha256_2048_65537_v3_usr'&lt;BR /&gt;Certificate is to be certified until Nov 20 11:08:48 2031 GMT (3650 days)&lt;/P&gt;&lt;P&gt;Write out database with 1 new entries&lt;BR /&gt;Data Base Updated&lt;/P&gt;&lt;P&gt;Please guide me on this.Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 11:11:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1374976#M183363</guid>
      <dc:creator>pawar_123_y</dc:creator>
      <dc:date>2021-11-22T11:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: while generating HAB4 PKI Tree,hab4_pki_tree script giving error 140453821149632:error:2406F079:</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1375285#M183397</link>
      <description>&lt;P&gt;Try this ,and you will also need this&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/Patch-for-u-boot-imx-Using-FIT-and-HAB-in-bootm-command/td-p/1164472" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/Patch-for-u-boot-imx-Using-FIT-and-HAB-in-bootm-command/td-p/1164472&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cd ~ &amp;amp;&amp;amp; openssl rand -writerand .rnd&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 02:13:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1375285#M183397</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2021-11-23T02:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: while generating HAB4 PKI Tree,hab4_pki_tree script giving error 140453821149632:error:2406F079:</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1376189#M183476</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 09:39:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1376189#M183476</guid>
      <dc:creator>pawar_123_y</dc:creator>
      <dc:date>2021-11-24T09:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: while generating HAB4 PKI Tree,hab4_pki_tree script giving error 140453821149632:error:2406F079:</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1376291#M183488</link>
      <description>&lt;P&gt;Can you please help me with error. I am trying to generate the CSF binary signature. using " cst -i imx-boot.csf -o imx-boot.csf.bin" command.&lt;/P&gt;&lt;P&gt;following is log of command&lt;/P&gt;&lt;P&gt;PKCS#11: Initializing the engine&lt;BR /&gt;Found 1 slot&lt;BR /&gt;Format not recognized!&lt;BR /&gt;The certificate ID is not a valid PKCS#11 URI&lt;BR /&gt;The PKCS#11 URI format is defined by RFC7512&lt;BR /&gt;The legacy ENGINE_pkcs11 ID format is also still accepted for now&lt;BR /&gt;Format not recognized!&lt;BR /&gt;The certificate ID is not a valid PKCS#11 URI&lt;BR /&gt;The PKCS#11 URI format is defined by RFC7512&lt;BR /&gt;The legacy ENGINE_pkcs11 ID format is also still accepted for now&lt;BR /&gt;139987367705472:error:80064064:pkcs11 engine:ctx_load_cert:invalid id:eng_back.c:425:&lt;BR /&gt;Public key certificate is invalid in file ./CSF1_1_sha256_2048_65537_v3_usr_crt.pem&lt;/P&gt;&lt;P&gt;imx_boot.csf file is as follows&lt;/P&gt;&lt;P&gt;[Header]&lt;BR /&gt;Version = 4.3&lt;BR /&gt;Hash Algorithm = sha256&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Certificate Format = X509&lt;/P&gt;&lt;P&gt;Signature Format = CMS&lt;/P&gt;&lt;P&gt;[Install SRK]&lt;BR /&gt;File = "./SRK_1_2_3_4_table.bin"&lt;BR /&gt;Source index = 0&lt;BR /&gt;[Install CSFK]&lt;BR /&gt;File = "./CSF1_1_sha256_2048_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate CSF]&lt;BR /&gt;[Unlock]&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Features = MID&lt;BR /&gt;[Unlock]&lt;BR /&gt;Engine = CAAM&lt;BR /&gt;Features = MFG&lt;BR /&gt;[Install Key]&lt;BR /&gt;Verification index = 0&lt;BR /&gt;Target index = 2&lt;BR /&gt;File = "./IMG1_1_sha256_4096_65537_v3_usr_crt.pem"&lt;/P&gt;&lt;P&gt;[Authenticate Data]&lt;BR /&gt;Verification index = 2&lt;BR /&gt;Blocks = 0x7e0fc0 0x0 0x2bc00 "flash.bin"&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 11:18:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1376291#M183488</guid>
      <dc:creator>pawar_123_y</dc:creator>
      <dc:date>2021-11-24T11:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: while generating HAB4 PKI Tree,hab4_pki_tree script giving error 140453821149632:error:2406F079:</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1376670#M183514</link>
      <description>&lt;P&gt;Please&amp;nbsp; follow&amp;nbsp;&lt;A href="https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4/introduction_habv4.txt?h=lf-5.10.52-2.1.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4/introduction_habv4.txt?h=lf-5.10.52-2.1.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There will be no error.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 02:38:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1376670#M183514</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2021-11-25T02:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: while generating HAB4 PKI Tree,hab4_pki_tree script giving error 140453821149632:error:2406F079:</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1377037#M183541</link>
      <description>&lt;P&gt;Thanks, I have checked link you share.&lt;/P&gt;&lt;P&gt;my updated u-boot.cfg file is as follows.&lt;/P&gt;&lt;P&gt;[Header]&lt;BR /&gt;Version = 4.1&lt;BR /&gt;#Security Configuration = Open&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 = Any&lt;/P&gt;&lt;P&gt;[Install SRK]&lt;BR /&gt;File ="../../crts/SRK_1_2_3_4_table.bin"&lt;BR /&gt;Source index = 0&lt;BR /&gt;Hash Algorithm = SHA256&lt;/P&gt;&lt;P&gt;[Install CSFK]&lt;BR /&gt;File ="../../crts/CSF1_1_sha256_2048_65537_v3_usr_crt.pem"&lt;BR /&gt;Certificate Format = X509&lt;/P&gt;&lt;P&gt;[Authenticate CSF]&lt;BR /&gt;Engine = DCP&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Signature Format = CMS&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 ="../../crts/IMG1_1_sha256_2048_65537_v3_usr_crt.pem"&lt;BR /&gt;Certificate Format = X509&lt;/P&gt;&lt;P&gt;[Authenticate Data]&lt;BR /&gt;Verification index = 2&lt;BR /&gt;Engine = DCP&lt;BR /&gt;Blocks = 0x01000000 0x0 0x10000 “flash.bin”&lt;BR /&gt;#0xf8000000 0x0 0x10000 “flash.bin”&lt;BR /&gt;#0xf801000 0x0 0x1000 “xyz.bin”&lt;BR /&gt;Engine Configuration = 0&lt;BR /&gt;Signature Format = CMS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here i am getting error on "Blocks = 0x01000000 0x0 0x10000 “flash.bin" " line num 35.&lt;/P&gt;&lt;P&gt;1) I am using ubuntu machine for sign image.which offset i need to you here?&lt;/P&gt;&lt;P&gt;2)To generate out.bin from input hab4.csf and public key certificate to encrypt symmetric&lt;BR /&gt;key(s)&lt;BR /&gt;cst -o out.bin --cert dek_protection_crt.pem -i example.csf&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is dek_protection_crt.pem here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 11:55:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/while-generating-HAB4-PKI-Tree-hab4-pki-tree-script-giving-error/m-p/1377037#M183541</guid>
      <dc:creator>pawar_123_y</dc:creator>
      <dc:date>2021-11-25T11:55:01Z</dc:date>
    </item>
  </channel>
</rss>

