LE Secure key generation performance

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

Parents
  • Hi,

    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 nrf_ble_lesc_keypair_generate() in nrf_ble_lesc_init() in components\ble\peer_manager\nrf_ble_lesc.c. With the default configuration this took 25 ms. To experiment I also chagned 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.

    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?

Reply
  • Hi,

    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 nrf_ble_lesc_keypair_generate() in nrf_ble_lesc_init() in components\ble\peer_manager\nrf_ble_lesc.c. With the default configuration this took 25 ms. To experiment I also chagned 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.

    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?

Children
No Data
Related