Fault Injection Attacks
Basically, we assume here that we have a black-box that produces an output using a known algorithm but with some unknown parameters. In the case of cryptography, the black-box could be a chip on a smart-card, the know algorithm could be a cryptographic algorithm and the unknown parameters would be the key of the algorithm which lies hidden in the chip (and never go out).
In this particular setting, we can perform what we call a 'chosen clear-text attack', meaning that we can choose the inputs of the black-box and look at the output. But, lets also suppose that this is not enough to guess the unknown parameters (the key). So, we need a bit more to help us.
Our second assumption will be that we are able to introduce errors at specific chosen phase of the known algorithm. Usually, when speaking about smart-cards, it means that we have a physical setup with a very precise timer linked to the smart-card clock and a laser targeting a physical register on the chip. Beaming up the register with the laser, usually reset the register (or may introduce some random values).
The point of fault-injection is thus to study the effect of the injected fault on the cipher algorithm and to deduce some information about the value of the key.
Depending on the cipher algorithm used in the chip, the most interesting bits to reset in order to maximize the information collected about the key may vary a lot because the propagation of the error is not the same depending on the computation performed. So, each cipher algorithm need to be studied first, in order to know the best way to proceed in order to extract the key.
Types of Fault-injection Attacks
The different types of fault-injection analysis depends mainly on the accuracy with which you can control the error that you introduce (from the easiest to the most difficult):
- Fully controlled error: We suppose that we have a full control on the error. Basically, we can choose what is the content of the register and when to introduce the error in the algorithm.
- Known error: We suppose that we have a partial control on the error. Meaning that we know where it has been introduced and we know what is written in the register but we cannot choose it in advance.
- Unknown error: We know exactly where, in the algorithm, the error has been introduced but we cannot control what is written nor have a knowledge of what has been written in the register.
- Fully uncontrolled error: We have no exact knowledge of what is written nor when it has been introduced in the algorithm.
Countering fault-injection is, in fact, quite easy but costly. You only need to duplicate the circuits and check that the two circuits gives the same output when finished. If not, you just have to issue an error without leaking any information.
Of course, in the case of a 'fully controlled error' attack, one can just duplicate the laser beam as well. But, usually, the 'fully controlled error' attack is an ideal case that is almost never reached in practice.
More difficult to work around, in the case of the 'known error' attack, you can use the output of the chip (
error) to guess the content of any register you want. You just need to perform attacks always on the same input until you get a normal
output, then you can store what you wrote on the register. And, thus, rebuild the value of the key.
Anyway, the cost of circuit redundancy on a chip is quite high, both in money and power-consumption. So, not all the chips can be equipped with this.
Other Related Attacks and Conclusion
These attacks have to be compared (or combined) with 'side-channel attack'. Both attacks have a different approaches and use different assumptions on what is possible or not. Combining them allow to get way further in extracting information about the device that you study.
Talking now about software reverse engineering, I do not know any practical use of fault injection attack nowadays. But, I'm pretty confident that you can use this technique to guess the parameters of a know algorithm that has been obfuscated without having to dissect it in details. Somehow, any debugger can rewrite a register at precise time in the program (breakpoints) with a full control of what is written in the register (we are here in the case of the 'fully controlled error' attack). So, this can certainly be used in the case of usual obfuscated programs.