Monday, December 1, 2008

Microcontrollers and code protection (with pictures!)

A microcontroller is generally considered to be a microprocessor with built-in program memory (usually FLASH) and data memory, plus (maybe) EEPROM and peripherals. It is a "system on a chip".

If you look at many embedded hardware designs, you will see that the circuitry varies from incredibly complex (think cell phone) to fairly straight-forward (although considerable effort may have been put into the printed circuit board layout).

For the straight-forward embedded system, the electronics are reasonably easy to copy. The real value of the system is in the code controlling it. To help protect this, most (if not all) microcontrollers include some sort of code protection, so that the program memory cannot be read out of the microcontroller. That way, someone cannot copy your design without having to re-develop the code.

Of course, there is a value to getting someone else's code instead of developing your own. And where there is money, there are people to do the job. This does not make them bad people, but it does make you consider if it would be quicker / cheaper to get someone else's code instead of writing your own.

Flylogic can, among other things, break into a microcontroller and read out the program code. There are even valid reasons for the company that produces the embedded system to do this (the programmer dropped dead and nobody can find his source code). They also do security analysis of chips to make sure that they are as hard as possible to break into.

And, if you check out their blog, you will see how they tear apart microcontrollers, and they have many wonderful and beautiful photos of the actual silicon chips they contain.

No comments: