<?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>Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80834/problems-verifying-dfu-package-signature-in-custom-background-dfu</link><description>Hello Devzone, 
 We are trying to get a custom background dfu solution working using nRF5 SDK 15.2 and softdevice s140 6.1.0. We are developing on Windows 10 and are using the nRF52840. Our approach is to use the DFU request handler while stil in the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Apr 2023 07:04:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80834/problems-verifying-dfu-package-signature-in-custom-background-dfu" /><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/419527?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 07:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b70218de-6a2c-41d1-a4c9-b8f04ba0431d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/tocgre"&gt;TOCGRE&lt;/a&gt;&amp;nbsp;, please create a new case where you include the details about the issue you are facing. There were several improvements made to the background DFU support between SDK v15.2 that OP was using compared to SDK 17.0.2, so it is more likely that you are experiencing a different problem.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/419429?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2023 10:24:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:023ee33f-1eb9-4f3a-b9dc-d8117bb00407</guid><dc:creator>TOCGRE</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve got the exact same issue verifying DFU package but with SDK17.0.2 and nrf52832.&lt;/p&gt;
&lt;p&gt;Is there any update on this thread ?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/335806?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 14:36:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27005e10-e795-4bcc-bf64-4d122d6b5892</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Interesting that it only works with my hex file. It&amp;#39;s one I built from the ble_app_hrs example. Does your hex file include data in the UICR section (0x10001000)? In that case, can you try to remove this section before you generate the zip package? Data in UICR will not be included in the DFU image anyway.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/335128?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 13:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cac334eb-5a24-418c-a5e0-87269616c8fa</guid><dc:creator>hfj</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When using nrfutil 4.0.0 and the .hex you provided it works. I tried generating a new application .hex file, which also failed.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1634737223754v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Edit: I do not know what causes this.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;hfj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/335124?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 13:31:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:046c67b9-fa04-452b-a900-21a50dd78edb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you please try with the hex file below and nrfutil v4.0.0 to see if it might have anything to do with the hex file itself?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs_5F00_pca10056_5F00_s140.hex"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_hrs_5F00_pca10056_5F00_s140.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/335118?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 13:13:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90f974fe-f166-4520-aafb-fced111045f5</guid><dc:creator>hfj</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When using the latest nrfutil executable it works the same as the nrfutil 6.X installed through pip&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1634735716504v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/334997?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 07:54:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85fb2061-4126-4f60-bbc2-8e6e80be256c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Does the same application hex work with nrfutil 6? I didn&amp;#39;t get any errors when I ran the same command as shown in your screenshot.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1634716452553v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/334996?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 07:31:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08f3269f-a572-482b-8abd-8e8c03df1c2c</guid><dc:creator>hfj</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m getting these errors when trying to run the nrfutil 4.0.0 executable, both from 64 and 32-bit powershell terminals. Do you know what I am doing wrong here?&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1634714888237v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;hfj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/334993?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 07:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30792737-dd21-4a40-92aa-302889f7a287</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s OK to use micro-ecc library instead. As you problably have seen, this is the library we already use for the other nRF52 variants that don&amp;#39;t include cc310 peripheral. The obvious drawback is that you won&amp;#39;t benefit from the HW accelleration offered by the Cryptocell, so the signature and hash validations will be a bit slower.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/334986?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 06:37:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae9d7879-6ca4-4d94-88e9-11893624325d</guid><dc:creator>hfj</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for the reply! If there is backwards compatability it seems reasonable that something else is wrong. I&amp;#39;ll try using the pre-built 4.0.0 version of nrfutil anyway and see if that leads to any different results.&lt;/p&gt;
&lt;p&gt;We&amp;#39;re trying to use the micro-ecc crypto backend at the moment. We tried getting different crypto backends to work such as Oberon and CC310, but had difficulties compiling successfully. We also tried CC310_BL which we were able to compile. However, after creating an object and writing the init command to it we experienced some weird behaviour when trying to validate the init command. Execution stopped without any error messages in the function &amp;quot;nrf_crypto_hash_update()&amp;quot; at the function pointer &amp;quot;ret_val = p_int_context-&amp;gt;p_info-&amp;gt;update_fn(p_context, p_data, data_size);&amp;quot;. We think the app scheduler might have crashed in the background, although we&amp;#39;re not entirely sure.&lt;/p&gt;
&lt;p&gt;Should we rather try getting the CC310 crypto backend to compile or is using micro-ecc a viable option?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;hfj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems verifying DFU package signature in custom background DFU</title><link>https://devzone.nordicsemi.com/thread/334936?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 15:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d875014-70a6-4961-935b-36cfd775a2e3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The init file should be backward compatible with older protobuf parsers. I&amp;#39;ve tested DFU with SDK 15.2.0 and nrfutil v6.1.0 without issues. That said,&amp;nbsp;according to the documentation here:&amp;nbsp;&lt;span class="item"&gt;&lt;a class="" title="nRF Util" href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_intro.html?cp=10_7"&gt;nRF Util&lt;/a&gt;, &lt;/span&gt;nrfutil version 4.0.0 is the version we recommended for this SDK release &lt;span class="item"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="item"&gt;Note that you can download a pre-built executable for version 4.0.0 here:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/releases?page=2"&gt;https://github.com/NordicSemiconductor/pc-nrfutil/releases?page=2&lt;/a&gt; so you don&amp;#39;t have to install Python 2.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="81273" url="~/f/nordic-q-a/80834/problems-verifying-dfu-package-signature-in-custom-background-dfu"]While also taking into account that the dfu_req_handler converts from little-endian to big-endian, we see that the signature has had it&amp;#39;s first and last halves switched.[/quote]
&lt;p&gt;Are you using the regular cc310 crypto backend or the bootloader specific variant of this backend? The nRF crypto top-level API should work with big-endian keys anyway. But I wonder if there is something else that may cause the signature validation to fail.&lt;/p&gt;
&lt;p&gt;&lt;span class="item"&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="item"&gt;&lt;span class="item"&gt;Vidar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>