<?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>unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100975/unique-private-keys-per-device-during-ota-dfu</link><description>we have 100 devices out there on the field, each has its own unique private key. 
 1. if we want to update the firmware of all these 100 devices, must we build a unique public key per each device using its private pre-set private key? 
 2. if so, then</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Jun 2023 12:32:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100975/unique-private-keys-per-device-during-ota-dfu" /><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/433688?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 12:32:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e59ab558-abe0-4388-b720-b62de7eee775</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="26310" url="~/f/nordic-q-a/100975/unique-private-keys-per-device-during-ota-dfu/433655"]it is already known to both sides[/quote]
&lt;p&gt;This is what I meant. I was not concerned about how the key was distributed in the first place. The private key is not supposed to be known by either of the devices when using our DFU solution.&lt;/p&gt;
[quote userid="26310" url="~/f/nordic-q-a/100975/unique-private-keys-per-device-during-ota-dfu/433655"]can we just send the binary image through the Android DFU library instead of the zip with the manifest/DAT files?[/quote]
&lt;p&gt;The manifest file can be omitted, but you will need the generated .dat file if you are going to use our dfu protocol and DFU library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/433655?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 11:14:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5ca7b7f-e6a7-4b27-8ab9-dcc443c08dd3</guid><dc:creator>Omri Friedman</dc:creator><description>&lt;p&gt;we are not sharing the private key. it is already known to both sides (private key, not shared over the air) - the application (on the Android side) and the firmware (on the device side).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;can we just send the binary image through the Android DFU library instead of the zip with the manifest/DAT files?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/433637?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 10:13:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb979963-b872-46cd-8af4-1e22e82cb13f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;nrfutil is not available for Android, unfortunately. If you are going to implement this, you can use the python source as a reference. However, wouldn&amp;#39;t it be better if you could avoid having to&amp;nbsp;distribute the private key like this? Have you considered&amp;nbsp;having&amp;nbsp;a&amp;nbsp;&amp;quot;signing service&amp;quot; hosted on a web server?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/433622?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 08:25:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fa20ff5-2601-415b-a246-7926fb96db6c</guid><dc:creator>Omri Friedman</dc:creator><description>&lt;p&gt;one more related question - we need to create zip from binary image on our Android device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is done after we encrypt the binary image.&lt;/p&gt;
&lt;p&gt;We cannot use nrfutil.exe on Android OS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have Android utility to do that? or alternatively - can you explain how you create the DAT file and how you ZIP by nrfutil?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431712?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 10:08:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:761d161b-dcdb-453a-a268-5a187ce77863</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;OK, it sounds like you have a plan on how to solve this. I will leave the ticket open in case you have any follow up questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431711?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2023 06:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdec3c56-dfac-476e-a2f1-b16db3ea0228</guid><dc:creator>Omri Friedman</dc:creator><description>[quote user="vibe"]So, what you are saying is that any device that can establish a secure connection with your product should also be able to change the public key?[/quote]
&lt;p&gt;yes, but i think the easier way is to use our other option i have mentioned, which entirely bypasses the DFU and uses our proprietary encryption/authentication methods.&amp;nbsp;&lt;/p&gt;
[quote user="vibe"]But how do you intend to apply these modifications to units&amp;nbsp;you&amp;nbsp;already have out in the field?[/quote]
&lt;p&gt;on the field we already have a unique keys per any device, and the host knows this private keys. so our steps would be:&lt;/p&gt;
&lt;p&gt;1. host takes the zip file it needs to send to the device&lt;/p&gt;
&lt;p&gt;2. host extracts the binary and encrypts/authenticates this entire file using our private keys&lt;/p&gt;
&lt;p&gt;3. host makes zip out of it&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. host performs FOTA as usual with the nRf DFU on the device.&lt;/p&gt;
&lt;p&gt;5. we modify the device side nRf bootloader to also be able to decrypt/de-authenticate the file&amp;nbsp;&lt;/p&gt;
&lt;p&gt;6. the nRf bootloader on the device side&amp;nbsp;&lt;span&gt;decrypt/de-authenticate the file (since it has the set of private keys which it uses for device/host routine communication)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431710?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2023 06:28:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d542507-ea20-46ff-8b8c-329028e4a391</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;As I mentioned in my previous response, if you are using the original bootloader, the only way you will be able to update the firmware over-the-air is by signing each update individually. Note that this update may include the bootloader with a new public key.&lt;/p&gt;
[quote user="Omri F"]secure connection with the device over BLE. this means it is encrypted and authenticated using private (!)[/quote]
&lt;p&gt;So, what you are saying is that any device that can establish a secure connection with your product should also be able to change the public key?&lt;/p&gt;
[quote user="Omri F"]alternatively we can just apply the same encryption/authentication on the binary image and modify the dfu code to use it on it side with the same private keys we use. is that makes sense?[/quote]
&lt;p&gt;But how do you intend to apply these modifications to units&amp;nbsp;you&amp;nbsp;already have out in the field?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431709?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2023 05:48:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1473a9f-1ba3-41ec-a360-94fe128d842a</guid><dc:creator>Omri Friedman</dc:creator><description>&lt;p&gt;we have a secure connection with the device over BLE. this means it is encrypted and authenticated using private (!) keys etc. so we can use this channel to send new public key, modify the DFU so it would take this key from where we place it....&amp;nbsp;&lt;/p&gt;
&lt;p&gt;alternatively we can just apply the same encryption/authentication on the binary image and modify the dfu code to use it on it side with the same private keys we use. is that makes sense?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431708?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 20:21:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59c9c379-f3db-4b04-bbd8-aaf947842e7d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;If you haven&amp;#39;t modified anything in the bootloader, the only way you will be able to update your devices will be to sign&amp;nbsp;each update individually and ensure you send the update to the correct device. So, you will need some kind of database to keep track of which signing key to use for each device.&lt;/p&gt;
[quote user="Omri F"]our walkaround may be to send a unique public key over the air using our secured connection BEFORE we start an update, and then do the update with this public key.&amp;nbsp;[/quote]
&lt;p&gt;Sorry, but I&amp;#39;m not sure I understand what you mean here. If the public key could be updated on the DFU target, then what would prevent an attacker from doing the same?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431707?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 20:02:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6723bada-c0f5-49d8-b6c0-f0196d75d443</guid><dc:creator>Omri Friedman</dc:creator><description>&lt;p&gt;our cyber security requirements forces us to have a unique key per every device. it does not matter if it is public or private. if we use the same keys, it is assume unsafe security wise, since we assume an attacker will gain control over our secret key (unless it is a different key per device).&lt;/p&gt;
&lt;p&gt;Our concern is that an attacker with the keys can send a malicious firmware image using nRF EVAL to any of our devices. only with a unique key per each device, we are safe cyber-security wise.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;our walkaround may be to send a unique public key over the air using our secured connection BEFORE we start an update, and then do the update with this public key.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;hope i understood correctly your implementation....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431706?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 18:39:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8803c4cd-2357-46ad-80d9-98d57eff6e8c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;None of the keys are exchanged over the air. The public key is embedded into the bootloader image (defined in the&amp;nbsp;dfu_public_key.c file) and is used to verify if an update has been signed with the private key, see &amp;#39;&lt;a title="Signature verification" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_bootloader_dfu_validation.html?cp=9_1_3_5_1_1_2_3#lib_bootloader_signatures"&gt;Signature verification&lt;/a&gt;&amp;#39; for more details.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please explain how you made the keys and how you provisioned them? Did you generate private/public 100 key pairs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431705?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 15:46:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c820c329-16d7-4ede-ab35-f9bd094c7c0b</guid><dc:creator>Omri Friedman</dc:creator><description>&lt;p&gt;we do base it on nRF5 SDK. So how does the private key used? if i change the private key on the host side, then how does the far end device learns about it? only the public key is sent over the air. correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unique private keys per device during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/431704?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 10:15:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97aff26c-9eed-470b-9e97-129bb4ce0d2b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t store the private key on the device in our secure DFU solution. Have you based your bootloader on our bootloader from the nRF5 SDK or some other bootloader? Either way, if you have a unique key on each device, I imagine you will need to sign each update based on what device the update is meant for.&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></channel></rss>