December 9th, 2014, 11:52 AM
Bootloader with firmware encryption
Hi guys, I need to develop a bootloader which supports firmware encryption (I plan to use AES CBC) and 'on the fly' writing to the flash. I'm handling a few options:
- divide the firmware in fixed size registers (like an s19) and encrypt them, including its addresses.
- divide the firmware in fixed size registers and encrypt them without their addresses.
- encrypt the whole firmware.
I would like to know how safe are which one of these options. I have some thoughts:
If I go with option 1, an attacker would know that every block contains an address which probabily would be equals to the previous one plus and offset. How much it compromises security?
If I choose option 2 the interrupt vector may cause me troubles. I could encrypt only data and code segments and leave the interrupt vector without encryption.
The third option seems safer to me but is more expensive to implement.
Any help would be appreciated. Thank you!