View previous topic :: View next topic |
Author |
Message |
Nick Guest
|
understanding the pic .hex file format |
Posted: Thu Jul 07, 2005 9:30 pm |
|
|
I'm adding a simple encryption to a boot loader.
":1000000010308A0000280000FF00030E8301A100C9"
is the first line of a hex file, can someone break down the line?
I figure it has the address, data, and a check sum value
also sometimes i see lines that start with :0 what are those?
":0A385000272C99008A01002800349B"
Thanks Nick |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: understanding the pic .hex file format |
Posted: Fri Jul 08, 2005 4:08 am |
|
|
Nick wrote: | I'm adding a simple encryption to a boot loader. |
If you are going to build simple encryption then one challenge you will have to work with is that the record format is "well known". Generally records are a fixed length - this gives an obvious clue to the record format. Certain records are constant such as type 4 records. When constant records occur it is relatively easy to break the encryption. You will effectively need to pad all records to the same length. You have to have a psuedo random pad otherwise type 4 records can be readily identified. Once these are identified then it becomes easier to determine the key to break the rest. The encryption algorithm has to be such that changing a single byte (such as would be the case of a minor code change) should result in the charge in a large number of records (ideally all records) without any obvious pattern. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Last edited by asmallri on Fri Jul 08, 2005 8:30 am; edited 1 time in total |
|
|
Nick Guest
|
|
Posted: Fri Jul 08, 2005 5:06 am |
|
|
1. Only encyrpt type 0 codes
2. Only encrypt the four digit hex- words and the checksum
those are going to be my rules.
example
non-enc
:1000000010308A0000280000FF00030E8301A100C9
enc
:10000000KFIJI4OI3KL409FKFKLEOI904983IO489390
so the format is not broken and can be programmed ;-)
Nick |
|
|
|