Clone Microprocessor Flash Memory Protection: Four Methods, Four Gaps
Preventing the clone of a microprocessor flash memory is described as one problem and it is two. The first is copying the binary from one unit into another. The second is copying the behaviour, so that a device built on different silicon produces the same response at the same pins. The four protection methods in common use are aimed at the second problem, and the reason there are four is that each closes a different surface.
This matters because a review that asks whether a part is protected gets an answer carrying no information. The useful question is which of the four surfaces is covered, since an attacker chooses the cheapest one still open.
Why the encoding comes first
Three of the four methods rest on a single change to the way a bit is carried. In a dual-rail design each bit occupies two wires and is decoded as a pair instead of being compared against a threshold.
| Pair | Meaning | Legal during normal operation |
|---|---|---|
| L-H | one | yes |
| H-L | zero | yes |
| L-L | idle, or a transition in progress | yes, between operations |
| H-H | illegal | never |
The scheme removes the analog decision. Zero and one differ by which wire is high, not by how high either one is, so a supply variation that shifts every threshold by the same amount changes nothing. A single glitch that flips one wire of a legal pair produces an illegal pair, and an illegal pair is a detectable event.
Method two: removing the clock
A self-timed circuit carries no global clock. Blocks proceed by a request and acknowledge handshake, so the instant at which a given instruction executes depends on the data and on the propagation delays rather than on a clock edge.
That is what defeats a clock glitch. The technique works by shortening one cycle so a path does not settle before it is sampled, and it requires the attacker to know which cycle to hit. With no global clock there is no cycle to align to, and the same disturbance lands on a different operation each time.
The cost is real. A self-timed design is larger, harder to verify and poorly served by most synthesis and timing tools, which is why the method appears in security elements and rarely in a general-purpose microcontroller.
Method three: the alarm
The fourth state in the table is the basis of the third method. A design that can detect the illegal pair can also be made to react to it, and the reaction is the part that costs the attacker.
A common arrangement clears the key registers and raises an alarm on the first illegal pair. To avoid it, an attacker must move one legal pair to another without passing through an illegal state, which means flipping both wires inside the same window. That is two faults, synchronised, rather than one.
| Attacker action | Result | Detected |
|---|---|---|
| One glitch on one wire | Legal to illegal | yes |
| Two glitches, unsynchronised | Legal to illegal in between | yes |
| Two glitches, synchronised | Legal to legal | no |
| Common-mode supply dip | Both wires shift together | no |
The last two rows are the gap. A supply disturbance reaching both wires through the same path moves them together, so the pair stays legal throughout and the alarm never fires. This is why a dual-rail part is still evaluated with a power glitch and not with a clock glitch.
The fourth method is not in the logic
Every method so far protects computation. None of them protects storage, and an attacker is not obliged to attack computation.
If the key and the program sit in an array that can be read through a test port, a debug interface, or a probe after the package is opened, the logic protection is bypassed rather than defeated. The array is read directly and the protection never participates in that read, which is the subject of lock and fuse behaviour.
| Countermeasure | Protects | Does not protect |
|---|---|---|
| Dual-rail encoding | Internal signal values | Stored data |
| Self-timed logic | Timing alignment | Stored data |
| Tamper alarm | Against detected faults | Against a read |
| Secrets kept off-chip | Stored data | The interface to the element |
So the fourth method is a storage decision: keep the key out of the readable array, derive session values from it inside a block with its own shield, or move it to an element designed to resist a read. It is also why a part that holds its program in EEPROM can be cloned while its logic-level protection is intact.
Where the boundary sits
Two of the four methods can be removed with a focused ion beam instead of a glitch, because a sensor and an alarm line are wires like any other. That is a different budget and a different skill, described in restoring a microprocessor program.
The working judgement is therefore not whether a part is protected but what the cheapest remaining path costs in equipment, in time and in knowledge. A design that pushes an attacker from a bench supply to a focused ion beam has done its job even though the array was never made unreadable.
What the review measures
For a part submitted for cloning, the first pass is a boundary map: which of the four surfaces is present, which is claimed in the datasheet but absent on the die, and which is simply open.
The map is worth more than a verdict. A verdict changes with whatever equipment the attacker owns; the map does not.