<?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>Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100156/store-bonding-keys-in-specific-location</link><description>Hi, Im using nrf connect SDK and would like to know if its possible to store the bonding keys/info in a specific memory location. Im developing a Central device and Im able to bond with the peripheral. However, I would like to know if I can decide where</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 May 2023 10:59:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100156/store-bonding-keys-in-specific-location" /><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/428416?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 10:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f5e851a-4492-43c5-8382-6e35d31bfb83</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Thank you very much! &lt;br /&gt;&lt;br /&gt;Going to close this now &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Have a nice day Hieu!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/428412?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 10:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09042f1d-492a-424f-b13d-6a3e4a3fcd47</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Miguel.&lt;/p&gt;
[quote user="Miguel Ferreira"]Yup only the bonding information, but probably the API as its stores all the settings. My question was based on this ticket : &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/97525/setting-and-using-nvs-and-bt-settings-with-static-partition-manager/416596"&gt;RE: Setting and using NVS and BT Settings with Static Partition Manager&lt;/a&gt; .[/quote]
&lt;p&gt;Ah yes, here they are dealing with storing all of Zephyr Settings, not just the key part. They are also dealing with regular Flash partitions and NVS, not a secure storage that hides the information away. As discussed, I don&amp;#39;t think doing so provides any security benefits.&lt;/p&gt;
[quote user="Miguel Ferreira"]Thanks again![/quote]
&lt;p&gt;Just doing my job&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If everything is clear, please feel free to close this&amp;nbsp;question at your convenience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/428409?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 10:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:682666f6-a52c-4ef8-bea0-11be920ff0b3</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;br /&gt;&lt;br /&gt;Thanks for the clarification! &lt;br /&gt;&lt;br /&gt;Yup only the bonding information, but probably the API as its stores all the settings. My question was based on this ticket : &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/97525/setting-and-using-nvs-and-bt-settings-with-static-partition-manager/416596"&gt;RE: Setting and using NVS and BT Settings with Static Partition Manager&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/428147?ContentTypeID=1</link><pubDate>Tue, 30 May 2023 11:35:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4842f712-73ff-49af-8836-9ed0c3ace562</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Miguel,&lt;/p&gt;
&lt;p&gt;The nRF5340&amp;nbsp;supports &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/tfm/index.html"&gt;Trusted Firmware-M&lt;/a&gt;&amp;nbsp;(TF-M), which supports some form of secure storage.&amp;nbsp;&lt;span style="font-family:inherit;"&gt;I checked with my team and there is no fully integrated&amp;nbsp;solution for storing Zephyr Setting&amp;nbsp;using the TF-M&amp;#39;s secure storage options. It is theoretically possible, but&amp;nbsp;one will need to implement one&amp;#39;s own solution for that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Additionally, from the security viewpoint, the data&amp;nbsp;will be exposed when it is used, so&amp;nbsp;that diminishes the benefit of secure storage.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Therefore, this option is not recommended.&lt;/span&gt;&lt;/p&gt;
[quote user="Miguel Ferreira"]Basically during yesterday I found that its maybe possible to create an nvs partition while using the Partition Manager and you can store the keys in this partition. However, so far I wasnt able to do it...[/quote]
&lt;p&gt;Do you mean only the bonding information, and not the entirety of Zephyr Settings? If so, could you share your references?&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;If it&amp;#39;s about the entire Zephyr Settings, then even without any customization work, it is already setup like that by default, being stored in&amp;nbsp;a partition via NVS.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/428074?ContentTypeID=1</link><pubDate>Tue, 30 May 2023 08:20:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:649660b7-3c30-4c56-89c0-30cf3b8da51a</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;br /&gt;&lt;br /&gt;No problem! hope you had a great holiday!&lt;br /&gt;&lt;br /&gt;At the moment we are using nrf52840... But can you point me to the nrf5340 solution please ?&lt;br /&gt;&lt;br /&gt;Basically during yesterday I found that its maybe possible to create an nvs partition while using the Partition Manager and you can store the keys in this partition. However, so far I wasnt able to do it...&lt;br /&gt;&lt;br /&gt;Im using the setting CONFIG_NVS=y and calling nvs_mount() pointing to my nvs_storage partition:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;settings_partition:
  address: 0xfc000
  end_address: 0xfe000
  placement:
    align:
      start: 0x1000
  region: flash_primary
  size: 0x2000
nvs_storage:
  address: 0xfe000
  end_address: 0x10000
  placement:
    align:
      start: 0x1000
  region: flash_primary
  size: 0x2000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I would guess that BT APIs would use this partition but probably Im doing something wrong.&lt;br /&gt;&lt;br /&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/428067?ContentTypeID=1</link><pubDate>Tue, 30 May 2023 07:51:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c01d7ca-8034-4622-a454-ac7dde496a73</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Miguel,&lt;/p&gt;
&lt;p&gt;Sorry for the wait. There was a holiday.&lt;/p&gt;
&lt;p&gt;It is not possible to store just the bonding information in a protected section and the rest of Zephyr Settings elsewhere.&lt;/p&gt;
&lt;p&gt;Are you implementing your own protected section from the ground up, or are you using something the nRF5340&amp;#39;s TF-M Protected Storage? I am&amp;nbsp;checking internally if the entire Zephyr Settings can be stored with Protected Storage and if there is an existing&amp;nbsp;solution for that, just in case you are using the nRF5340.&lt;/p&gt;
&lt;p&gt;On other note, I have relayed your interest to our development engineers. Storing bonding information in a protected section&amp;nbsp;is something that we too already had on our backlog. Hopefully, we will see it realized soon.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/427856?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 14:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd5c36a0-bc29-4493-8dad-7ea4f9fdd8dc</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Oh sorry. Just want to save it in &amp;quot;protected&amp;quot; section along with other credentials. &lt;br /&gt;Just to summarize, right now its not possible to do it correct ?&lt;br /&gt;&lt;br /&gt;Thanks again Hieu.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/427848?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 14:42:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b0e439a-ef11-4d03-ac10-d0b0ac9bacf9</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Miguel,&lt;/p&gt;
&lt;p&gt;Ah right, I understood your setup and your goal.&lt;/p&gt;
&lt;p&gt;When I asked about your motivation, I meant what is the reason you want to control the storage location of the bonding key?&lt;/p&gt;
&lt;p&gt;It&amp;#39;s fine if you cannot share it. I am happy to have helped, regardless.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/427834?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 14:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20379edc-fed1-4030-bfa2-1f54763ba1fb</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;br /&gt;&lt;br /&gt;Thanks for you reply!&lt;br /&gt;So basically the goal would be to store the keys in a specific memory section or even in an external memory. To detail even more what Im doing:&lt;br /&gt;1 -) Use bt_conn_set_security to force pairing &lt;br /&gt;2- ) Use settings_load to grab the keys and to use them after rebooting the system&lt;br /&gt;&lt;br /&gt;This works fine, but I would like to know how or if its possible to choose the &amp;quot;location&amp;quot; where the bonding info or keys are stored.&lt;br /&gt;&lt;br /&gt;Thank you for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Store bonding keys in specific location ?</title><link>https://devzone.nordicsemi.com/thread/427770?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 11:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f771e9c8-fba3-4ed2-aa10-1305eb358764</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Miguel,&lt;/p&gt;
&lt;p&gt;Unfortunately, that is not possible, at least as of now (nRF Connect SDK v2.3.0). The bond information storage is done in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.2.99-ncs2/subsys/bluetooth/host/keys.c#L336-L363"&gt;keys.c&lt;/a&gt;, part of the Zephyr Host, using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/settings/index.html"&gt;the Zephyr Settings subsystem&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can control&amp;nbsp;where all Zephyr Settings are stored, but beyond that, you don&amp;#39;t have any control over where the bonding information is stored.&lt;/p&gt;
&lt;p&gt;By &amp;quot;specific memory location,&amp;quot; do you mean in Flash or somewhere else?&amp;nbsp;Could you please elaborate your motivation for this interest?&amp;nbsp;Depends on the use case, we could&amp;nbsp;consider the feature for some future &lt;span&gt;nRF Connect SDK&lt;/span&gt;&amp;nbsp;version.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;
&lt;p&gt;*Update 2023 May 31: Added some links.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>