Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Replace Oberon backend with uECC backend in LESC device app

In my project I use nRF52832 embedded in MuRata module. I have a BLE service with capabilities very similar to NUS service.

I've managed to add support for LESC + SEC_MITM to my BLE service while using the Oberon backend. I've also managed to build a working Secure Bootloader with OTA DFU using uECC library.

The projects are built with SEGGER Embedded Studio and nRF5 SDK.

The projects are built with nRF5 SDK 16.0.0

But I am struggling to replace the Oberon backend with the uECC backend.

While using the uECC backend I get the following errors while pairing:

<info> app: BLE UART started.
<info> app: Debug logging for UART over RTT started.
<info> app:
<*> Connected

<info> app: conn_sup_timeout = 72
<info> app: min_conn_interval = 24
<info> app: max_conn_interval = 24
<info> app: slave_latency = 0
<info> app: Data len is set to 0xF4(244)
<warning> nrf_ble_lesc: Creating invalid shared secret to make LESC fail.
<info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
<info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 136

Please help.

Parents
  • Hello,

    Please make sure you are building your project with these uECC_* flags like in the ecdh crypto example (/examples/crypto/nrf_crypto/ecdh)
    :

    The last symbol highlighted in read is the most important one. Without it, the nrf crypto library will assume the uECC backend is big endian like the others and cause computation of the shared secret to fail.

    Best regards,

    Vidar

Reply
  • Hello,

    Please make sure you are building your project with these uECC_* flags like in the ecdh crypto example (/examples/crypto/nrf_crypto/ecdh)
    :

    The last symbol highlighted in read is the most important one. Without it, the nrf crypto library will assume the uECC backend is big endian like the others and cause computation of the shared secret to fail.

    Best regards,

    Vidar

Children
Related