<?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>Using zephyr and MCUboot without image signatures</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109542/using-zephyr-and-mcuboot-without-image-signatures</link><description>Is there a way to not use signatures at all for MCUboot? 
 
 Without any changes to the kconfig file, I get a warning when compiling a project using MCUboot: 
 --- WARNING: Using default MCUBoot key, it should not --- --- be used for production. -- 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Apr 2024 10:44:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109542/using-zephyr-and-mcuboot-without-image-signatures" /><item><title>RE: Using zephyr and MCUboot without image signatures</title><link>https://devzone.nordicsemi.com/thread/480412?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 10:44:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:502b8ed1-df6e-4bb9-8e18-f7674dad695a</guid><dc:creator>mstriegel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;the challenge here is that things are intertwined: Essentially the magic happens in two files:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;1. nrf/modules/mcuboot/CMakeLists.txt&lt;/div&gt;
&lt;div&gt;2. bootloader/mcuboot/boot/zephyr/CMakeLists.txt&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;(1.) contains the function(sign), which creates all the desired build artifacts, i.e., app_update.bin, app_to_sign.bin _but only_ if CONFIG_SIGN_IMAGES=y. It further checks if CONFIG_BOOT_SIGNATURE_KEY_FILE has been provided. If so, it uses the private key contained in the provided .pem file to sign the build artifacts. If CONFIG_BOOT_SIGNATURE_KEY_FILE has not been set, it uses the default key root-ec-p256.pem provided by mcuboot and shows the well known warning banner (I suppose if you set CONFIG_BOOT_SIGNATURE_TYPE_RSA or CONFIG_BOOT_SIGNATURE_TYPE_ED25519 it would use the default key for those).&lt;/p&gt;
&lt;p&gt;Next, it tries to extract the pubkey from the .PEM file (line 332) and if this causes an error (if(${ret_val} EQUAL 2)), it warns you that the .PEM file does not contain a valid _private_ key (???) and suggests you set CONFIG_SIGN_IMAGES=n.&lt;/p&gt;
&lt;p&gt;Then it uses the private key contained in the .PEM file to sign the build artefacts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;(2.) uses CONFIG_BOOT_SIGNATURE_KEY_FILE to extract the public key portion from it, create the file build/zephyr/autogen-pubkey.h which is then compiled into the bootloader.&lt;/p&gt;
&lt;p&gt;(2.) will also consider CONFIG_BOOT_SIGNATURE_TYPE_NONE but in my nrf connect SDK v0.2.5 this will only modify some library includes.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I could confirm that setting&lt;/p&gt;
&lt;p&gt;CONFIG_SIGN_IMAGES=n @prj.conf&lt;/p&gt;
&lt;p&gt;CONFIG_BOOT_SIGNATURE_TYPE_NONE=y @mcuboot.conf&lt;/p&gt;
&lt;p&gt;results in only merged.hex build artifact.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So to solve your problem, I suppose you need to modify (1.) and potentially (2.) such that functionality is disentangled and that (1.) still creates the build artifacts but does not try to sign them.&lt;/p&gt;
&lt;p&gt;You might find inspiration in [1], as this post made me understand how the Kconfig symbols are used in the two CMakelists.txt files.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/80629/decouple-mcuboot-public-key-storage-and-image-signing-nrf9160-mcuboot"&gt;devzone.nordicsemi.com/.../decouple-mcuboot-public-key-storage-and-image-signing-nrf9160-mcuboot&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr and MCUboot without image signatures</title><link>https://devzone.nordicsemi.com/thread/477066?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 10:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14e20f68-89f6-4a53-be66-067684c073c0</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s strange. Then, I guess, you need to manually set the MCUboot build to not use a signature. I believe this feature will be included in the next release of NCS with the inclusion of &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/zephyr/build/sysbuild/index.html"&gt;Sysbuild&amp;nbsp;&lt;/a&gt;as the new multi-image build system.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr and MCUboot without image signatures</title><link>https://devzone.nordicsemi.com/thread/476232?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2024 20:36:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:116a24de-5bbe-4fd3-985e-14fe34ab3729</guid><dc:creator>JoshK</dc:creator><description>&lt;p&gt;I tried that, it does actually finish the build with no issues, but it no longer generates a binary file for application updates, which is the output that I need. app_update.bin.&lt;br /&gt;&lt;br /&gt;Maybe I am missing something there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr and MCUboot without image signatures</title><link>https://devzone.nordicsemi.com/thread/476209?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2024 17:34:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9c9c18d-d187-42f1-bca0-68f9c9cdf52e</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="JoshK"]The problem is that setting MCUboot to not require a key seems to result in build errors from the nrf connect sdk, which is attempting to sign the image as part of the build process (using then nonexistent resources).[/quote]
&lt;p&gt;Yes, the NCS release until version V2.6.0 does not support the not-checking signature feature. Most of these will be included in the upcoming release, but I cannot provide you with a timeline for this.&lt;/p&gt;
&lt;p&gt;Can you include the configuration CONFIG_SIGN_IMAGES=n in the project configuration (prj.config) and CONFIG_BOOT_SIGNATURE_TYPE_NONE=y inside the mcuboot configuration (childimage/mcuboot/mcuboot.config)? Let me know if this works or not.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Please expect some delay after this response as it is Easter vacation here in Norway. You can expect a response after the 2nd of April. Sorry if this creates any inconvenience for your development.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr and MCUboot without image signatures</title><link>https://devzone.nordicsemi.com/thread/475700?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2024 14:47:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24d168b5-545d-457a-b755-aa7323f3c1ff</guid><dc:creator>JoshK</dc:creator><description>&lt;p&gt;I understand that is the cause of the warning. I can avoid it by using a custom key, but would prefer to use no key whatsoever.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The problem is that setting MCUboot to not require a key seems to result in build errors from the nrf connect sdk, which is attempting to sign the image as part of the build process (using then nonexistent resources).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr and MCUboot without image signatures</title><link>https://devzone.nordicsemi.com/thread/475571?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2024 09:07:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1def2ab8-b467-41a6-b636-d7395f803773</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The warning message you&amp;#39;re seeing is indicating that the default MCUBoot key is being used. This key is intended for development or debug use only and should not be used for production.&lt;/p&gt;
&lt;p&gt;It might not be possible to avoid the warning without setting your custom key for MCUboot, as this warning is a built-in feature of MCUboot to ensure the security of the application when it comes to production. I think you can just ignore the warning if you are using some other method for verification.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Abhijith&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>