Electronic – AVR – NRF24L01+ : Encrypt Data Transmission

avrencryption

I have a pair of AVR's that communicate over the 2.4GHz link using NRF24l01+. The payload sent is 5 bytes long.

Right now the payload sent is in clear format so that anyone with enough knowledge and skill could theoretically build a device to intercept the data stream.

Can you please provide me with some recommendations on ways to encrypt this data stream considering it would be implemented on a 8 bit AVR (small code size) and would be done real time (so should be fast).

Thanks!

Best Answer

XXTEA, Keeloq, TEA are suitable encryption algorithms for microcontrollers with small amount of RAM.

If the data are usually constant you will have to use a rolling code method to prevent replay attack.