<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>WARNING: Using generated NSIB public/private key-pair.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102725/warning-using-generated-nsib-public-private-key-pair</link><description>D:\ncs\v2.4.0\bootloader\mcuboot\samples\zephyr\hello-world&amp;gt;west build -b nrf5340dk_nrf5340_cpuapp -- west build: generating a build system 
 ... 
 -- Configuring done -- Generating done -- Build files have been written to: D:/ncs/v2.4.0/bootloader/mcuboot</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Feb 2024 21:05:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102725/warning-using-generated-nsib-public-private-key-pair" /><item><title>RE: WARNING: Using generated NSIB public/private key-pair.</title><link>https://devzone.nordicsemi.com/thread/467444?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 21:05:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d65694b6-4f7f-48ca-bc28-52392d1d20b4</guid><dc:creator>Daniel K</dc:creator><description>&lt;p&gt;I found that I was hitting the error because I didn&amp;#39;t have the key file defined for hci_rpmsg; so I fixed my overlays so that the absolute path is supplied via generated files into the child images via &amp;lt;img&amp;gt;_OVERLAY_CONFIG&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mcuboot (CONFIG_BOOT_SIGNATURE_KEY_FILE)&lt;/li&gt;
&lt;li&gt;b0 and hci_rpmsg (CONFIG_SB_SIGNING_KEY_FILE)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I still think the scripts should be fixed to allow override via environment variable, CMake argument, or by path relative to &amp;lt;img&amp;gt;_CONF_DIR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WARNING: Using generated NSIB public/private key-pair.</title><link>https://devzone.nordicsemi.com/thread/467441?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 20:21:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff054a9d-cfa3-49b7-9b4c-33048fae9ae1</guid><dc:creator>Daniel K</dc:creator><description>&lt;p&gt;I tried to solve this by generating a config file using the absolute path and adding it as an overlay; but then the thing I ran into was that this message is being generated for the b0 and b0n images.&lt;/p&gt;
&lt;p&gt;CONFIG_SB_SIGNING_KEY_FILE depends on SECURE_BOOT, which depends on !IS_SECURE_BOOTLOADER.&lt;/p&gt;
&lt;p&gt;Therefore this config will always be undefined for b0 and b0n and always produce this error message.&lt;/p&gt;
&lt;p&gt;What does this mean?&amp;nbsp; I don&amp;#39;t think b0 and b0n are signed with CONFIG_SB_SIGNING_KEY_FILE, but neither should they be signed with the default key either (because what would validate the signature?).&amp;nbsp; Is hci_rpmsg signed with CONFIG_SB_SIGNING_KEY_FILE if I don&amp;#39;t supply an absolute path for it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WARNING: Using generated NSIB public/private key-pair.</title><link>https://devzone.nordicsemi.com/thread/467420?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 16:47:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88f41d82-7ce2-4c69-9f7a-8ce5f6decde3</guid><dc:creator>Daniel K</dc:creator><description>&lt;p&gt;I ran into this problem too.&amp;nbsp; The source of it is here in nrf/subsys/bootloader/cmake/debug_keys.cmake:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  if(IS_ABSOLUTE ${CONFIG_SB_SIGNING_KEY_FILE})
    set(SIGNATURE_PRIVATE_KEY_FILE ${CONFIG_SB_SIGNING_KEY_FILE})
  else()
    set(SIGNATURE_PRIVATE_KEY_FILE
      ${APPLICATION_CONFIG_DIR}/${CONFIG_SB_SIGNING_KEY_FILE})
  endif()&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So the only way to make it use relative paths is to change APPLICATION_CONFIG_DIR, but then I have to duplicate prj.conf from the sample image.&lt;/p&gt;
&lt;p&gt;For mcuboot, it is possible to change the signing key directory by supplying mcuboot_CONF_DIR only (not mcuboot_CONF_FILE); this causes it to use prj.conf from mcuboot SDK directory as the base configuration and then look into the directory I&amp;#39;ve defined for the key file.&lt;/p&gt;
&lt;p&gt;It would be great if debug_keys.cmake also supported the same logic to allow getting the key from hci_rpmsg_CONF_DIR.&lt;/p&gt;
&lt;p&gt;PS: Also I found that the logic in here is broken in other ways; if you try to pass the key via &amp;quot;SB_SIGNING_KEY_FILE&amp;quot; environment variable or CMake command line argument, it is always overridden by the config file setting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WARNING: Using generated NSIB public/private key-pair.</title><link>https://devzone.nordicsemi.com/thread/440646?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 08:05:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:312abf85-d55b-4fae-864d-34dab83e624b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You need to set&amp;nbsp;&lt;span&gt;CONFIG_SB_SIGNING_KEY_FILE when using your own key.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;See the documentation here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html#adding-a-custom-signature-key-file"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html#adding-a-custom-signature-key-file&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Based on your sample, try setting this in prj.conf:&lt;/p&gt;
&lt;p&gt;CONFIG_SB_SIGNING_KEY_FILE=&amp;quot;custom_key_dir/custom_priv.pem&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WARNING: Using generated NSIB public/private key-pair.</title><link>https://devzone.nordicsemi.com/thread/440608?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 03:11:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1942adff-d034-40d3-93d4-cd1a3d31d336</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1513.hello_2D00_world.zip"&gt;devzone.nordicsemi.com/.../1513.hello_2D00_world.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>