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

How to use CryptoCell310 with nRF Connect SDK

Hi there,

the nRF58240 SoC supports a wide range of hardware-accelerated cryptography features using ARM's CryptoCell310. However, I'm unable to use many of the features with the nRF Connect SDK. The samples included in the the official documentation don't use any of the code prefixed with `CRYS_` in contrast to the nRF5 SDK. I need to use the functions previously defined in:

#include <crys_srp.h>
#include <crys_rnd.h>
#include <crys_hkdf.h>
#include <crys_ec_edw_api.h>

They also don't seem to be available in nrfxlib. Any help would be most welcome.

Parents
  • Thanks again for the pointers, however, I'm still unable to use the SRP functionality (on systems using CC310). In particular, the function mbedtls_srp_init requires a reference to a CCRndContext_t but there doesn't seem to be a way to initialize it. You mentioned about a year ago here that the SW support for this was incomplete. Using the nRF5 SDK, it was possible to initialize the context with a call to SaSi_LibInit. The CC312 runtime provides a similar way by using a call to CC_LibInit. I presume there must be a way to achieve this for CC310 systems. Is there an update on this situation?

  • Thanks, it would be great to make this work somehow. Else, we'd have to resort to using the nRF5 SDK (which is a ton of work). Doing a simple grep search for CC_LibInit I've noticed that there are matches in the static CC310 libraries, e.g. ./nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/soft-float/libnrf_cc310_platform_0.9.13.a which leads me to believe that 1) either this function is invoked as part of some platform initialization routine or 2) the implementation exists but the respective header files are missing from the NCS. Either way, it would be great if you could figure out a solution and let me know.

Reply
  • Thanks, it would be great to make this work somehow. Else, we'd have to resort to using the nRF5 SDK (which is a ton of work). Doing a simple grep search for CC_LibInit I've noticed that there are matches in the static CC310 libraries, e.g. ./nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/soft-float/libnrf_cc310_platform_0.9.13.a which leads me to believe that 1) either this function is invoked as part of some platform initialization routine or 2) the implementation exists but the respective header files are missing from the NCS. Either way, it would be great if you could figure out a solution and let me know.

Children
Related