<?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>Secure DFU signature check wrong</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60247/secure-dfu-signature-check-wrong</link><description>Hi, 
 I tried the SDK_DIR\examples\dfu\secure_bootloader\pca10040_s132_ble example from nRF5_SDK_16.0.0 with my custom board with nrf52832 mcu. 
 I followed this guide: 
 https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Apr 2020 06:22:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60247/secure-dfu-signature-check-wrong" /><item><title>RE: Secure DFU signature check wrong</title><link>https://devzone.nordicsemi.com/thread/245126?ContentTypeID=1</link><pubDate>Fri, 17 Apr 2020 06:22:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a03334ce-60b8-43fc-ba5d-b094cd807aad</guid><dc:creator>nevi</dc:creator><description>&lt;p&gt;I figured out the problem. When I modified some bytes in the private.key file, I actually did not modify the private key itself, just some other fields in the PEM file. I check this with&amp;nbsp;nrfutil keys display --key sk --format hex private.key command. And the 256 bit keys are the same even though the private.key files are different.&lt;/p&gt;
&lt;p&gt;And I found the reason why the bootloader able to decide the app firmware validity without all of the firmware data. It checks the signature that received in the first packet (init). And during the post validation it checks the calculated hash against the hash received in the init packet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU signature check wrong</title><link>https://devzone.nordicsemi.com/thread/245039?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 14:07:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e436de9-2f94-482b-b45b-6b09cc475cf3</guid><dc:creator>nevi</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3527.bootloader.zip"&gt;devzone.nordicsemi.com/.../3527.bootloader.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I tried this bootloader with the app packed with this command:&lt;/p&gt;
&lt;p&gt;Correct key:&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --application-version 1 --application build\nrf52832_xxaa.hex --sd-req 0xB7 --key-file dfu\private.key dfu\app_dfu_package.zip&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Wrong key:&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --application-version 1 --application build\nrf52832_xxaa.hex --sd-req 0xB7 --key-file dfu\private_wrong.key dfu\app_dfu_package_wrong.zip&lt;/p&gt;
&lt;p&gt;And the bootloader accept both of them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU signature check wrong</title><link>https://devzone.nordicsemi.com/thread/245011?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 13:28:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90cc6efa-c699-40f3-a52c-5c60b1fcd154</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This seems odd. Could it be that by accident you modified another copy of the private key than what is actually being used (just a guess)? If not, can you upload the original and modified private key here along with detailed instructions so that I can attempt to reproduce on my side? (use a test key that you do not need to keep secret).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>