<?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>BLE - security</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77264/ble---security</link><description>Hi, 
 I have a question regarding diffie-hellman. 
 What exactly are we doing with diffie-hellman key? Do we use it to create another key? Or is it the key itself? 
 Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 17 Jul 2021 12:20:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77264/ble---security" /><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320540?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 12:20:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b8ff922-fd80-41b7-8d53-d4addc06d962</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;&lt;a href="https://www.bluetooth.com/specifications/specs/core-specification/"&gt;https://www.bluetooth.com/specifications/specs/core-specification/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wow, a new version appeared four days ago...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320539?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 12:14:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:005af0ac-41b8-45e0-b6ad-9b9ca9eadb84</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Can you please give me the link for the spec?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320538?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 11:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6c9a540-6557-4a9a-93bf-06f66d1e9686</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Phase 2, Authentication Stage 1.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re curious about such low-level things, please read Bluetooth Core spec (Vol 3 Part H) - the whole pairing process is explained in details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320537?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 09:58:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44df6d79-cd1a-4a9b-b6cf-344c91e3ade6</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Can you please tell me in which phase does authentication (passkey etc...) occur?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320534?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 09:31:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76afdeda-899f-46b1-8af6-383386e5a75a</guid><dc:creator>Dmitry</dc:creator><description>[quote userid="73410" url="~/f/nordic-q-a/77264/ble---security/320533#320533"]After that - we use that shared secret key and together with both sides&amp;#39;s addresses and rand numbers, we create the LTK?[/quote]
&lt;p&gt;Exactly.&lt;/p&gt;
[quote userid="73410" url="~/f/nordic-q-a/77264/ble---security/320533#320533"]Do we know the exact generation function?[/quote]
&lt;p&gt;Yes, see Bluetooth Core specification Vol 3 Part H, &amp;quot;LE Secure Connections key generation function f5&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320533?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 08:54:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53c794d4-3e78-44b3-a80b-1f473254594c</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;OK, just to be sure everything is cleared:&lt;/p&gt;
&lt;p&gt;Diffie-Hellman is used to generate shared secret. In the end - both sides have the shared secret.&lt;/p&gt;
&lt;p&gt;After that - we use that shared secret key and together with both sides&amp;#39;s addresses and rand numbers, we create the LTK? Do we know the exact generation function?&lt;/p&gt;
&lt;p&gt;Thanks!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320532?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 08:46:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee14341a-2156-4a9c-84cb-2803e52a977f</guid><dc:creator>Dmitry</dc:creator><description>[quote userid="73410" url="~/f/nordic-q-a/77264/ble---security/320530#320530"]In other words - why do we need another phase for key distribution? After Diffie-hellman - both sides can generate the LTK[/quote]
&lt;p&gt;They do. In case of LESC, third phase is only needed to distribute IRK and CSRK (if requested in pairing request/response). As these values are confidential, this step is performed over an encrypted channel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320530?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 08:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1959a8af-5d19-4ac7-9ba2-3b9cb060448c</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;In other words - why do we need another phase for key distribution? After Diffie-hellman - both sides can generate the LTK.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320528?ContentTypeID=1</link><pubDate>Sat, 17 Jul 2021 07:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c2962de-afa4-40d5-8318-5bc2e376cdef</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Regarding phases - does key generation occur during the second phase? Because I know that third phase is key distribution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320513?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 21:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08e67fd9-9f9d-43fc-8756-f510a037da05</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;First, public keys are exchanged. Second, confirmation and random values are sent. The channel is not encrypted at this stage, but these values are not secret.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320512?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 20:44:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cd345ef-2bf9-475f-8799-be95f08e253f</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;I understand that we are generating the LTK, using both sides addresses and random numbers which are sent to both sides. Can you please tell me if those numbers are sent before or after diffie-hellman? Does it happen over secured connection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320510?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 20:38:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72690389-7cdc-4482-97ea-e1c4549cad9f</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="73410" url="~/f/nordic-q-a/77264/ble---security/319728#319728"]Why do need another step after generating diffie-hellman key?[/quote]
&lt;p&gt;Short answer - direct use of shared secret is insecure. The theory is somewhat complicated but we can trust&amp;nbsp;&lt;a href="https://wiki.openssl.org/index.php/Elliptic_Curve_Diffie_Hellman"&gt;OpenSSL wiki&lt;/a&gt;&amp;nbsp;that clearly says: &amp;quot;Never use a derived secret directly&amp;quot;.&lt;/p&gt;
[quote userid="73410" url="~/f/nordic-q-a/77264/ble---security/320431#320431"]&lt;p&gt;In addition - what about a connection which isn&amp;#39;t bonded?&lt;/p&gt;
&lt;p&gt;Do we still have diffie-hellman and LTK?&lt;/p&gt;[/quote]
&lt;p&gt;As Einar pointed out, LTK is the only key that we have after pairing process in case of LESC - we just have an option to forget it after disconnection when bonding is not required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/320431?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 12:52:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2a597e8-a6a9-4e55-a649-85adaeea700b</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;In addition - what about a connection which isn&amp;#39;t bonded?&lt;/p&gt;
&lt;p&gt;Do we still have diffie-hellman and LTK?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/319728?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 08:59:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b15b2f09-e76e-4200-901d-374c304570d8</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Why do need another step after generating diffie-hellman key? What is the difference between this key and LTK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/319217?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 14:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2bb7f72-fb62-4958-affc-f9aa0900e422</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Yes. In the end, the only key that remains after the pairing procedure is the LTK. This is briefly described in the &lt;a href="https://www.bluetooth.com/blog/bluetooth-pairing-part-4/"&gt;second link I provided&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/319216?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 14:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06919cc-c9b3-4187-83fd-6eeb6254253f</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I know that with diffie-hellman, both sides generates a key, without sharing private keys.&lt;/p&gt;
&lt;p&gt;After it&amp;#39;s done - we are we doing with that key? Do we use it to generate another key?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - security</title><link>https://devzone.nordicsemi.com/thread/319193?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 13:02:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06e80a9d-233d-4508-b5a1-f6b7ec87e760</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I assume you are referring to LE Secure Connections (LESC), which is where a &lt;a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange"&gt;Diffie–Hellman key exchang&lt;/a&gt;e is used in Bluetooth. That is used so that the two peers can exchange their public keys with each other to generate a shared secret that no one else can know, even an attacker that has intercepted all of the communication. This in turn is used to generate a encryption key.&lt;/p&gt;
&lt;p&gt;You can read more about LESC &lt;a href="https://www.bluetooth.com/blog/bluetooth-pairing-part-4/"&gt;here&lt;/a&gt;, and refer to the Bluetooth specification for all details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>