Go Down

Topic: Arduino code safety (Read 569 times) previous topic - next topic

Danish_Javed

I am making a commercial product in transportation field and my product contains two arduinos (mega and uno) in my design box with few other components. Is there any way to make my code safe from outsiders because my box would be installed on the road and anybody can take my code??

plx help

PaulS

Quote
and anybody can take my code??
Anyone with knowledge of the devices in the box (that should be locked), and the right hardware, can get the hex file that is uploaded. What they can do with the hex file is very limited. Converting the hex file to code is like converting an omelet to eggs.

Danish_Javed

The problem is even though my box would be locked but my competitors are strong enough to open that box and check the components. The only thing which i wants to safe is my code. Is there anything which evaporates the code so that even the developer cant get back the code again once its uploaded on the arduino.

PaulS

Quote
Is there anything which evaporates the code so that even the developer cant get back the code again once its uploaded on the arduino.
You could look at the bootloader that loads a sketch from an SD card. Have just one useless sketch on the SD card. Set it up so that opening the box triggers the bootloader to load the new sketch.

Personally, I think you are worrying about nothing. Look up the AVRDUDE commands needed to extract a hex file from the Arduino. Take a look at the hex file. See if you can do anything with it.

Danish_Javed

What if the main supply is cutoff before opening the box?? The arduino wont be able to load new sketch from the SD card.

PaulS

Quote
What if the main supply is cutoff before opening the box??
Battery backup?

pYro_65

What if the main supply is cutoff before opening the box?? The arduino wont be able to load new sketch from the SD card.
Thermite and a starter which does not require a battery?
https://forum.arduino.cc/index.php?action=dlattach;topic=327736.0;attach=128670 New EEPROM library released

Robin2

The only thing which i wants to safe is my code
The Arduino is an OpenSource system.

The easiest way to make your code completely safe is to publish it. Then you can sleep nights.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

kowalski

#8
Jan 04, 2016, 04:26 pm Last Edit: Jan 04, 2016, 04:27 pm by kowalski
@Danish_Javed

I would suggest that you use the lock bits. http://electronics.stackexchange.com/questions/53282/protecting-avr-flash-from-reading-through-isp

Cheers!

PS: And if you intend to use open-source software consider contributing and then "you can sleep nights" :)

PaulS

Quote
I would suggest that you use the lock bits.
They do not guarantee that the code is unreadable. A high voltage programmer can change the lock bits back.

kowalski

They do not guarantee that the code is unreadable. A high voltage programmer can change the lock bits back.
Changing the lock bits back is only possible with a chip erase command and that will erase program memory.

Cheers!

westfw

Using a bootloader is incompatible with using the lock bits to protect the code.  You can protect your code from being read if you upload it appropriately using an ISP programmer, but you have to get rid of the arduino bootloader to do so.
(This protects your binary against "moderate" effort.   I hear that there are still "overseas entities" that will provide the code given a "protected" chip and some "moderate" amount of money. ($100<x<$10000 ?)) (Or maybe they just take your money...)


Danish_Javed

@paulS yes battery backup

Robin2

I hear that there are still "overseas entities" that will provide the code given a "protected" chip and some "moderate" amount of money. ($100<x<$10000 ?)) (Or maybe they just take your money...)
Could be an interesting business - how would the customer know if the "code" wasn't just something dreamed up in a pub   :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Benji

Thermite and a starter which does not require a battery?
I promote this solution!
(Because thermite)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy