<?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 preshared PIN/key auth</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2965/ble-preshared-pin-key-auth</link><description>Hi,
i&amp;#39;m developing an app for Android and iOS that needs to comunicate with a devices based on nRF51422 with S110 v7 loaded. 
 We want to encrpyt all comunication and enstablish a bond only between the app and our devices. 
 The device hasn&amp;#39;t a keyboard</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Mar 2015 20:47:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2965/ble-preshared-pin-key-auth" /><item><title>RE: BLE preshared PIN/key auth</title><link>https://devzone.nordicsemi.com/thread/11248?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2015 20:47:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5bb0cbb-a810-4eb9-a7ce-c47d907b898f</guid><dc:creator>bgun</dc:creator><description>&lt;p&gt;Hey, I&amp;#39;m working on a similar project, how did you managed to use the shared/generated key as the Temporary Key (TK) for the device? I am fairly new to BLE service creation and usage so I would greatly appreciate simple instructions, thanks in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE preshared PIN/key auth</title><link>https://devzone.nordicsemi.com/thread/11252?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2014 06:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6bda4ef-94c2-43f7-b243-1c1e4176234f</guid><dc:creator>P&amp;#229;l H&amp;#229;land</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/documentation/nrf51/6.0.0/s110/html/a00303.html"&gt;devzone.nordicsemi.com/.../a00303.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE preshared PIN/key auth</title><link>https://devzone.nordicsemi.com/thread/11251?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2014 03:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b2655c6-c112-4fc7-82d7-ea012e5d5158</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;enum BLE_GAP_OPTS
{
BLE_GAP_OPT_LOCAL_CONN_LATENCY  = BLE_GAP_OPT_BASE,    /&lt;strong&gt;&amp;lt; Local connection latency. */
BLE_GAP_OPT_PASSKEY,                                   /&lt;/strong&gt;&amp;lt; Set passkey to be used during pairing. This option can be used to make the SoftDevice use an application provided passkey instead of generating a random passkey.*/
BLE_GAP_OPT_PRIVACY,                                   /**&amp;lt; Set or get custom IRK or custom private address cycle interval. */
};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE preshared PIN/key auth</title><link>https://devzone.nordicsemi.com/thread/11250?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2014 08:11:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46ac7ff5-ca58-4e20-9fb5-fdfa54191829</guid><dc:creator>P&amp;#229;l H&amp;#229;land</dc:creator><description>&lt;p&gt;With the latest softdevice &lt;a href="http://www.nordicsemi.com/eng/Products/S110-SoftDevice-v7.0"&gt;www.nordicsemi.com/.../S110-SoftDevice-v7.0&lt;/a&gt; you will be able to set a static passkey.&lt;/p&gt;
&lt;p&gt;By using the API call sd_ble_opt_set() with the structure ble_gap_opt_passkey_t, then the passkey display event will come with the passkey you set.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE preshared PIN/key auth</title><link>https://devzone.nordicsemi.com/thread/11249?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2014 01:05:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09ebcf21-d374-427a-8d2a-4af1f847ab7b</guid><dc:creator>Emiliano Bonassi</dc:creator><description>&lt;p&gt;Very interesting discussion. You found a resourceful solution but I need something different.&lt;/p&gt;
&lt;p&gt;I need a static key written in my phone&amp;#39;s app and in the nRF51422 rom. I don&amp;#39;t have to change it in the future it will remain the same.&lt;/p&gt;
&lt;p&gt;Then I will use it as key to start an encrypted comunication between the device and the mobile phone.&lt;/p&gt;
&lt;p&gt;I know it is possibile to do that using Gap Peripheral Bonding: Passkey entry but the security is limited by the length of the pin. As I told you before, it can be a 4 or 6 digit number and a bruteforce attack is very easy.&lt;/p&gt;
&lt;p&gt;I hope I have explained my issue better.&lt;/p&gt;
&lt;p&gt;Anyway, I am going to evaluate your security scheme, the public/private key it&amp;#39;s a solution. I let you update on my progress.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE preshared PIN/key auth</title><link>https://devzone.nordicsemi.com/thread/11247?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2014 21:39:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e96cdbcb-1980-4835-b349-8fdf3eda6236</guid><dc:creator>Sai</dc:creator><description>&lt;p&gt;Did you look at my discussion with Ulrich here?
&lt;a href="https://devzone.nordicsemi.com/question/13156/writing-oob-pin-to-softdevice/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In my prototype, I used ECDH for shared key exchange and AES for encryption of heart rate data from the default heart rate service. It&amp;#39;s quite simple really, just drop in the nano-ecc and tiny-AES code into your GATT service and use it to generate shared keys and encrypt data.&lt;/p&gt;
&lt;p&gt;Of course, your app will have to know how to generate the same shared key using ECDH. Let me know if you want to talk more. I&amp;#39;m not a cryptographer and my interest in this was to build a PoC but I&amp;#39;d happy to help as best as I can.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>