otCryptoAesCcm() OpenThread crypto API not working after NCS 2.6 update.

Hi Nordic Team,

The OpenThread API function otCryptoAesCcm() is not working after updating to NCS v2.6.0.

Setting CONFIG_OPENTHREAD_NRF_SECURITY_CHOICE=y seems to be a workaround.

Any guidance how to get it working with the new PSA cryptography backend?

Thanks

Fränz

Parents
  • I just came across the same issue.

    Here is my setup.
    I have a border router running on raspberry pi and nrf52840 dev board.
    On my custom board I am running openthread as MTD. Every reset cycle MTD generates new random PSKd which is then manually entered on raspberry pi to initiate commissioning.

    Here's how I can consistently trigger this issue:
    1. MTD generates random PSKd
    2. initiate commissioning on border router with said PSKd
    3. MTD successfully joins Thread network
    4. As soon as MTD joins Thread immediately reset MTD through debugger running in VScode
    6. MTD gets reset
    7. MTD generates random PSKd
    8. initiate commissioning on border router with new PSKd
    9. Problem mentioned in OP appears

    The interesting thing is that once assert is triggered if I reset MTD and restart joining process then I can join on the next try. So its like every 2nd joiner try that crypto function asserts.
    I am using otInstanceErasePersistentInfo() function to clear thread network data from MTD.

    Any idea what the problem might be?


    Thank you for the workaround.

    EDIT:
    After more investigation the problem appears to be triggered when commissioner gets disabled and re-enabled on the border router.
    Seems that when new PSKd is entered and commission initiated it stops and disables the active commissioner before enabling it again. And at exactly this transition MTD device asserts in the function mentioned in OP.

  • Solution in my case was that instead of using otInstanceErasePersistentInfo() to erase network data from MTD I did:

        if (otDatasetIsCommissioned(ot_instance))
                otInstanceFactoryReset(ot_instance);


    This additionally causes device to reset after erasure.

Reply Children
No Data
Related