<?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>Nontraditional pairing using certificates/PKI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56924/nontraditional-pairing-using-certificates-pki</link><description>Hi All, 
 I&amp;#39;m trying to figure out the best way to implement the security between two industrial IoT devices. We don&amp;#39;t have a good out-of-band channel for more &amp;quot;traditional&amp;quot; BLE pairing (no user display, keypad, nfc, etc.). As a result we&amp;#39;re considering</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Jan 2020 12:32:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56924/nontraditional-pairing-using-certificates-pki" /><item><title>RE: Nontraditional pairing using certificates/PKI</title><link>https://devzone.nordicsemi.com/thread/231642?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2020 12:32:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:100bc88d-8da4-4408-be35-f0772a720fb3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Jay,&lt;/p&gt;
&lt;p&gt;I see. The way I understand it this should work well with your authentication on top of LESC just works pairing. Then after pairing you can do your authentication procedure, and disconnect if authentication fails.&lt;/p&gt;
[quote user="jaylong"]Thanks for the info on&amp;nbsp;LTK etc. I&amp;#39;m sure this is well documented but if you have any good primers I&amp;#39;d be happy to get links.[/quote]
&lt;p&gt;The short story is that LESC uses&amp;nbsp;Diffie–Hellman key exchange and derives the LTK from the shared secret. The LTK is subsequently used to encrypt the link for all future connections. I don&amp;#39;t know of a &lt;em&gt;good&lt;/em&gt; primer, but the principle is quite simple. You can refer to&amp;nbsp;BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part H SECURITY MANAGER&lt;br /&gt;SPECIFICATION (starting at page 2417) for all details.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nontraditional pairing using certificates/PKI</title><link>https://devzone.nordicsemi.com/thread/231525?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2020 02:03:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c593557-96b9-4b6c-a13a-0c287ed73465</guid><dc:creator>Jay</dc:creator><description>&lt;p&gt;Thanks for the thoughtful response Einar,&lt;/p&gt;
&lt;p&gt;To answer your questions:&lt;/p&gt;
&lt;p&gt;1. Any two devices will need to be able to pair. No pairing will be done at time of manufacturing.&lt;br /&gt;2. Only the hub device will have internet access and hence access to the full PKI in &amp;quot;real-time&amp;quot;. The peripheral will only have internet access through the hub. While traditional TLS only stores the root public key, fetching the subsequent nodes in the certificate chain in real-time, I believe we can overcome this real-time limitation by storing the full public chain on each peripheral plus the hub public root. During hub authentication, the hub will have to send its whole public chain, minus its root to the peripheral. The peripheral will then authenticate each node in the chain, verifying it&amp;#39;s signed by the previous node, all the way up to the locally stored hub root. This same process can be symmetric about the two devices, i.e. the hub can authenticate the peripheral in the exact same manner. This is illustrated in the attached image.&lt;br /&gt;&lt;br /&gt;Thanks for the info on&amp;nbsp;LTK etc. I&amp;#39;m sure this is well documented but if you have any good primers I&amp;#39;d be happy to get links.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;jay&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Offline_5F00_PKI.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nontraditional pairing using certificates/PKI</title><link>https://devzone.nordicsemi.com/thread/230864?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 13:14:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b68a7305-a4e3-4aaa-b3bf-854d9f187831</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Jay,&lt;/p&gt;
&lt;p&gt;Using LE Secure Connections, you can establish a secure link between two peers over BLE. An eavesdropper will not be able to obtain the key since LESC uses a&amp;nbsp;Diffie–Hellman key exchange, so the link will be secure. However, without a display, keyboard, NFC or similar which you do not have, you have no standardized way of authenticating the peer, as you write. So without it, you can inadvertently establish a secure link with an attacker. If you need authentication (MITM protection), you need a non-standard system, as you write.&lt;/p&gt;
[quote user=""]Any reason not to go this route, or is there a better alternative for this problem?[/quote]
&lt;p&gt;It depends on several factors.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can you explain more about high this should work at a higher level? Please elaborate.
&lt;ul&gt;
&lt;li&gt;Should any two produced devices be able to pair, or will you pair two devices during production?&lt;/li&gt;
&lt;li&gt;If &lt;em&gt;any&lt;/em&gt; two devices; are the nRF devices connected to your public key infrastructure real-time somehow?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If just two devices, perhaps you could just generate a random LTK and program them with the bonding information during production? (Or provision them with each others public key for that matter, using that for your custom authentication).&lt;/li&gt;
&lt;/ul&gt;
[quote user=""]If x.509 certificates are used for initial authentication, should I still use the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;LE Secure Connections + Long Term Key (LTK)&lt;/i&gt;&amp;nbsp;standards for the subsequent encryption and any future bonding?[/quote]
&lt;p&gt;In any case, you have to use an LTK, which is the key that is used to encrypt the link. The difference between LE Secure Connections and legacy pairing (and OOB pairing) is how you obtain and exchange this key. If all you need is MITM protection (authenticity), then you could even to normal Just works LE Secure Connection pairing, and use your own method for authenticity on top of that. (Once the link is secured, communicate with the peer to see if he is the one you expected, using a challenge-response or some other mechanism).&lt;/p&gt;
&lt;p&gt;Summing up I find it difficult to give more specific advice without knowing more details about your use case. But it is definitely possible to provide authentication via a non-standard method such as a PKI or other. Which makes more sense depends on the requirements and limitations of the specific system.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>