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

Need Help on Encryption in Beacon Advertising data

Hi,

I want to transmit adv. data AES encrypted everytime. The Basic requirement is to do Encryption with Stream Cipher (Counter Mode) so i want to know when and where to do encryption everytime beacon transmits new frame in the Example code ( I have nRF51822 Beacon Dev Kit and its Source code).

  • Hi Spatel,

    I suggest that you take a look at this blog post about using the ECB(Electronic CodeBook) peripheral to encrypt data.

    As for the where and when, you will have to encrypt the advertisment data(i.e. manuf_specific_data) before calling ble_advdata_set(). Everytime you want to change the the data you will have to encrypt the new data and then call ble_advdata_set().

    -Bjørn