<?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 to implement ECC functions on SDK v12.3.0 and nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37035/how-to-implement-ecc-functions-on-sdk-v12-3-0-and-nrf51822</link><description>Hello all. 
 
 few years ago, I made some product using nRF51822 on SDK v10.0.0 
 currently, I have to software update to use ECC(Elliptic Curve Cryptography) function on same hardware. 
 To implement ECC functions, I found several information as below</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Aug 2018 00:46:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37035/how-to-implement-ecc-functions-on-sdk-v12-3-0-and-nrf51822" /><item><title>RE: How to implement ECC functions on SDK v12.3.0 and nRF51822</title><link>https://devzone.nordicsemi.com/thread/142479?ContentTypeID=1</link><pubDate>Thu, 02 Aug 2018 00:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84ad9250-bbc4-4254-aca6-69d7df25798a</guid><dc:creator>Ethan.jskim</dc:creator><description>&lt;p&gt;Very Thanks Einar.&lt;/p&gt;
&lt;p&gt;Your answer is very helpful to solve my problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement ECC functions on SDK v12.3.0 and nRF51822</title><link>https://devzone.nordicsemi.com/thread/142314?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 08:08:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51d159fe-18f0-41e7-b12a-a8ad046d7b00</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.whitepapers/dita/whitepapers/nwp_031/changes_sdk.html?cp=11_0_3"&gt;Relevant changes in nRF5 SDK v15.0.0&lt;/a&gt;&amp;nbsp;section in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.whitepapers/dita/whitepapers/nwp_031/intro.html?cp=11_0"&gt;nWP031 - Security Threat in Bluetooth LESC Pairing&lt;/a&gt;&amp;nbsp;describe the changes made for SDK 15, and you should do the same for older SDKs.&lt;/p&gt;
&lt;p&gt;Using the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/ble_sdk_app_multirole_lesc.html?cp=4_0_6_4_2_1_2"&gt;Experimental: BLE LE Secure Connections multirole example&lt;/a&gt;&amp;nbsp;from SDK 12.3 as a reference,&amp;nbsp;you should update the handling of the&amp;nbsp;&lt;code&gt;BLE_GAP_EVT_LESC_DHKEY_REQUEST&lt;/code&gt; request in main.c. There you should validate the remote peer public key and only calculate the shared secret if it is valid. If it is invalid, return a random shared secret to make pairing fail.&lt;/p&gt;
&lt;p&gt;I have made some modifications to the example main.c here, which uses&amp;nbsp;&lt;code&gt;uECC_valid_public_key()&lt;/code&gt; from micro-ecc via wrapper functions that I have added in the ECC interface module in the SDK (below).&lt;/p&gt;
&lt;p&gt;Diffs only:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-a8da554a38944a749b75ac4e427993e8/main.c.diff"&gt;devzone.nordicsemi.com/.../main.c.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-a8da554a38944a749b75ac4e427993e8/ecc.h.diff"&gt;devzone.nordicsemi.com/.../ecc.h.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-a8da554a38944a749b75ac4e427993e8/ecc.c.diff"&gt;devzone.nordicsemi.com/.../ecc.c.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Complete source files:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-a8da554a38944a749b75ac4e427993e8/lesc_5F00_fix.zip"&gt;devzone.nordicsemi.com/.../lesc_5F00_fix.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement ECC functions on SDK v12.3.0 and nRF51822</title><link>https://devzone.nordicsemi.com/thread/142279?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 02:55:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bde36bc-6297-4443-8184-4d31032d923c</guid><dc:creator>Ethan.jskim</dc:creator><description>&lt;p&gt;I found myself an answer to this question.&lt;/p&gt;
&lt;p&gt;I will close my&amp;nbsp;question by myself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>