<?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>nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82240/nrf8240-signature-validation-failed-during-testing</link><description>Hi , 
 
 i am using nrf52840 dk board. and using 17.1 sdk for examples code. 
 i am trying to customize open bootloader code and trying to validate the signature of a input data by using nrf_dfu_validation_signature_check() API. 
 Note: - i am having</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 04 Dec 2021 04:15:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82240/nrf8240-signature-validation-failed-during-testing" /><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341938?ContentTypeID=1</link><pubDate>Sat, 04 Dec 2021 04:15:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a71767b8-97ed-4ec8-be93-2200b8922849</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Thanks Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341830?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 10:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5b03199-743c-46c6-92ec-d77319d5c4a3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No, these sets of commands are not OK. The specific problem is that the bootloader start address is stored in the UICR, and that is part of the bootloader hex file. When you later&amp;nbsp;program&amp;nbsp;the application with the &amp;quot;--sectoranduicrerase&amp;quot; option, the UICR is deleted again. In this specific case it would be enough to just skip &amp;quot;--sectoranduicrerase&amp;quot; from step 5, but as you start with an&amp;nbsp;erase all there is no need to use this anywhere, so I suggest you remove this option from all the commands.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341737?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 15:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c671d04-09bc-46aa-9df7-7a4b8627f4dc</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Thanks Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;one last thing is the below commands are ok for programming&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;1. Erase the entire flash&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog.exe --family NRF52 --eraseall&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;2.Program the MBR&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in;"&gt;&lt;span style="background:white;color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;"&gt;nrfjprog --reset --program &lt;/span&gt;&lt;span style="font-family:Calibri;font-size:11.0pt;"&gt;mbr_nrf52_2.4.1_mbr&lt;/span&gt;&lt;span style="background:white;color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;"&gt;.hex&amp;nbsp; --family NRF52 --sectoranduicrerase&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;3.Program the Bootloader Settings&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog --program settings.hex -f NRF52 -r&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;4. Program the Bootloader&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog --reset --program open_bootloader_usb_mbr_pca10056.hex --family NRF52 --sectoranduicrerase&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;5. Program Blinky App&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog --reset --program blinky_pca10056.hex --family NRF52 --sectoranduicrerase&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341725?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 14:21:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7ba53cc-6700-4ab7-b8f2-079a136d9b75</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
[quote user="R_S"]in this command , these version number will it effect the process or its just the version just assigning here?[/quote]
&lt;p&gt;The version numbers for application and bootloader does not matter in itself, other than that downgrade protection ensures that you need to use increasing numbers. So when you set 1, a DFU image which is not higher will not be accepted (this can be adjusted by sdk_config.h macros, though). This data will be programmed to the bootloader settings page and is read whenever there is a DFU procedure. This is just the starting point though. If you update to for instance application version 3, the number in the settings page on the device would then be changed to 3.&lt;/p&gt;
&lt;p&gt;The bl-settings-version is a bit different, and depends on the SDK version of the bootloader. As you use SDK 17.1 it should always be set to 2. This is to match the data structure and content that is used by the bootloader version you use.&lt;/p&gt;
[quote user="R_S"]And in application part which hex file i need to pass whether its a bootloader hex file or my application hex file which will run after bootloader?[/quote]
&lt;p&gt;You normally only need to pass the hex file of the application when generating bootloader settings page. If you also want SD boot validation you need to pass the SoftDevice hex file as well.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341720?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 14:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab63429d-6680-43e1-9419-20d5641d2438</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;in this command , these version number will it effect the process or its just the version just assigning here?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1638454180904v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And in application part which hex file i need to pass whether its a bootloader hex file or my application hex file which will run after bootloader?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Rohit Saini&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341710?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 13:27:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14d59e9f-5499-4043-88a0-1a2f90de9772</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
&lt;p&gt;You would have to expand your nrfutil command to something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil.exe settings generate --family NRF52840 --application blinky_pca10056.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 --app-boot-validation VALIDATE_ECDSA_P256_SHA256 --key-file /path/to/key_file.pem settings.hex &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You should also set&amp;nbsp;NRF_BL_APP_SIGNATURE_CHECK_REQUIRED to 1 in the bootloader&amp;#39;s sdk_config.h to enforce it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341708?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 13:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63dc99ac-5904-4ac6-beef-d916f132ae41</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;HI Einar,&lt;/p&gt;
&lt;p&gt;yes you are right i am just verify my application before it start.&lt;/p&gt;
&lt;p&gt;bootloader settings i am using following command.&lt;/p&gt;
&lt;p&gt;&lt;span style="background:white;"&gt;nrfutil.exe settings generate --family NRF52840 --application blinky_pca10056.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background:white;"&gt;and how to specify that i want to validate&amp;nbsp;&lt;code&gt;VALIDATE_ECDSA_P256_SHA256&lt;/code&gt;&lt;span&gt;&amp;nbsp;while creating bootloader settings rather than CRC.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background:white;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background:white;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background:white;"&gt;&lt;span&gt;Regards&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background:white;"&gt;&lt;span&gt;Rohit saini&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341697?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 12:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d2a1b7f-917b-4e0e-a398-d4d17cc107cd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Rohit,&lt;/p&gt;
&lt;p&gt;So what you try to do here is just to verify the application before you start it on every boot, right?&lt;/p&gt;
&lt;p&gt;How do you generate the bootloader settings?&lt;/p&gt;
&lt;p&gt;Do you test with DUMMY defined here? If so, I don&amp;#39;t see where this &lt;code&gt;m_message&lt;/code&gt; comes from nor do I know how the signature you compare with is generated, so I cannot say much other than that as the verification fails there are issues with the data of some sort (could be anywhere). What I can say though is that this is supported by the unmodified bootloader SDK bootloader example, so you could simply do as is done there. When you generate the bootloader settings page you can specify that you want to use signature verification on every boot instead of just a CRC which is default using the&amp;nbsp;&lt;code&gt;--app-boot-validation&amp;nbsp;VALIDATE_ECDSA_P256_SHA256&lt;/code&gt; when you generate the settings page using &lt;code&gt;nrfutil settings generate&lt;/code&gt;. Search for VALIDATE_ECDSA_P256_SHA256 in the bootloader code to see how it is used there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341610?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 04:46:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24b09604-6d8b-4639-994c-3647da2623ac</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;yes public key i cross checked its the same which i generated, there is no confusion in that.&lt;/p&gt;
&lt;p&gt;And regarding changes i did, so the base code i am using nordic sdk open bootloader code.&lt;/p&gt;
&lt;p&gt;i comment out all nrf_bootloader_init part. below is my main function content.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1638419888907v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;IsSignatureVerified() i am calling API for validation .&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1638419988692v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And before all these things i am using following steps to program my bootloader code and application code.&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;1. Erase the entire flash&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog.exe --family NRF52 --eraseall&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;2.Program the MBR&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in;"&gt;&lt;span style="background:white;color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;"&gt;nrfjprog --reset --program &lt;/span&gt;&lt;span style="font-family:Calibri;font-size:11.0pt;"&gt;mbr_nrf52_2.4.1_mbr&lt;/span&gt;&lt;span style="background:white;color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;"&gt;.hex&amp;nbsp; --family NRF52 --sectoranduicrerase&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;3.Program the Bootloader Settings&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog --program settings.hex -f NRF52 -r&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;4. Program the Bootloader&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog --reset --program open_bootloader_usb_mbr_pca10056.hex --family NRF52 --sectoranduicrerase&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;font-weight:bold;"&gt;5. Program Blinky App&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;nrfjprog --reset --program blinky_pca10056.hex --family NRF52 --sectoranduicrerase&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;one controller boot up its start my open bootloader in that i am doing signature validation of the application code and then jump to the application part.&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;but during validation it fails every time. and i am not sure which steps i am missing here.&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;for validation i am reading the flash data of application code and store it in a local buffer (dataBuffer) and that buffer i am passing in the&amp;nbsp;nrf_dfu_validation_signature_check() as input.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;My intension only to validate the application hex file data which i flash directly to the controller.&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;;font-size:10.5pt;margin:0in;"&gt;&lt;span style="background:white;"&gt;Rohit Saini&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341547?ContentTypeID=1</link><pubDate>Wed, 01 Dec 2021 14:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5176d26-355a-460c-88e4-620a8fb45a5e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="R_S"]&lt;p&gt;And above this can i c ross check my created signature whether it is ok or not.&lt;/p&gt;
&lt;p&gt;is there any way to do that....?&lt;/p&gt;[/quote]
&lt;p&gt;The only way I can see to do that is to do the validation operation and ensure that it is successful. Also, there is not really much information you can get about what is wrong wen you you validate the signature. Either it validates OK, or there is a problem.&lt;/p&gt;
[quote user="R_S"]i am following this user guide to generate private key. but what about the signature data, how can i generate that so that i can cross check whether there is an issue with my signature or not.[/quote]
&lt;p&gt;I see you use nrfutil, and the nRF5 SDK bootloader, with some modification. If you use&amp;nbsp; nrfutil to generate the upgrade image and an unmodified bootloader, this will work assuming you did not accidentally use wrong keys (for instance forget to build the bootloader with the public key that corresponds to the private key you used with nrfutil). If you have checked the keys it would be interesting to know which changes you have done in the bootloader? Perhaps you can backtrack and go back to the working SDK example and then see which change you does that cause problems?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341426?ContentTypeID=1</link><pubDate>Wed, 01 Dec 2021 03:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb3fc24e-0132-46c6-a484-9a97ee1b24c0</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;And above this can i c ross check my created signature whether it is ok or not.&lt;/p&gt;
&lt;p&gt;is there any way to do that....?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/pdf/nrfutil_v1.3.pdf"&gt;https://infocenter.nordicsemi.com/pdf/nrfutil_v1.3.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;i am following this user guide to generate private key. but what about the signature data, how can i generate that so that i can cross check whether there is an issue with my signature or not.&lt;/p&gt;
&lt;p&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: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341357?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 15:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e959f6d8-76e8-4573-b2e0-c73d8aa375d4</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Yes my Signature data is already in big endian format but my public key is in little endian format.&lt;/p&gt;
&lt;p&gt;So according to you in my case Signature i no need to swap , but for public key i need that swap function right..?&lt;/p&gt;
&lt;p&gt;Please correct me if my understanding is not ok..?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341353?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 15:12:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a95e089-da7e-41d9-bc0b-fe54f02b337d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The crypto library operates on&amp;nbsp;big-endian data. However, the signature in the DFU protocol use little endian, so it needs to be converted. If you allready have big endian data (I am not sure about the exact use in your case) then you can either modify the nrf_dfu_validation_signature_check() function to not swap endian in that case, or swap twice (though that means doing unnecessary calculations).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341347?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 14:55:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3484b3e-e5c0-45fe-ad01-95c36d233713</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Thanks for reply Einar.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Error is&amp;nbsp; &amp;quot;&lt;span&gt;NRF_ERROR_CRYPTO_ECDSA_INVALID_SIGNATURE&amp;quot; only.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And want to know regarding endianness of the data... like Signature and public key should be in little endian or big endian format before&amp;nbsp;nrf_crypto_internal_double_swap_endian_in_place() this function call...?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf8240 Signature validation failed during testing</title><link>https://devzone.nordicsemi.com/thread/341298?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 13:11:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99dac145-9a6b-4d81-b63f-065c677078f4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;nrf_dfu_validation_signature_check() returns&amp;nbsp;NRF_DFU_RES_CODE_INVALID_OBJECT on any failure of the verify operation itself, so it could be good to debug to see which error is actually returned from the call to nrf_crypto_ecdsa_verify(). If it is&amp;nbsp;NRF_ERROR_CRYPTO_ECDSA_INVALID_SIGNATURE, then there simply is a signature verification failure due to the input not being a valid signature with the provided public key.&lt;/p&gt;
&lt;p&gt;Typical reasons for getting problems with signature verifications is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Perhaps you used the wrong key&lt;/li&gt;
&lt;li&gt;Corrupt data (signature)&lt;/li&gt;
&lt;li&gt;Endianness problems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regarding the latter note that for historical reasons the secure DFU bootloader use little-endian format (as does Bluetooth), and therefor endianness of the signature is&amp;nbsp;converted by a call to&amp;nbsp;nrf_crypto_internal_double_swap_endian_in_place() within&amp;nbsp;nrf_dfu_validation_signature_check().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>