I've got some code and I need to stop people looking at it and stealing it. Can I obfuscate it easily?. I also need to do it with the .hex code so they cant reverse it.
I think this is a very common requirement. Is there a button in keil to do it?
Advise please.
reverse engineering the code read out from a chip is virtually impossible. I have experience from doing this legally. I ended up writing the code from scratch instead.
Of course if you can use the code read from a chip as is that is another story.
so, just set the flags to prevent readout of the chip and lock your source up and you are as safe as can be. Is that totally safe, by no means, all it means is that it cost effort or money to steal.
Erik
Not so! There are organisations & individuals who offer that very service!
It's not (necessarily) easy and, therefore, it's not cheap - but some find it worthwhile...
Of course, nobody's going to waste the money/effort on some "me-too" 8051+I2C+GSM student project.
Unless that student is just trying to hide the fact that they stole the code from somewhere else...
"virtually"
it is virtually impossible to strike a match on a bar of soap, but if you have the time, money and equipment to harden the bar, you can do it.
And someone who does have the time, money and equipment is not going to be defeated by mere obfuscation!
reverse engineering the code read out from a chip is virtually impossible.
I have to disagree with that. It is totally achievable; and certainly simpler than trying to light a match on a bar of soap.
I say that as someone who has done it a number of times and all of them legally. The first important requirement is having a known starting point (which on embedded systems can normally be easy to determine) and the second is having a reasonable idea of what the code is trying to do.
A good knowledge of the processor architecture and experience of doing the job makes the task easier.
There are also a number of very good tools available that make the task easier still.
Obfuscation is just something that can make the task more difficult.
If you have any doubt about this, you just need to consider the cat and mouse actions associated with the more nefarious purposes of reverse engineering.
I say that as someone who has done it a number of times and all of them legally assembler code : fairly tough C code: very tough fully optimized C: extremely tough
Please note, I never said 'impossible'
fairly tough very tough extremely tough
The toughness of the task really depends on whether one is adept at the task. Sometimes C (even optimised C) can be a lot easier than assembler.
Obfuscation is just something that can make the task more difficult. Actually no, it can't. Hex-to-source reverse-engineering doesn't care one bit about what the source you never saw might have looked like.
Actually no, it can't. Hex-to-source reverse-engineering doesn't care one bit about what the source you never saw might have looked like.
I was not commenting on hex to source reverse engineering.
Source code is more frequently a low concern when dealing with reverse engineering.