This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

OpenThread + DTLS + nrf_crypto question(s)

The current problem:

Has anyone else experienced that doing nrf_crypto_init() before a (certificate-based) DTLS handshake messes up something with OpenThead, and prevents the handshake from happening? Any pointers for solutions? For us this is true also if we do nrf_crypto_uninit(), which makes it a hard problem to overcome.

Another crypto question:

Is it correct to assume that using the software-only version of mbedtls, through libmbedcrypto.a, there is no way to generate random numbers? It seems both the CC310 and the nRF HW RNG peripheral collides with the use of libmbedcrypto.a.

Some more background:

We have a project where we are programming a nrf52840 to use OpenThread and nRF SDK for Thread and Zigbee (4.1.0). It connects to and through a OT Border Router running on a raspberry pi, with a zolertia firefly as radio stick. On the border router we run a test server based on the example libcoap server.

We were not able to use the included hardware versions of the , so we were given the helpful suggestion to swap in libmbedcrypto.a instead. This partially solved the handshake issue, but, among other issues, caused a lack of random numbers instead.

Parents
  • Update / follow up / related question:

    I'm still having problems with the RNG: an alternative error when I try to include the nRF HW RNG is the following:

    components/libraries/crypto/nrf_crypto_rng.c
    requires 
    components/libraries/crypto/backend/nrf_hw/nrf_hw_backend_rng.c
    which requires
    integration/nrfx/legacy/nrf_drv_rng.c 
    which requires
    modules/nrfx/drivers/src/nrfx_rng.c

    which give the following interesting compile error:

    ../../../lib/openthread/libopenthread-nrf52840-sdk.a(libopenthread_nrf52840_sdk_a-entropy.o): In function `nrf_rng_event_get':
    .. ../third_party/NordicSemiconductor/nrfx/hal/nrf_rng.h:215: multiple definition of `RNG_IRQHandler'

    build/app/nrfx_rng.c.o:/home/ubuntu/nRF5_SDK/modules/nrfx/hal/nrf_rng.h:215: first defined here

    --

    Anyone seen and solved this, or have suggestions?

Reply
  • Update / follow up / related question:

    I'm still having problems with the RNG: an alternative error when I try to include the nRF HW RNG is the following:

    components/libraries/crypto/nrf_crypto_rng.c
    requires 
    components/libraries/crypto/backend/nrf_hw/nrf_hw_backend_rng.c
    which requires
    integration/nrfx/legacy/nrf_drv_rng.c 
    which requires
    modules/nrfx/drivers/src/nrfx_rng.c

    which give the following interesting compile error:

    ../../../lib/openthread/libopenthread-nrf52840-sdk.a(libopenthread_nrf52840_sdk_a-entropy.o): In function `nrf_rng_event_get':
    .. ../third_party/NordicSemiconductor/nrfx/hal/nrf_rng.h:215: multiple definition of `RNG_IRQHandler'

    build/app/nrfx_rng.c.o:/home/ubuntu/nRF5_SDK/modules/nrfx/hal/nrf_rng.h:215: first defined here

    --

    Anyone seen and solved this, or have suggestions?

Children
Related