AES128 Encryption Library

I am using my nRF52833 chip to send 20 bytes beacons frequently. 

I want to encrypt the initial 16bits of my data using AES128. 

What is the library to use for this purpose? How to include the initialization vector and encryption key? 

Thanks

Parents Reply Children
  • Thanks Vidar. I do encryption of first 16bytes of data in my beacon every 10 sec and send the beacon. 

    I read somewhere that the encryption speed on a computer CPU typically is in order of Gb per sec. What is the clock frequency of internal CPU in nRF52833 so that I can scale this number. I use external crystal at 32.7k Hz on XL1 and XL2 pins.  

  • The CPU frequency is 64 MHz, but the processing speed does not scale linearly with that. Desktop CPUs have different instruction sets, and most, if not all, come with HW accelerated AES support - similar to how we have dedicated AES peripherals encrypting Bluetooth connections on our chips. The processing time will also depend on how optimized the AES library is.

    The most accurate way to determine the additional power usage in your case is to actually measure it on the device with a Power Profiler Kit II or similar tool. Alternatively, you can time the AES execution time with a TIMER or the CPU cycle counter and multiply that by the typical CPU current.

Related