|Publication number||US7376844 B2|
|Application number||US 10/240,542|
|Publication date||May 20, 2008|
|Filing date||Mar 16, 2001|
|Priority date||Apr 6, 2000|
|Also published as||CN1426547A, DE60103520D1, DE60103520T2, EP1269290A1, EP1269290B1, US20030115478, WO2001077791A1|
|Publication number||10240542, 240542, PCT/2001/794, PCT/FR/1/000794, PCT/FR/1/00794, PCT/FR/2001/000794, PCT/FR/2001/00794, PCT/FR1/000794, PCT/FR1/00794, PCT/FR1000794, PCT/FR100794, PCT/FR2001/000794, PCT/FR2001/00794, PCT/FR2001000794, PCT/FR200100794, US 7376844 B2, US 7376844B2, US-B2-7376844, US7376844 B2, US7376844B2|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (8), Non-Patent Citations (1), Referenced by (4), Classifications (21), Legal Events (4)|
|External Links: USPTO, USPTO Assignment, Espacenet|
This disclosure is based upon French Application No. 00/04426, filed on Apr. 6, 2000 and International Application No. PCT/FR01/00794, filed Mar. 16, 2001, the contents of which are incorporated herein by reference.
The present invention relates to a countermeasure method for a microcontroller in which sequences of program instructions are executed.
The present invention applies in particular to protected electronic components such as microcontrollers for chip cards, for example.
Microcontrollers are monolithic integrated circuits incorporating at least one microprocessor, also referred to as a CPU, standing for Central Processing Unit in English terminology These microcontrollers are true computers on a single silicon substrate, or integrated circuit chip.
Thus microcontroller chip cards constitute protected information carriers which have the same structure as a computer, that is to say they make it possible to store data and also to process information. In this context, the role of the microcontroller is to authenticate the card and its bearer, to encode and decode messages and to calculate electronic signatures proving that a licit operation has indeed been performed.
The operations of the microcontroller are sequenced by a clock (CLK). The microcontroller also has a power supply Vcc and an earth GND.
There are essentially two families of microcontroller. The majority of microcontrollers existing at the present time (approximately 90%) are based on a CISC (from the English Complex Instructions Set Computer) architecture in which the instructions are read and executed sequentially by a large decoding engine. However, the current trend is to use, more and more, microcontrollers with RISC (from the English Reduced Instruction Set Computer) architecture in which the instructions are read and executed in parallel. Such an architecture requires several expensive decoding engines in place on the integrated circuit chip, but it is also much more rapid in the execution of the sequences of instructions. In particular, RISC architectures using a so-called “pipeline” method make it possible to interleave several instructions by dividing them into substeps and executing steps of several instructions in the same clock cycle. The particularities of the pipeline in RISC architecture will be enlarged on hereinafter.
The execution of programs by the microcontroller must therefore be protected since all or some of the data being manipulated are secret. The protection can be provided by mathematical algorithms integrated into the programs executed, and/or by so-called countermeasure methods.
A countermeasure method is a protection method which consists of preventing the data manipulated during the execution of the instructions of a program being able to be interpreted outside the protected component. Such a leakage of information is possible through the very structure of the microcontroller, which may suffer what are referred to as power attacks, or DPA, standing for Differential Power Attack in English terminology.
When the microprocessor executes a program composed of a sequence of instructions (Ins1, Ins2, Ins3, . . . ), with an algorithm, whether secret or not, it seeks the necessary data in memory, processes them and writes the results in memory.
Conventionally, the execution of a sequence of instructions always takes place in the same way, identical and determined, whatever the architecture (CISC or RISC) of the microcontroller used.
It then becomes possible to effect a power attack simply by reading the current consumption of the microcontroller (from its power supply Vcc), which may allow information on the secret data being handled to show through. In order to obtain such information, it is necessary to perform the same sequence of instructions several times. It then becomes possible to correlate the current consumption with the data processed during the execution of the same instruction. The current consumption of the microcontroller can thus become a veritable indicator of the data being manipulated.
For example, an attacker can proceed in the following manner. If a secret data item of eight bytes k[i], with i from 1 to 8, is considered. An accumulator is used and a loop is effected for i from 1 to 8 Acc=k[i]xor k[i+1]. At the end of the loop, Acc=xor(Σ(i=1 to 8)k[i]) is obtained. When the current consumption I is observed as a function of time during this sequence (loop), a curve is obtained with the cyclic trend which is the reflection of what was executed in the microcontroller, that is to say in the example cited eight identical signals are obtained for the eight operations of the loop. Nevertheless, if each element of the signals is compared, it is possible to extract differences, and thus information on the k[i] secrets. Observation is also facilitated by the possibility of having the same loop executed several times. The current consumption of the card being the same for one and the same sequence of operations, it is possible to extract the information sought.
Consequently it becomes essential to eliminate the repetition in the current consumption for the same sequence of instructions. This is the objective of the countermeasure methods.
Such countermeasure methods already exist, in particular in the software field, where programs containing random variants may be used. Such programs can have recourse to subprograms in a random fashion. Thus, for the same task repeated several times, which conventionally would invoke the same sequence of instructions, different subprograms are invoked and give rise to the execution of different sequences of instructions. It becomes impossible to correlate the current consumption and the data being manipulated.
Such a software solution is however complex to implement. It is necessary in fact to write the different subprograms, which is expensive in development time and in code size.
The object of the present invention is a countermeasure method which resolves the drawbacks of the prior art. The invention proposes such a countermeasure method based on the execution of the sequences of instructions according to a so-called pipeline method in an electronic component with RISC architecture, for example.
The invention introduces the principle of random and non-reproducible execution at each sequence of instructions at the level of the instruction itself.
The invention more particularly relates to a countermeasure method for a microcontroller able to execute sequences of instructions, the said instructions being executed according to a so-called pipeline method, characterised in that the method consists of randomly introducing at least one waiting time between two consecutive instructions and/or within at least one instruction.
According to one characteristic, the instructions are broken down into a plurality of substeps.
According to one particularity, the substeps can consist of:
According to one characteristic, the waiting time is introduced randomly between any two substeps of an instruction.
According to another characteristic, the instructions can be macro-instructions corresponding to complex logic modules such as sub-blocks of cryptographic algorithms.
According to another characteristic, the waiting time is introduced randomly several times during the execution of the sequence of instructions.
According to one characteristic, the waiting time is introduced following a software command preceding the sequence of instructions to be protected.
According to one characteristic, the method is implemented through a non-software implantation which is the direct responsibility of the instruction decoding electronics.
According to another characteristic, the introduction of the waiting time can be regulated statically or dynamically, by means of an electronic or software parameter, so as to adjust the variability of the execution of one and the same sequence of instructions.
According to one implementation of the invention, the method is implemented in an integrated circuit chip having a microcontroller with RISC architecture with pipeline.
The invention advantageously applies to any protected device of the chip card type.
The invention has the advantage of proposing a mechanism implemented directly at the level of the microcontroller, on the integrated circuit chip. The complexity of the software solutions is thus avoided.
In addition, the countermeasure method according to the invention guarantees the execution of any program, protected or not, on an electronic component equipped with such a countermeasure mechanism.
It is in fact the component itself, rather than the sequence of instructions of the program, which ensures the random execution and therefore the protection of the data being manipulated. This advantageously makes it possible to have programs decorrelated from the component, which can prove very useful in the context of certain applications. The same component can thus be used with different programs without losing its level of protection.
Other advantages and particularities of the invention will emerge during the following description given by way of illustrative and non-limitative example with reference to the figures, in which:
The countermeasure method according to the invention is based on the principle of the processing of instructions in pipeline generally used in a microcontroller with RISC architecture.
Several points distinguish RISC architecture from CISC architecture.
Firstly, to each instruction there corresponds a single logic block implemented in the form of a specific and unique electronic submodule, so that the decoding and execution of an instruction can take place in a single clock cycle, whilst CISC architecture uses a single electronic block sequentially processing all the instructions.
Secondly, the data bus is differentiated from the instruction bus to allow the decoding of an instruction at each clock cycle independently of the data stored in memory and used by the other instructions. This makes it possible to go and seek data in memory simultaneously with the decoding of the instructions which have to process them. In addition, all the instructions must have a size at least equal to that of the external data bus so that the decoding of the instructions is direct and entails no delay.
There are in general two models of microcontroller with RISC architecture,
The present invention applies more particularly to the pipeline technique proposed in the “Stanford” model. This is because the invention proposes a countermeasure method which relies on this pipeline architecture.
Pipelines make it possible to interleave the execution of several instructions by dividing each instruction into several substeps and executing these substeps in parallel. Thus a pipeline stage is defined as the set of substeps executed simultaneously. Thus the number of clock cycles per instruction will be divided proportionally to the number of pipeline stages.
It should be noted that, when a program, or more simply a series of instructions, is executed, the functioning of the pipeline may be broken when instructions arise such as branch, jump, interrupt and other exceptions to the linear execution of instructions.
The instructions INSn can be simple instructions or macro-instructions corresponding to complex logic modules, such as sub-blocks of cryptographic algorithms, such as for example permutation, compression or expansion constructions, non-basic mathematical functions, look-up tables, or others.
The instructions INSn are advantageously broken down into several substeps. An example of breaking down into four substeps is given by way of example and must not be considered to be restrictive.
The first step “F”, from the English acronym “FETCH”, makes it possible to seek in memory the instruction to be decoded. It places this instruction, which is next transmitted to the following stage, on the bus.
The second step “D”, from the English acronym “DECODE”, decodes the instruction, that is to say activates the submodule of the microcontroller which is able to process this instruction.
The third step “E”, from the English acronym “EXECUTE”, executes the instruction in the submodule of the microcontroller.
The last step “W”, from the English acronym “WRITE”, writes the result of the instruction executed by the submodule of the microcontroller on the bus. This result is then used in the remainder of the execution or returned to memory.
It can be seen, from
Conversely, as illustrated in
Such an architecture is however not immune from a power attack. This is because, if the same sequence of instructions is repeated several times, there will always be the same chaining of stages of the pipeline with the same current consumption.
In order to resolve the problem generated by power attacks and to prevent reproducibility of the current consumption for the same sequence of instructions executed several times, a waiting time, Break B, is introduced randomly into the processing of the instructions. This waiting time B can be introduced randomly at the start of an instruction and/or between any two substeps of one and the same instruction.
The random waiting time B can also be introduced several times if necessary during the execution of a sequence of instructions.
The random waiting times B prevent any reproducibility of the current consumption by modifying, at each sequence of instructions, the pipeline stages without interfering with the execution of the instructions.
The method according to the invention is executed through a non-software implementation, directly executed by the electronic module (hardware) for decoding instructions of the microcontroller.
In its functioning, the method can be adjustable, statically or dynamically, by electronic or software means, in order to obtain more or less variability in the repeated execution of the same sequence of instructions.
According to one possibility of implementing the method according to the invention, the introduction of the waiting time B can be dependent on a start-up controlled in a software manner, for example just before the execution of the sequence of instructions which it is wished to protect. In this way the speed of execution of a sequence of instructions which does not require any particular protection is not compromised.
The method according to the invention thus ensures the random execution of a sequence of instructions, that is to say the non-reproducibility of this sequence from one execution to another, and this for the same functional result.
A compromise must simply be defined in order not to excessively extend the execution time for the sequence of instructions and thus lose the main advantage of the pipeline.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US4077061 *||Mar 25, 1977||Feb 28, 1978||Westinghouse Electric Corporation||Digital processing and calculating AC electric energy metering system|
|US4910671||Mar 27, 1986||Mar 20, 1990||Fujitsu Limited||Data processing system having a performance control pulse with a variable duty cycle for controlling execution and non-execution of instructions|
|US5761466 *||May 9, 1994||Jun 2, 1998||Lsi Logic Corporation||Soft programmable single-cycle/pipelined micro-programmed control system|
|US5944833 *||Mar 7, 1997||Aug 31, 1999||Cp8 Transac||Integrated circuit and method for decorrelating an instruction sequence of a program|
|US6470291 *||Sep 24, 1999||Oct 22, 2002||Seagate Removable Storage Solutions Llc||Velocity feedback measurement method|
|US6575373 *||Sep 15, 2000||Jun 10, 2003||Kabushiki Kaisha Toshiba||Security card and a computer system provided with an interface for reading a security card|
|EP0977108A2||Jul 20, 1999||Feb 2, 2000||Philips Corporate Intellectual Property GmbH||Apparatus for electronically processing data signals|
|FR2745924A1||Title not available|
|1||Cohen, Frederick, B., Operating system protection through program evolution, Computers & Security, vol. 12, No. 6, Oct. 1993, pp. 565-584, Oxford, GB.|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US7653906 *||Oct 23, 2002||Jan 26, 2010||Intel Corporation||Apparatus and method for reducing power consumption on simultaneous multi-threading systems|
|US8386796 *||Mar 20, 2009||Feb 26, 2013||Fujitsu Limited||Information processing apparatus and information management method|
|US20040083478 *||Oct 23, 2002||Apr 29, 2004||Yen-Kuang Chen||Apparatus and method for reducing power consumption on simultaneous multi-threading systems|
|US20090240950 *||Mar 20, 2009||Sep 24, 2009||Fujitsu Limited||Information processing apparatus and information management method|
|U.S. Classification||713/194, 712/E09.063, 712/220, 712/245, 712/E09.049|
|International Classification||G06F21/55, G06F12/14, G06K19/073, G06F11/30, G06F9/38, G06F9/44, H04L9/32|
|Cooperative Classification||G06F9/3869, G06K19/07363, G06F9/3836, G06F21/558, G06F2207/7219|
|European Classification||G06F21/55C2, G06F9/38E, G06F9/38P2, G06K19/073A6|
|Mar 4, 2003||AS||Assignment|
Owner name: GEMPLUS, FRANCE
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:FEYT, NATHALIE;REEL/FRAME:013811/0156
Effective date: 20021004
|Aug 31, 2010||AS||Assignment|
Owner name: GEMALTO SA, FRANCE
Free format text: MERGER;ASSIGNOR:GEMPLUS;REEL/FRAME:024906/0868
Effective date: 20081001
|Oct 26, 2011||FPAY||Fee payment|
Year of fee payment: 4
|Oct 27, 2015||FPAY||Fee payment|
Year of fee payment: 8