Bootloader for Protect Program Memory

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guys,
I do not have much more idea about AVR bootloader. I read some documents to protect my program code from reverse engineers. so some documents says I have to create bootloader to decrypt program data and want to interpret program data on the fly. Any body have idea about this. I am still searching some idea. If any body knows please share with me.

Thank you,
gopy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have run-able code in the chip then nothing can stop a determined thief to get your code. May cost them a bit of money but they can still get it.

Is your code that large and valuable to tempt anyone?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thankyou for your reply. Yes i feel to protect my code from hackers. because i spent lots of time to develop my code.this is my first product in embedded system.

I read some forums to re engineer code is very low cost. so i am afraid.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Any bootloader (even the encrypting one) is just an additional key for firmware thieves. If you're so paranoic about stealing your "valuable" code, just use the lock fuses to protect it from direct reading.

But I bet I am able to recreate the functionality of your device in just a couple of hours :D:D:D

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have to create bootloader to decrypt program data and want to interpret program data on the fly.

You mean something like Java Virtual Machine? You want to write your own interpreter and execute externally provided "code"?
You do not need to push it into small bootloader section, regular application section will do.
Could be done, but I am afraid will run deadly slow on AVR and requires RAM. But on the other hand this gives unlimited program space (with 2GB flash for example).

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well,
Thankyou for your valuable comments. I am using Top2005+ programmer. In this software i have security option, when i checked security option box i could not read my flash memory. is this good programmer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, you both are bad programmers :D:D:D

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MBedder wrote:
No, you both are bad programmers :D:D:D

If you are really good then give me some good ideas :D :D :D :D :D :D :D :D :D :D :D :D :D

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Blink a single LED first.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think gopy is asking about bootloaders where the data sent into it is encrypted (so cannot be reverse engineered or put directly into FLASH) and it has to decode it on-the-fly before programming. Are you gopy?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes Martin you are right.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But, as we have discussed here MANY times, if the code is so big and so expensive that someone is prepared to reverse engineer your product all they need to do is buy (or borrow) ONE ONLY of your product and crack open the chip (or pay someone a few hunderd dollars) and copy the code from the chip.

Have a look at the AppNote AVR231 - AES Bootloader

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi danni,
I refereed http://www.mikrocontroller.net/t...

I created a 1 wire diagram which they mentioned. when i try to connect sometime i am getting
21.12.10-16:18:44-038 > Connecting...
21.12.10-16:18:44-069 > Switch to 1-Wire mode
21.12.10-16:18:58-218 > ICOM: write error.

sometime

21.12.10-21:55:20-229 > Connecting...

Only.

My config is

.equ UseWDR = 1 ; set to 0/1 to de/activate WatchDog
.equ UseAutobaud = 0 ; set to 0/1 to de/activate Baudrate Detection
.equ UseVerify = 0 ; set to 0/1 to de/activate Verify FLASH Command, FLASH write/erase includes implicit verify, can be deactivated
.equ UseE2Write = 1 ; set to 0/1 to de/activate EEPROM Write Command
.equ UseE2Read = 1 ; set to 0/1 to de/activate EEPROM Read Command
.equ UseSRAM = 1 ; set to 0/1 to de/activate SRAM Commands
.equ UseCrypt = 1 ; set to 0/1 to de/activate cryptography
.equ UseCryptFLASH = 1 ; set to 0/1 to de/activate only use cryptography for writing to FLASH
.equ UseCryptE2 = 1 ; set to 0/1 to de/activate only use cryptography for writing to EEPROM
.equ UartInvert = 0 ; set to 1 to invert UART levels, for RS232 drivers such as MAX232

.equ RX_PORT = PORTD ; Receive Port and Pin
.equ RX = PD0
.equ TX_PORT = PORTD ; Transmit Port and Pin
.equ TX = PD0

.set XTAL = 16934400 ; only important for BootDelay if Autobaud is used
.set BootDelay = XTAL / 8 ;
.set BootBaudrate = 115200 ; only used if no Baudrate Detection activated, XTAL is important
.set BootVersion = 1 ; Version 1
.set BootCodeSize = 822 ; compile and set to value in [.cseg] Used, compile again.

Is there any problem.

Please help me.

Thankyou

greetings