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

Using HW AES CCM module with zephyr OS

Hi,

I am experimenting with zephyr OS on my nrf52 DK. I want to use the HW AES CCM encryption module available on the board, but I can't figure out how to do this with zephyr. In my mind, there should be crypto functions which are performed in HW if there is a module available and otherwise realized in SW. Is this even possible with zephyr OS or does one have to use the nrf SDK? If it is possible, I would really appreciate a reference to the CONFIGs I have to make and the function API I can use. 

Kind regards,

Marco

  • Hi,

    The AES CCM peripheral is used for encrypting/decrypting Bluetooth traffic, so if you have a Bluetooth application then using it for other purposes may not be straight forward. Also, since it was designed for a single purpose, it is not very flexible. If you don't use it for Bluetooth or anything else, then you can use it in the same way as you do in the nRF5 SDK (without SoftDevice), by accessing the registers as described in the product specification. I suggest you look at the HAL (nrf_ccm.h) and use that. You can refer to Zephyr BLE LL HAL for Nordic for an example of how it is used there (radio.c). 

  • Hi, 

    thank you for your quick reply. I am not using it for Bluetooth communication, so this shouldn't be the problem. I want to build an application with zephyr, which I can easily run on multiple architectures without changing the code. I am using SW crypto libraries right now, but would of course like to use HW accelerators, if they are available. But it looks like this is not yet possible with zephyr, so I will either stick to SW crypto or write a crypto wrapper for every device I use with the architecture specific calls.

Related