Search code examples
cencryptioncryptographyembeddedavr

Symmetric encryption algorithm for embedded system


Looking for recommendations and some reference code for encrypting byte array in C. The problem is that I have to fit into 1KByte memory along with other routines and MCU is only 8MHz. So the size and speed is the key. I've checked Rijndael but it has huge tables for my MCU. Basically I am going to encrypt intel hex format on PC, probably only data area, then decrypt in MCU.

Using dynamic memory allocation routines is not desirable.

My google search brings me all to C# implementations, using libraries.

UPDATE:

decryption side constraints:

RAM: 512 byte
MAX code size: 512-1024 words
CPU: 8 bit, 8MHz

Solution

  • A very simple encryption algorithm that I saw being used in the embedded world is XXTEA