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

nRF52 data Encryption

Hello Nordic team

I am working on nRF52832 dev board and I have a requirements to encrypt and decrypt data using AES-128 ECB. Could you please provide the example code or documentation how to encrypt and decrypt the data?

Any help will be appreciated.

Thanks

Raj

Parents Reply
  • Hi,

    Based on the function names, I assume you are basing your code on this tutorial. This function works on full blocks only, so you would have to pad and call multiple times to encrypt/decrypt more than 16 bytes. That is possible.

    Alternatively, you could use nrf_crypto to do the encryption/decryption as discussed before, which would give you are more complete API do the operations in one go, padding etc. as needed. This would not be in HW then, but that may not be a practical problem.

Children
Related