<?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>LE Secure key generation performance</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81812/le-secure-key-generation-performance</link><description>We have noticed that generating LE Secure keys [ nrf_ble_lesc_keypair_generate() ] takes 2.5s. That causes our external, 1s watchdog to trigger. Is there any way to improve performance of the key generation? 
 Thanks, 
 J</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Nov 2021 20:24:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81812/le-secure-key-generation-performance" /><item><title>RE: LE Secure key generation performance</title><link>https://devzone.nordicsemi.com/thread/340199?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 20:24:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3c1187d-4ea2-49a5-a819-353a55d036fb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Ah, I never thought to test&amp;nbsp;without&amp;nbsp;optimization. Oberon is distributed as a prebuilt binary, so in that case it will always be built with optimization (by us) regardless of how you build your app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Secure key generation performance</title><link>https://devzone.nordicsemi.com/thread/340185?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 17:49:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78fe0c15-a915-4b29-aa58-5adfe9b346b4</guid><dc:creator>JZone</dc:creator><description>&lt;p&gt;We use&amp;nbsp;MBED-TLS &amp;ndash; Optimization level 0&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After switching to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Oberon &amp;ndash; Optimization &amp;nbsp;0/1&amp;nbsp;we are down to&amp;nbsp;~45ms&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Secure key generation performance</title><link>https://devzone.nordicsemi.com/thread/339406?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 11:38:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9596ca0-3ee5-4e1d-ab9e-bafdca91b28e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That is not expected. I tested the ble_app_hrs with a nRF52 DK in SDK 17.1.0 and toggled a GPIO before and after the call to&amp;nbsp;nrf_ble_lesc_keypair_generate() in&amp;nbsp;nrf_ble_lesc_init() in&amp;nbsp;components\ble\peer_manager\nrf_ble_lesc.c. With the default configuration this took 25 ms. To experiment I also chagned&amp;nbsp;NRF_CRYPTO_BACKEND_NRF_HW_RNG_MBEDTLS_CTR_DRBG_ENABLED to 0 in sdk_config.h to see if that could explain what you saw, but that just increased the time to 44 ms.&lt;/p&gt;
&lt;p&gt;How have you verified that this takes 2.5s? Which nrf_crypto backend do you use? Could there be other things happening here as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>