nRF5 SDK for Thread v0.11.0
ARM CryptoCell support

Thread SDK provides a precompiled version of hardware-accelerated mbedTLS libary (libmbedcrypto-cc310.a) utilizing the ARM CryptoCell technology, which can be used with OpenThread. For more information, see CryptoCell library.

Note
The library available in OpenThread repository does not support hardware acceleration. You can still use it, but the commissioning procedure takes more time in such case (see table for comparison). For the best performance, use the library provided with the SDK.
Version Commissioning (with Network Discovery) DTLS Handshake
Without CryptoCell 37,76 s 32,88 s
With CryptoCell 6,31 s 1,51 s

CryptoCell library is utilized by OpenThread to accelerate cryptographic operations (AES-EBC, ECJ-PAKE, and SHA256) in mbedTLS library. Application can still use it when called from the same context as OpenThread (main context in bare-metal applications, or the same thread in RTOS apllications). Keep in mind that the current version of CryptoCell library is not thread-safe and thus it should not be used from multiple threads or interrupt service routines.

Building mbedTLS library with CryptoCell support

If you want to update the mbedTLS library with CryptoCell support, for example when OpenThread updates the mbedTLS version it uses, you can build the new library within SDK.

To build the new library, manually update the mbedTLS source files in <InstallFolder>/external/mbedtls and perform the following steps:

mbedTLS library for GCC

  1. Navigate to the <InstallFolder>/components/thread/experimental/crypto/nrf52_armgcc/armgcc folder.
  2. Run make to build the library.
  3. Copy the libmbedcrypto-cc310.a library into the OpenThread folder: <InstallFolder>/external/openthread/lib/gcc.

mbedTLS library for IAR

  1. Navigate to the <InstallFolder>/components/thread/experimental/crypto folder.
  2. Open the IAR workspace.
  3. Build the library.
  4. Copy the libmbedcrypto-cc310.a library into the OpenThread folder: <InstallFolder>/external/openthread/lib/iar.
Note
CryptoCell and mbedTLS libraries for IAR Embedded Workbench were built and tested with IAR 7.80.4, which uses 2-byte wchar_t type. Since version 8.10, IAR uses 4-byte wchar_t type, and thus the libraries provided are not compatible with this version.

mbedTLS library for Keil 5

  1. Navigate to the <InstallFolder>/components/thread/experimental/crypto/nrf52_keil/arm5_no_packs folder.
  2. Open the Keil 5 project.
  3. Build the library.
  4. Copy the libmbedcrypto-cc310.lib library into the OpenThread folder: <InstallFolder>/external/openthread/lib/keil.

mbedTLS library for SES

SEGGER Embedded Studio uses GCC libraries. Therefore, you must follow the steps from the GCC section.


Documentation feedback | Developer Zone | Subscribe | Updated