EP3827549A1 - Procede d'execution d'une fonction, par un microprocesseur, securisee par desynchronisation temporelle - Google Patents
Procede d'execution d'une fonction, par un microprocesseur, securisee par desynchronisation temporelleInfo
- Publication number
- EP3827549A1 EP3827549A1 EP19756215.0A EP19756215A EP3827549A1 EP 3827549 A1 EP3827549 A1 EP 3827549A1 EP 19756215 A EP19756215 A EP 19756215A EP 3827549 A1 EP3827549 A1 EP 3827549A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- execution
- instruction
- delay
- function
- phase
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/08—Randomization, e.g. dummy operations or using noise
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
- H04L9/003—Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
- H04L9/004—Countermeasures against attacks on cryptographic mechanisms for fault attacks
Definitions
- the invention relates to a method of executing a function, by a microprocessor, secured by time desynchronization, as well as an information recording medium and an electronic calculator for the implementation of this method.
- Temporal desynchronization is a principle used in software or hardware countermeasures to make more difficult the attempts at cryptanalysis of a function executed, for example, by a microprocessor of an embedded system. Subsequently, this executed function is called "secure function" because it is generally a function which executes operations which are the preferred target of an attacker such as, for example, an encryption or decryption function.
- the cryptanalysis of a function consists in particular in studying the operation of this function to reveal secret information processed by this function, or to modify its operation. Attempts at cryptanalysis are conventionally called "attacks”.
- Temporal desynchronization is, for example, effective in making attacks by auxiliary channels known by the English expression "Side Channel Attack” more difficult.
- Auxiliary channel attacks bring together a wide variety of different possible attacks.
- some of these attacks consist in measuring a physical quantity correlated to the operations executed by the microprocessor when it performs the secure function. This physical quantity can be the electrical consumption, the electromagnetic radiation of the microprocessor, the noise of the microprocessor, the execution time or others.
- this attack is known by the acronym DPA ("Differential Power Analysis") or CPA ("Correlation Power Analysis").
- fault injection attack Another known attack is for example the attack by fault injection or "fault attack”, known by the English expression “fault injection attack”.
- This attack consists in causing a fault or a malfunction of the microprocessor at the particular moment when it executes a critical instruction of the secure function.
- a critical instruction is, for example, a conditional branch instruction in order to cause unexpected operation of this secure function.
- temporal desynchronization increases the difficulty for an attacker to target with the injection of a fault the moment when a particular instruction of the secure function is executed.
- this ordinary time desynchronization phase comprising, before the execution by the microprocessor of each instruction l m of a group of instructions of the function, the carrying out of the following steps:
- the problem with known methods is that the instructions of the secure function which are, for example, at the start of this function are less well protected than the following instructions and are therefore more vulnerable to attacks by auxiliary channels, because the inserted time delay accumulates on the wire instructions executed.
- the instructions at the start of the secure function are those that are executed first. This is explained using the following simplified example in which, whatever the index m:
- Figure 1 shows the statistical distribution SP i0 of the accumulation of the first delays after the introduction of the first ten delays.
- This statistical distribution associates with each of the possible values of the accumulation of the first ten delays its probability of occurrence.
- the possible values of the accumulations of the delays are represented on the abscissa and the probability of occurrence is represented on the ordinate.
- the largest value, also called “maximum”, of the statistical distribution SPio is noted SPmaxio. After the insertion of the tenth first delay, the maximum SPmaxio is approximately equal to 0.25.
- the tenth instruction of the secure function is executed one time in four at the same time.
- Figure 1 shows on the same graph a statistical distribution SPi 00 of the cumulative first delays after the introduction of the first 100 delays.
- the largest SPmaxioo value of the SPi 00 distribution is this time equal to 0.08.
- the proposed law P m is constructed so that the statistical distribution SP m has the largest possible standard deviation and therefore is as flat as possible.
- the proposed P m law is non-uniform.
- the law P m is non-uniform that in the particular case where a single delay, drawn using this law P m , is introduced before the sequence of instructions to be protected, the robustness against an auxiliary channel attack of this instruction sequence is reduced.
- this single delay be drawn with a uniform law and to use the law P m for all the other delays introduced elsewhere.
- condition (1) depends on a statistical distribution SS k of the accumulation of delays already introduced before the execution of the instruction to be protected. However, these delays already introduced are all drawn using the law P m except possibly a delay which is drawn using the uniform law. Thus, to verify that condition (1) is satisfied or not by the set [1; 255], the distribution SS k and therefore the statistical distribution of the cumulative delay already introduced must be taken into account using the law P m .
- the invention therefore aims to provide a method for executing a function, secured by more robust time synchronization against attacks and without it being necessary to modify the laws P m already implemented. It therefore relates to such an execution method according to claim 1.
- the embodiments of this method may include one or more of the features of the dependent claims.
- the invention also relates to an information recording medium, readable by an electronic computer, in which this information recording medium includes instructions for the execution of the method which is the subject of this application, when these instructions are executed by the electronic computer.
- FIG. 1 is a graph representing statistical distributions of the accumulation of the first delays
- FIG. 2 is a schematic illustration, along an axis, of the different times when instructions of a secure function are executed
- FIG. 3 is a schematic illustration of the structure of a computing system capable of performing a secure function
- FIGS. 4 to 6 are graphs representing different statistical distributions of cumulative delays useful for understanding the operating principle of time desynchronization implemented by the system of Figure 3;
- FIG. 7 is a flow diagram of a method for executing a secure function implemented by the system of FIG. 3.
- FIG. 2 represents a time axis 30 on which each graduation corresponds to an instant when an instruction l m of a secure function is executed.
- the index “m” is the sequence number of the instruction compared to the other instructions of the secure function. This order number m is assigned by taking as a reference instruction of the secure function and progressing in a reference direction D ref .
- the first instruction is the instruction U
- the second instruction encountered is the instruction l 2 and so on until the last instruction of the function synchronized encountered while advancing in direction D ref .
- the direction D ref can correspond to the direction in which the instructions l m are temporally executed one after the other by an electronic computer or to the reverse direction.
- the order in which the instructions l m are executed may depend on the values of the variables processed by the secure function.
- the value of the index m associated with an instruction executed can vary according to the values of the variables processed.
- we consider that the values of the variables processed each time the secure function is executed are constant so that the value of the index m associated with a given instruction is always the same. If the values of the processed variables change and cause the order of instructions to be changed, this further increases the time desynchronization. Thereafter, unless otherwise indicated, terms such as "previous instruction”, “next instruction”, "before”, “after” are defined relative to the direction D ref .
- the instruction preceding the instruction L is the instruction l mi .
- first instruction of the secure function and “last instruction of the secure function” denote, respectively, the first and the last instruction of the secure function in the order in which these instructions are executed by an electronic computer. This first and this last instruction are noted, respectively, Deb and Der . These instructions l Deb and l Der are independent of the direction D ref .
- the instruction L is typically an instruction which corresponds to an instant which could be chosen as a synchronization instant by an attacker who wishes to implement an attack by auxiliary channels. It is therefore a particular instruction of the secure function whose execution is easy to spot. Typically, this is the eb instruction or the b er instruction of the secure function.
- the direction D ref goes from the instruction b eb to the instruction b er .
- the direction D ref goes from the instruction b er to the instruction b eb .
- Figure 2 is shown in the particular case where the instruction b is equal to the instruction b eb . To simplify the description, the embodiments described with reference to the figures are described in this particular case.
- ti m The instant of execution, by the electronic computer, of the instruction l m is denoted ti m .
- these times of execution are also noted, respectively, t ref , t deb and t der .
- the secure function comprises one or more sequences Seq k of instructions.
- a sequence Seq k is a group of one or more instructions l m systematically executed one after the other. Seq k sequences are disjoint from each other. Thus, an instruction l m which belongs to any Seq k sequence cannot also belong to another sequence of instructions.
- the index k is the sequence number of the sequence Seq k with respect to the other instruction sequences of the secure function. This serial number is assigned by taking instruction b as the origin and progressing in the direction D ref . Thus, starting from instruction b and progressing in the direction D ref , the first sequence of instructions encountered is the sequence Seqi, the second sequence of instructions encountered is the sequence Seq 2 and so on.
- first instruction of the sequence Seq k and “last instruction of the sequence Seq k ” denote, respectively, the first and the last instruction of the sequence Seq k in the direction D ref .
- the instant of execution of the first instruction of the sequence Seq k is noted ts k .
- each sequence Seq k is associated with a respective zone Z k for the introduction of a second delay.
- Zone Z k has one or more instructions l m . It begins with an instruction noted l Zd, k and ends with an instruction noted l Zf, k .
- the zone Z k systematically precedes, in the direction D ref , the sequence Seq k .
- the instruction l zd, k is systematically located before, in the direction D ref , the first instruction of the sequence Seq k .
- the instruction l zf, k is located after the instruction l zd, k in the direction D ref .
- the instruction l zf, k is also located before, in the direction D ref , or confused with the first instruction of the sequence Seq k .
- the zone Zi associated with the sequence Seqi is represented in the particular case where the instruction l zf, i is confused with the first instruction of the sequence Seqi.
- FIG. 3 represents a calculation system 2 comprising in particular an electronic computer 4 capable of performing a secure function.
- This system 2 also includes:
- a clock 6 which gives rhythm to the operation of the components of the computer 4, and
- the secure function is typically a function which manipulates and / or processes secret information during its execution.
- the secure function is an encryption or decryption function.
- the secret information often corresponds to an encryption or decryption key.
- the secure function is an AES (“Advanced Encryption Standard”) encryption function.
- the secure function comprises a succession of instructions which code the operations carried out by the computer 4 when it executes this secure function.
- the computer 4 comprises:
- microprocessor 10 capable of executing the instructions of the secure function
- an input and output interface 14 allowing the computer 4 to exchange information with other electronic components of the system 2 such as for example a man-machine interface or a wireless transceiver or the like, and
- the computer 4 is capable of producing temporal variability during each execution of the secure function. To this end, it comprises a module 18 for ordinary time desynchronization and a module 20 for enhanced time desynchronization.
- the module 18 is for example a conventional time desynchronization module.
- this is a hardware module capable of introducing a random delay before the execution of each instruction L of the secure function. Thereafter, the random delays introduced by the module 18 are called "first delays".
- the first delay introduced before the instruction l m is introduced between the instants ti mi and ti m .
- the first delays are introduced by varying the frequency of the clock 6.
- the reader can refer to the following article: T. Guneysu and Al: “Generic side-channel countermeasures for recongurable devices, "Cryptography Hardware and Embedded Systems CHES 2011, Springer Berlin Heidelberg, 2011, pp. 33-48.
- the module 18 randomly chooses a value of a first delay in a group Gi , m of ni , m possible values for this first delay.
- the number ni , m is an integer greater than or equal to two.
- the values of the group Gi , m are typically integer multiples of an elementary duration d e .
- the different values of the group Gi , m are denoted jd e where:
- - j is an integer between 0 and ni , m -l, and
- the module 18 chooses each new value of the first delay in the group Gi , m by performing a random draw which checks a probability law P m .
- the law P m associates with each value of the group Gi , m a probability of occurrence.
- the law P m and the group Gi , m are for example the same whatever the values of the index m.
- the module 20 reinforces the temporal desynchronization of the sequences Seq k of instructions.
- the module 20 is capable of introducing before each instant ts k where the execution of the sequence Seq k begins an additional delay subsequently called "second delay".
- this second delay is introduced between the instants ts ki and ts k .
- this second delay is introduced into the zone Z k situated between the last instruction of the sequence Seq k _i and the first instruction of the sequence Seq k .
- the instruction l Zf, k is chosen equal to the first instruction l m of the sequence Seq k . This zone Z k immediately precedes and is therefore contiguous to the sequence Seq k .
- the instruction l zd , k is for example an instruction which calls a routine RI2d which triggers the introduction of the second delay before the execution of the instruction l Zf, k -
- the instruction l zf, k is the instruction located at the return address of the routine RI2d.
- the routine RI2d is executed by the microprocessor 10 before the execution of the first instruction of the sequence Seq k begins.
- the module 20 randomly chooses a value of a second delay in a group G 2, k of n 2, k different values.
- the number n 2, k is an integer greater than or equal to two.
- the values contained in the group G 2, k are denoted x 0 , Xi. - i.
- each value Xi is an integer multiple of the duration of e .
- the module 20 uses a probability law S k which associates a probability of occurrence S k [xi] with each value x, of the group G 2, k . The sum of all these probabilities of occurrence S k [x] is equal to one.
- a second delay whose duration is equal to the second delay x is introduced between the instants t zd, k and t zf, k where the instructions l zd, k and l zf, k are executed, respectively.
- the RI2d routine includes instructions which, when executed by the microprocessor 10:
- the random drawing of the integer q corresponds to the random choice of a value in the group G 2, k .
- the values of group G 2, k each correspond to a respective number of useless instruction executions. More precisely, if we note d k the time necessary for the microprocessor 10 to execute an unnecessary instruction, then each value x is equal to qd k , where d k is for example itself an integer multiple of the duration of e .
- the module 20 is associated with a memory in which is recorded for each sequence Seq k :
- this information is saved in memory 12.
- the law S k is practically equiprobable, that is to say that, whatever the value x ,, the probability S k [xi] is between 0.9 / n 2, k and l , l / n 2, k .
- each law S k is equiprobable, that is to say that each probability S k [xi] is equal to l / n 2, k .
- the values Xi of the group G 2, k prerecorded in the memory 12 verify the following condition (1):
- - SS k is the statistical distribution of the possible values of the cumulation of the delays already introduced between the instants t ref and ts k ,
- - p is a real number greater than or equal to 1.05 and, preferably, greater than or equal to 1.3 or 1.5 or 1.8 or 2.
- the cumulative delays already introduced between the instants t ref and ts k include in particular:
- this accumulation can also take into account any other delay than those introduced by the modules 18 and 20. By cons, this accumulation does not take into account the second delay chosen using the law S k .
- the number p is a number chosen during the design of the law S k .
- SEmaX k the maximum of a statistical distribution SE k .
- the statistical distribution SE k is the statistical distribution of the accumulation of all the delays introduced between the instants and ts k .
- the statistical distribution SE k is therefore identical to the statistical distribution SS k except that it also takes into account the second delay chosen using the law S k .
- n 2 , k is equal to two so that the two values of the group G 2 , k are x 0 and Xi.
- the value x 0 is zero and the value Xi is an integer multiple of the duration of e .
- the value Xi is equal to 5d e .
- the law S k is equiprobable and therefore the probabilities of occurrence of the values x 0 and Xi are both equal to 0.5.
- FIG. 4 represents an example of distribution SS k for which the largest value SSmax k is approximately 0.25.
- the distribution SS k is identical to the distribution SE k which would be obtained if the value of the second delay introduced before the sequence Seq k was systematically chosen equal to x 0 during each execution of the secure function.
- the graph in FIG. 5 represents the statistical distribution SE k which would be obtained if the value of the second delay introduced before the sequence Seq k was systematically chosen equal to Xi during each execution of the secure function.
- the distribution of Figure 5 is therefore identical to that of Figure 4 except that it is shifted to the right by the value Xi.
- the graph in FIG. 6 represents the statistical distribution SE k which is obtained when there is a one in two chance that the value of the second delay introduced is either x 0 or Xi.
- the distribution SE k is the weighted sum of the statistical distributions shown in Figures 4 and 5, where the weighting coefficients of each of these statistical distributions in Figures 4 and 5 are equal, respectively, to the probabilities of occurrence S k [x 0 ] and S k [xJ.
- the weighting coefficient of the statistical distributions in Figures 4 and 5 is therefore 0.5.
- condition (1) whatever the value of the index j, the probability of occurrence SE k Qd e ) is less than SSmax k / p.
- the maximum SEmax k is therefore necessarily lower than the maximum SSmax k . Consequently, the introduction of the second delay reduces the value of the maximum SEmax k with respect to an embodiment where this second delay would never be introduced before the instant ts k . Consequently, as soon as the values Xi of the group G 2, k satisfy the condition (1), the temporal desynchronization of the sequence Seq k is improved by a configurable factor linked to the factor 1 / p.
- the maximum SEmax k is two times smaller than the maximum SSmax k and this by introducing a second delay only equal on average to Xi / 2.
- Condition (1) is expressed in the general case where:
- condition (1) It is possible to determine a large number of sets of values x, which satisfy condition (1). However, among this large number of possible sets of x values, some are more advantageous than others. These sets of values Xi which are more advantageous than others satisfy additional conditions. For example, in this embodiment, the values of group G 2, k additionally satisfy the following condition (2):
- SP k is the statistical distribution of the possible values of the accumulations of the first delays introduced between the instants t ref and ts k .
- SPmax k is the maximum of the statistical distribution SP k .
- the distribution SP k only takes account of the first delays introduced. Consequently, in particular, it does not take account of any second delays introduced before the instant ts ki .
- the statistical distribution SP k is easier to determine than the distribution SS k .
- the distribution SP k can be measured experimentally.
- the secure function is executed repeatedly by a computer identical to the computer 4 except that it does not have a module 20. During each of these executions, the instant at which begins the execution of the sequence Seq k is recorded. From these records, the statistical distribution SP k is then constructed. It will be noted that the advantage of measuring the statistical distribution SP k is that it can be done without knowing the different laws P m used by the module 18.
- the different laws P m used by the module 18 are known, then it is also possible to construct the statistical distribution SP k by calculation, which is simple and quick. Once the statistical distribution SP k has been constructed, its maximum SPmax k is also known.
- the weighted average of the second delays introduced be as small as possible.
- x 0 0.
- the values Xi are between 0.9.lid e and l, llid e , where the number i is the smallest integer for which at least one of the following conditions (3) or (3 ') is satisfied:
- Condition (3 ') is used if only the distribution SP k has been determined. Otherwise, preferably, condition (3) is used. Any set of values Xi which satisfies condition (3) or (3 ') also additionally satisfies condition (1). The sets of values Xi which verify condition (3 ') also additionally verify condition (2).
- the group G 2, k be the same for T sequences Seq k different, where T is an integer greater than or equal to two.
- the T sequences Seq k are the successive T sequences Seq k Seq k to Seq k + Ti .
- the same set of values Xi must satisfy conditions (3) or (3 ') for k, k + 1 up to k + (Tl).
- the values Xi are between 0.9.lid e and l, llid e , where the number i is the smallest integer for which at least one of the following conditions (4) or (4 ') is satisfied:
- the method begins with a phase 40 of initialization.
- This phase 40 begins with the identification of the sequences Seq k of instructions of the secure function which must be the subject of a reinforced temporal desynchronization. For this, there are many different ways to identify these sequences. However, below, certain directives are given which make it possible to optimize the implementation of the method described here.
- a safety threshold Si , k below which the maximum SEmax k must be situated, is fixed.
- this threshold Si , k is the same for all the sequences Seq k .
- the threshold Si , k is chosen less than 0.2 or 0.1 and, preferably, less than 0.08 or 0.05 or 0.01.
- the greater the cumulative amount of first delays introduced the more the value of the maximum SPrnax m decreases.
- an index a + 1 corresponding to an instruction l a + i from which the maximum SPrnax m is less than the threshold Si , k without it being necessary for this to introduce second delays.
- the instruction l a is the last instruction for which the following condition is satisfied: SPmax a > Si , k . It is therefore unnecessary to introduce second delays after the execution of the instruction l a .
- the introduction of second delays after the execution of the instruction l a unnecessarily delays the execution of the secure function.
- the education has been identified.
- the distribution SP m of the accumulation of the first delays between instant t ref and instant ti m is determined by increasing the index m to the index a + 1.
- the statistical distribution SP m is determined by measurement or by calculation if the laws P m are known.
- the instruction l f of the secure function from which the introduction of second delays must be inhibited is then chosen between instruction l a and instruction l b . Consequently, the introduction of second delays ceases well before the instant t der and even though the introduction of first delays continues after the execution of the instruction l f , for example, until the instant t der .
- the index b is here chosen between a and a + 100.
- the first instructions of the secure function do not deal with secret information. There is therefore often an index below which the introduction of the second delay is also unnecessary. Seq k sequences are therefore located here between the instructions l d and l f . Between these instructions l d and l f , certain sequences of instructions can be more critical than others. Thus, advantageously, each sequence Seq k corresponds to one of these more critical instruction sequences. In this case, the instruction sequences Seq k are separated from each other by less critical instructions of the secure function. The moments of execution of these less critical instructions are desynchronized only by the introduction of first delays.
- each sequence Seq k identified is associated with a zone Z k .
- the instruction l zd, k is introduced into the code of the secure function between the last instruction of the sequence Seq ki and the first instruction of the sequence Seq k .
- the instruction l zd, k is a call to the routine RI2d.
- the instruction l zf, k is the instruction located at the return address of this routine RI2d.
- a law S k is constructed so that following the introduction of the second delay, the maximum SEmax k is less than the threshold Si , k .
- the different statistical distributions SS k or SP k associated with each sequence Seq k are determined either from measurements or by calculation if the laws P m are known and the distribution calculable. Thereafter, we place our in the particular case where these are the statistical distributions SP k that have been determined. However, everything described in this particular case also applies to the case where the distributions SS k are determined by simply replacing the expression "SP k " with the expression "SS k ".
- the number n 2, k is taken equal to or greater than the upper part of the number p.
- the upper part of a number is the smallest integer greater than or equal to this number.
- the probability of occurrence S k [xi] associated with each of the values Xi of the group G 2, k is also chosen.
- the law S k is equiprobable, that is to say that the law S k is a discrete uniform law.
- the probability of occurrence S k [xi] of each value Xi is therefore equal to l / n 2, k .
- the code of the secure function comprises an instruction l Zd, k which triggers the introduction of the second delay,
- the memory 12 includes a group G 2, k of n 2, k values associated with this sequence Seq k , and
- the memory 12 comprises a probability law S k associated with this sequence Seq k .
- the system 2 can then proceed to a phase 42 of execution of the secure function.
- the microprocessor 10 executes the instructions l m of the secure function one after the other.
- phase 46 comprises, before the execution of each instruction l m , the execution of the following operations 48 and 50.
- the module 18 randomly chooses, according to the law P m , a value of a first delay in the group Gi , m .
- the module 18 introduces a first delay of duration equal to this first delay before the execution of the instruction L by the microprocessor 10.
- This first delay is introduced between the instants ti mi and ti m .
- the introduction of this first delay therefore has the effect of shifting the instant ti m with respect to the instant ti mi -
- the module 20 performs a phase 60 of enhanced time desynchronization.
- the execution of phase 60 is here only triggered in response to each loading or execution of an instruction l Zd, k .
- the instruction l Zd, k is a call to the routine RI2d.
- the execution of phase 60 is then systematically interrupted in response to the loading or the execution of the instruction l zf, k .
- the module 20 performs the following operations.
- the module 20 randomly chooses a value of the second delay in the group G 2, k , this choice being made according to the law S k .
- the module 20 introduces a second delay of duration equal to the second delay, chosen during operation 62, before the loading or execution of the instruction l zf, k , c 'is to say here before the loading of the instruction which is at the return address of the routine RI2d.
- the RI2d routine introduces this second delay by executing unnecessary instructions a certain number of times, for example.
- polymorphic code can be used for this.
- Polymorphic codes are well known. For example, the reader can consult the following articles on this subject:
- a polymorphic code of a secure function is capable of performing the same operation, but by alternately executing different variants of the executable code.
- Each of these variants produces the same result when executed by the microprocessor, but the code of each of these variants is different.
- each of the variants executes a different number of instructions and / or different instructions.
- the execution times of each of these variants by the microprocessor are therefore different from each other. Consequently, the fact of choosing a variant which takes longer to execute than another variant introduces a delay in the execution of the secure function.
- the executable code of each of these variants can be prerecorded in a memory or be generated on the fly during a compilation phase prior to its execution.
- the variant to be executed to carry out the operation is chosen randomly.
- the variant to execute to perform the operation is chosen according to the value of the first or second delay.
- a variant is chosen whose execution time is equal to the first or the second delay chosen randomly.
- Another method for introducing a delay in the execution of a secure function is to interrupt its execution for a predetermined period of time, either by preempting the execution of the secure function by triggering an interrupt, either by inserting into the secure function code calls to independent routines whose execution time is variable.
- the reader can consult the following article: J. -S. Coron et al. : "An efficient method for random delay generation in embedded software” Lecture Notes in Computer Science, vol. 5747 LNCS, pp. 156-170, 2009.
- phase 46 of ordinary time desynchronization the introduction of the first delay is not necessarily carried out in the same way depending on whether, in parallel, phase 60 of enhanced time desynchronization is executed or not.
- the first delay is introduced by modifying the frequency of the clock 6.
- the first delay can be introduced by triggering the execution of a routine Rlld.
- the first delay is chosen randomly using the law P k associated with the first instruction of the sequence Seq k .
- the second delay is chosen randomly using the law S k . Then, the first and second delays thus chosen are added together to obtain a third delay.
- a delay of a duration equal to the third delay is then introduced immediately before the instant ts k .
- this delay can be introduced by executing a loop of useless instructions a number of times sufficient to delay the instant ts k with respect to the instant ts ki by a duration equal to the third delay.
- the first delay since the first delay is introduced by the execution of the routine Rlld, it does not need to be introduced using the module 18 so that the module 18 can be temporarily deactivated.
- the second delay need not be introduced immediately before the first instruction of the sequence Seq k .
- the instruction l Zf, k can be located one or more instructions before the first instruction of the sequence Seq k .
- the instruction l Zf, k can even be located before the first instruction of the Seq ki sequence, or even anywhere between the instructions and the first instruction of the Seq k sequence.
- the second delay does not need to be introduced all at once.
- the second delay is divided into several sub-periods, the sum of which is equal to the duration of the second delay. Then, each of these delay sub-periods is introduced during the execution of the secure function at respective different times situated between the times ts ki and ts k .
- the instructions l zd , k and l zf , k are separated from each other by several intermediate instructions and these delay sub-periods are each introduced before a respective intermediate instruction.
- this module comprises, for each sequence Seq k , identifiers prerecorded in its memory which allow it identify specific instructions of the secure function which precede the sequence Seq k .
- These particular instructions identifiable by the module 20 correspond to the instructions l zd , k and l Zf, k .
- the identifiers used are the addresses of the instructions l zd, k and l Zf, k .
- the module 20 constantly compares the address of the instruction loaded by the microprocessor 10 with the prerecorded addresses of the instructions Iz dk - When the module 20 determines that the address of the instruction loaded by the microprocessor 10 corresponds to one of the prerecorded addresses of the instructions Iz dk then it executes operations 62 and 64. In the case where the address of the instruction loaded by the microprocessor 10 corresponds to the prerecorded address of an instruction l zf k , then the module 20 interrupts the execution of phase 60. If the introduction of the second delay is not yet complete at the time when the instruction l Zf, k is loaded or executed, then the second delay is introduced at this time there, all at once in step 64.
- the distances between two successive values of the group G 2, k are not all the same.
- the n 2, k values of the group G 2, k need not be uniformly distributed.
- the group G 2, k contains the following three values 0, e id and e 4.id instead of the three values 0, e id and 2. i .de as described in the previous embodiments.
- any two successive values of the group G 2, k is not equal to id e , but strictly greater than id e .
- this distance is greater than or equal to l, lid e or 1.5. id e or 2.id e .
- the group G 2, k does not have the value 0.
- the group G 2, k includes only the values id e and 2.id e .
- the T Seq k sequences which verify the condition (4) or (4 ') are not necessarily consecutive Seq k sequences but can be chosen arbitrarily from the set of Seq k sequences.
- the condition (4) or (4 ') need not be satisfied.
- the group G 2, k is generally different from the group G 2, k + i .
- the maximum SPmax k or SSmax k varies according to the value of the index k.
- the same sequence Seq k can be associated with several different laws S k denoted here S k, i , S k, 2 , S k, 3 and so on.
- the laws S k, i , S k, 2 , S k, 3 all satisfy condition (1).
- the laws S k, i , S k, 2 , S k, 3 are for example obtained for values different from the number p, denoted pi, p 2 and p 3 with for example, pi> 1.3, p 2 > Pi and p 3 > p 2 .
- the value obtained for SEmax k is greater when the law S ki is used than when the law S k, 2 is used.
- the module 20 selects from the different possible laws S kl , S k, 2 , S k, 3 the law to be used to randomly choose the value of the second delay. This selection is preferably made according to the context in which the secure function is executed. For example, the module 20 automatically selects the law S k to be used as a function of a required level of security which has previously been transmitted to it. The level of security required can be determined by the computer itself.
- the computer 4 increases the security level which leads to selecting a law S k which further decreases the maximum SEmax k .
- the selection of the security level can also be carried out according to the nature of the processing operations currently carried out by the computer 4.
- the distribution SP k is used in place of the distribution SS k to construct the law S k .
- the statistical distribution SS k is constructed and then used in turn to construct the law S k .
- groups G 2, k of values which verify condition (1) without verifying condition (2) it is possible to construct groups G 2, k of values which verify condition (1) without verifying condition (2).
- the statistical distribution SS k holds counts both the first and second delays already introduced before the execution of the sequence Seq k .
- the statistical distribution SSi is equal to the statistical distribution SP zf, i because before time t zf, i no other second delay than that chosen according to the law Si has not yet been introduced.
- the law P m used to choose the value of the first delay is not necessarily always the same for all the instructions l m .
- the laws P m and P m + i can differ from each other by one or more of the following characteristics:
- the law P m can also associate with one or more values of the group Gi , m , a probability of occurrence zero.
- the law P m can associate a zero occurrence value with the zero value of the first delay.
- this new value is systematically different from the zero value.
- module 20 is not necessarily a software module executed by the same microprocessor as that which performs the secure function.
- the module 20 is a software module executed by a security microprocessor capable of introducing the second delays during the execution of the function secured by the microprocessor 10.
- the module 20 can also be in the form of a hardware module capable of executing phase 60.
- the modules 18 and 20 are modules independent of the microprocessor 10, these modules can be implemented on the same safety microprocessor or in the same hardware module independent of the microprocessor 10.
- the microprocessor 10 which performs the secure function is not necessarily a generic microprocessor equipped with an arithmetic unit and logical and able to execute a program stored in an external memory.
- the microprocessor is a specific microprocessor only capable of performing the secure function.
- such a specific microprocessor is a hardware module dedicated to the execution of this specific function which cannot be programmed to execute new functions other than those provided during design.
- it may be a hardware module designed to perform the secure AES function.
- the initialization phase 40 can be carried out by the computer 4 itself.
- the microprocessor 10 executes the secure function several times and during each of these executions, only the phase 46 of ordinary time desynchronization is implemented.
- the phase 60 of enhanced time desynchronization is not executed.
- the secret information processed by the secure function is replaced by decoys.
- the encryption keys are replaced by randomly drawn encryption keys.
- repeated executions of the secure function during the initialization phase cannot leak this secret information.
- the module 20 records the instant ts k when the execution of this sequence begins.
- the module 20 constructs the statistical distribution SP k and therefore obtains the value of the maximum SPmax k . Then, the module 20 chooses the number n 2, k for example as previously described. In another embodiment, the number n 2, k can be chosen randomly from a limited group of integers.
- the law S k [x] is systematically chosen equal to l / n 2, k . From this moment, the module 20 automatically determines a set of values Xi which satisfies condition (1) and in addition, possibly, condition (2), (3 ') and / or (4'). For this, it uses the distribution SP k which it determined automatically.
- the law S k has been automatically constructed and is then recorded in the memory 12 associated with the sequence Seq k .
- This memory 12 comprises beforehand the identifiers of the instructions l Zd, k and l Zf, k .
- these instructions are, as in the embodiments previously described, respectively a call and return instruction of the routine RI2d.
- the module 20 can also execute the initialization phase 40 at the same time as the execution phase 42. For example, as in the embodiment of the paragraph above, the module 20 constructs the statistical distribution SP k just before the execution of the sequence Seq k from knowledge of the laws P m and the sequence number m of the first instruction in the sequence Seq k . From this determined statistical distribution SP k , the module 20 constructs the law S k as previously described. In this case, the law S k is constructed between the instants ts ki and ts k .
- the microprocessor also identifies the instruction l f from which the insertion of the second delays becomes unnecessary to satisfy the condition SEmax k ⁇ Si , k and can therefore be systematically inhibited. For example, to do this, the microprocessor proceeds as described in the main embodiment. In particular, the microprocessor identifies the last instruction l a , and therefore the instant t a , for which the following condition is satisfied: SPmax a > Si , k .
- the statistical distribution SP m must be determined for different instants ti m , this determination is carried out either during the execution of an initialization phase 40 which precedes the execution of phase 42 or during the execution of an initialization phase 40 executed at the same time as phase 42.
- the instructions l Zd, k and l Zf, k are automatically introduced into the code of the function secured by the computer 4 during phase 40.
- the computer 4 distributes randomly or , on the contrary uniformly, these instructions l zd, k and l zf, k throughout the code of the secure function.
- the sequences Seq k do not necessarily correspond to a sequence of critical instructions.
- phase 60 is executed in response to a command received by the computer 4. In this case, as long as this command has not been received, even if the microprocessor 10 loads or executes an instruction l zd, k , phase 60 is not executed. On the other hand, after reception of this command, as soon as the microprocessor 10 loads or executes an instruction l zd, k , phase 60 is executed. For example, this command is sent and received by the computer 4 as soon as an attack attempt is detected. In another variant, this command comprises the law S k and the group G 2, k to be used to introduce, immediately in response, a second delay.
- phase 60 can be triggered at any time and without waiting for an instruction l zd, k to be loaded or executed by the microprocessor 10.
- the instructions l zd, k and lz f , k can be omitted.
- phase 60 can be interrupted in response to a command received by the computer 4.
- the module 20 determines, by calculation, the maximum SPmax zd, k of the statistical distribution SP zd, k . Then, it compares this maximum SPmax zd, k calculated with a prerecorded threshold top S h . If the maximum SPmax Zd , k calculated is greater than this threshold S h , then the module 20 triggers the execution of phase 60. Otherwise, the module 20 inhibits the execution of phase 60. This makes it possible to automatically adapt the instants of triggering of phase 60 to different secure functions capable of being executed by the same microprocessor 10.
- phase 46 is not executed for the entire duration of the execution of the secure function.
- phase 46 can be interrupted when the instructions being executed are not critical. Then, the execution of phase 46 can also be restarted if necessary.
- phase 60 can continue to be executed during the period of time when phase 46 is interrupted. It is even possible to execute phase 60 only during the period of time when phase 46 is interrupted.
- Steps 62 and 64 can be executed several times for the same sequence Seq k .
- this allows each iteration of steps 62 and 64 to introduce before the execution of the sequence Seq k a second delay which divides by two the maximum SEmax k obtained after the previous iteration of steps 62 and 64 for this same sequence Seq k .
- auxiliary channels Certain attacks by auxiliary channels are carried out taking as a reference instant the instant when the execution of the secure function ends. To make these attacks difficult, it is also necessary to minimize the maximum SEmax k in the case where the reference instant t ref is equal to the instant t der and the direction D ref goes from the instruction l Der to the instruction l Deb . In this case, the statistical distributions SS k or SP k are different from those constructed when the reference instant t ref is equal to the instant t deb . More generally, if it is suspected that a time when a particular instruction of the secure function is executed can be used as a reference time to implement an attack by auxiliary channels, then the methods described here can be implemented. implemented by choosing as instant t ref this instant where this particular instruction is executed.
- the instant t ref can therefore be located between the instants t deb and t der .
- several phases of enhanced temporal desynchronization similar to phase 60 can be executed in parallel. These different phases of enhanced temporal desynchronization then differ from one another only by the instant t ref chosen as the reference instant.
- it is useful to execute in parallel with phase 60 an additional phase of enhanced temporal desynchronization for which the reference instant t ref has been chosen equal to t der . Indeed, this then makes it possible to protect the instructions located at the start of the secure function as well as those located at the end of the secure function.
- Chapter 111.5 Other variants
- the number of instructions contained in the sequence Seq k is for example equal to one.
- the group of instructions of the secure function before each of which steps 48 and 50 are executed does not include all the instructions of the secure function, but only a limited number of these instructions l m .
- this group includes only one instruction out of two for the secure function.
- Inhibiting the execution of phase 60 after the execution of the instruction f allows to further reduce the execution time of the secure function.
- Determining SPmax k and triggering phase 60 only if the maximum SPmax k crosses a predetermined threshold makes it possible to automatically adapt the instant of triggering of phase 60 to different secure functions capable of being executed by the same microprocessor 10.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
- Executing Machine-Instructions (AREA)
- Complex Calculations (AREA)
Abstract
Description
Claims
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| FR1856781A FR3084177B1 (fr) | 2018-07-23 | 2018-07-23 | Procede d'execution d'une fonction, par un microprocesseur, securisee par desynchronisation temporelle |
| PCT/FR2019/051640 WO2020021176A1 (fr) | 2018-07-23 | 2019-07-02 | Procede d'execution d'une fonction, par un microprocesseur, securisee par desynchronisation temporelle |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| EP3827549A1 true EP3827549A1 (fr) | 2021-06-02 |
Family
ID=65494202
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP19756215.0A Withdrawn EP3827549A1 (fr) | 2018-07-23 | 2019-07-02 | Procede d'execution d'une fonction, par un microprocesseur, securisee par desynchronisation temporelle |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20210273778A1 (fr) |
| EP (1) | EP3827549A1 (fr) |
| FR (1) | FR3084177B1 (fr) |
| WO (1) | WO2020021176A1 (fr) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| FR3122747B1 (fr) | 2021-05-07 | 2023-03-31 | Commissariat Energie Atomique | Procede d’execution d’une fonction, securise par desynchronisation temporelle |
-
2018
- 2018-07-23 FR FR1856781A patent/FR3084177B1/fr not_active Expired - Fee Related
-
2019
- 2019-07-02 WO PCT/FR2019/051640 patent/WO2020021176A1/fr not_active Ceased
- 2019-07-02 US US17/261,755 patent/US20210273778A1/en not_active Abandoned
- 2019-07-02 EP EP19756215.0A patent/EP3827549A1/fr not_active Withdrawn
Also Published As
| Publication number | Publication date |
|---|---|
| WO2020021176A1 (fr) | 2020-01-30 |
| FR3084177B1 (fr) | 2020-07-03 |
| FR3084177A1 (fr) | 2020-01-24 |
| US20210273778A1 (en) | 2021-09-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3457620B1 (fr) | Procédé d'exécution d'un code binaire d'une fonction sécurisée par un microprocesseur | |
| WO2009092903A2 (fr) | Procede et dispositifs de protection d'un microcircuit contre des attaques visant a decouvrir une donnee secrete | |
| EP3712794B1 (fr) | Procédé d'exécution d'un code binaire d'une fonction sécurisée par un microprocesseur | |
| EP3300293B1 (fr) | Procédé de chiffrement ou de déchiffrement symétrique par bloc | |
| WO2009112686A2 (fr) | Procede et dispositifs de contre-mesure pour cryptographie asymetrique | |
| EP4086801B1 (fr) | Procédé d'exécution d'une fonction, sécurisé par désynchronisation temporelle | |
| FR2895609A1 (fr) | Procede cryptographique comprenant une exponentiation modulaire securisee contre les attaques a canaux caches, cryptoprocesseur pour la mise en oeuvre du procede et carte a puce associee | |
| FR2917197A1 (fr) | Procede de masquage du resultat d'une operation de multiplication modulaire et dispositif associe. | |
| EP3827549A1 (fr) | Procede d'execution d'une fonction, par un microprocesseur, securisee par desynchronisation temporelle | |
| EP3712795B1 (fr) | Procédé d'exécution, par un microprocesseur, d'un code binaire comportant une fonction appelante et une fonction appelee | |
| EP3300292B1 (fr) | Procédé de chiffrement ou de déchiffrement protégé contre des attaques par canaux cachés | |
| FR2960728A1 (fr) | Procede de determination d'une representation d'un produit et procede d'evaluation d'une fonction | |
| EP3306465B1 (fr) | Procédé de traitement cryptographique comprenant une multiplication d'un point d'une courbe elliptique par un scalaire | |
| EP1387519A2 (fr) | Procédé de sécurisation d'un ensemble électronique contre des attaques par introduction d'erreurs | |
| EP1869545B1 (fr) | Dispositif implementant la multiplication modulaire de montgomery | |
| EP4089559B1 (fr) | Microprocesseur équipé d'une unité arithmétique et logique et d'un module matériel de sécurisation | |
| FR2969875A1 (fr) | Procede et systeme pour l'authentification multi-modale multi-seuil utilisant le partage de secret | |
| EP4057169B1 (fr) | Procédé d'exécution d'un code binaire d'un programme d'ordinateur par un microprocesseur | |
| EP4089557B1 (fr) | Procédé d'exécution d'un code binaire par un microprocesseur | |
| EP3799347B1 (fr) | Sécurisation du chiffrement des et du déchiffrement des inverse | |
| EP4057168B1 (fr) | Procédé d exécution d'un programme d ordinateur par un appareil électronique | |
| FR2994608A1 (fr) | Procede de traitement cryptographique comprenant un acces securise a une pluralite de tables de substitution, dispositifs et produit programme d'ordinateur correspondants. | |
| FR3166774A1 (fr) | Réduction modulaire d’opérations cryptographiques | |
| FR3053862A1 (fr) | Procede de generation des parametres caracterisant un protocole cryptographique | |
| EP3614617A1 (fr) | Procédé et dispositif de génération de paramètre(s) d'un protocole cryptographique asymétrique à partir d'une blockchain, procédé et appareil de cryptage ou de décryptage et programme d'ordinateur associés |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: UNKNOWN |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE |
|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| 17P | Request for examination filed |
Effective date: 20210118 |
|
| AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| DAV | Request for validation of the european patent (deleted) | ||
| DAX | Request for extension of the european patent (deleted) | ||
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN |
|
| 18D | Application deemed to be withdrawn |
Effective date: 20230201 |