Other Parts Discussed in Thread: SHA-256
I have a very basic understanding of the C2000's CSM, we're planning on using a OTP bootloader to do upgrades in the field.
The problem I'm facing is that
1) The Flash API in ROM is considered insecure, so it cannot be used to flash a secure device
2) This necessitates sending the Flash API another way (over the serial port, etc) into secure SARAM with help from the OTP bootloader and then executing it, as discussed here:
http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/170158.aspx?pi303962=1
So how do I go about validating that what is being sent is really the Flash API and not some nefarious code designed to dump the contents of flash back out to the serial port? I somehow doubt an SHA-256 signing algorithm is going to fit in the OTP flash space...
Along the same lines, we'd like to encrypt the actual firmware such that only the OTP can decode it right before flashing. A basic symmetric encryption algorithm would probably suffice, since OTP is considered secure the decryption key could be hard-coded.
Thoughts?