discover the algorithm running on an Ardn.

Hi, everyone.
Does anyone know if its possible (somehow) to discover the algorythm running on an Arduino, once it's been uploaded? If, yes is it possible to prevent that?

For example, if I develop a product that uses Ardn. as the processing unit and its source code, developed by me, is classified. Is there any possibility to someone who buy the product to know that code?

Thanks.

to discover the algorythm running on an Arduino

Yes it is difficult but it is possible.

Is there any possibility to someone who buy the product to know that code?

Yes they could if they wanted to disassemble the code into machine code. The underlying C code is not always clear from this.
It is possible on other processors to lock the device so it can't be read but not this one.

Some processors even have a scrambling algorithm built in so you have to use your "password" in order to program and run the processor.

Section 28 of the datasheet discusses the lock bits.
The way I read it, it possible to set the bits such that no further sketches can be downloaded - and once set can only be cleared using High Voltage programming mode that also clears the flash.

If one cannot upload a new sketch, then one cannot run a sketch that can read out the memory contents.
Is there another method one could use to dump the flash contents?

Yes you are right although it is section 27 on my data sheet.
Setting those will protect it.

However if someone is determined then you can slice the top off to expose the chip and look at it under a scanning electron microscope to see the state of each cell. But that is quite a high hurdle.

Another way is the black box approach. Make a list of all inputs and generated outputs to deduce the working of the algorithm inside.
In the end the algorithm describes the detailed behaviour ...

easier to use the electron microscope I think :wink:

For the dissasembly route you need to read

...\arduino-0022\hardware\tools\avr\doc\avrdude
.../arduino-0022/hardware/tools/avr/doc/binutils/binutils.html/objdump.html