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

AES encryption and decryption code for nRF5340

Hi ,

nRF5340 has hardware support with AES CCM mode encryption. As per product specification document AES - CCM is in built in nRF5340 SoC.

I did not find sample code or driver code in nRF connect SDK for AES. 

please help me , To find out AES CCM register configuration sample/example code for my testing purpose.

Regards,

Srinivas Rao.

Parents
  • Hi,

    The AES CCM peripheral is specifically tailor made for use with BLE. It is possible to use it for other purposes, but it is in most cases more sensible to use CryptoCell CC312 for that. Then you need to use the APIs we provide. There are no simple examples demonstrating that but you can refer to the crypto tests. If you want to use the CCM peripheral non the less, then you can refer to this post (principle is the same as for earlier nRF5 devices). If you want to use the AES CCM peripheral then there is no official example but you may find this one useful.

  • In nRF5340 product specification, Application core having support for  AES-128 and 256: ECB, CBC, CMAC/CBC-MAC, CTR, CCM/CCM*, GCM. I am able to only enable register in cryptcell 312 sub system. I am not able to see any configuration registers for crytocell 312 sub system. how can I enable AES 256 mode from cryptocell 312 subsystem.

  • Hi,

    The CryptoCell peripheral must be used via a SW library and not directly. In the future the APIs will be TF-M based, but for now mbed TLS API's are used via the nrf security library. There are not a lot of examples, but the test code I linked to in my previous answer (which is part of the nRF Connect SDK) demonstrates how you can use it with different "backends", including CryptoCell (CC3xx).

Reply Children
No Data
Related