A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
I'm trying to figure out a way to distribute software updates without the source code becoming public. I want to use a bootloader and two wire serial connection to the PC from the circuit board, so new software can be programmed into the flash memory easily. However, I'm not sure how to distribute the program to people without it "hanging in the breeze". Should I hash the hex file and rename it to a different file extension? I suppose I'd have to write a very specific pc "Update" program that would decrypt the file and then serially feed it to the circuit board. Is this a common thing to do? Any suggestions would be greatly appreciated. |
|
|
|
Just renaming the file is next to useless.
I guess there are several ways of securing the soft but it is quite obvious that it must be encrypted. And it must stay encrypted while it is transferred to the target, otherwise one could just tap into the serial link to get parts or the whole file in 'clear text'. Some time ago I made a encrypted system, consisting of the bootloader
and the accompanying windows program.
The basic algorithm is as follows:
That is the basic concept.
For data integrity I used CRC16 on transmissions in both directions...if
bootloader crc-check fails on a frame it
I made this system for PIC18, and the PIC18 series has very good code protection facilities. I'm not sure such a secure bootloader could be made for any of the other (lower) PIC series chips. tadaosystems wrote:
--
|