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

AES Encryption/Decryption nRF91 and the CRYPTOCELL

I was looking for more information about hardware accelerated AES128 functions in the nRF9160.  We want to encrypt and decrypt data using this and was wondering if there are API's or examples using hardware accelerated features of the nRF91. 

A search of the forum lists information for the nrf52 line. 

A search of the infocenter for nrf91 just shows you the block for the CRYPTOCELL.

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf9160%2Fcryptocell.html&resultof=%22%41%45%53%22%20%22%61%65%22%20

Anyone have any sample projects or function call references that would point me in the right direction?

Thanks!

  • Hi,

    There are no examples specifically for the CC310 peripheral in nRF91 in nRF Connect SDK. However, it is supported, though the SW support lacks a bit in maturity. The CC310 should be used with mbed TLS as a frontend, via nrf_cc310_mbedcrypto (documentation here).

  • Hi Einar, I'm also interested in how to use CC310 from NRF52840. However, by checking the documentation you mentioned,  it is suggested to use `Nordic security module` instead of c310_mbedcrypto directly. Do you have any example showing how to use the module for a simple application, such as going through app configuration,  initialization, using several functions, and de-initialization?  I found the boot loader library in `nrf/subsys/bootloader` is using cc310 but it doesn't decently demonstrate how to use the APIs from Nordic Security module. So, any samples showing how to use the module will be much appreciated. 

    Thank you! 

  • Hi,

    Please note that the nRF52 series is not officially supported in the nRF Connect SDK today.

    The bootloader does not currently use the nrf_security module since that would increase the size, and we try to keep the bootloader size down. We are planning to add an example for using nrf_security along with improved documentation in the future, but it might take some time.

  • By reading the internal code, I didn't see the sdk excludes NRF52840 from being supported. Also, I tried a very simple sha256 hash example with mbedtls as the front-end and it works on NRF52840. So, I can assume the sdk still works  for NRF52840 even though it doesn't get technical support, right? 

    Another way I can imagine is directly to use the crypto component from NRF52 sdk. However, I'm not sure if that component is independent from Soft Device since I'm using zephyr as the operating system for the device. Can you confirm if the crypto component is an independent one which doesn't need soft device? 

    Thank you! 

  • Hi,

    I suggest you look at this pull request which has low-level crypto tests to see how to use the low-level API, which should show you how to do SHA256 etc.

    Regarding the crypto components from the nRF5 SDK, these do not have any dependencies to the SoftDevice. However,  there may be some issues using it together with Zephyr, since that is not tested.

    You are right that there is support for nRF52840 in nRF Connect SDK and Zephyr, my point was just that it is not currently officially supported. So you should not make any assumptions about the quality etc.

Related