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

Struggling with crypto examples

Hi,

I'm trying to familiarise myself with the available crypto functionality on the 52811 and have managed to get basic AES-128 block encryption working using the ECB peripheral. So far so good, but as I can't do decryption using the ECB, I now need to face the music and try to understand how to use the CCM peripheral by looking at the examples. Unfortunately I can't get any of them to build - I keep getting an error about the external micro_ecc_lib_nrf52.a  not being found. I'm guessing I have to build this, but this doesn't seem to be stated anywhere - the instructions for the examples are 'compile and program'. My questions:

1. Why is decryption functionality not included in the ECB?

2. The crypto examples seem to pull in every possible backend and an inordinate number of extra files. I don't know where to start to add basic encryption & decryption to my project. Is there any guidance for getting a basic AES decryption working?

3. Am I correct in thinking that there is no driver for the CCM? I can only see the HAL file and the libraries.

3. Do I need to build all external backends, and if so why?

All feedback appreciated. Thanks.

Pete

  • Hi Peter, 

    I keep getting an error about the external micro_ecc_lib_nrf52.a  not being found. I'm guessing I have to build this, but this doesn't seem to be stated anywhere - the instructions for the examples are 'compile and program'.

     Please see the Installing micro-ecc documentation. 

    1. Why is decryption functionality not included in the ECB?

     Please see this post

     

    2. The crypto examples seem to pull in every possible backend and an inordinate number of extra files. I don't know where to start to add basic encryption & decryption to my project. Is there any guidance for getting a basic AES decryption working?

     Please see AES Example and its sdk_config.h.

     

    3. Am I correct in thinking that there is no driver for the CCM? I can only see the HAL file and the libraries.

     Yes, only the AES CCM HAL.

     

    3. Do I need to build all external backends, and if so why?

     No, see the Configuring nrf_crypto frontend and backends documentation. 

     The support staff is reduced during the summer holidays, and you may experience delayed answers.

    -Amanda H.

  • Thanks for the reply. I've managed to get the CCM module working and have been able to test encryption/decryption with this, which was all I was looking for at this point. I thought there would be some simple examples for the ECB and CCM peripherals (without using backends) but there doesn't seem to be, but I found the one that Torbjørn did a few years, ago, which really helped.

    Pete

Related