<?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>Security of data passing in BLE communication</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51783/security-of-data-passing-in-ble-communication</link><description>Security of data passing in BLE communication Hello I am developing based on &amp;quot;multirole lesc&amp;quot; of BLE sample project. What is worrisome about the project is the &amp;quot;security_req_t&amp;quot; structure in &amp;quot;ble_srv_common.h&amp;quot;. I think that this structure is where security</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Sep 2019 11:38:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51783/security-of-data-passing-in-ble-communication" /><item><title>RE: Security of data passing in BLE communication</title><link>https://devzone.nordicsemi.com/thread/208901?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2019 11:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:486a5c4d-a871-4f9e-bbea-0321f0820de6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The security capabilities are set in peer manager init (pm_init)&amp;nbsp;using the defines (SEC_PARAM_BOND,..) shown in my previous reply.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Security of data passing in BLE communication</title><link>https://devzone.nordicsemi.com/thread/208781?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2019 04:48:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18c06e94-f573-4f9d-97fd-a2557318792d</guid><dc:creator>Kova</dc:creator><description>&lt;p&gt;Hello Vidar Berg.&lt;br /&gt;Sorry for the late reply.&lt;br /&gt;I do not know where GATT Central security settings are configured.&lt;br /&gt;If you do not mind, please teach me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Security of data passing in BLE communication</title><link>https://devzone.nordicsemi.com/thread/208199?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 11:47:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a303e599-1215-49d3-aecf-f7328403291c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The security levels should be applied to the characteristics you have on the GATT server. The security level of the link and the characteristics will then determine whether the client gets read/write access. It&amp;#39;s not uncommon to have some characteristics set with &amp;quot;open&amp;quot; while having others with a security level that requires bonding.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So if we use the&amp;nbsp;ble_app_hrs project as an example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    // Here the sec level for the Heart Rate Service can be changed/increased.
    hrs_init.hrm_cccd_wr_sec = SEC_OPEN;
    hrs_init.bsl_rd_sec      = SEC_OPEN;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here write access to the CCCD is set to open, so any connected client can enable notifications for this characteristic. And&amp;nbsp;let&amp;#39;s say we want to require just works bonding or pairing before notifications can be enabled. Then we need to changes it to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    // Here the sec level for the Heart Rate Service can be changed/increased.
    hrs_init.hrm_cccd_wr_sec = SEC_JUST_WORKS;
    hrs_init.bsl_rd_sec      = SEC_OPEN;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also note that the security level achieved through bonding will depend on the security capabilities of both the GAP central and GAP peripheral. Most of the examples are not set up to support MITM protection since it requires some kind of input or output (keyboard, display, etc) to the user.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Security parameters used for the bonding in the ble_app_hrs example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define SEC_PARAM_BOND                      1                                       /**&amp;lt; Perform bonding. */
#define SEC_PARAM_MITM                      0                                       /**&amp;lt; Man In The Middle protection not required. */
#define SEC_PARAM_LESC                      1                                       /**&amp;lt; LE Secure Connections enabled. */
#define SEC_PARAM_KEYPRESS                  0                                       /**&amp;lt; Keypress notifications not enabled. */
#define SEC_PARAM_IO_CAPABILITIES           BLE_GAP_IO_CAPS_NONE                    /**&amp;lt; No I/O capabilities. */
#define SEC_PARAM_OOB                       0                                       /**&amp;lt; Out Of Band data not available. */
#define SEC_PARAM_MIN_KEY_SIZE              7                                       /**&amp;lt; Minimum encryption key size. */
#define SEC_PARAM_MAX_KEY_SIZE              16                                      /**&amp;lt; Maximum encryption key size. */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>