Device and method for executing a cryptographic algorithm
Abstract
The device for executing a cryptographic algorithm comprises computational means, data storage means and data communication means. The storage means comprise determined values r and N, a predetermined function f(x) with a value x, as well as an algorithm, by means of which the computational means can determine: the value of z = f(x) modulo r.N; the value of y>r< = f(x) modulo r; if z modulo r is equal to or not equal to y>r<, in order to detect an error in the cryptographic algorithm calculation when z modulo r is not equal to y>r<, and to calculate the value y = z modulo N when z modulo r is in fact equal to y>r<. One possible field of application for said invention is chip cards.
Term
No projected expiry on record.
- Priority
- Filed
- Published
- Today
39 claims: 6 independent, 33 dependent
- 1R E V E ND I C A T I O N S 1. Dispositif (1) d'exécution d'un algorithme cryptographique, comprenant des moyens de calcul (2) , des moyens de mémorisation de données (4, 6) et des moyens de communication de données (8) , caractérisé en ce les moyens de mémorisation (4,6) contiennent :des valeurs déterminées r et N, une fonction prédéterminée f (x) d'une valeur x, ainsi qu'un algorithme permettant aux moyens de calcul (2) d'établir : REVE ND ICATIONS 1. Device (1) for executing a cryptographic algorithm, comprising calculation means (2), data storage means (4, 6) and data communication means (8), characterized in that the storage means (4,6) contain: determined values r and N, a predetermined function f (x) of a value x, and an algorithm allowing the calculation means (2) to establish: - la valeur de z = f (x) modulo r.N ;- la valeur de yr = f (x) modulo r ;the value of z = f (x) modulo rN;- the value of yr = f (x) modulo r;- if z modulo r is equal to or not equal to yr, for : - si z modulo r est égal ou pas égal à yr, pour : - dans le cas où z modulo r n'est pas égal à yr, constater une erreur dans le calcul de l'algorithme cryptographique, et - dans le cas où z modulo r est effectivement égal à yr, calculer la valeur y = z modulo N. - in the case where z modulo r is not equal to yr, find an error in the calculation of the cryptographic algorithm, and - in the case where z modulo r is actually equal to yr, calculate the value y = z modulo N.
- 6Device (1) for executing a cryptographic algorithm, comprising calculation means (2), data storage means (4, 6) and data communication means (8), characterized in that the means for storage (4,6) contain:determined values r and N, a predetermined function f (x) of a value x, and a performance mode type algorithm of the Chinese Remainder Theorem (TRC) allowing the means calculation (2) to establish: 6. Dispositif (1) d'exécution d'un algorithme cryptographique, comprenant des moyens de calcul (2) , des moyens de mémorisation de données (4, 6) et des moyens de communication de données (8) , caractérisé en ce les moyens de mémorisation (4,6) contiennent : des valeurs déterminées r et N, une fonction prédéterminée f (x) d'une valeur x, ainsi qu'un algorithme du type à exécution en mode du théorème des restes chinois (TRC) permettant aux moyens de calcul (2) d'établir : La valeur de zp=xAdp mod p*r et la valeur de zq=xAdq mod q*r où r est un entier aléatoire;La valeur de bp=zpAdq mod r et la valeur de bq=zqAdp mod r;The value of zp= xATdp mod p * r and the value of zq= xATdq mod q * r where r is a random integer;The value of bp= zpATdq mod r and the value of bq= zqATdp mod r;Le constat d'une erreur dans le calcul si la valeur de bp mod r n'est pas égale à la valeur de bq mod r;- La valeur y = TRC(zp mod p, zq mod q) s'il n'y a pas eu d'erreur constatée. The finding of an error in the calculation if the value of bp mod r is not equal to the value of bq mod r;- The value y = TRC (zp mod p, zq mod q) if there has been no error found.
- 9Device (1) for executing a cryptographic algorithm, comprising calculation means (2), data storage means (4, 6) and data communication means (8), characterized in that the means for storage (4,6) contain:determined values r and N, a predetermined function f (x) of a value x, and a performance mode type algorithm of the Chinese Remainder Theorem (TRC) allowing the means calculation (2) to establish: the value of y = TRC (zp mod p, zq mod q);the finding of a calculation error if (y-zp ) * (y-zq ) is different from 0 modulo N. In this case, the value of y is not returned. 9. Dispositif (1) d'exécution d'un algorithme cryptographique, comprenant des moyens de calcul (2) , des moyens de mémorisation de données (4, 6) et des moyens de communication de données (8) , caractérisé en ce les moyens de mémorisation (4,6) contiennent : des valeurs déterminées r et N, une fonction prédéterminée f (x) d'une valeur x, ainsi qu'un algorithme du type à exécution en mode du théorème des restes chinois (TRC) permettant aux moyens de calcul (2) d'établir : la valeur de y = TRC(zp mod p, zq mod q) ;le constat d'une erreur de calcul si (y- zp ) * (y- zq ) est différent de 0 modulo N. Dans ce cas, la valeur de y n'est pas renvoyée.
- 21A method of executing a cryptographic algorithm, characterized in that it comprises, from determined values r and N, and a predetermined function f (x) of a value x, the steps of:21. Procédé d'exécution d'un algorithme cryptographique, caractérisé en ce qu'il comprend, à partir de valeurs déterminées r et N, et d'une fonction prédéterminée f (x) d'une valeur x, les étapes de : - calculate the value of z = f (x) modulo rN;- calculer la valeur de z = f (x) modulo r.N ;- calculate the value of yr = f (x) modulo r;- calculer la valeur de yr = f (x) modulo r ;- determine if z modulo r is equal to or not equal to yr, for : - déterminer si z modulo r est égal ou pas égal à yr, pour : - dans le cas où z modulo r n'est pas égal à yr, constater une erreur dans le calcul de l'algorithme cryptographique, et - dans le cas où z modulo r est effectivement égal à yr/ calculer la valeur y = z modulo N. - in the case where z modulo r does not equal to yr, find an error in the calculation of the cryptographic algorithm, and - in the case where z modulo r is actually equal to yr / calculate the value y = z modulo N.
- 26A method of executing a cryptographic algorithm, characterized in that it comprises, from determined values r and N, and a predetermined function f (x) of a value x, as well as an algorithm of the type in execution mode of the Chinese Remainder Theorem (TRC), the following calculation steps:- calculate the value of zp= xATdp mod p * r and the value of zq= xATdq mod q * r where r is a random integer;calculate the value of bp= zp dq mod r and the value of bq= zqATdp mod r;determine the finding of an error in the calculation if the value of bp mod r is not equal to the value of bq mod r;calculate the value y = TRC (zp mod p, zq mod q) if there has been no error found. 26. Procédé d'exécution d'un algorithme cryptographique, caractérisé en ce qu'il comprend, à partir de valeurs déterminées r et N, et d'une fonction prédéterminée f (x) d'une valeur x, ainsi qu'un algorithme du type à exécution en mode du théorème des restes chinois (TRC) , les étapes de calculs suivantes : - calculer la valeur de zp=xAdp mod p*r et la valeur de zq=xAdq mod q*r où r est un entier aléatoire;calculer la valeur de bp=zp dq mod r et la valeur de bq=zqAdp mod r;déterminer le constat d'une erreur dans le calcul si la valeur de bp mod r n'est pas égale à la valeur de bq mod r;calculer la valeur y = TRC(zp mod p, zq mod q) s'il n'y a pas eu d'erreur constatée.
- 29Method (1) for executing a cryptographic algorithm, characterized in that it comprises, from the determined values r and N, a predetermined function f (x) of a value x, as well as an algorithm of the type in execution mode of the Chinese Remainder Theorem (TRC), the following calculation steps:calculate the value of y = TRC (zp mod p, zq mod q);determine the finding of a calculation error if (y-p ) * (y-zq ) is different from 0 modulo N and in this case the value of y is not returned. 29. Procédé (1) d'exécution d'un algorithme cryptographique, caractérisé en ce qu'il comprend, à partir des valeurs déterminées r et N, une fonction prédéterminée f (x) d'une valeur x, ainsi qu'un algorithme du type à exécution en mode du théorème des restes chinois (TRC) , les étapes de calculs suivantes : calculer la valeur de y = TRC(zp mod p, zq mod q) ;déterminer le constat d'une erreur de calcul si (y- zp ) * (y- zq ) est différent de 0 modulo N et dans ce cas, la valeur de y n'est pas renvoyée.
Independent claims6
105 paragraphs in 2 sections, as filed
DEVICE AND METHOD FOR PERFORMING A CRYPTOGRAPHIC ALGORITHM
The invention relates to the field of cryptographic algorithms intended in particular for communicating electronic devices, a non-restrictive example of which is a smart card. Cryptographic algorithms are commonly executed in such devices to provide encryption of transmitted data and / or decryption of received data when they must remain confidential. To this end, there is provided a microprocessor capable of executing the cryptographic algorithm, associated with a frozen memory (ROM) for recording the program containing the algorithm and a re-inscriptibe memory (RAM) for constituting registers and containing the evolutionary data. The encoded information of the device passes between the microprocessor and a communication interface, forming an outward port.
It is possible for fraudsters to interfere with the cryptographic algorithm by acting either at the communication interface, or within the microprocessor and its memories, in order to break the code in order to make intelligible the encoded data. or modify this data to their advantage.
To minimize this type of attack risk, several protection strategies have already been considered, both in terms of the hardware realization of the devices and at the level of the calculation processes.
In the field of smart cards, among others, there are several possible attacks, including a so-called "fault attack". In this type of attack, the attacker induces any fault during the calculation of a cryptographic algorithm, in order to exploit the presence of this fault to extract secret information.
This type of attack can be envisaged in particular with the RSA algorithm (Rivert, Shamir, Adleman), which is the one most used in cryptography in this field of application. Security is based on factoring. We establish a number N which is the product of two large prime numbers p and q, ie N = pq To sign a number x which expresses a message, we use a secret key d in order to calculate the value y = x<sup>d</sup> modulo N. It is generally remembered that a value v expressed modulo N (abbreviation "v mod N") is equal to the remainder less than N at the end of a subtraction of an integer multiple of N; for example 11 modulo 3 = 2, the remainder less than 3 after the subtraction of the multiple 3 times 3.
To verify that the code signature is correct, we use a corresponding key, called public key, which is an exponent e. We just check that x = y<sup>e</sup> mod N is equal to the constituent value of the message.
Figure 1 illustrates the process of calculating the signature y = x<sup>d</sup> modulo N using the Chinese Remainder Theorem (TRC). The theorem of Chinese remains is also known by its Anglo-Saxon name "Chinese remainder theorem" (CRT).
To save time, four times faster execution of the algorithm, one does not carry out the calculations directly modulo N, but one carries out first modulo calculations p and modulo q.
We denote the values of x modulo p and x modulo q respectively by x<sub>p</sub> and x<sub>q</sub>. Moreover, denote by dp the value d modulo (p-1), and by d<sub>q</sub> the value d modulo (q-1). We calculate modulo p by calculation of y<sub>p</sub> = x<sub>p</sub> exhibitor d<sub>p</sub> modulo p. Similarly, we calculate modulo q the value y<sub>q</sub> = x<sub>q</sub> exhibitor d<sub>q</sub> modulo q.
After getting the values y<sub>p</sub> and there<sub>q</sub> respectively modulo p and modulo q, they are recombined by the Chinese remains theorem to obtain the value y mentioned above.
Now suppose that an attacker, by any method, causes an error during the calculation of<sub>p</sub>, but not during that of<sub>q</sub>. This would imply that the value of y<sub>p</sub> will be incorrect. The fact that it is an incorrect value is indicated by a circumflex accent above the "y" in Figure 1. However, the value of y<sub>q</sub> will be correct. As a result, when values are recombined<sup>AT</sup>there<sub>p</sub> and there<sub>q</sub> by the TRC, the resulting signature will be incorrect.
If the attacker knows the value of the verification public key e, he can calculate the value <sup>AT</sup>there<sup>e</sup> - x modulo N. We also have the correct signature y, equal to x<sup>d</sup> modulo N. From the pre-established relation x = y<sup>e</sup>, the attacker only has to calculate that there<sup>e</sup> - x modulo N. It extracts the greatest common divisor (gcd) with N, ie: pgdc (<sup>Λ</sup>there<sup>e</sup> - x mod N, N) = q. He then obtains the secret factor q. As a result, the RSA code is effectively broken.
In other words, if someone is able to induce any error during a modulo calculation while the modulo q calculation is correct, it can completely break the RSA code. A first countermeasure to avoid this kind of scenario is to recalculate the entire algorithm. We compare the values obtained at the end of the successive calculations. If they are identical, it is assumed that there was no error induced. A problem with this approach is that it does not detect a permanent fault. For example, it will not be possible to detect an attack in which the induced error consists in systematically forcing a bit to a determined logical state. Another method of countering such an attack is based on verification. A signature is obtained which is calculated by the TRC. Then we check that the signature is correct and that the public key is good. This approach is very reliable, but the signature algorithm does not always know the verification key e, which prevents it from being able to implement it in certain applications.
Another disadvantage of this method is that if e is large, it implies two exponentiations. The signature is then twice as slow.
According to a countermeasure to the fault attack described by Shamir in patent document 5,633,929, the following algorithm is used:
1. Choose a random number r of low value, 2. Calculate:
Yr = x<sup>d</sup> mod rp, and y<sub>rq</sub> = x<sup>d</sup> mod rq;
3. If there<sub>rp</sub> ≠ y<sub>rq</sub> (mod r), then there is an error, (maybe induced by an attack, and therefore an interruption of the algorithm, otherwise;
4. Output: y = TRC (y<sub>rp</sub> mod p, q<sub>rq</sub> mod q<sup>)</sup>.
Thus, for a random number r, instead of calculating modulo p, one calculates modulo rp and modulo rq Then, one verifies that these two values are equal modulo r. If these two values are different, it is certain that there was an error. On the other hand, if they are equal, we can suppose that there was no error, with a probability of l / r being wrong in this assumption.
A disadvantage of this method is that one calculates<sub>rp</sub> = x<sup>d</sup> mod rp, not x<sup>dp</sup> mod rp. Now, the value of the module size, which is usually a 1024-bit number, while dp is a number of the size of half the module, or 512 bits in
1 example.
This implies that in the normal scheme, without fault detection, a first exponentiation with an exponent and a module of 512 bits, and a second exponentiation with an exponent and a module of 512 bits is carried out. On the other hand, with the method of countermeasure according to the patent document 5 633 929, it is not necessary to use<sub>p</sub>, but D. This implies that the exponent will have a size of 1024 bits on each side.
So we lose in effectiveness.
Another disadvantage of the Shamir method is that it only works for the TRC-based calculation mode. However, it is also possible to calculate directly x<sup>d</sup> modulo n, that is, without resorting to the theorem of Chinese remains.
Indeed, there are two ways to store the secret key. Either we keep the value d, or we keep the values of<sub>p</sub>, d<sub>q</sub>, p and q. When calculating directly, the standard mode is used; when we calculate modulo p and modulo q, we use the TRC mode.
In view of the above, the invention proposes three countermeasures, including default attacks, which allow exponentiation with an exponent of the size of the module and which can adapt to standard mode or TRC mode.
More particularly, the first countermeasure of the invention concerns, according to a first object, a device for executing a cryptographic algorithm, comprising calculation means, data storage means and data communication means, characterized in that the storage means contain: determined values r and N, a predetermined function f (x) of a value x, and an algorithm allowing the calculation means to establish:
the value of z = f (x) modulo rN;
- the value of y<sub>r</sub> = f (x) modulo r; - if z modulo r is equal to or not equal to y<sub>r</sub>, for :
- in the case where z modulo r is not equal to y<sub>r</sub>, find an error in the calculation of the cryptographic algorithm, and - in the case where z modulo r is actually equal to y<sub>r</sub>, calculating the value y = z modulo N. In an embodiment where the algorithm is of the execution type in standard mode, it allows the calculation means to establish:
- the value of z = x<sup>d</sup> mod rN;
- if x<sup>d mod 2 Power s</sup> is equal to or not equal to z modulo (r), for:
- in the case where x<sup>d mod 2 Power s</sup> does not equal z modulo (r), find an error in the calculation of the cryptographic algorithm, and
- in the case where x<sup>d mod 2 Puisseles</sup> is equal to z modulo (r), calculate the value y = z mod N.
In one embodiment where the algorithm is of the execution type in the mode of the Chinese Remainder Theorem (TRC), the algorithm allows the computation means to establish: the value of R<sub>p</sub> = rr<sub>p</sub> = r<sub>p</sub> || r<sub>p</sub> and K<sub>p</sub> = d<sub>p</sub> + k<sub>p</sub> (p
- 1), where: r<sub>p</sub> is a value in [0.2<sup>S</sup>), k<sub>p</sub> e [0,2<sup>t</sup>), p is a prime number, and d<sub>p</sub> = d modulo (p - 1);
- the value of z<sub>p</sub> = x<sup>Kp</sup> mod R<sub>p</sub>p; - the finding of an error in the calculation of the cryptographic algorithm if x<sup>Kp mod 2 Power s</sup> does not equal z<sub>p</sub> (mod r);
- the value of R<sub>q</sub> = rr<sub>q</sub> = r<sub>q</sub> || r<sub>q</sub> and Kg = d<sub>q</sub> + k<sub>q</sub>(q - 1), where: r<sub>q</sub> is a value in [0.2<sup>S</sup>), k<sub>q</sub> e [0,2<sup>fc</sup>), q is a prime number, and d<sub>q</sub> = (d modulo q) - 1;
- the value of z<sub>q</sub> = x<sup>kq</sup> mod R<sub>q</sub>q; the finding of an error in the calculation of the cryptographic algorithm if x<sup>Kq mod 2 Power s</sup> does not equal z<sub>q</sub> (mod r); - the value y = TRC (z<sub>p</sub> mod p, z<sub>q</sub> mod q) if there has been no error found.
In the preferred embodiments, s = 16, t = 32, the value r is a prime number, advantageously equal to 2<sup>1S</sup> + 1, where the value of r is a multiple of a prime number.
Advantageously, the value N = pq is established, where p and q are prime numbers.
The value x can correspond to protected information, with the function f (x) being given by f (x) = x<sup>d</sup>, where d is a private key.
Advantageously, the function f (x) is equal to g (x) modulo Φ, where g (x) = x<sup>d</sup>, and Φ is the indicator function of Euler of the module. The second countermeasure of the invention applies to an embodiment where the algorithm is of the execution type in the mode of the Chinese Remainder Theorem (TRC), the algorithm allowing the computation means to establish: The value of z<sub>p</sub>xD =<sub>p</sub> mod p * r and the value of z<sub>q</sub>xD =<sub>q</sub> mod q * r where r is a random integer;
The value of b<sub>p</sub>= z<sub>p</sub><sup>AT</sup>d<sub>q</sub> mod r and the value of b<sub>q</sub>= z<sub>q</sub> d<sub>p</sub> mod r; - The finding of an error in the calculation if the value of b<sub>p</sub> mod r is not equal to the value of b<sub>q</sub> mod r;
The value y = TRC (z<sub>p</sub> mod p, z<sub>q</sub> mod q) if there has been no error found.
In a variant of the algorithm above applied to the second countermeasure, it is possible to use the integer of<sub>p</sub>= d<sub>p</sub> + rl * (p-1) where ri is a random integer. It is also possible to use the result of the calculation of (x + t * n) instead of x, where t is a random integer. The advantage of the second countermeasure as the first countermeasures is that they protect the execution of the cryptographic algorithm against fault attacks on exponentiation.
The third countermeasure of the invention consists in protecting the step of calculating the value y = TRC (z<sub>p</sub> mod p, z<sub>q</sub> mod q) from the following method:
Determine the value y = TRC (z<sub>p</sub> mod p, z<sub>q</sub> mod q);
Check that (y-z<sub>p</sub> ) * (y-z<sub>q</sub> ) = 0 mod N. If this is not the case, return an error message. Otherwise, return y.
The third countermeasure therefore makes it possible to protect the cryptographic algorithm against a possible fault attack on the calculation step of y by theorem of the Chinese remainder. A variant of the third countermeasure is to execute the following method:
Determine the value y = TRC (z<sub>p</sub> mod p, z<sub>q</sub> mod q);
Calculate α = (y-z<sub>p</sub>) mod p * r and β = (y-z<sub>q</sub>) mod q * r; Let τ be twice the size of the integer r expressed in number of bits; - Calculate t = α * β / N mod 2<sup>AT</sup>τ;
Check that α.β-t * N = 0, the computation being carried out on the integers. If it does not, return an error message. If not send back y.
The advantage of the variant of the third countermeasure is that the calculations are effected by using shorter integers than in the third countermeasure.
In the embodiment, the algorithm is of the RSA type (Rivert, Shamir, Adleman); however, other types of algorithms may be considered.
Preferably, the device interrupts the data communication in the event of an error in said calculations.
The device in question can be a smart card.
According to a second object, the invention relates to the use of the aforementioned device to counter default attacks.
According to a third object, the invention relates to a method for executing a cryptographic algorithm, characterized in that it comprises, from determined values r and N, and a predetermined function f (x) of a value x, the steps of:
- calculate the value of z = f (x) modulo rN;
- calculate the value of y<sub>r</sub> = f (x) modulo r;
- determine if z modulo r is equal to or not equal to y<sub>r</sub>, for :
- in the case where z modulo r is not equal to y<sub>r</sub>, find an error in the calculation of the cryptographic algorithm, and - in the case where z modulo r is actually equal to y<sub>r</sub>, calculate the value y = z modulo N. According to a fourth object, the invention relates to the use of the method for countering fault attacks.
The optional features presented above under the device apply mutatis mutandis to this method.
The invention and the advantages thereof will appear more clearly on reading the description which follows of the preferred embodiments, given purely by way of non-limiting examples, with reference to the appended drawings in which: FIG. analyzed, is a symbolic representation of the cryptographic calculation method of the signature y = x<sup>d</sup> mod N using the Chinese Remainder Theorem (TRC);
FIG. 2 is a block diagram schematically representing the elements of a smart card capable of implementing the invention; and
FIG. 3 is a symbolic representation of the general approach to error detection in a cryptographic algorithm according to the invention.
The embodiments are described in the context of smart cards, but can of course apply to all other devices equipped with cryptographic calculation means.
As shown in FIG. 1, the smart card 1 comprises a microprocessor 2 coupled to a frozen memory (ROM) 4 and to a random access memory (RAM) 6, the whole forming a set allowing, among other things, the execution of cryptographic algorithms. More precisely, the microprocessor 2 comprises the arithmetic calculation means necessary for the algorithm, as well as data transfer circuits with memories 4 and 6. The frozen memory 4 contains the executable program of the cryptographic algorithm in the form of source code, while the random access memory 6 includes registers that can be updated for the storage of calculation results.
The smart card 1 also includes a communication interface 8 connected to the microprocessor 2 to enable the exchange of data with the external environment. The communication interface 8 may be of the "contact" type, being in this case formed of a set of contact pads intended to connect to a contactor of an external device, such as a card reader, and or "contactless" type. In the latter case, the communication interface 8 comprises an antenna and radio communication circuits for wireless data transfer. This link may also allow a transfer of power supply of the circuits of the card 1. All the material means constituting the card are known and will not be described in detail for the sake of brevity.
In the example, the cryptographic algorithm is of the RSA type (Rivert, Shamir, Adleman), the characteristics of which have been described in the introductory part.
In the following, we will focus more particularly on the detection of errors in the algorithmic calculation and the countermeasures according to the present invention. The error in question may be deliberately provoked by an attacker who aims to break the cryptographic code used by the smart card, as explained in the introductory part. Thus, to face this eventuality, the countermeasures make it possible to detect such errors and react accordingly.
The principle of error detection is shown schematically in FIG. 3. In general, the execution of the cryptographic algorithm involves a computation of a function f (x) modulo N, whatever the function f (x) . Thus, for the case of an RSA algorithm, we take a value of N which is the product of two large prime numbers p and q. As shown in Figure 3, we take a random number r, and we calculate on the one hand z = f (x) modulo rN, and y<sub>r</sub> = f (x) modulo r. Then we check that z mod r = y<sub>r</sub>. If this is not the case, we are certain that there is an error; otherwise it is assumed, with a probability of being wrong of l / r, that there is no error.
Then, to find the value of y = f (x) modulo N, we simply calculate y = z mod N.
In the implementation, r is a 32-bit number. It will now be described how to apply a countermeasure according to the invention when the algorithm is executed in standard mode. In standard mode, the value of x is calculated "brutally"<sup>d</sup> mod N, where d is a number which constitutes a secret key of the code.
In general, the procedure is as follows. We calculate the value of one part of f (x) modulo rN, and on the other hand of f (x) modulo r; we check that these two calculated values are equal. If this is the case, assume there is no error.
When applying this to the RSA algorithm, proceed as follows. We no longer take a random number, but a specific number, which is here the number 2<sup>16</sup>1. This number has the interesting property of being a prime number. We simply calculate the value z = x<sup>d</sup> modulo (2<sup>16</sup>+1) .N. Then, we calculate the value x<sup>d</sup> mod (2<sup>16</sup> + 1).
In the embodiment, the value of x is not calculated<sup>d</sup>, but instead we calculate the value of x<sup>d mod φ</sup> mod (2<sup>1S</sup> + 1), where Φ is the Euler indicator function of the module. We can reduce modulo Φ
(2<sup>ιe</sup> + 1).
We note that when a number takes as value a prime number P, we have the condition: Φ (P) = Pl. Applied to the example, this condition gives: Φ (2<sup>16</sup> +
1) = 2<sup>16</sup>.
Because of this, we do not have to calculate x<sup>d</sup> modulo (2<sup>1S</sup> +
1), but rather x<sup>d mod 2 Power 1S</sup> modulo (2<sup>16</sup> + 1). This value is a number of 16 bits only. The operation is very fast.
Another advantage of this way of proceeding is that modulo 2<sup>16</sup> is easy to calculate, in terms of
16 last bits of the secret key d.
In standard mode, we will no longer take a random number, but a prime number, or a prime number multiplied by a random number. The verification will each time be done modulo the prime number that we chose. By proceeding in this way, the calculation time can be reduced. Indeed, the Φ indicator function of Euler can be evaluated easily only for prime numbers.
On the other hand - and this is where the strength of the RSA algorithm lies - to break the RSA code modulo N (= pq), we have to calculate Φ (N). The value of this function is equal to (pl). (q-1). If we do not know the factorization of N, we can not calculate Φ (N). Thus, the countermeasure according to the example for the standard mode amounts to performing the following algorithm:
1. Calculate z = x<sup>d</sup> mod (2<sup>16</sup> + 1) N {no random number used, but an Φ indicator function of Euler};
2 . Yes<sub>χ</sub>dr od <sub>2</sub> power 16 <sub>≠</sub> _. <sub>(mQd (2</sub> _.6 <sub>+ 1} d mQd 2</sub> 6 is the 16 low-order bits of d}, then output ERROR and stop the algorithm, otherwise;
3. Output y = z mod N.
It is understandable that it is thus possible to detect a fault having as a possible origin an attack, and therefore to take preventive measures. These consist in particular in stopping the algorithmic process and interrupting any data exchange with the communication interface 8.
It will now be described how to apply a countermeasure according to the invention when the algorithm is executed in calculation mode based on the Chinese Remainder Theorem (TRC), hereinafter referred to as TRC mode.
In TRC mode, we simply perform modulo p and modulo q calculations. We can perform calculations on the basis of a modulo of a prime number multiplied by the module (N), or we can take a prime number multiplied by a random number. We will always check on the basis of a modulo of a prime number. This produces a calculation with a modulo of a first - 1.
As an example, we will consider, in TRC mode, the modulo calculation p. We choose a random number k, for example 16 bits. We will use it to counter other attacks. We will also take k<sub>p</sub>, a 32-bit number, to avoid further attacks, such as current attacks or others. It will be recalled that a current attack is based on the analysis of the current consumed by the processor at various stages of the calculation, aiming to determine, for example, the characteristics of a current exponentiation calculation.
We establish the following relation: 2<sup>16</sup>+1 multiplied by a value r<sub>p</sub>, is equal to this value r<sub>p</sub> that one concatenates with oneself (here, r<sub>p</sub> is a value of 16 bits). This applies to any prime number.
We calculate a K value<sub>p</sub> (to make the exponent random).
We calculate the z value<sub>p</sub> = x<sup>Kp</sup> modulo R<sub>p</sub>.p. Then we check that modulo 2 calculations<sup>1G</sup>+1 are equal. If this is the case, we can assume, with a risk of being wrong 2<sup>lδ</sup>, that we will not have an error.
The above reflects the general principle. For the RSA cryptographic algorithm, we will not take a random number, but a prime number. In this way, we can reduce the exponent modulo a prime number - 1. We can also take any number multiplied by a prime number.
In summary, the countermeasure according to the example for the TRC mode amounts to performing the following algorithm:
1. Choose randomly r<sub>p</sub> in [0.2<sup>16</sup>) and k<sub>p</sub> e [0,2<sup>32</sup>) (to counter current attacks); 2. Let R be<sub>p</sub> = (2<sup>16</sup> + l) r<sub>p</sub> = r<sub>p</sub> || r<sub>p</sub> and K<sub>p</sub> = d<sub>p</sub> + k<sub>p</sub> (p -
D;
3 . calculate z<sub>p</sub> = x<sup>Kp</sup> mod R<sub>p</sub>p; 4. Yes<sub>X</sub>KP tnod <sub>2</sub> power 16 <sub>≠</sub> ^ <sub>(mQd (2</sub> 6 <sub>+ 1)} al ors</sub> output ERROR and stop the algorithm, otherwise;
5. Repeat steps 1 to 4 modulo q; 6. Output y = TRC (z<sub>p</sub> mod p, z<sub>q</sub> mod q).
(The symbol || indicates a concatenation, so a || b = the concatenation of a and B. For example, for a = 1011 and b = 1101, then a || b = 10111101.)
It is noted from the foregoing that these operations are carried out for an R which is either a prime number or a prime number multiplied by any number. Verification is always modulo this prime number, more generally, a prime power. The invention is valid not only for the RSA cryptographic algorithms, presented here for illustrative purposes only, but for all cryptographic algorithms where modular arithmetic is used, since this technique makes it possible to verify that any modular function is correct or not.
Contents2
Every citation, both ways
| Document | Relation | Office | Category | Cited during | Relevant claims |
|---|---|---|---|---|---|
| WO2019079048A1 | Cited by | World Intellectual Property Organization (WIPO) | – | International search | – |
| DE102004001659B4 | Cited by | Germany | – | Search report | – |
| WO2006095281A1 | Cited by | World Intellectual Property Organization (WIPO) | – | International search | – |
| US8817974B2 | Cited by | United States of America | – | Applicant | – |
| US11418334B2 | Cited by | United States of America | – | Applicant | – |
| US6144740A | Cites | United States of America | A | International search | 6,9,26,29 |
| WO9852319A1 | Cites | World Intellectual Property Organization (WIPO) | A | International search | 1,3,6,9,20,21,23,26,29,39 |
4 priority claims, no other members on record
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 0100688 | France | A | |
| 0100688 | France | A | |
| 0100688 | – | – | – |
| FR20010000688 | – | – | – |
9 legal events, as 3 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Non-entry into the national phaseNENP | NENP | JP | |
| Wipo information: withdrawn in national officeWithdrawnWWW | WWW | WO | |
| Procedure relating to pct application: ceased to have effect for deCeased8642 | 8642 | DE | |
| Wipo information: published in national officeWWP | WWP | WO | |
| Wipo information: entry into national phaseWWE | WWE | WO | |
| Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)DFPE | DFPE | WO | |
| Ep: the epo has been informed by wipo that ep was designated in this application121 | 121 | WO | |
| Designated statesAK | AK | WO | |
| Designated countries for regional patentsAL | AL | WO |
Numbers
- Publication
- 02/058321
- Publication, DOCDB
- 02058321
- Publication, EPODOC
- WO02058321
- Application
- 200113
- Application, DOCDB
- 0200113
- Application, EPODOC
- WO2002FR00113
Titles2
- English
- DEVICE AND METHOD FOR EXECUTING A CRYPTOGRAPHIC ALGORITHM
- French
- DISPOSITIF ET PROCEDE D'EXECUTION D'UN ALGORITHME CRYPTOGRAPHIQUE
Classification
- CPC, 5
- G06F7/72
- G06F7/723
- H04L9/004
- H04L9/302
- H04L2209/08
- IPC, 2
- G06F7 72
- H04L9 30
Designated states118
- Regional, 61
- African Regional Intellectual Property Organization (ARIPO)
- Ghana
- Gambia
- Kenya
- Lesotho
- Malawi
- Mozambique
- Sudan
- Sierra Leone
- Eswatini
- United Republic of Tanzania
- Uganda
- Zambia
- Zimbabwe
- Eurasian Patent Organization (EAPO)
- Armenia
- Azerbaijan
- Belarus
- Kyrgyzstan
- Kazakhstan
- Republic of Moldova
- Russian Federation
- Tajikistan
- Turkmenistan
and 37 moreShow fewer
- European Patent Office (EPO)
- Austria
- Belgium
- Switzerland
- Cyprus
- Germany
- Denmark
- Spain
- Finland
- France
- United Kingdom
- Greece
- Ireland
- Italy
- Luxembourg
- Monaco
- Netherlands (Kingdom of the)
- Portugal
- Sweden
- Türkiye
- African Intellectual Property Organization (OAPI)
- Burkina Faso
- Benin
- Central African Republic
- Congo
- Côte d’Ivoire
- Cameroon
- Gabon
- Guinea
- Equatorial Guinea
- Guinea-Bissau
- Mali
- Mauritania
- Niger
- Senegal
- Chad
- Togo
- National, 57
- United Arab Emirates
- Antigua and Barbuda
- Albania
- Australia
- Bosnia and Herzegovina
- Barbados
- Bulgaria
- Brazil
- Belize
- Canada
- China
- Colombia
- Costa Rica
- Cuba
- Czechia
- Dominica
- Algeria
- Ecuador
- Estonia
- Grenada
- Georgia
- Croatia
- Hungary
- Indonesia
and 33 moreShow fewer
- Israel
- India
- Iceland
- Japan
- Democratic People’s Republic of Korea
- Republic of Korea
- Saint Lucia
- Sri Lanka
- Liberia
- Lithuania
- Latvia
- Morocco
- Madagascar
- North Macedonia
- Mongolia
- Mexico
- Norway
- New Zealand
- Oman
- Philippines
- Poland
- Romania
- Singapore
- Slovenia
- Slovakia
- Tunisia
- Trinidad and Tobago
- Ukraine
- United States of America
- Uzbekistan
- Viet Nam
- Yugoslavia, later Serbia and Montenegro (until 2006)
- South Africa