Thread SDK provides a precompiled version of hardware-accelerated mbedTLS libary (libmbedcrypto.a
) utilizing the ARM CryptoCell technology, which can be used with OpenThread. For more information, see CryptoCell library.
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 contex as OpenThread (main contex 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.
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
<InstallFolder>/components/thread/experimental/crypto/nrf52_armgcc/armgcc
folder.make
to build the library.libmbedcrypto.a
library into the OpenThread folder: <InstallFolder>/external/openthread/lib/gcc
.mbedTLS library for IAR
<InstallFolder>/components/thread/experimental/crypto/nrf52_iar/armgcc
folder.make
to build the library.libmbedcrypto.a
library into the OpenThread folder: <InstallFolder>/external/openthread/lib/iar
.