<?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_app_uart example with encryption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62010/ble_app_uart-example-with-encryption</link><description>Hi, 
 I use proprietary service to transmit data between raspberry pi and nRF52840 DK. The example I referred to is below. 
 C:\nRF5_SDK_16.0.0_98a08e2\examples\ble_peripheral\ble_app_uart\pca10056\s140\arm5_no_packs 
 I need the data be encrypted with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Jun 2020 12:27:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62010/ble_app_uart-example-with-encryption" /><item><title>RE: ble_app_uart example with encryption</title><link>https://devzone.nordicsemi.com/thread/252995?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 12:27:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfdeb153-29fb-4029-8a72-421eb09938c4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Deeper"]According to my understanding，maybe the crypto frontend and backend should also be included to support encryption.&amp;nbsp;&amp;nbsp;Is my understanding correct?&amp;nbsp;[/quote]
&lt;p&gt;Yes, but that does not require any specific code changes in your code since it is all handled by the peer manager. But you need to add nrf_crypto files and include, in the same way as you need to add other libraries that are used by the peer manager.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart example with encryption</title><link>https://devzone.nordicsemi.com/thread/252793?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 14:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:199cdcc5-f9b4-497d-a430-3d7adc31a322</guid><dc:creator>Deeper</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your kindly help. According to your suggestions, there are at least two adjustments should be done:&lt;/p&gt;
&lt;p&gt;1. Include the peer mannager.&lt;/p&gt;
&lt;p&gt;2. adjust the security configuration for&amp;nbsp;&lt;span&gt;characteristics.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. modify the &amp;#39;sdk_config.h&amp;#39; file to enable these changes.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;According to my understanding，maybe the crypto frontend and backend should also be included to support encryption.&amp;nbsp;&amp;nbsp;Is my understanding correct?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;look forward to your reply.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart example with encryption</title><link>https://devzone.nordicsemi.com/thread/252782?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 14:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7753d8e6-2fbe-4fd3-9fec-9e7cc083a246</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]&lt;span&gt;1.&amp;nbsp;&lt;/span&gt;How can I modify the source code to enable encryption with Just Work.[/quote]
&lt;p&gt;You should refer to an example that includes the peer manager&amp;nbsp;and implement support for pairing/bonding as done there. You should also reference the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_peer_manager.html"&gt;peer manager documentation&lt;/a&gt; for that. Lastly, you must adjust the security configuration for the characteristics that you want to protect, so that they are only readable/writable when paired. You can for instance refer to the HRS example (ble_app_hrs), but to require pairing you would set&amp;nbsp;hrs_init.hrm_cccd_wr_sec to&amp;nbsp;SEC_JUST_WORKS instead of SEC_OPEN.&lt;/p&gt;
[quote user=""]2. If modified, shall UART apps need to modify, too?[/quote]
&lt;p&gt;What do you mean? The application needs to be adjusted to use the Peer manager library as described above. But if you refer to apps on a phone, then most likely not, depending on the app. Most of the pairing/bonding is handled by the OS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>