EP1419434A1 - Secure method for performing a modular exponentiation operation - Google Patents

Secure method for performing a modular exponentiation operation

Info

Publication number
EP1419434A1
EP1419434A1 EP02772476A EP02772476A EP1419434A1 EP 1419434 A1 EP1419434 A1 EP 1419434A1 EP 02772476 A EP02772476 A EP 02772476A EP 02772476 A EP02772476 A EP 02772476A EP 1419434 A1 EP1419434 A1 EP 1419434A1
Authority
EP
European Patent Office
Prior art keywords
mod
masking parameter
modulo
secure
algorithm
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
Application number
EP02772476A
Other languages
German (de)
French (fr)
Inventor
Marc Joye
Karine Villegas
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gemplus SA
Original Assignee
Gemplus Card International SA
Gemplus SA
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Gemplus Card International SA, Gemplus SA filed Critical Gemplus Card International SA
Publication of EP1419434A1 publication Critical patent/EP1419434A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/723Modular exponentiation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks
    • G06F2207/7223Randomisation as countermeasure against side channel attacks
    • G06F2207/7233Masking, e.g. (A**e)+r mod n
    • G06F2207/7242Exponent masking, i.e. key masking, e.g. A**(e+r) mod n; (k+r).P
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks
    • G06F2207/7223Randomisation as countermeasure against side channel attacks
    • G06F2207/7257Random modification not requiring correction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/04Masking or blinding

Definitions

  • the present invention relates to a secure method for carrying out an exponentiation operation, with application in particular in the field of cryptography.
  • the invention applies in particular to cryptographic algorithms implemented in electronic devices such as smart cards.
  • U, V and X are integers most often of large size, and W a predetermined number.
  • the numbers U, V can correspond for example to an encrypted text or to be encrypted, a data signed or to be signed, a data verified or to be verified, etc.
  • the numbers W and X can correspond to elements of keys, private or public used for the encryption or the decryption of the numbers U, V.
  • RSA Rivest, Sha ir and Adleman
  • d and N are 1024 bits
  • p and q are 512 bits.
  • the CRT function (s p , s q ) is commonly called the recombination formula according to the Chinese remainder theorem.
  • the CRT function is calculated, for example, as follows:
  • the numbers e and N form the public key associated with the private key (d, p, q); the numbers e and N verify the relations:
  • a malicious user can possibly initiate hidden channel attacks, aimed in particular at discovering confidential information (such as for example the numbers d or p) contained and manipulated in processing operations carried out by the computing device executing an exponentiation operation.
  • the most well-known hidden channel attacks are said to be simple or differential.
  • a simple or differential hidden channel attack is understood to mean an attack based on a measurable physical quantity from outside the device, the direct analysis of which (simple attack) or the analysis according to a statistical method (differential attack) allows discover information contained and manipulated in processing carried out in the device. These attacks can thus allow the discovery of confidential information.
  • These attacks were notably exposed by Paul Kocher (Advances in Cryptology - CRYPTO'99, vol. 1666 of Lecture Notes in Computer Science, pp.388-397. Springer-Verlag, 1999).
  • the CRT attack can be considered for any algorithm implemented through the Chinese remains theorem.
  • the CRT attack makes it possible to obtain the number p of the private key.
  • Y i p x (s q - s p ) mod (q) If p, q are of a bits (for example 512 bits), then, i p , s p , s q are of a bits, as well as Y The product pxY and the number s are therefore 2a bits. Since s p is of a bits, we deduce that the a most significant bits of s are equal to the a most significant bits of the product pxY.
  • the Hamming weight H (Y) of the number Y can be obtained by a simple hidden channel attack during the calculation of Y. It is recalled that the Hamming weight of the number Y is the number of bits at "1" of the number Y.
  • an object of the invention is to propose a secure method of carrying out an exponentiation operation, protected against all attacks, including CRT attacks such as as described above.
  • Another object of the invention is to propose a secure method for carrying out an exponentiation operation, at least as efficient as the method disclosed in document WO 99/35782, in particular in terms of circuit size and time. Calculation.
  • Another object of the invention finally is to provide a secure method for calculating an exponentiation operation, which can be incorporated into any calculation method during which a calculation of the type
  • the masking parameter is a fractional number.
  • the numbers W, X are in practice numbers which must be kept hidden, like elements of a private key, and / or numbers derived from such a key.
  • the number W can be the variables d p , d q used in the usual way.
  • the size of the numbers W, X is indifferent, it is for example 1024 bits.
  • the masking parameter is of the form R / K.
  • R is a random integer modified at each execution of the method.
  • the size of number R determines the security 'of the algorithm with respect to said differential attacks, R may be chosen, for example size of 32 bits.
  • K is an integer divisor of the number ⁇ (X), ⁇ being the indicative function of Euler. K can be chosen constant or can be modified each time the process is executed.
  • the size of K is indifferent, it is for example close to the size of the number R.
  • W is the default part of the result of the division of W by K, and R is equal to the product of the masking parameter (R / K) by the number ⁇ (X).
  • the method of the invention as described above can be advantageously used in a global cryptographic method.
  • the cryptographic method is of the RSA type, and it is implemented according to the Chinese remains theorem.
  • the invention is used in particular. to mask a possibly derived key (for example the keys derived d p , d q -) by a masking parameter chosen randomly at each execution of the method, the masking parameter being a fractional number.
  • the invention also relates to an electronic component comprising a calculation circuit for implementing a method according to the invention, for example, but not necessarily, within the framework of a cryptographic algorithm.
  • the invention also relates to a smart card comprising said electronic component.
  • the single figure shows in the form of a block diagram an electronic device 1 capable of carrying out exponentiation calculations.
  • this device is a smart card intended to execute a program Cryptographic.
  • the device 1 brings together in a chip programmed calculation means, composed of a central unit. 2 functionally connected to a set of memories of which: a memory 4 accessible in read only, in the example of the mask ROM type, also known by the English name "mask read-only .memory (mask ROM)", a memory 6 electrically re-programmable, in the example of the EEPROM type (from the English “electrically erasable programmable ROM”), and
  • a working memory 8 accessible in read and write, in the example of the RAM type (from the English "random access memory").
  • This memory notably includes the registers used by the device 1.
  • the executable code corresponding to the exponentiation algorithm is contained in program memory. This code can in practice be contained in memory 4, accessible in read only, and / or in memory 6, rewritable.
  • the central unit 2 is connected to a communication interface 10 which ensures the exchange of signals vis-à-vis the outside and the supply of the chip.
  • This interface can include studs on the card for a so-called “contact” connection with a reader, and / or an antenna in the case of a so-called “contactless” card.
  • One of the functions of the device 1 is to encrypt or decrypt a confidential message m respectively transmitted to, or received from, the outside.
  • This message can relate for example ' personal codes, information. medical, accounting on 'banking or business transactions, access permissions to certain restricted services, etc.
  • Another function is to calculate or verify a digital signature.
  • the central unit 2 executes a cryptographic algorithm, using an exponentiation calculation, on programming data which is stored in the mask ROM 4 and / or EEPROM 6 parts.
  • the exponentiation algorithm is of the RSA type, implemented by the use of the Chinese remainder theorem.
  • the algorithm is used to sign a message m using a private key comprising three integers d, p and q.
  • d is 1024 bits
  • p and q are 512 bits.
  • the numbers d, p, q are stored in a portion of the rewritable memory 6, of the EEPROM type in the example.
  • the central unit When the exponentiation calculation device 1 is requested for the exponentiation calculation, the central unit stores. first of all the number m, transmitted by the communication interface 10, in working memory 8, in a calculation register. The central unit will then read the keys d, p, q contained in rewritable memory 6, in order to memorize them temporarily, for the time of the exponentiation calculation, in a calculation register of the working memory 8. The central unit then launches the exponentiation algorithm.
  • the keys derived d p , d q from the key d are masked by a random fractional number in the following manner.
  • the central unit first chooses a number k p divisor of p-1, and a number k q divisor of q-1, p, q being elements of the key; k p , k q are stored in another working memory calculation register 8.
  • k p can be modified each time the algorithm is implemented or else can be kept constant.
  • the size of k p is indifferent, but necessarily smaller than the size of -p-1.
  • the central unit also chooses two random numbers r p , r q and stores them in two other calculation registers of the working memory.
  • r p , r q are preferably modified each time the algorithm is implemented.
  • the size of the numbers r p , r q is generally a compromise between on the one hand the size of the memory 8 in which they are stored and the calculation times (which increase with the size of the numbers r p , r q ) and d on the other hand the security of the algorithm (which also increases with the size of the numbers r p , r q ).
  • the central unit stores the variables d p *, a p , d q *, a q in registers of the working memory. Thereafter, the intermediate variables obtained throughout the calculation will also be stored in a portion of the working memory 8.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The invention concerns a secure method for performing an exponentiation operation which consists in carrying out an operation of type U = V^W modulo X. U, V, X are integers, W is an integer used in the form of a number W* masked by a fractional masking parameter randomly selected at each execution of the method. The invention is applicable to smart cards.

Description

PROCEDE SECURISE DE REALISATION D'UNE OPERATION D'EXPONENTIATION MODULAIRE SECURE PROCESS FOR CONDUCTING A MODULAR EXPONENTIATION OPERATION
La présente invention concerne un procédé sécurisé pour réaliser une opération d'exponentiation, avec application notamment dans le domaine de la cryptographie. L'invention s'applique en particulier à des algorithmes cryptographiques mis en œuvre dans des dispositifs électroniques tels que des cartes à puce.The present invention relates to a secure method for carrying out an exponentiation operation, with application in particular in the field of cryptography. The invention applies in particular to cryptographic algorithms implemented in electronic devices such as smart cards.
De nombreux algorithmes cryptographiques sont basés sur des calculs d'exponentiation du type ϋ = V W modulo X, où U, V et X sont des nombres entiers le plus souvent de grande taille, et W un nombre prédéterminé. Les nombres U, V peuvent correspondre par exemple à un texte chiffré ou à chiffrer, une donnée signée ou à signer, une donnée vérifiée ou à vérifier, etc. Les nombres W et X peuvent correspondrent à des éléments de clés, privées ou publiques utilisées pour le chiffrage ou le déchiffrage des nombres U, V.Many cryptographic algorithms are based on exponentiation calculations of the type ϋ = V W modulo X, where U, V and X are integers most often of large size, and W a predetermined number. The numbers U, V can correspond for example to an encrypted text or to be encrypted, a data signed or to be signed, a data verified or to be verified, etc. The numbers W and X can correspond to elements of keys, private or public used for the encryption or the decryption of the numbers U, V.
L'un de ces algorithmes est l'algorithme RSA (de Rivest, Sha ir et Adleman). , qui permet d'obtenir une signature ou un message déchiffré s à partir d'une clé privée comprenant trois nombres entiers d, p et q, p et' q étant des nombres premiers de grande taille dont le produit est égal à N. Dans un exemple typique, d et N sont de 1024 bits, et p et q sont de 512 bits.One of these algorithms is the RSA algorithm (from Rivest, Sha ir and Adleman). , which makes it possible to obtain a signature or a decrypted message s using a private key comprising three integers d, p and q, p and ' q being large prime numbers whose product is equal to N. In a typical example, d and N are 1024 bits, and p and q are 512 bits.
De nombreux ouvrages présentent en détails l'algorithme RSA, il est cependant nécessaire de rappeler ici les principes de base de cet algorithme, qui permet de calculer la signature s : s = mAd mod(p.q) = mAd mod(N) L'algorithme RSA peut être mis en oeuvre en utilisant le théorème des restes chinois (en anglais Chinese Remainder Theorem) . Par l'application de ce théorème, la signature s est obtenue par : s = mAd mod(N) = CRT(sp, sq) La fonction CRT(sp, sq) est couramment appelée formule de recombinaison selon le théorème des restes chinois. La fonction CRT se calcule par exemple de la manière suivante :Many works present in detail the RSA algorithm, it is however necessary to recall here the basic principles of this algorithm, which makes it possible to calculate the signature s: s = m A d mod (pq) = m A d mod (N ) The RSA algorithm can be implemented using the Chinese Remainder Theorem. By applying this theorem, the signature is obtained by: s = m A d mod (N) = CRT (s p , s q ) The CRT function (s p , s q ) is commonly called the recombination formula according to the Chinese remainder theorem. The CRT function is calculated, for example, as follows:
CRT(sp, sq) = sp + pxY, avec : dp = d mod(p-l), sp = mAdp mod(p) dq = d mod(q-l), sq = mAdq mod(q) ip = (1/p) mod(q)CRT (s p , s q ) = s p + pxY, with: d p = d mod (pl), s p = m A d p mod (p) d q = d mod (ql), s q = m A d q mod (q) i p = (1 / p) mod ( q)
Le même algorithme permet de vérifier la validité de la signature s d'un message m en vérifiant que la relation : m = s e mod(N) est satisfaite.The same algorithm makes it possible to check the validity of the signature s of a message m by checking that the relation: m = s e mod (N) is satisfied.
Les nombres e et N forment la clé publique associée à la clé privée (d, p, q) ; les nombres e et N vérifient les relations :The numbers e and N form the public key associated with the private key (d, p, q); the numbers e and N verify the relations:
N = pxq pgcd(e, Φ(N) ) = 1 exd = 1 mod(Φ(N) ) ,N = pxq pgcd (e, Φ (N)) = 1 exd = 1 mod (Φ (N)),
Φ(N) étant la fonction indicatrice d'Euler définie par Φ(N) = (p-1) (q-1) .Φ (N) being the indicator function of Euler defined by Φ (N) = (p-1) (q-1).
On notera que tous les éléments d, p, q d'une clé privée et tous les éléments e, N d'une clé publique associée sont impairs. En effet p et q étant des grands nombres premiers, ils sont nécessairement impairs. Φ(N) = (p-1) (q-1) est donc pair et N = pxq est impair. Comme e et Φ(N) sont premiers entre eux, e est impair. Comme exd = 1 mod(Φ(N)), exd est impair, et donc d est également impair.Note that all the elements d, p, q of a private key and all the elements e, N of an associated public key are odd. Indeed p and q being large prime numbers, they are necessarily odd. Φ (N) = (p-1) (q-1) is therefore even and N = pxq is odd. Since e and Φ (N) are prime to each other, e is odd. As exd = 1 mod (Φ (N)), exd is odd, and therefore d is also odd.
D'autres algorithmes, cryptographiques ou non, utilisent également des opérations d'exponentiation de type ϋ = VAW modulo X, éventuellement mis en œuvre par la théorème des restes chinois. Par exemple le cryptosystème de' Rabin-Williams ou encore l'échange de clé Diffie- Hellman modulo un nombre composé.Other algorithms, cryptographic or not, also use exponentiation operations of the type ϋ = V A W modulo X, possibly implemented by the Chinese remains theorem. For example the cryptosystem de 'Rabin-Williams or the key exchange Diffie-Hellman modulo a composite number.
Un utilisateur malveillant peut éventuellement engager des attaques à canaux cachés, visant à découvrir notamment des informations .confidentielles (comme par exemple les nombres d ou p) contenues et manipulées dans des traitements effectués par le dispositif de calcul exécutant une opération d'exponentiation. Les attaques à canaux cachés les plus connues sont dites simples ou différentielles. On entend par attaque à canal caché simple ou différentielle, une attaque basée sur une grandeur physique mesurable de l'extérieur du dispositif, et dont l'analyse directe (attaque simple) ou l'analyse selon une méthode statistique (attaque différentielle) permet de découvrir des informations contenues et manipulées dans des traitements réalisés dans le dispositif. Ces attaques peuvent ainsi permettre de découvrir des informations confidentielles. Ces attaques ont notamment été dévoilées par Paul Kocher (Advances in Cryptology - CRYPTO'99, vol. 1666 of Lecture Notes in Computer Science, pp.388-397. Springer-Verlag, 1999).A malicious user can possibly initiate hidden channel attacks, aimed in particular at discovering confidential information (such as for example the numbers d or p) contained and manipulated in processing operations carried out by the computing device executing an exponentiation operation. The most well-known hidden channel attacks are said to be simple or differential. A simple or differential hidden channel attack is understood to mean an attack based on a measurable physical quantity from outside the device, the direct analysis of which (simple attack) or the analysis according to a statistical method (differential attack) allows discover information contained and manipulated in processing carried out in the device. These attacks can thus allow the discovery of confidential information. These attacks were notably exposed by Paul Kocher (Advances in Cryptology - CRYPTO'99, vol. 1666 of Lecture Notes in Computer Science, pp.388-397. Springer-Verlag, 1999).
Parmi les grandeurs physiques qui peuvent être exploitées à ces fins, on peut citer le temps d'exécution, la consommation en courant, le champ électromagnétique rayonné par la partie du composant utilisée pour exécuter le calcul, etc. Ces attaques sont basées sur le fait que, au cours de l'exécution d'un algorithme, la manipulation d'un bit, c'est à dire son traitement par une instruction particulière, laisse une empreinte particulière sur la grandeur physique considérée, selon la valeur de ce bit et / ou selon 1 ' instruction.Among the physical quantities which can be exploited for these purposes, one can quote the execution time, the current consumption, the electromagnetic field radiated by the part of the component used to execute the calculation, etc. These attacks are based on the fact that, during the execution of an algorithm, the manipulation of a bit, that is to say its processing by a particular instruction, leaves a particular imprint on the physical quantity considered, according to the value of this bit and / or according to the instruction.
Les algorithmes d'exponentiation précités ont dû inclure des contre-mesures pour empêcher de telles attaques d'aboutir. Paul Kocher a notamment proposé, dans le document WO 99/35782, une méthode qui consiste notamment à masquer les variables dérivées dp, dq du nombre d par l'ajout d'un nombre entier aléatoire. Plus précisément, les variables dp, dq ne sont pas utilisées directement dans l'algorithme, mais elles sont utilisées sous la forme de nombres masqués di* = di + rιx(p-l), avec i égal à p ou q et ri (rp ou rq) des nombres entiers aléatoires, modifiés à chaque mise en œuvre de l'algorithme. Dans un exemple dévoilé dans le document WO 99/35782, cette méthode est utilisée dans le cadre d'un algorithme - RSA mis en œuvre selon le théorème des restes chinois. L'algorithme se décompose alors de la manière suivante : On calcule tout d'abord sp* et sq* : sp* = [mAdp*] mod(p) = [mA (dp + rpx(p-l))] mod(p) sq* = [mAdq*] mod(q) = [mA (dq + rqx(p-l))] mod(q) On calcule ensuite le nombre s par la formule de recombinaison : s = s* = CRT (sp*, sq*) . L'égalité s = s* se déduit de la définition de dp, dq, dp*, dg* et du théorème de Fermât, selon lequel AA(B-1) = 1 mod(B) lorsque B est un nombre entier premier et que A est relativement premier avec B. Dans le cas présent, on déduit du théorème de Fermât : m dp* = m (dp + rpx(p-l))The aforementioned exponentiation algorithms had to include countermeasures to prevent such attacks from succeeding. Paul Kocher notably proposed, in document WO 99/35782, a method which notably consists in masking the derived variables d p , d q of the number d by adding a random integer. More precisely, the variables d p , d q are not used directly in the algorithm, but they are used in the form of masked numbers di * = di + rιx (pl), with i equal to p or q and ri ( r p or r q ) random integers, modified at each implementation of the algorithm. In an example disclosed in document WO 99/35782, this method is used within the framework of an algorithm - RSA implemented according to the Chinese remains theorem. The algorithm is then broken down as follows: We first calculate s p * and s q *: s p * = [m A d p *] mod (p) = [m A (d p + r p x (pl))] mod (p) s q * = [m A d q *] mod (q) = [m A (d q + r q x (pl))] mod (q) We then calculate the number s by the recombination formula: s = s * = CRT (s p *, s q *). The equality s = s * is deduced from the definition of d p , d q , d p *, d g * and from Fermat's theorem, according to which A A (B-1) = 1 mod (B) when B is a prime number and that A is relatively prime with B. In the present case, we deduce from Fermât's theorem: md p * = m (d p + r p x (pl))
= mAdpXmA (rpx (p-1) ) = m dpxl [mod (p) ] . Puisque mAdp* = [m dp] [mod(p)], on a sp = sp* . Un raisonnement similaire permet de déduire sq = sq*. Finalement, comme sp = sp* et sq = sq*, s = s*. La" méthode dévoilée dans le document WO 99/35782 est notamment efficace pour contrer les attaques à canaux cachés différentielles, elle complique également les attaques simples.= m A d p Xm A (r p x (p-1)) = md p xl [mod (p)]. Since m A d p * = [md p ] [mod (p)], we have p = s p *. Similar reasoning makes it possible to deduce s q = s q *. Finally, like s p = s p * and s q = s q *, s = s *. The " method disclosed in document WO 99/35782 is in particular effective in countering attacks with differential hidden channels, it also complicates simple attacks.
Cependant, cette méthode n'est pas efficace contre une attaque particulière détaillée ci dessous (que l'on appellera par la suite par souci de simplification attaque CRT) dans le cadre d'un exemple relatif à l'algorithme RSA. Plus généralement, l'attaque CRT peut être envisagée pour tout algorithme mis en œuvre par l'intermédiaire du théorème des restes chinois. Dans l'exemple d'un algorithme RSA mis en œuvre à l'aide du théorème des restes chinois, l'attaque CRT permet d'obtenir le nombre p de la clé privée. On a vu précédemment que la .formule de recombinaison permettant de calculer s s'écrit : s = CRT(sp, sq) = sp + pxY, avec -However, this method is not effective against a particular attack detailed below (which will be called later for the sake of simplification CRT attack) as part of an example relating to the RSA algorithm. More generally, the CRT attack can be considered for any algorithm implemented through the Chinese remains theorem. In the example of an RSA algorithm implemented using the Chinese remainder theorem, the CRT attack makes it possible to obtain the number p of the private key. We saw previously that the recombination formula allowing to calculate s can be written: s = CRT (s p , s q ) = s p + pxY, with -
Y = ipx(sq - sp) mod(q) Si p, q sont de a bits (par exemple 512 bits) , alors, ip, sp, sq sont de a bits, de même que Y. Le produit pxY et le nombre s sont donc de 2a bits. Comme sp est de a bits, on en déduit que les a bits de poids fort de s sont égaux aux a bits de poids fort du produit pxY.Y = i p x (s q - s p ) mod (q) If p, q are of a bits (for example 512 bits), then, i p , s p , s q are of a bits, as well as Y The product pxY and the number s are therefore 2a bits. Since s p is of a bits, we deduce that the a most significant bits of s are equal to the a most significant bits of the product pxY.
Par ailleurs, le poids de Hamming H (Y) du nombre Y peut être obtenu par une attaque à canal caché simple lors du calcul de Y. On rappelle que le poids de Hamming du nombre Y est le nombre de bits à "1" du nombre Y.Furthermore, the Hamming weight H (Y) of the number Y can be obtained by a simple hidden channel attack during the calculation of Y. It is recalled that the Hamming weight of the number Y is the number of bits at "1" of the number Y.
Connaissant les bits de poids forts du produit pxY et le poids de Hamming du nombre Y, il est possible de .retrouver le nombre p par itérations successives de la manière suivante : - on fait une hypothèse sur la valeur de b bitsKnowing the most significant bits of the product pxY and the Hamming weight of the number Y, it is possible to find the number p by successive iterations as follows: - we make a hypothesis on the value of b bits
(par exemple b = 8) de poids le plus fort de p et on détermine les b bits du poids fort correspondant de Y à partir des bits de poids fort du produit pxY, lesquels sont donnés par la valeur de s . On calcule ensuite la probabilité pour que l'hypothèse sur les b bits de poids le plus fort de p soit correcte à partir du poids de Hamming de Y, mesuré par un canal caché.(for example b = 8) with the most significant weight of p and the b most significant bits of Y are determined from the most significant bits of the product pxY, which are given by the value of s. We then calculate the probability that the hypothesis on the b most significant bits of p is correct from the Hamming weight of Y, measured by a hidden channel.
- on réitère pour chaque valeur possible des b bits de poids les plus forts de p et on retient finalement l'hypothèse la plus probable pour ces b bits. - on réitère ensuite pour chaque paquet de b bits de p, jusqu'à l'obtention d'un nombre suffisant des bits de p.- we reiterate for each possible value the b most significant bits of p and we finally retain the most probable hypothesis for these b bits. - then it is reiterated for each packet of b bits of p, until a sufficient number of the bits of p are obtained.
La méthode dévoilée dans le document WO 99/35782 n'est pas efficace contre cette attaque CRT. En effet, dans le document WO 99/35782, la formule de recombinaison utilisée s'écrit : s = CRT(sp*, sq*) = sp* + pxY*, avec s, pxY* de taille 2a bits et sp* de taille a bits.The method disclosed in document WO 99/35782 is not effective against this CRT attack. In fact, in document WO 99/35782, the recombination formula used is written: s = CRT (s p *, s q *) = s p * + pxY *, with s, pxY * of size 2a bits and s p * of size a bits.
Il est donc possible, par une attaque CRT telle qu'on vient de la décrire, de déterminer le nombre p à partir du nombre s connu, du produit pxY*, et du poids de Hamming de (Y*) .It is therefore possible, by a CRT attack as described above, to determine the number p from the known number s, the product pxY *, and the Hamming weight of (Y *).
Au vu des limites de la méthode dévoilée dans le document WO 99/35782, un objet de l'invention est de proposer un procédé sécurisé de réalisation d'une opération d'exponentiation, protégé contre toutes les attaques, y compris les attaques CRT telles que décrites ci-dessus .In view of the limits of the method disclosed in document WO 99/35782, an object of the invention is to propose a secure method of carrying out an exponentiation operation, protected against all attacks, including CRT attacks such as as described above.
Un autre objet de l'invention est de proposer un procédé sécurisé de réalisation d'une opération d'exponentiation, au moins aussi performant que le procédé dévoilé- dans le document WO 99/35782, notamment en terme de taille de circuit et de temps de calcul.Another object of the invention is to propose a secure method for carrying out an exponentiation operation, at least as efficient as the method disclosed in document WO 99/35782, in particular in terms of circuit size and time. Calculation.
Un autre objet de l'invention enfin est de réaliser un procédé sécurisé de calcul d'une opération d'exponentiation, pouvant être incorporé à tout procédé de calcul au cours duquel un calcul du typeAnother object of the invention finally is to provide a secure method for calculating an exponentiation operation, which can be incorporated into any calculation method during which a calculation of the type
U = VAW modulo X doit être réalisé.U = V A W modulo X must be realized.
Avec ces objectifs en vue, l'invention a pour objet un procédé sécurisé de réalisation- d'une opération d'exponentiation au cours duquel on réalise une opération du type U = V W modulo X, U, V, X étant des nombres entiers, W étant un nombre entier utilisé sous la forme d'un nombre W* masqué par un paramètre de masquage choisi de manière aléatoire à chaque exécution du procédé.With these objectives in view, the invention relates to a secure method of carrying out an exponentiation operation during which an operation of the type U = VW modulo X, U, V, X being numbers integers, W being an integer used in the form of a number W * masked by a masking parameter chosen randomly at each execution of the method.
Selon l'invention, le paramètre de masquage est un nombre fractionnaire.According to the invention, the masking parameter is a fractional number.
Les nombres W, X sont en pratique des nombres qui doivent être maintenus cachés, comme des éléments d'une clé privée, et / ou des nombres dérivés d'une telle clé. Par exemple, si le procédé selon l'invention est utilisé dans le cadre d'un algorithme RSA mis en œuvre selon le théorème des restes chinois, le nombre W peut être les variables dp, dq utilisées de manière habituelle. La taille des nombres W, X est indifférente, elle est par exemple de 1024 bits. L'utilisation d'un paramètre de masquage aléatoire fractionnaire, au lieu d'un paramètre de masquage aléatoire entier, rend impossible l'obtention d'une information sur le nombre W par un attaque à canaux cachés, ou par une attaque CRT, comme on le verra mieux par la suite dans des exemples.The numbers W, X are in practice numbers which must be kept hidden, like elements of a private key, and / or numbers derived from such a key. For example, if the method according to the invention is used within the framework of an RSA algorithm implemented according to the Chinese remainder theorem, the number W can be the variables d p , d q used in the usual way. The size of the numbers W, X is indifferent, it is for example 1024 bits. The use of a fractional random masking parameter, instead of an integer random masking parameter, makes it impossible to obtain information on the number W by a hidden channel attack, or by a CRT attack, such as we will see this better later in examples.
Selon des modes de réalisation préférés, le paramètre de masquage est ' de la forme R/K. R est un nombre entier aléatoire modifié à chaque exécution du procédé. La taille du nombre R détermine la sécurité ' de l'algorithme par rapport aux attaques dites différentielles, R peut être choisi par exemple de taille 32 bits. K est un nombre entier diviseur du nombre Φ(X), Φ étant la fonction indicatrice d'Euler. K peut être choisi constant ou bien peut être modifié à chaque exécution du procédé. La taille de K est indifférente, elle est par exemple proche de la taille du nombre R.According to preferred embodiments, the masking parameter is of the form R / K. R is a random integer modified at each execution of the method. The size of number R determines the security 'of the algorithm with respect to said differential attacks, R may be chosen, for example size of 32 bits. K is an integer divisor of the number Φ (X), Φ being the indicative function of Euler. K can be chosen constant or can be modified each time the process is executed. The size of K is indifferent, it is for example close to the size of the number R.
Avantageusement, le nombre masqué W* est de la forme W* = W + R. W est la partie par défaut du résultat de la division de W par K, et R est égal- au produit du paramètre de masquage (R/K) par le nombre Φ(X). Le résultat U peut alors être exprimé en fonction de (U*)AK modulo X, avec U* = VAW* modulo X.Advantageously, the masked number W * is of the form W * = W + R. W is the default part of the result of the division of W by K, and R is equal to the product of the masking parameter (R / K) by the number Φ (X). The result U can then be expressed as a function of (U *) A K modulo X, with U * = V A W * modulo X.
Plus précisément, le résultat U est égal à U = (U*)AK x VAZ modulo X, avec U* = VAW* modulo X. Z est le reste de la division entière de W par K.More precisely, the result U is equal to U = (U *) A K x V A Z modulo X, with U * = V A W * modulo X. Z is the remainder of the integer division of W by K.
Le procédé de l'invention, tel que décrit ci-dessus peut être utilisé avantageusement dans un procédé cryptographique global.The method of the invention, as described above can be advantageously used in a global cryptographic method.
Dans un exemple qui sera décrit plus précisément, le procédé cryptographique est de type RSA, et il est mis en œuvre selon le théorème des restes chinois. Dans ce cas, l'invention est utilisée notamment . pour masquer une clé éventuellement dérivée (par exemple les clés dérivées dp, dq-) par un paramètre de masquage choisi de manière aléatoire à chaque exécution du procédé, le paramètre de masquage étant un nombre fractionnaire.In an example which will be described more precisely, the cryptographic method is of the RSA type, and it is implemented according to the Chinese remains theorem. In this case, the invention is used in particular. to mask a possibly derived key (for example the keys derived d p , d q -) by a masking parameter chosen randomly at each execution of the method, the masking parameter being a fractional number.
L'invention a également pour objet un composant électronique comprenant un- circuit de calcul pour mettre en œuvre un procédé selon l'invention, par exemple, mais non' nécessairement, dans le cadre d'un algorithme cryptographique .The invention also relates to an electronic component comprising a calculation circuit for implementing a method according to the invention, for example, but not necessarily, within the framework of a cryptographic algorithm.
Enfin, l'invention a également pour objet une carte à puce comprenant ledit composant électronique.Finally, the invention also relates to a smart card comprising said electronic component.
L'invention et les avantages qui en découlent apparaîtront plus clairement à la lecture de la description qui suit d'un exemple particulier de réalisation de l'invention, donné à titre purement indicatif et en référence à l'a figure unique en annexe. Celle-ci est un dispositif électronique permettant de mettre en œuvre l'invention.The invention and the advantages thereof will appear more clearly from reading the following description of a particular embodiment of the invention given for guidance only and with reference to a single Figure attached. This is an electronic device for implementing the invention.
La figure unique représente sous forme de schéma bloc un dispositif 1 électronique apte à réaliser des calculs d'exponentiation. Dans l'exemple, ce dispositif est une carte à puce destinée à exécuter un programme cryptographique. A cette fin, le dispositif 1 réunit dans une puce des moyens de calcul programmés, composés d'une unité centrale. 2 reliée fonctionnellement à un ensemble de mémoires dont : - une mémoire 4 accessible en lecture seulement, dans l'exemple du type ROM masque, aussi connue sous l'appellation anglaise "mask read-only .memory (mask ROM) ", une mémoire 6 re-programmable électriquement, dans l'exemple du type EEPROM (de l'anglais "electrically erasable programmable ROM"), etThe single figure shows in the form of a block diagram an electronic device 1 capable of carrying out exponentiation calculations. In the example, this device is a smart card intended to execute a program Cryptographic. To this end, the device 1 brings together in a chip programmed calculation means, composed of a central unit. 2 functionally connected to a set of memories of which: a memory 4 accessible in read only, in the example of the mask ROM type, also known by the English name "mask read-only .memory (mask ROM)", a memory 6 electrically re-programmable, in the example of the EEPROM type (from the English "electrically erasable programmable ROM"), and
, - une mémoire de travail 8 accessible en lecture et en écriture, dans l'exemple du type RAM (de l'anglais "random access memory"). Cette mémoire comprend notamment les registres utilisés par le dispositif 1., a working memory 8 accessible in read and write, in the example of the RAM type (from the English "random access memory"). This memory notably includes the registers used by the device 1.
Le code exécutable correspondant à l'algorithme d'exponentiation est contenu en mémoire programme. Ce code peut en pratique être contenu en mémoire 4, accessible en lecture seulement, et/ou en mémoire 6, réinscriptible.The executable code corresponding to the exponentiation algorithm is contained in program memory. This code can in practice be contained in memory 4, accessible in read only, and / or in memory 6, rewritable.
L'unité centrale 2 est reliée à une interface de communication 10 qui assure l'échange de signaux vis-à- vis de l'extérieur et l'alimentation de la puce. Cette interface peut comprendre des plots sur la carte pour une connexion dite "à contact" avec un lecteur, et/ou une antenne dans le cas d'une carte dite "sans contact".The central unit 2 is connected to a communication interface 10 which ensures the exchange of signals vis-à-vis the outside and the supply of the chip. This interface can include studs on the card for a so-called "contact" connection with a reader, and / or an antenna in the case of a so-called "contactless" card.
L'une des fonctions du dispositif 1 est de crypter ou décrypter un message m confidentiel respectivement transmis vers, ou reçu de, l'extérieur. Ce message peut concerner par exemple ' des codes personnels, des informations . médicales, une comptabilité sur ' des transactions bancaires ou commerciales, des autorisations d'accès à, certains services restreints, etc. Une autre fonction est de calculer ou de vérifier une signature numérique. A cette fin, l'unité centrale 2 exécute un algorithme cryptographique, utilisant un calcul d'exponentiation, sur des données de programmation qui sont stockées dans les parties ROM masque 4 et/ou EEPROM 6.One of the functions of the device 1 is to encrypt or decrypt a confidential message m respectively transmitted to, or received from, the outside. This message can relate for example ' personal codes, information. medical, accounting on 'banking or business transactions, access permissions to certain restricted services, etc. Another function is to calculate or verify a digital signature. To this end, the central unit 2 executes a cryptographic algorithm, using an exponentiation calculation, on programming data which is stored in the mask ROM 4 and / or EEPROM 6 parts.
Dans l'exemple décrit ici, l'algorithme d'exponentiation est de type RSA, mis en oeuvre par l'utilisation du théorème des restes chinois. L'algorithme est utilisé pour signer un message m à partir d'une clé privée comprenant trois nombres entiers d, p et q. Dans l'exemple, d est de 1024 bits, et p et q sont de 512 bits.In the example described here, the exponentiation algorithm is of the RSA type, implemented by the use of the Chinese remainder theorem. The algorithm is used to sign a message m using a private key comprising three integers d, p and q. In the example, d is 1024 bits, and p and q are 512 bits.
Dans l'exemple, on réalise un calcul d'exponentiation s = mAd mod(p.q), où m est un message prédéterminé et d, p, q des nombres entiers éléments de' la clé privée. Le nombre s obtenu constitue une signature du message m.In the example, there is provided a exponentiation calculation s = m d mod (pk), where m is a predetermined message and, p, q are integers elements of 'the private key. The number s obtained constitutes a signature of the message m.
Les nombres d, p, q (éléments de la clé) sont stockés dans une portion de la mémoire re-inscriptible 6, de type EEPROM dans l'exemple.The numbers d, p, q (elements of the key) are stored in a portion of the rewritable memory 6, of the EEPROM type in the example.
Lorsque le dispositif 1 de calcul d'exponentiation est sollicité pour le calcul d'exponentiation, l'unité centrale mémorise . tout d'abord le nombre m, transmis par l'interface de communication 10, en mémoire de travail 8, dans un registre de calcul. L'unité centrale va ensuite lire les clés d, p, q contenues en mémoire re- inscriptible 6, pour les mémoriser temporairement, le temps du calcul d'exponentiation, dans, un registre de calcul de la mémoire de travail 8. L'unité centrale lance alors l'algorithme d'exponentiation.When the exponentiation calculation device 1 is requested for the exponentiation calculation, the central unit stores. first of all the number m, transmitted by the communication interface 10, in working memory 8, in a calculation register. The central unit will then read the keys d, p, q contained in rewritable memory 6, in order to memorize them temporarily, for the time of the exponentiation calculation, in a calculation register of the working memory 8. The central unit then launches the exponentiation algorithm.
Selon l'invention, les clés dérivées dp, dq de la clé d sont masquées par un nombre fractionnaire aléatoire de la manière suivante.According to the invention, the keys derived d p , d q from the key d are masked by a random fractional number in the following manner.
L'unité centrale choisit tout d'abord un nombre kp diviseur de p-1, et un nombre kq diviseur de q-1, p, q étant des éléments de la clé ; kp, kq sont mémorisés dans un autre registre de calcul de la mémoire de travail 8. Selon le mode de réalisation choisi, kp peut être modifié à chaque mis en œuvre de l'algorithme ou bien peut être maintenu constant. La taille de kp est indifférente, mais nécessairement inférieure à la taille de- p-1.The central unit first chooses a number k p divisor of p-1, and a number k q divisor of q-1, p, q being elements of the key; k p , k q are stored in another working memory calculation register 8. Depending on the embodiment chosen, k p can be modified each time the algorithm is implemented or else can be kept constant. The size of k p is indifferent, but necessarily smaller than the size of -p-1.
L'unité centrale choisit également deux nombres rp, rq, aléatoires et les mémorise dans deux autres registres de calcul de la mémoire de travail. rp, rq sont de préférence modifiés à chaque mise en œuvre de l'algorithme. La taille des nombres rp, rq est généralement un compromis entre d'une part la taille de la mémoire 8 dans laquelle ils sont mémorisés et les temps de calcul (qui augmentent avec la taille des nombres rp, rq) et d'autre part la sécurité de l'algorithme (qui augmente également avec la taille des nombres rp, rq) .The central unit also chooses two random numbers r p , r q and stores them in two other calculation registers of the working memory. r p , r q are preferably modified each time the algorithm is implemented. The size of the numbers r p , r q is generally a compromise between on the one hand the size of the memory 8 in which they are stored and the calculation times (which increase with the size of the numbers r p , r q ) and d on the other hand the security of the algorithm (which also increases with the size of the numbers r p , r q ).
L'unité centrale calcule ensuite les variables dp*, 3-pr dq*, aq suivantes : dp* = dp 4- rp, (formule 1) ap = dp mod kp (formule 2) avec dp = |_dp / kpJ et rp = rpx(p-l)/kp dq* = dq + rq, (formule 3) aq = dq mod kq (formule 4) ec dq = Ldq / kqJ et rq rqx(q-l)/kq dp, ap sont respectivement le résultat et le reste de la division entière de dp par kp dq, aq sont respectivement le résultat et le reste de la division entière de dq par kq The central unit then calculates the following variables d p *, 3-p r d q *, a q : d p * = d p 4- r p , (formula 1) a p = d p mod k p (formula 2 ) with d p = | _d p / k p J and r p = r p x (pl) / k p d q * = d q + r q , (formula 3) a q = d q mod k q (formula 4 ) ec d q = Ld q / k q J and r qr q x (ql) / k q d p , a p are respectively the result and the remainder of the integer division of d p by k p d q , a q are respectively the result and the remainder of the integer division of d q by k q
L'unité centrale mémorise les variables dp*, ap, dq*, aq dans des registres de la mémoire de travail. Par la suite, les variables intermédiaires obtenues tout au long du calcul seront également mémorisées dans une portion de la mémoire de travail 8.The central unit stores the variables d p *, a p , d q *, a q in registers of the working memory. Thereafter, the intermediate variables obtained throughout the calculation will also be stored in a portion of the working memory 8.
L'unité centrale calcule ensuite les variables : sp* = mAdp* mod p sq* = mAdq* mod q puis la signature s à partir des variables sp*, ap, kp, sq*, aq, kq. Pour cela, l'unité centrale utilise le fait que : sp = [(m dp*) kp x m ap] mod(p), (formule 5) sq = [(m dq*)Akq x m aq] mod(q), (formule 6) s = CRT(sp, .sq) (formule 7)The central unit then calculates the variables: s p * = m A d p * mod ps q * = m A d q * mod q then the signature s from the variables s p *, a p , k p , s q *, a q , k q . For this, the central unit uses the fact that: s p = [(md p *) k p xma p ] mod (p), (formula 5) s q = [(md q *) A k q xma q ] mod (q), (formula 6) s = CRT (s p , .s q ) (formula 7)
On notera que les expressions ci-dessus de • sp, sq se déduisent du fait que dp, dq et ap, aq sont définis de sorte que dp = dpxkp + ap et dp = dpxkp + ap, ce qui permet d'écrire : sp= [mAdp] mod(p)Note that the above expressions of • s p , s q are deduced from the fact that d p , d q and a p , a q are defined so that d p = d p xk p + a p and d p = d p xk p + a p , which allows to write: s p = [m A d p ] mod (p)
= (mA dp) kp x mAap mod(p) = mA ( dpxkp)xm ap mod(p) = mA ( dpxkp) xm (rpx (p-1) ) xm ap mod(p) (th. de Fermât)= (m A d p ) k p xm A a p mod (p) = m A (d p xk p ) xm a p mod (p) = m A (d p xk p ) xm (r p x (p- 1)) xm a p mod (p) (th. Of Fermât)
= m [ ( dp+ rp)xkp]xmAap mod(p) = (m dp*)Akp x mΛap mod(p) = (sp*)Akp x mAap mod(p) . La démonstration de l'exactitude de l'expression pour sq est bien entendu similaire.= m [(d p + r p ) xk p ] xm A a p mod (p) = (md p *) A k p xm Λ a p mod (p) = (s p *) A k p xm A a p mod (p). The proof of the accuracy of the expression for s q is of course similar.
Dans un exemple de mise en œuvre pratique où kp = kq et ap = aq, les égalités 5 . et 6 permettent de simplifier l'égalité 7 sous la forme : s = CRT.(sp, sq) = { [CRT(sp*, sq*) ] AkpxmAap} mod N = { (sp*+pxY*) ΛkpxmAap} mod N (formule 7')In an example of practical implementation where k p = k q and a p = a q , the equalities 5. and 6 simplify equality 7 in the form: s = CRT . (s p , s q ) = {[CRT (s p *, s q *)] A k p xm A a p } mod N = {(s p * + pxY *) Λ k p xm A a p } mod N (7 'formula)
= { [CRT(sp*, Sq*) ] kpxm ap} mod N Dans un exemple numérique, on choisit kp = kq =2. Dans ce cas, ap = aq = 1 car tous les éléments d'une clé secrète et d'une clé publique associée sont impairs (voir plus haut) . En effet, d, p et q étant des nombres impairs, les nombres dp = d mod(p-l') et dq = q mod (q-1) sont également impairs. En conséquence, ap, le reste de la division de dp par kp = 2 est nécessairement égal à 1. Pour les mêmes raisons, aq, le reste de la division de dq par kq = 2 est bien sûr égal à 1. L'égalité 7 est insensible aux attaques à canaux cachés différentielles et simples. En effet, les termes aléatoires dans les nombres sp*, sq* masquent les données dp, dq, de même que dans le document WO 99/35782. Par ailleurs, l'égalité 7 est insensible aux attaques CRT. Ceci apparaît plus clairement sur la formule simplifiée 7'. La somme sp*+pχγ*, indispensable pour mener à bien une attaque CRT, n'apparaît pas directement dans la relation 7 ' , elle apparaît uniquement à . la puissance kp. Or, il est conjecturé impossible d'extraire de s une racine kp ~ιeme sans connaître le module N. Il n'est donc pas possible de calculer sp*+pxY*, il n'est donc pas possible d'obtenir les bits de p par une attaque CRT. Un algorithme selon ' l'invention est donc bien protégé contre toutes ces attaques. = {[CRT (s p *, S q *)] k p xm a p } mod N In a numerical example, we choose k p = k q = 2. In this case, a p = a q = 1 because all the elements of a secret key and an associated public key are odd (see above). Indeed, d, p and q being odd numbers, the numbers d p = d mod (pl ' ) and d q = q mod (q-1) are also odd. Consequently, a p , the remainder of the division of d p by k p = 2 is necessarily equal to 1. For the same reasons, a q , the remainder of the division of d q by k q = 2 is of course equal at 1. Equality 7 is insensitive to differential and simple hidden channel attacks. Indeed, the random terms in the numbers s p *, s q * mask the data d p , d q , as well as in document WO 99/35782. Furthermore, equality 7 is insensitive to CRT attacks. This appears more clearly on the simplified formula 7 '. The sum s p * + pχγ *, essential for carrying out a CRT attack, does not appear directly in the relation 7 ', it appears only at. the power k p . Now, it is conjectured impossible to extract from s a root k p ~ th without knowing the module N. It is therefore not possible to calculate s p * + pxY *, it is therefore not possible to obtain the bits of p by a CRT attack. An algorithm according to 'the invention is thus well protected against these attacks.

Claims

REVENDICATIONS
1. Pro'cé.dé sécurisé de réalisation d'une opération d'exponentiation au cours duquel on réalise une opération du type U = VAW modulo X, U, V, X .étant des nombres entiers, W étant un nombre entier utilisé sous la forme d'un nombre W* masqué par un paramètre de masquage choisi de manière aléatoire à chaque exécution' du procédé, caractérisé en ce que le paramètre de masquage est un nombre fractionnaire.1. Secure process for carrying out an exponentiation operation during which an operation of the type U = V A W modulo X, U, V, X. Being integers, W being an integer used in the form of a number W * masked by a masking parameter chosen randomly at each execution of the method, characterized in that the masking parameter is a fractional number.
2. Procédé selon la revendication 1, caractérisé en ce que le paramètre de masquage est de la forme R/K, où R est un nombre entier aléatoire et où K est un nombre entier diviseur du nombre Φ(X), Φ étant une fonction indicatrice d'Euler.2. Method according to claim 1, characterized in that the masking parameter is of the form R / K, where R is a random integer and where K is a integer divisor of the number Φ (X), Φ being a Euler indicator function.
3. Procédé selon la revendication 2, caractérisé en ce que le nombre K et / ou le nombre R sont modifiés à chaque exécution. du procédé.3. Method according to claim 2, characterized in that the number K and / or the number R are modified at each execution. of the process.
4. Procédé selon la revendication 2 ou la revendication 3, caractérisé en ce que le nombre masqué W* est de la ' forme W* = W + R, W étant la partie par défaut du résultat de la division de W par K, et ' R étant égal au produit du paramètre de masquage R/K par le nombre Φ(X) .4. The method of claim 2 or claim 3, characterized in that the masked number W * is the 'form W * = W + R, W being the default portion of the result of the division by W K, and ' R being equal to the product of the R / K masking parameter by the number Φ (X).
5. Procédé selon l'une des revendications 2 à 4, caractérisé .en ce que le résultat U est fonction de (U*)AK modulo X, avec U* = VΛW* modulo X.5. Method according to one of claims 2 to 4, characterized .in that the result U is a function of (U *) A K modulo X, with U * = V Λ W * modulo X.
6. Utilisation d'un procédé sécurisé selon l'une des revendications 1 à 5 dans un procédé cryptographique. 6. Use of a secure method according to one of claims 1 to 5 in a cryptographic method.
7. Utilisation d'un procédé sécurisé selon l'une des revendications 1 à 5 dans un procédé cryptographique mis en œuvre selon le théorème des restes chinois, .pour masquer une clé éventuellement dérivée par un paramètre de masquage choisi de manière aléatoire à chaque exécution du procédé, le paramètre de masquage étant un nombre fractionnaire.7. Use of a secure method according to one of claims 1 to 5 in a cryptographic method implemented according to the Chinese remains theorem. To mask a key possibly derived by a masking parameter chosen randomly at each execution of the method, the masking parameter being a fractional number.
8. Utilisation d'un procédé sécurisé selon la revendication 7, caractérisée en ce que le procédé cryptographique est un procédé de type RSA.8. Use of a secure method according to claim 7, characterized in that the cryptographic method is an RSA type method.
9. Composant électronique comprenant un circuit de calcul pour mettre en œuvre un procédé selon l'une des revendications 1 à 5.9. Electronic component comprising a calculation circuit for implementing a method according to one of claims 1 to 5.
10. Composant électronique comprenant des moyens de mise en œuvre d'un procédé cry'ptographique utilisant un procédé selon l'une des revendications 1 à 6.10. Electronic component comprising means for implementing a cry ' ptographic method using a method according to one of claims 1 to 6.
11. Carte à puce comprenant un composant électronique selon la revendication 9 ou la . revendication 10. 11. Chip card comprising an electronic component according to claim 9 or la. claim 10.
EP02772476A 2001-08-10 2002-07-31 Secure method for performing a modular exponentiation operation Withdrawn EP1419434A1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
FR0110671A FR2828608B1 (en) 2001-08-10 2001-08-10 SECURE PROCESS FOR PERFORMING A MODULAR EXPONENTIATION OPERATION
FR0110671 2001-08-10
PCT/FR2002/002771 WO2003014916A1 (en) 2001-08-10 2002-07-31 Secure method for performing a modular exponentiation operation

Publications (1)

Publication Number Publication Date
EP1419434A1 true EP1419434A1 (en) 2004-05-19

Family

ID=8866432

Family Applications (1)

Application Number Title Priority Date Filing Date
EP02772476A Withdrawn EP1419434A1 (en) 2001-08-10 2002-07-31 Secure method for performing a modular exponentiation operation

Country Status (5)

Country Link
US (1) US20040184604A1 (en)
EP (1) EP1419434A1 (en)
CN (1) CN1568457A (en)
FR (1) FR2828608B1 (en)
WO (1) WO2003014916A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2847402B1 (en) * 2002-11-15 2005-02-18 Gemplus Card Int SECURE ENTIRE DIVISION METHOD AGAINST HIDDEN CHANNEL ATTACKS
TW586086B (en) * 2002-12-27 2004-05-01 Ind Tech Res Inst Method and apparatus for protecting public key schemes from timing, power and fault attacks
DE10341096A1 (en) 2003-09-05 2005-03-31 Giesecke & Devrient Gmbh Transition between masked representations of a value in cryptographic calculations
ATE472769T1 (en) 2003-11-16 2010-07-15 Sandisk Il Ltd IMPROVED NATURAL MONTGOMERY EXPOSURE MASKING
KR100652377B1 (en) * 2004-08-06 2007-02-28 삼성전자주식회사 A modular exponentiation algorithm, a record device including the algorithm and a system using the algorithm
DE102004061312B4 (en) * 2004-12-20 2007-10-25 Infineon Technologies Ag Apparatus and method for detecting a potential attack on a cryptographic calculation
FR2884004B1 (en) 2005-03-30 2007-06-29 Oberthur Card Syst Sa DATA PROCESSING METHOD INVOLVING MODULAR EXPONENTIATION AND ASSOCIATED DEVICE
CN101243388A (en) * 2005-08-19 2008-08-13 Nxp股份有限公司 Circuit arrangement for and method of performing an inversion operation in a cryptographic calculation
CN101243389A (en) * 2005-08-19 2008-08-13 Nxp股份有限公司 Circuit arrangement and method RSA key generation
US8280041B2 (en) * 2007-03-12 2012-10-02 Inside Secure Chinese remainder theorem-based computation method for cryptosystems
KR101383690B1 (en) * 2008-12-10 2014-04-09 한국전자통신연구원 Method for managing group key for secure multicast communication

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5991415A (en) * 1997-05-12 1999-11-23 Yeda Research And Development Co. Ltd. At The Weizmann Institute Of Science Method and apparatus for protecting public key schemes from timing and fault attacks
DE19963408A1 (en) * 1999-12-28 2001-08-30 Giesecke & Devrient Gmbh Portable data carrier with access protection by key division

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of WO03014916A1 *

Also Published As

Publication number Publication date
US20040184604A1 (en) 2004-09-23
FR2828608A1 (en) 2003-02-14
CN1568457A (en) 2005-01-19
FR2828608B1 (en) 2004-03-05
WO2003014916A1 (en) 2003-02-20

Similar Documents

Publication Publication Date Title
EP2031792B1 (en) Secure modular exponentiation with leak minimization for smartcards and other cryptosystems
US7065788B2 (en) Encryption operating apparatus and method having side-channel attack resistance
EP1166494A1 (en) Countermeasure procedures in an electronic component implementing an elliptical curve type public key encryption algorithm
EP2296086B1 (en) Protection of prime number generation against side-channel attacks
EP1419434A1 (en) Secure method for performing a modular exponentiation operation
JP2004304800A (en) Protection of side channel for prevention of attack in data processing device
JP2004512570A (en) Method and apparatus using an insecure cryptographic accelerator
EP1421473B1 (en) Universal calculation method applied to points on an elliptic curve
US8233615B2 (en) Modular reduction using a special form of the modulus
US20090122980A1 (en) Cryptographic Method for Securely Implementing an Exponentiation, and an Associated Component
US7123717B1 (en) Countermeasure method in an electronic component which uses an RSA-type public key cryptographic algorithm
EP1994465A1 (en) Method of securing a calculation of an exponentiation or a multiplication by a scalar in an electronic device
EP1839125A1 (en) Secure and compact exponentiation method for cryptography
WO2003055134A9 (en) Cryptographic method for distributing load among several entities and devices therefor
EP0980607A1 (en) Pseudo-random generator based on a hash coding function for cryptographic systems requiring random drawing
FR2842052A1 (en) CRYPTOGRAPHIC METHOD AND DEVICES FOR REDUCING CALCULATION DURING TRANSACTIONS
WO2004017193A2 (en) Method for universal calculation applied to points of an elliptic curve
FR2818846A1 (en) Method for protecting electronic component executing cryptographic algorithm against current measurement attack, comprises factorization of exponential in algorithm and permutation of the factors
EP2738974A1 (en) Method for deriving multiple cryptographic keys from a master key in a security microprocessor
WO2002099624A1 (en) Method for making secure computation of an exponentiation in an electronic device
WO2002082257A1 (en) Device for performing secure exponentiation calculations and use thereof
FR2829646A1 (en) Cryptography method, especially for use with a smart card, provides protection against side channel attacks by use of various exponentiation algorithms that serve to protect the exponentiation factor
FR2864649A1 (en) Reverse calculation circuit for chip card, has random number generator generating two random numbers, and inverter outputting number of bits expressing reverse elements of one set of elements of function

Legal Events

Date Code Title Description
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

17P Request for examination filed

Effective date: 20040310

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR IE IT LI LU MC NL PT SE SK TR

AX Request for extension of the european patent

Extension state: AL LT LV MK RO SI

17Q First examination report despatched

Effective date: 20041124

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: 20060210