<?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>How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7307/how-can-i-handle-passkey-verification-myself</link><description>I understand that it is possible to set a static passkey on the nRF51822. 
 However, what I would like to do is handle the verification of the user-entered passkey myself. 
 Essentially, I&amp;#39;d like to have multiple passkeys stored and associated with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 May 2015 15:21:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7307/how-can-i-handle-passkey-verification-myself" /><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25852?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 15:21:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aac51e7e-2438-4536-b764-39812df623e1</guid><dc:creator>Drew</dc:creator><description>&lt;p&gt;@hungwui:&lt;/p&gt;
&lt;p&gt;Thank you so much for that explanation. I appreciate it.&lt;/p&gt;
&lt;p&gt;Unfortunately, neither Android nor iOS allow the use of NFC for an out-of-band LTK exchange.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25851?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 14:37:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:007e60f5-bac3-4732-8787-cf0d109e2e24</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Drew: The issue with your approach of having flexibile passkeys is that by spec the passkey (or the TK) must be defined before the 2 devices exchange Mconfirm and Sconfirm to be able to generate the STK. There is actually no exchange of the passkey between 2 devices. So it&amp;#39;s not possible for the initiating device to know in advance which passkey will be enterred to be able to generate the Mconfirm accordingly.
In short, by spec, phase 2 of bonding only possible if both of the devices know the correct single passkey in advance before the process starts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To avoid MITM, there currently only 2 options: passkey and OOB (e.g NFC), some of the Android phones does have NFC. New iPhone has NFC but I think it&amp;#39;s restricted to Apple Pay, for now.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25850?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 16:05:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:020b0f60-a906-4525-bcdb-739990286f40</guid><dc:creator>Drew</dc:creator><description>&lt;p&gt;@hungbui:&lt;/p&gt;
&lt;p&gt;Very funny ;) I could make sure each user&amp;#39;s key is randomly generated, too, though, and my solution would remain in spec.&lt;/p&gt;
&lt;p&gt;When used with Android and iOS, is there any method for the nRF51822 to create a bond that &lt;em&gt;isn&amp;#39;t&lt;/em&gt; vulnerable to MITM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25849?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 15:54:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04fe7870-5f2a-4dff-88e5-84ca4da950c0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Well, it&amp;#39;s followed the spec as long as the passkey is randomly generated. So it&amp;#39;s up to the application to make sure the key(s) is generated randomly :)&lt;/p&gt;
&lt;p&gt;What else you can do is to have your layer of verification before the BLE bonding. So that you would reject any bonding request as long as the correct key hasn&amp;#39;t been entered. After that you can use JustWork for bonding. This way the end customer only have to type passcode once.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s true that the link is not encrypted when you type the passkey, but the BLE Passkey MITM mechanism is also vulnerable to eavesdropping as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25848?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 15:09:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10e81e6e-cf63-4a44-9ce8-49bfdd7833c9</guid><dc:creator>Drew</dc:creator><description>&lt;p&gt;@hungbui:&lt;/p&gt;
&lt;p&gt;My device doesn&amp;#39;t have a display or keyboard, so using a random passkey is out of the question. I could set a static passkey and have that distributed to users of each device, but that will cause the user to have to go through multiple passkey entry screens and will likely be jarring and confusing.&lt;/p&gt;
&lt;p&gt;Static passkeys are outside of the Bluetooth spec, too: why has Nordic implemented &lt;em&gt;that&lt;/em&gt; feature?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25847?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 14:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8e8c6f7-ff9f-4cfd-8f89-be44cd3cf87d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Drew: What I meant was to leave the current (randome) passkey as it is now. And use another passkey for the extra verification layer after you bond.&lt;/p&gt;
&lt;p&gt;The softdevice is provided as a pre-compiled stack and is not possible to modify. Moreover, any change that&amp;#39;s outsite of the spec, will make the stack non-compliant with Bluetooth spec =&amp;gt; not compaible with off the shelf phones.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25846?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 14:40:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cdf0f47-8271-4846-99ae-8a57ae6d3689</guid><dc:creator>Drew</dc:creator><description>&lt;p&gt;@hungbui:&lt;/p&gt;
&lt;p&gt;Thank you for your prompt response.&lt;/p&gt;
&lt;p&gt;If I were to do passkey handling as an additional layer, I would lose MITM protection. Additionally, I would have to write custom UI code for every central for inputting a PIN. This is an extremely inferior way of doing things.&lt;/p&gt;
&lt;p&gt;How can I modify the SoftDevice to allow me to handle passkey verification?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I handle passkey verification myself?</title><link>https://devzone.nordicsemi.com/thread/25845?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 14:12:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cce2f08-9486-47e3-ae42-62052be6fe01</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Drew: passkey is used as Short Term Key and by default it&amp;#39;s not to be used as the index for stored bonding data (the Long Term Key).
I assume that you want to give the flexibility that the user can have one specific passkey and can use it when bonding. The nRF51 will recorgnize the passkey and match it with the bond data base and update bond information if the user has been bonded before.&lt;/p&gt;
&lt;p&gt;This is not what supported in the stack or by Bluetooth Spec.&lt;/p&gt;
&lt;p&gt;If you want to implement smth like this, I would suggest you to implement one extra layer of verification in the application. Let say after you&amp;#39;re connected and bonded, you can send an extra passkey to activate, or to update bonding.&lt;/p&gt;
&lt;p&gt;So for example you have the code 1234 and you lost your phone. When you have a new phone, you can connect bond as a new central. However you can send the code 1234 to tell the phone that you want to remove the old bonding information and update it with the current bond.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>