<?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>BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112773/ble-dfu-with-encrypted-images-in-mcuboot</link><description>We are trying to setup image encryption in our nRF build, for use with BLE DFU. 
 I see that this is not supported by Nordic, but that there is support for it in MCUBoot. There exists an example from Hellevik that we followed: https://github.com/hellesvik</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Aug 2024 07:47:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112773/ble-dfu-with-encrypted-images-in-mcuboot" /><item><title>RE: BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/thread/497735?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 07:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a1a740e-ea31-4c25-92a5-802f8fd9bd31</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for getting back to you so late; it was the summer vacation period here in Norway.&lt;/p&gt;
[quote user="Simen Eilevstjonn"]&lt;p&gt;while using both NSIB and MCUboot, then the process fails, and the old image is swapped back.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, I found a workaround by disabling NSIB. That is going to be okay for our use case, unless there exists some simple solution to get it to work with a two-stage bootloader.&lt;/p&gt;[/quote]
&lt;p&gt;I believe that image encryption with a two-stage bootloader is not a supported feature. When NSIB&amp;nbsp; is enabled, MCUboot might not support image encryption because this process requires secure handling of keys and decryption, typically performed entirely within a secure environment. NSIB introduces complexity to the boot flow, potentially making it incompatible with image encryption. In the usual scenario, MCUboot decrypts the image before handing it over to the application. However, with NSIB enabled, the boot process is split between secure and non-secure cores, which may prevent the decryption logic from being properly executed.&lt;/p&gt;
&lt;p&gt;If NSIB must be used, you might need to implement a custom solution to securely handle image decryption in conjunction with NSIB. Alternatively, as you&amp;#39;re currently doing, disabling NSIB is a viable workaround, allowing you to rely solely on MCUboot for the process.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/thread/493277?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2024 06:06:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48464b5c-2f56-4940-844f-7afa7fde4e88</guid><dc:creator>Simen Eilevstjonn</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I still do not have an error message, but the observed behaviour is that if one attempts to do over the air DFU with an encrypted image (using&amp;nbsp;&lt;span&gt;CONFIG_BOOT_ECDSA_TINYCRYPT&lt;/span&gt;&lt;span&gt;=y,&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_BOOT_ENCRYPT_IMAGE&lt;/span&gt;&lt;span&gt;=y in mcubooot.conf&lt;/span&gt;) while using both NSIB and MCUboot, then the process fails, and the old image is swapped back.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, I found a workaround by disabling NSIB. That is going to be okay for our use case, unless there exists some simple solution to get it to work with a two-stage bootloader.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/thread/493178?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 13:34:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9ca32ad-615c-4e79-80bc-b3aa261ee0b7</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could you please provide some additional details about the issue you are experiencing? I am unable to determine where the crash is occurring or where the error message is coming from.&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: BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/thread/492973?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 13:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eaef607-93f9-4d2d-bf18-a677048d9de8</guid><dc:creator>Simen Eilevstjonn</dc:creator><description>&lt;p&gt;The tutorial is for image signing, not encryption.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/thread/492953?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 12:06:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43e46ed4-3318-4ca2-b148-b7f8f10fcf0e</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not entirely sure what could be causing the issue. Could you please provide more details that might shed light on the problem? Nordic has an&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/exercise-2-dfu-over-usb-adding-external-flash/#:~:text=core%20image.-,Custom%20key,-The%20more%20observant"&gt; official tutorial&lt;/a&gt; on using custom keys in DFU which might be helpful.&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: BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/thread/492858?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 05:35:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ba8ba3d-b1ca-4522-87f2-1b80ffdbdbe1</guid><dc:creator>Simen Eilevstjonn</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We are using an nRF52840 with SDK version 2.6.0.&lt;/p&gt;
&lt;p&gt;I do not have a log with an error message. The errors are detected as disconnects during DFU. &amp;quot;FAILED&amp;quot; is also reported in the Android DFU library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU with encrypted images in MCUBoot</title><link>https://devzone.nordicsemi.com/thread/492709?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2024 12:42:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f68365c-0301-477c-8b4f-6eff4bc9d664</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I wanted to let you know that I have been assigned to this case and have started looking into it. Could you please share which SDK version and Nordic chip you are using? You mentioned it is reporting as failed; could you share the entire log with the error message you are receiving?&lt;/p&gt;
[quote user=""]I could not find that key in merged.hex, so I suspect it is not included.[/quote]
&lt;p&gt;The private key is not included in the merged.hex file that contains the firmware image and other application data to prevent it from being exposed or accidentally included in the production firmware image.&lt;/p&gt;
&lt;p&gt;I recommend looking at the section on&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/bootloaders/bootloader_signature_keys.html"&gt;signature_keys&lt;/a&gt;&amp;nbsp;for further insights.&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></channel></rss>