<?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>DFU keys update</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77160/dfu-keys-update</link><description>Hi, 
 I tried to update DFU keys via update on SDK-4.1 and I didin&amp;#39;t to do it. Its possible to change DFU keys via upgrade. I did this process on SDK-2 and there was no validation of dfu key via Bootloader but not in SDK-4. 
 My steps: 
 
 Prepare key</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Jul 2021 05:54:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77160/dfu-keys-update" /><item><title>RE: DFU keys update</title><link>https://devzone.nordicsemi.com/thread/319269?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 05:54:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a56bb0f1-981e-4a41-91de-f770debd07b5</guid><dc:creator>PBeS</dc:creator><description>&lt;div class="author"&gt;
&lt;div class="avatar"&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/piotr-barcinski"&gt;&lt;img alt="PBeS" border="0px" src="https://devzone.nordicsemi.com/cfs-filesystemfile/__key/communityserver-components-imagefileviewer/system-images/anonymous.gif_2D00_44x44x2.png?_=637367229955000086" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;
&lt;p&gt;Hi&amp;nbsp;Terje,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Little update:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I try to update like this (SDK4):&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Prepare keys pair 1 (let&amp;#39;s call them pub1 and priv1) and pair 2&amp;nbsp;&lt;span&gt;(pub2 and priv2)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;On SoC: Bootloader 1, Application 1, compiled with public key 1 (pub1), signed with private key 1 (priv1).&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Prepare bootlader dfu package (compiled with pub2, signed with priv1)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;DFU is performed&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Prepare&amp;nbsp;application dfu package (compiled with pub2, signed with priv1)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;DFU is performed&lt;/span&gt;&lt;span&gt;&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;application is downloaded correctly&lt;/li&gt;
&lt;li&gt;reboot after DFU&lt;/li&gt;
&lt;li&gt;bootloader - signature error&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;In case 9.c I got bootloader error debug:&lt;/span&gt;&lt;/p&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_scroller"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_text-layer"&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;error&amp;gt; nrf_dfu_validation: Signature failed (err_code: 0x8542)
&lt;/pre&gt;
&lt;div class="ace_layer ace_cursor-layer ace_hidden-cursors"&gt;
&lt;div class="ace_cursor"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="content-scrollable-wrapper"&gt;I know that it&amp;nbsp;&lt;span&gt;should not update bootloader and keys but is there any other way to change the keys via dfu?&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Piotr&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU keys update</title><link>https://devzone.nordicsemi.com/thread/319099?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 09:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ad224f4-27c4-49f1-b113-88fa6566d04a</guid><dc:creator>PBeS</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Terje,&lt;/p&gt;
&lt;p&gt;Thanks for quick reaction.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using&amp;nbsp;&lt;span&gt;Thread Secure DFU.&amp;nbsp;You are right, I missed step when I update keys for bootloader (Is not required for SDK2, because there is no signature validation by bootloder).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I try to update like this (SDK4):&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Prepare keys pair 1 (let&amp;#39;s call them pub1 and priv1) and pair 2&amp;nbsp;&lt;span&gt;(pub2 and priv2)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;On SoC: Bootloader 1, Application 1, compiled with public key 1 (pub1), signed with private key 1 (priv1).&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Prepare bootlader dfu package (compiled with pub2, signed with priv1)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;DFU is performed&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Prepare&amp;nbsp;application dfu package (compiled with pub2, signed with priv1)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;DFU is performed&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Now I have bootloader 2 and application 2&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Prepare&amp;nbsp;application dfu package (compiled with pub2, signed with priv2)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;DFU is performed&lt;/span&gt;&lt;span&gt;&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;application is downloaded correctly&lt;/li&gt;
&lt;li&gt;reboot after DFU&lt;/li&gt;
&lt;li&gt;bootloader - signature error&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;In case 9.c I got bootloader error debug:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;error&amp;gt; nrf_dfu_validation: Signature failed (err_code: 0x8542)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please let me know if my steps are ok.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Piotr&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU keys update</title><link>https://devzone.nordicsemi.com/thread/318988?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 13:00:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71f809c8-f464-4865-94dd-7c60cc1b7be9</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which DFU solution are you using? There is both the standard DFU bootloader solution from nRF5 SDK, and the particular solution for Thread Secure DFU. The latter can only be used for application updates, and so I assume that you are talking about the (serial) DFU bootloader from nRF5 SDK.&lt;/p&gt;
&lt;p&gt;For the one from nRF5 SDK, the DFU bootloader contains a public key, which is used for checking the signing. It will therefore accept any update signed with the corresponding private key.&lt;/p&gt;
&lt;p&gt;With key pairs 1 and 2, and bootloaders 1 and 2, the update will go like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On SoC: Bootloader 1, compiled with public key 1.&lt;/li&gt;
&lt;li&gt;Bootloader 2 (compiled with public key 2) is put into an update package signed with private key 1.&lt;/li&gt;
&lt;li&gt;DFU is performed.&lt;/li&gt;
&lt;li&gt;Now on SoC: Bootloader 2, compiled with public key 2.&lt;/li&gt;
&lt;li&gt;New updates can be prepared and signed with private key 2.&lt;/li&gt;
&lt;li&gt;The SoC, now with bootloader 2, can accept those new updates.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In your case, in 6, the bootloader claims the signing is wrong. This may be either because the old bootloader (with old key) is still on the SoC (i.e. the first update failed), or because there is something wrong with the update.&lt;/p&gt;
&lt;p&gt;Have you confirmed that the first bootloader update succeeded?&lt;br /&gt;Have you confirmed that the upgrade zip packet is working as expected if programming bootloader 2 directly first?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>