I'm using this bootloader that implements XTEA encryption for uploading an encrypted firmware to small MCU:
https://github.com/nyholku/diolan-plus2
the actual XTEA code is here:
https://github.com/nyholku/diolan-plus2/blob/master/fw/xtea.asm
It is not my code but to me it looks like it uses 16 byte key and 64 iterations and seems to be pretty much equivalent to the wikipedia XTEA C-implementation.
Now my questions is, is my encryption key safe if I publish my firmware both as plain object code i.e. plain text and encrypted?
The firmware size if max 48kB out of which several kilobytes at the end will be 0xFF.
How about if over the years I publish number of ( <50 ) such plain text / encrypted text pairs?
I've read from the interweb that this should be safe but because the subject is so complex I would like to make sure I don't make a rookie blunder.
XTEA_KEY
secret? It's going to be right in the bootloader. – fgrieu Jul 19 '17 at 20:09