WO2002082257A1 - Device for performing secure exponentiation calculations and use thereof - Google Patents

Device for performing secure exponentiation calculations and use thereof Download PDF

Info

Publication number
WO2002082257A1
WO2002082257A1 PCT/FR2002/001233 FR0201233W WO02082257A1 WO 2002082257 A1 WO2002082257 A1 WO 2002082257A1 FR 0201233 W FR0201233 W FR 0201233W WO 02082257 A1 WO02082257 A1 WO 02082257A1
Authority
WO
WIPO (PCT)
Prior art keywords
exponentiation
algorithm
chain
universal
random
Prior art date
Application number
PCT/FR2002/001233
Other languages
French (fr)
Inventor
Marc Joye
Original Assignee
Gemplus
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 filed Critical Gemplus
Publication of WO2002082257A1 publication Critical patent/WO2002082257A1/en

Links

Classifications

    • 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
    • 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/7276Additional details of aspects covered by group G06F7/723
    • G06F2207/7295Additional details of aspects covered by group G06F7/723 using an addition chain, or an addition-subtraction chain

Definitions

  • the addition chain is thus both a representation of the exponent e and a coding of the exponentiation algorithm • from which it results.
  • the only executable part of the algorithm that allows exponentiation from this addition chain hard coded, in mask ROM memory. It consists of a succession of multiplications.
  • This exponentiation algorithm is universal in the sense that it can be used with any addition chain generated by any exponentiation algorithm.
  • An addition string of an exponent e is a sequence of numbers, the first of which is the number 1, each of the following numbers being equal to the sum of two previous numbers. The last number is equal to the exponent e itself.
  • a variant of the addition chains is an addition chain such that each element e (l) of the chain is equal to the immediately preceding element e (1-1) plus another preceding element e (k (i)) .
  • the sequence defining .comment is obtained each element of the chain is then shorter, since one of the two preceding elements is already known: it is the previous one.
  • the execution of the universal exponentiation algorithm which results therefrom consists in step i of calculation of the i th element e ( ⁇ ) of the addition chain, writing in the register R ⁇ ( i) the result of the multiplication of the content of the register R ⁇ tu by the content of the register R ⁇ (i>.
  • the content of the register R ⁇ (i> is equal to the content of the register R ⁇ (ii) calculated in the previous round.
  • T * (e) ⁇ ( ⁇ (i): ⁇ (i)) ⁇ i ⁇ i ⁇ r and the corresponding universal exponentiation algorithm is written:
  • star strings makes it possible to save memory space by approximately 1/3 compared to the addition strings represented by sequences of register triplets.
  • the exponentiation method which has just been described can be applied to any type of exponentiation algorithm, this algorithm being coded in the resulting addition chain.
  • this algorithm being coded in the resulting addition chain.
  • we can also use a k-ary type algorithm, or a chain division algorithm (so-called alter algorithm) to generate the addition chain. This list is not exhaustive.
  • the universal exponentiation algorithm receives at each step a corresponding triplet of registers of the sequence.
  • C * gd2 (87) ⁇ 1,2,4,5,10,20,21,42,43,86,87 ⁇ . If there are two registers R0 and RI, a sequence of registers ' associated with this star chain is written: (0: 0), (0: 0), (0: 1), (0: 0), (0: 0), (0: 1), (0: 0), (0: 1), (0: 0), (0: 1), (0 : 0), (0: 1) ⁇ , where RO and RI are both initialized to x.
  • This exponentiation method is also very fast: the number of multiplications to be performed is equal to the length of the addition chain. Now we know generate strings' of short additions to. appropriate exponentiation algorithm means, such as the alter division exponentiation algorithm. If we take as a comparison, the binary exponentiation algorithm with countermeasure ("square and multiply always"), - 21og 2 nd multiplications are necessary for its execution. With the exponentiation method considered, we know how to reduce this number of operations to 1.251og 2 è.
  • this exponentiation method has the advantage of being resistant to simple hidden channel attacks, unlike the usual exponentiation algorithms which must integrate countermeasures to resist these attacks.
  • the addition chain can be generated in a device personalization phase, by external means, then programmed into rewritable memory (EEPROM or FLASH EPROM for example).
  • EEPROM erasable programmable read-only memory
  • FLASH EPROM programmable read-only memory
  • the exponent e represents a private key, determined for a given device (a smart card) in a personalization step.
  • the addition chain (the sequence of registers) can be calculated in this same personalization step by means external to the device, then stored as such once and for all in the card, in. rewritable memory (EEPROM, Flash EPROM, ). If we consider the field of application of the smart card, this supposes changes in the mode of production and putting into functionality of these cards, which is not desirable.
  • the addition chain or the sequence which represents it occupies more space than the exponent itself, usually stored in binary form, which is a drawback, the size of the rewritable memory being generally limited.
  • the card providers that manage the personalization step does not favor the establishment of such a change.
  • the addition chain C (e) is calculated in a phase d. ' initialization of the device, by means of an exponentiation algorithm coded in the device, and then stored in working memory of RAM type. This supposes a manipulation of the exponent by the exponentiation algorithm, only once, for example when the device is powered up. However, the device can then be vulnerable to hidden channel attacks, in particular to simple hidden channel attacks. -The exhibitor, which generally represents a key, could then be discovered.
  • a problem linked to this exponentiation method lies in the generation of the addition chain representing the exponent e.
  • An object of the invention is to solve this problem of generating the exponent's addition chain.
  • the device uses a random addition chain C ( a), which implicitly defines a number a, which is essentially random.
  • the random chain is generated by means external to the device, and programmed in the device in a portion of rewritable memory.
  • the random chain is generated by internal means, and stored in a portion of working memory.
  • this methodology helps protect against differential hidden channel attacks.
  • the exponent ea is calculated using the universal exponentiation algorithm, after generation of an addition-subtraction chain representative of the exponent ea from any exponentiation algorithm .
  • ea not being known, because random, one can use it in any computation in general, without fearing the attacks with hidden channels.
  • To calculate x ea we must first calculate ea, so a.
  • by using the universal exponentiation algorithm in additive notation i.e. where the multiplication operation is replaced by an addition
  • we obtain a universal multiplication algorithm scaling, which allows to calculate the value of a.
  • This scalar multiplication is applicable to the elements of a set noted additively, typically to points of an elliptical curve.
  • R and x represent points on this curve.
  • this property is used . to calculate the random number a from the random string C (a).
  • the implementation of the exponentiation method based on the universal exponentiation algorithm is it easy, while ensuring a high degree of security of the device against attacks with hidden channels.
  • FIG. 1 represents in the form of a block diagram a programmed device implementing this exponentiation method.
  • this device is a smart card intended to execute a cryptographic program.
  • the device 1 gathers in a chip means programmed for the execution of calculations, composed of a central unit (CPU) 2 functionally connected to a set of memories of which:
  • This 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.
  • program memory is called the memory which contains executable code.
  • This code can in practice be contained in memory 4, accessible in read only, or in memory 6, rewritable.
  • the device 1 also comprises a random generator 9.
  • the function of this random generator is to generate a random chain C (a).
  • the central unit 2 is also 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 and decrypt confidential data respectively transmitted to and from outside. This data may relate, for example, to personal codes, medical information, accounting on bank or commercial transactions, authorizations to access certain restricted services, etc. Another function is to calculate a digital signature or verify it.
  • the central unit 2 executes a cryptographic algorithm on the basis of programming data which, according to the invention, are stored in the mask ROM 4 ′ and EEPROM 6 parts.
  • the number R thus obtained constitutes encrypted, deciphered, signed or verified data.
  • the number x, transmitted by the communication interface 10, is stored in working memory 8.
  • the number e (the key) is stored in a rewritable memory portion 6, of the EEPROM type in the example.
  • the universal exponentiation algorithm that is to say an algorithm performing a succession of multiplications, is stored in a portion of the program memory 4.
  • An arbitrary exponentiation algorithm is stored in another portion of the program memory 4. It can be a binary algorithm (SAM) or an algorithm of type M, M 3 , ...
  • This random chain is representative of a number a, in essence, also random. It can be represented in the form of a sequence of elements E. (a). It is advantageously represented in the form of a sequence of registers T (a).
  • the universal exponentiation algorithm can be configured to treat the random sequence E (a) or T (a), like sequences of doublets or triplets of elements or registers.
  • T (a) ⁇ (1: 1.1), (0: 0.1), (1: 1.1), (0: 0.1), (1: 1.1), (1: 1 , 1), (0: 0.1), (1: 1.1), (1: 1, 1), (0: 0, 1) ⁇ .
  • the universal scalar multiplication algorithm processes at each step a corresponding triplet of registers of the sequence.
  • this universal algorithm will successively carry out the following additions: RI - Rl + Rl (RI then contains 2) RO - R0 + R1 (RO then contains 3) RI ⁇ - Rl + Rl (RI contains 4) RO r- R0 + R1 (RO contains 7) RI ⁇ - Rl + Ri (RI contains 8) RI ⁇ - Rl + Rl (RI contains 16) RO ⁇ - R0 + R1 (RO contains 23) RI - Rl + Rl (RI contains 32) RI r- Rl + Rl (RI contains 64) RO - R0 + R1 (RO contains 87)
  • the output result, contained here in the RO register corresponds to the value of the number a.
  • the device then calculates the number (ea), by performing a simple subtraction.
  • the universal scalar multiplication algorithm for the calculation of a, can process the representation of the random chain C (a) in sequence, parallel.
  • the arbitrary exponentiation algorithm coded in program memory does not have to include countermeasures with respect to hidden channel attacks, since knowledge of ea does not make it possible to completely find th , since the value of a, random, is protected.
  • An alternative embodiment of the invention relates • the generation mode a representation of the random string C (a).
  • the random chain is generated by external means. In this case, these means are used in the personalization phase of the exponentiation device 1, and the representation of the random chain thus generated is then stored in rewritable memory 6.
  • an addition-subtraction chain can be represented by a sequence of doublets or triplets of elements of the chain, or by a sequence of registers.
  • the calculation device according to the invention must therefore be configured to process doublets or triplets of elements or registers. This configuration is the same for the universal exponentiation algorithm and the universal multiplication algorithm, which process the same string. This configuration results in the corresponding execution programs programmed in program memory.
  • This configuration also depends on the number of registers available in the device.
  • the random generator must also be configured to generate a sequence corresponding to a given length r of random chain.
  • the random generator is configured so that the numbers a and e are substantially the same size, to make impossible any determination of this exponent e by channel type attacks hidden.
  • the random generator is configured so that the size of the number a is substantially equal to the size of the number e minus its known part.
  • the random chain is a chain of additions, or advantageously, a star chain.

Abstract

The invention concerns a device for performing exponentiation calculations of the type R=x<e>, where k is an element of a set with multiplicative notation and e a predetermined number, comprising first exponentiation calculating means from a representation of a random addition-subtraction sequence C(a) representing a number a, to calculate Y=x<a> using a universal exponentiation algorithm, and second exponentiation calculating means using any particular exponentiation calculating algorithm to calculate Z=x<e-a>.

Description

DISPOSITIF DESTINE A REALISER DES CALCULS D ' EXPONENTIATION SECURISEE ET UTLISA - T ION D ' UN TEL DESPOSITIFDEVICE FOR CARRYING OUT SECURE EXPONENTIATION CALCULATIONS AND USING SUCH A DESPOSITIVE
La présente invention concerne un dispositif de calcul d'exponentiation sécurisée, avec application notamment dans le domaine de la cryptologie où l'on met en oeuvre des algorithmes cryptographiques dans desThe present invention relates to a device for calculating secure exponentiation, with application in particular in the field of cryptology where cryptographic algorithms are implemented in
5 dispositifs électroniques tels que des cartes à puce.5 electronic devices such as smart cards.
De nombreux algorithmes cryptographiques sont basés sur des calculs d'exponentiation du type R = xe, où x et e sont des nombres prédéterminés qui codent une valeur R. Ceci est notamment le cas avec l'algorithme 10 du type RSA (Rivest, Shamir et Adleman) . La valeur R peut correspondre par exemple à un texte chiffré, une donnée signée ou vérifiée....Many cryptographic algorithms are based on exponentiation calculations of the type R = x e , where x and e are predetermined numbers which code an R value. This is notably the case with the algorithm 10 of the RSA type (Rivest, Shamir and Adleman). The value R can correspond for example to an encrypted text, a signed or verified data ...
Un dispositif électronique prévu pour exécuter un tel algorithme doit contenir en mémoire d'une part la 15 partie exécutoire pour élever x à la puissance de e, et d'autre part les valeurs x et e .An electronic device designed to execute such an algorithm must contain on the one hand the executable part for raising x to the power of e, and on the other hand the values x and e.
Il existe différents types d'algorithmes d'exponentiation. On connaît notamment la méthode binaire de type "élévation au carré et multiplication", 20 plus habituellement connue sous la terminologie anglo- saxonne "square and mul tiply" (acronyme anglais SAM) , la méthode de Yacobi, dite M,M3, la méthode des fenêtres glissantes, etc.There are different types of exponentiation algorithms. We know in particular the binary method of the type "squared and multiplication", more usually known under the English terminology "square and mul tiply" (English acronym SAM), the method of Yacobi, called M, M 3 , the sliding window method, etc.
Ces algorithmes produisent une chaîne d'additionThese algorithms produce an addition chain
25 représentative de l'exposant e. Il existe plusieurs chaînes d'addition ' représentatives de l'exposant, chacune étant fonction de l'exposant, de l'algorithme d'exponentiation utilisé et des paramétrages de cet algorithme .25 representative of the exhibitor e. There are several addition chains ' representative of the exponent, each being a function of the exponent, of the algorithm of exponentiation used and the parameters of this algorithm.
Ces algorithmes sont assez complexes et doivent inclure des contre-mesures adaptées contre des attaques visant à découvrir des informations contenues et manipulées dans des traitements effectués par le dispositif de calcul. Notamment, des contre-mesures sont prévues contre les attaques dites à canaux cachés, 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 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 . 1966 of Lectures Notes in Computer Science, pp. 388-397.These algorithms are quite complex and must include suitable countermeasures against attacks aimed at discovering information contained and manipulated in processing carried out by the computing device. In particular, countermeasures are provided against so-called hidden channel attacks, 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 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. 1966 of Lectures Notes in Computer Science, pp. 388-397.
Springer-Verlag , 1999) . Parmi les grandeurs physiques qui peuvent être exploitées à ces fins, on peut citer la consommation en courant, le champ électromagnétiqueSpringer-Verlag, 1999). Among the physical quantities which can be exploited for these purposes, one can cite the current consumption, the electromagnetic field
Ces attaques sont basées sur le fait que la manipulation d'un bit, c'est à dire son traitement par une instruction particulière a une empreinte particulière sur la grandeur physique considérée selon sa valeur.These attacks are based on the fact that the manipulation of a bit, that is to say its processing by a particular instruction has a particular imprint on the physical quantity considered according to its value.
Les algorithmes d'exponentiation précités ont dû inclure des contre-mesures pour empêcher ces attaques de prospérer. Par exemple, l'algorithme "square and ultiply always" selon la terminologie anglo-saxonne , et qui signifie "élever au carré et multiplier toujours", est une variante sécurisée de l'algorithme, SAM (square and multiply) dans lequel l'opération était conditionnelle à la valeur du bit en cours de traitement, donc permettant des attaques à canaux cachés.The aforementioned exponentiation algorithms had to include countermeasures to prevent these attacks from thriving. For example, the "square and ultiply always" algorithm according to English terminology, and which means "always squaring and multiplying", is a secure variant of the algorithm, SAM (square and multiply) in which the operation was conditional on the value of the bit being processed, therefore allowing channel attacks hidden.
Dans l'invention, on s'intéresse à une méthode d'exponentiation particulière, à partir d'une chaîne d'addition représentant l'exposant e, générée à partir d'un algorithme d'exponentiation arbitraire. Suivant cette chaîne d'addition, l'exponentiation est réalisée au , moyen d'un algorithme universel d'exponentiation, qui consiste en une succession de multiplications (cas général) . On rappellera que sur un ensemble noté additivement, tels les courbes elliptiques, l'exponentiation devient, une multiplication scalaire du type Q=d.P, où P et Q sont des éléments de l'ensemble noté additivement (courbe elliptique) et d un nombre scalaire. Dans ce cas, l'algorithme universel permettant de calculer Q=d.P à partir d'une chaîne d'addition, consiste en une succession d'additions (sur l'ensemble noté additivement).In the invention, we are interested in a particular exponentiation method, from an addition chain representing the exponent e, generated from an arbitrary exponentiation algorithm. According to this addition chain, exponentiation is carried out by means of a universal exponentiation algorithm, which consists of a succession of multiplications (general case). It will be recalled that on a set noted additively, such as elliptic curves, the exponentiation becomes, a scalar multiplication of the type Q = dP, where P and Q are elements of the set noted additively (elliptic curve) and d a scalar number . In this case, the universal algorithm allowing to calculate Q = d.P from an addition chain, consists of a succession of additions (on the set noted additively).
Dans la suite, on se place dans le cas général, conventionnel, ce qui veut dire que l'on utilisera la notation multiplicative, sauf mention explicite contraire.In the following, we place ourselves in the general, conventional case, which means that we will use the multiplicative notation, unless explicitly stated otherwise.
Avec la méthode d'exponentiation décrite, la chaîne d'addition est ainsi à la fois une représentation de l'exposant e et un codage de l'algorithme d'exponentiation dont elle résulte. La partie exécutoire de l'algorithme qui permet l'exponentiation à partir de cette chaîne d'addition est la seule partie codée en dur, en mémoire ROM masque. Elle consiste en une succession de multiplications. Cet algorithme d'exponentiation est universel en ce sens que l'on peut l'utiliser avec n'importe quelle chaîne d'addition générée par n'importe quel algorithme d'exponentiation.With the exponentiation method described, the addition chain is thus both a representation of the exponent e and a coding of the exponentiation algorithm • from which it results. The only executable part of the algorithm that allows exponentiation from this addition chain hard coded, in mask ROM memory. It consists of a succession of multiplications. This exponentiation algorithm is universal in the sense that it can be used with any addition chain generated by any exponentiation algorithm.
Une telle méthode d'exponentiation à partir d'une chaîne d'addition offre de nombreux avantages par rapport aux algorithmes d'exponentiation classiques.Such an exponentiation method from an addition chain offers many advantages over conventional exponentiation algorithms.
Ces avantages seront détaillés plus loin, après une présentation plus détaillée de cette méthode.These advantages will be detailed later, after a more detailed presentation of this method.
Cette méthode d'exponentiation est basée sur les chaînes d'addition ou plus généralement, sur ' les chaînes d'addition-soustraction.This method of exponentiation is based on the addition chains or more generally, to 'chains addition-subtraction.
Une chaîne d'addition d'un exposant e est une suite de nombres, dont le premier est le nombre 1, chacun des nombres suivants étant égal à la somme de deux nombres précédents. Le dernier nombre est égal à l'exposant e lui-même.An addition string of an exponent e is a sequence of numbers, the first of which is the number 1, each of the following numbers being equal to the sum of two previous numbers. The last number is equal to the exponent e itself.
Une chaîne d'addition pour un nombre e est ainsi définie comme la séquence C(e)= {e(0),e(1), ..., e(r)} qui satisfait les conditions:An addition string for a number e is thus defined as the sequence C (e) = {e (0) , e (1) , ..., e (r) } which satisfies the conditions:
(a) e(0) = 1, e(r) = e, et(a) e (0) = 1, e (r) = e, and
(b) pour tout 1 < i < r, il existe j (i) et k(i) strictement inférieurs à i tels que e!l) = e(j<x)) +(b) for all 1 <i <r, there exist j (i) and k (i) strictly less than i such that e ! l) = e (j <x)) +
( (i) où r représente la longueur de la chaîne.((i) where r represents the length of the string.
- On peut ainsi aisément obtenir R = xe en calculant, pour i = 1 à r : xΛe(i)=xΛe(j(i)).xΛe(k(i)), où le symbole Λ signifie «exposant». Au dernier tour r, on calcule ainsi : xΛe(r)= xΛe(3(r)).xΛe(k(r)). Comme e(r) = e (c'est le dernier élément de la chaîne), on a R= xΛe(r) .- We can thus easily obtain R = x e by calculating, for i = 1 to r: xΛe (i) = xΛe (j (i)) .xΛe (k (i)) , where the symbol Λ means “exponent”. In the last round r, we calculate as follows: xΛe (r) = xΛe (3 (r)) .xΛe (k (r)) . Since e (r) = e (this is the last element in the chain), we have R = xΛe (r) .
Ainsi, à chaque pas, on calcule une puissance de x correspondant à un exposant intermédiaire de la. chaîne en effectuant une multiplication entre deux puissances de x calculées à des pas précédents.Thus, at each step, a power of x is calculated corresponding to an intermediate exponent of the . chain by performing a multiplication between two powers of x calculated in previous steps.
En effectuant r multiplications, on obtient le résultat de l'exponentiation de x par e.By performing r multiplications, we obtain the result of the exponentiation of x by e.
En pratique, une chaîne d'addition est représentée sous la forme d'une séquence qui définit pour chaque élément de la chaîne (sauf le premier élément de la chaîne, toujours égal à 1), les deux éléments précédents de la chaîne desquels il est obtenu, c'est à dire, pour tout i, les éléments de la chaîne e(j(:)), e(k(i>), par lesquels on obtient un élément suivant e x) de la chaîne. L'algorithme d'exponentiation parcourt la séquence qui lui fournit ses entrées et sortie à chaque pas, et qui exécute les multiplications correspondantes. Si on considère la forme plus générale de la chaîne' dite d'addition-soustraction, chaque élément e(i) de la suite est égal à plus ou moins un élément précédent e(j(α)), plus ou moins un élément précédent e( {a"n. On peut donc prendre en compte soit un élément, soit son opposé. Dans la séquence représentative de la chaîne, on doit alors inclure pour tout élément e(i), le signe de chacun des éléments e(j(i)) et e(k(1)) associés.In practice, an addition chain is represented in the form of a sequence which defines for each element of the chain (except the first element of the chain, always equal to 1), the two preceding elements of the chain of which it is obtained, that is, for all i, the elements of the chain e (j (:)) , e (k (i>) , by which we obtain an element following e x) of the chain. The exponentiation algorithm traverses the sequence which provides its inputs and outputs at each step, and which executes the corresponding multiplications. If we consider the more general form of the chain ' called addition-subtraction, each element e (i) of the sequence is equal to more or less a preceding element e (j (α)) , more or less an element previous e ({a " n . We can therefore take into account either an element or its opposite. In the representative sequence of the chain, we must then include for each element e (i), the sign of each of the elements e ( j (i)) and e (k (1)) associated.
Une variante des chaînes d'additions, dénommée chaîne étoile, est une chaîne d'additions telle que chaque élément e(l) de la- chaîne est égal à l'élément immédiatement précédent e(1-1) plus un autre élément précédent e(k(i)). La séquence définissant .comment est obtenu chaque élément de la chaîne est alors plus courte, puisqu'un des deux éléments précédents est déjà connu : c'est le précédent.A variant of the addition chains, called a star chain, is an addition chain such that each element e (l) of the chain is equal to the immediately preceding element e (1-1) plus another preceding element e (k (i)) . The sequence defining .comment is obtained each element of the chain is then shorter, since one of the two preceding elements is already known: it is the previous one.
Ainsi, de manière générale, une chaîne d'addition- soustraction peut être représentée par une séquence de triplets (e(α>: e(j (1>), e!k(l)) ) ou de doublets ou pairesThus, in general, an addition-subtraction chain can be represented by a sequence of triplets (e (α> : e (j (1>) , e ! K (l)) ) or doublets or pairs
(e ): ek(i))f dans le cas particulier des chaînes étoiles .(e ) : e k (i) ) f in the particular case of star chains.
Dans un exemple pratique, avec une chaîne d'addition C(5)=(l,2,4,5) générée pour le nombre 5, une séquence associée peut s'écrire. :In a practical example, with an addition chain C (5) = (1,2,4,5) generated for the number 5, an associated sequence can be written. :
{(2:1,1), (4:2,2), (5:4,1)}.{(2: 1.1), (4: 2.2), (5: 4.1)}.
La méthode d'exponentiation décrite, nécessite donc la représentation de l'exposant sous forme d'une séquence de doublets (cas de chaînes étoiles) ou de triplets (cas général des chaînes d'addition ou d'addition-soustraction), cette séquence définissant les entrées/sorties de l'algorithme universel d' exponentiation. Cependant, remplacer la représentation de l'exposant par une séquence de doublets et de triplets n'est pas avantageux du point de vue de l'espace mémoire nécessaire à leur stockage : chaque élément d'un doublet ou triplet occupe en effet autant de place mémoire que 1 ' exposant .The exponentiation method described therefore requires the representation of the exponent in the form of a sequence of doublets (case of star chains) or triplets (general case of addition or addition-subtraction chains), this sequence defining the inputs / outputs of the universal exponentiation algorithm. However, replacing the representation of the exponent with a sequence of doublets and triplets is not advantageous from the point of view of the memory space necessary for their storage: each element of a doublet or triplet occupies as much space memory as the exhibitor.
En remplaçant chacun des éléments des doublets ou triplets de la séquence, par le registre dans lequel il est contenu ou doit être écrit, on améliore considérablement cet aspect. Par exemple, si le dispositif d'exponentiation dispose de quatre registres, seuls deux bits sont nécessaires pour représenter (coder) chacun de ces registres. Si chaque élément de la séquence représentative de la chaîne d'addition-soustraction est remplacée par le registre dans lequel il est contenu, on réduit de façon considérable l'espace mémoire nécessaire pour la stocker. La chaîne d'addition C(e) représentative de l'exposant e, est alors représentée par une séquence de registres, que l'on note T(e).By replacing each of the elements of the doublets or triplets of the sequence, by the register in which it is contained or must be written, this aspect is considerably improved. For example, if the exponentiation device has four registers, only two bits are necessary to represent (code) each of these registers. If each element of the representative sequence of the addition-subtraction chain is replaced by the register in which it is contained, the memory space required to store it is considerably reduced. The addition chain C (e) representative of the exponent e, is then represented by a sequence of registers, which we denote by T (e).
Si on part du cas général d'une chaîne d'additionIf we start from the general case of an addition chain
C(e) fournie pour un exposant e : C(e) = {e(0),e(1), ...,e(r)} avec e(0) = 1 et e(r)=e, représentée par une séquence de triplets d'éléments de cette chaîne : E(e) ={ (e(i) : e(j(i)), e(k(i>> ) i=ι à r}, avec e 1 et e(i) = e(3(i)) + e( (i)), on a vu que l'algorithme d'exponentiation universel s'écrit : à l'étape i, calculer xΛe(i) = xΛe(j(i)) .xΛe( (i) ! .C (e) supplied for an exponent e: C (e) = {e (0) , e (1) , ..., e (r) } with e (0) = 1 and e (r) = e, represented by a sequence of triplets of elements of this chain: E (e) = {(e (i) : e (j (i)) , e (k (i >> ) i = ι to r}, with e 1 and e (i) = e (3 (i)) + e ((i)) , we have seen that the universal exponentiation algorithm is written: in step i, calculate xΛe (i) = xΛe (j (i)) .xΛe ((i)!.
En posant que xΛe(j(l)> et xΛe(k<1)) sont contenus respectivement dans un premier registre Rα<i) et un deuxième registre Rβ(i), et que le résultat de la multiplication xΛe(i) est inscrit dans un troisième registre R7(i), l'exécution de l'algorithme d'exponentiation universel qui en découle, consiste à l'étape i de calcul du iè e élément e(α) de la chaîne d'additions, à écrire dans le registre Rγ(i) le résultat de la multiplication du contenu du registre Rαtu par le contenu du registre Rβ(i>.Assuming that xΛe (j (l)> and xΛe (k <1)) are respectively contained in a first register R α <i) and a second register Rβ (i), and that the result of the multiplication xΛe (i) is registered in a third register R 7 (i), the execution of the universal exponentiation algorithm which results therefrom, consists in step i of calculation of the i th element e (α) of the addition chain, writing in the register R γ ( i) the result of the multiplication of the content of the register R α tu by the content of the register Rβ (i>.
Ainsi, la chaîne d'addition de l'exposant e peut être représentée par la séquence de triplets de registres suivante: T(e) = { (γ(i) : α(i) , β (i) ) } i < i < r/> ce qui veut dire que Rγ(i)= Rα(i) -R ..) • Par convention, la valeur e=l est représentée par F(l)= {φ} .Thus, the addition chain of the exponent e can be represented by the following sequence of register triples: T (e) = {(γ (i): α (i), β (i))} i <i <r /> which means that Rγ (i) = Rα (i) -R ..) • By convention, the value e = l is represented by F (l) = {φ}.
De ce qui précède, on obtient l'algorithme d'exponentiation universel suivant' (pour e>l) :From the above, we obtain the following universal exponentiation algorithm ' (for e> l):
Initialiser Rα(ij — x ; Rβ(i) <- x pour i = 1 à r,- exécuter
Figure imgf000010_0001
émettre en sortie R =' R7(r) • On note que Rα(i) et β(u sont initialisés avec la valeur x, car le premier terme de chaque chaîne d'addition étant 1, le deuxième terme est toujours e(1> = 2. On note également que l'on peut avoir α(l) = β(l), et plus généralement α(i) = β(i). Dans le cas où l'on utilise des .chaînes étoiles, notées C* (e) , on a vu que la condition sur les termes de la chaîne s'écrit: e(i) = e(i_1) + e(k(i)).
Initialize R α (ij - x; Rβ (i) <- x for i = 1 to r, - execute
Figure imgf000010_0001
output R = ' R 7 ( r ) • We note that R α (i) and β (u are initialized with the value x, because the first term of each addition chain being 1, the second term is always e (1> = 2. We also note that we can have α (l) = β (l), and more generally α (i) = β (i). In the case where star chains are used , denoted C * (e), we have seen that the condition on the terms of the chain is written: e (i) = e (i_1) + e (k (i)) .
Une telle chaîne étoile C*(e), peut donc être représentée par une séquence de paires (doublets) de registres, en posant la condition α(i) = γ(i-l) pour tout 1 < i < r. En d'autres termes, le contenu du registre Rα(i> est égal au contenu du registre Rγ(i-i) calculé au tour précédent.Such a star chain C * (e), can therefore be represented by a sequence of pairs (doublets) of registers, by posing the condition α (i) = γ (il) for all 1 <i <r. In other words, the content of the register R α (i> is equal to the content of the register Rγ (ii) calculated in the previous round.
La séquence de registres associée à une chaîne étoile est donc donnée par :The sequence of registers associated with a star chain is therefore given by:
T*(e) = { (γ(i) : β(i))} i≤i≤r et l'algorithme d'exponentiation universel correspondant s'écrit :T * (e) = {(γ (i): β (i))} i≤i≤r and the corresponding universal exponentiation algorithm is written:
Initialiser Rγ(0) <— x ; Rβ(i) — x pour i = 1 à r, exécuter
Figure imgf000011_0001
émettre en sortie R = Rγ '(r) •
Initialize R γ (0 ) <- x; Rβ (i) - x for i = 1 to r, execute
Figure imgf000011_0001
send at output R = R γ ' ( r ) •
L'utilisation de chaînes étoiles permet de réaliser un gain d'espace mémoire .d'environ 1/3 par rapport aux chaînes d'addition représentées par des séquences de triplets de registres.The use of star strings makes it possible to save memory space by approximately 1/3 compared to the addition strings represented by sequences of register triplets.
Comme on l'a déjà expliqué, la méthode d'exponentiation qui vient d'être décrite peut s'appliquer à tout type d'algorithme d'exponentiation, cet algorithme se retrouvant codé dans la chaîne d'addition résultante. Outre les algorithmes d'exponentiation binaires, on peut aussi bien utiliser un algorithme de type k-aire, ou un algorithme par division de chaînes (algorithme dit de alter) pour générer la chaîne d'addition. Cette liste n'est pas exhaustive.As already explained, the exponentiation method which has just been described can be applied to any type of exponentiation algorithm, this algorithm being coded in the resulting addition chain. In addition to the binary exponentiation algorithms, we can also use a k-ary type algorithm, or a chain division algorithm (so-called alter algorithm) to generate the addition chain. This list is not exhaustive.
En pratique, la séquence de registres représentative de la chaîne d'addition, et partant, de l'exposant, dépend de la valeur de l'exposant, de l'algorithme d'exponentiation qui a généré la chaîne et de son paramétrage. Notamment, elle dépend du nombre de registres utilisés dans cet algorithme et disponibles dans le dispositif d'exponentiation.In practice, the sequence of registers representative of the addition chain, and hence of the exponent, depends on the value of the exponent, on the exponentiation algorithm which generated the chain and on its configuration. In particular, it depends on the number of registers used in this algorithm and available in the exponentiation device.
Pour illustrer les différents aspects de la méthode d'exponentiation qui vient d'être exposée, prenons des exemples pratiques.To illustrate the different aspects of the exponentiation method which has just been exposed, let us take practical examples.
Soit R=Xe à calculer, avec e=87.Let R = X e to be calculated, with e = 87.
En notation binaire, e s'écrit : e=(et-ι, ..-, e0)2= (1, 0, 1, 0, 1, 1, 1) 2 Si on utilise comme algorithme d'exponentiation, la méthode binaire (SAM) du type à balayage de l'exposant de droite à gauche, et utilisation de deux registres RO et RI. Cet algorithme s'écrit de façon bien connue : RO <- 1; RI r- X pour i = 0 à (t-1) , exécuter si (e± = 1), alors RO - RO . RIIn binary notation, e is written: e = (e t -ι, ..-, e 0 ) 2 = (1, 0, 1, 0, 1, 1, 1) 2 If we use as exponentiation algorithm , the binary method (SAM) of the exponent's scanning type from right to left, and use of two registers RO and RI. This algorithm is written in a well known way: RO <- 1; RI r- X for i = 0 to (t-1), execute if (e ± = 1), then RO - RO. RI
RI <- RI2 émettre en sortie R =|R0.RI <- RI 2 send at output R = | R0.
Avec un tel algorithme d'exponentiation, pour e=87= (1, 0, 1, 0, 1, 1, 1) 2, on obtient la chaîne d'additions Cdg2(87) suivante :With such an exponentiation algorithm, for e = 87 = (1, 0, 1, 0, 1, 1, 1) 2 , we obtain the following chain of additions C dg2 (87):
Cdg2(87)={l,2,3,4,7,8,16,23,32,64,87} que 1 ' on peut représenter par la séquence de registres R0 et RI : rdg2 (87) ={(1:1,1), (0:0,1), (1:1,1), (0:0,1), (1:1,1) , (1:1,1) , (0:0,1) , (1:1,1) , (1 : 1, 1) , (0 : 0, 1) } , où R0 et RI sont tous deux initialisés à x.C dg2 (87) = {l, 2,3,4,7,8,16,23,32,64,87} which 1 'can be represented by the sequence of registers R0 and RI: r dg2 (87) = {(1: 1.1), (0: 0.1), (1: 1.1), (0: 0.1), (1: 1.1), (1: 1.1), ( 0: 0.1), (1: 1.1), (1: 1, 1), (0: 0, 1)}, where R0 and RI are both initialized at x.
L'algorithme d'exponentiation universel reçoit à chaque pas, un triplet de registres correspondant de la séquence.The universal exponentiation algorithm receives at each step a corresponding triplet of registers of the sequence.
Ainsi, après initialisation des deux registres R0 et . RI à x, .l'algorithme universel va effectuer successivement les multiplications suivantes: RI <- RI. RI (RI contient alors x2) R0 <- R0.R1 (R0 contient alors x3) RI - RI. RI (RI contient x4) R0 - R0.R1 (R0 contient x7) RI - RI. RI (RI contient x8) RI <- RI. RI (RI contient x16) R0 <- R0.R1 (R0 contient x23) RI - RI. RI (RI contient x32) RI <r- RI. RI (RI contient x64) RO - R0.R1 (RO contient x87)Thus, after initialization of the two registers R0 and . RI at x,. The universal algorithm will successively carry out the following multiplications: RI <- RI. RI (RI then contains x 2 ) R0 <- R0.R1 (R0 then contains x 3 ) RI - RI. RI (RI contains x 4 ) R0 - R0.R1 (R0 contains x 7 ) RI - RI. RI (RI contains x 8 ) RI <- RI. RI (RI contains x 16 ) R0 <- R0.R1 (R0 contains x 23 ) RI - RI. RI (RI contains x 32 ) RI <r- RI. RI (RI contains x 64 ) RO - R0.R1 (RO contains x 87 )
Le résultat de l'exponentiation de x par e=87 est donné par le contenu final de RO .The result of the exponentiation of x by e = 87 is given by the final content of RO.
Une autre séquence de la chaîne d'addition Cdg2(87) précédente peut-être obtenue, en utilisant un - registre supplémentaire pour' la coder. On peut ainsi avoir la séquence suivante : r'dg2 (87) =={(1:0,0), (2:0,1), (0:1,1), (1:0,2), (2:0,0), (0:2,2), (2:0,1), (1:0,0), (0:1,1), (1:0,2) }. II s'ensuit un déroulement différent de l'algorithme d'exponentiation universel.Another sequence from the previous C dg2 (87) addition chain may be obtained, using an additional register to code it. We can thus have the following sequence: r ' d g 2 (87) == {(1: 0.0), (2: 0.1), (0: 1.1), (1: 0.2 ), (2: 0.0), (0: 2.2), (2: 0.1), (1: 0.0), (0: 1.1), (1: 0.2)} . It follows a different course of the universal exponentiation algorithm.
Si on utilise un algorithme binaire d'exponentiation avec balayage des bits de l'exposant e de gauche à droite (algorithme SAM Square And Multiply) , on obtient une autre chaîne pour représenter l'exposant e. En particulier, avec un tel algorithme, on obtient des chaînes d'additions de type étoile.If we use a binary exponentiation algorithm with scanning the exponent's bits from left to right (SAM Square And Multiply algorithm), we obtain another string to represent the exponent e. In particular, with such an algorithm, we obtain star type addition chains.
En reprenant l'exemple précédent avec e= 87, on obtient comme chaîne d'additions correspondante pour e = 87 :Using the previous example with e = 87, we get the corresponding addition chain for e = 87:
C* gd2(87) = {1,2,4,5,10,20,21,42,43,86,87}. Si on dispose des deux registres R0 et RI, une séquence de registres' associée à cette chaîne étoile s'écrit :
Figure imgf000013_0001
(0:0), (0:0), (0:1), (0:0), (0:0), (0:1), (0:0), (0:1) , (0:0) , (0:1) }, où RO et RI sont tous deux initialisés à x.
C * gd2 (87) = {1,2,4,5,10,20,21,42,43,86,87}. If there are two registers R0 and RI, a sequence of registers ' associated with this star chain is written:
Figure imgf000013_0001
(0: 0), (0: 0), (0: 1), (0: 0), (0: 0), (0: 1), (0: 0), (0: 1), (0 : 0), (0: 1)}, where RO and RI are both initialized to x.
Il s'ensuit encore un autre déroulement différent de l'algorithme d'exponentiation universel. Ces différents exemples de génération de chaînes d'additions et de séquences montrent bien que ces chaînes et séquences dépendent de l'exposant, de l'algorithme d'exponentiation mis en oeuvre et de paramétrages, comme le nombre de registres du dispositif d'exponentiation utilisés.There follows yet another different course of the universal exponentiation algorithm. These different examples of generation of addition chains and sequences clearly show that these chains and sequences depend on the exponent, the exponentiation algorithm used and the settings, such as the number of exponentiation device registers used.
Si l'algorithme d'exponentiation utilisé pour générer la chaîne d'addition est mis en oeuvre dans une phase d'initialisation du dispositif par des moyens externes, on ne programme plus l'exposant e en mémoire ré-inscriptible du dispositif d'exponentiation, mais la séquence de registres obtenue. En d'autres termes, l'algorithme d'exponentiation se retrouve codé dans la séquence de registres résultante.If the exponentiation algorithm used to generate the addition chain is implemented in a device initialization phase by external means, the exponent is no longer programmed in the rewritable memory of the exponentiation device , but the sequence of registers obtained. In other words, the exponentiation algorithm finds itself coded in the resulting sequence of registers.
Cette méthode d'exponentiation décrite est ainsi très flexible, puisqu'elle permet de coder dans la chaîne- d'addition, n'importe quel algorithme d'exponentiation, et qu'une simple reprogrammation de la mémoire ré-inscriptible permet des changements d'algorithme et/ou des changements d'exposant.This exponentiation method described is thus very flexible, since it makes it possible to code in the addition chain, any exponentiation algorithm, and that a simple reprogramming of the rewritable memory allows changes of 'algorithm and / or exponent changes.
Cette méthode d'exponentiation est aussi très rapide : le nombre de multiplications à effectuer est égal à la longueur de la chaîne d'addition. Or on sait générer des chaînes ' d'additions courtes, au . moyen d'algorithme d'exponentiation approprié, comme par exemple l'algorithme d'exponentiation par division de alter. Si on prend à titre de .comparaison, l'algorithme d'exponentiation binaire avec contre-mesure ( "square and multiply always" ) , - 21og2e multiplications sont nécessaires à son exécution. Avec la méthode d'exponentiation considérée, on sait réduire ce nombre d'opérations à 1.251og2è.This exponentiation method is also very fast: the number of multiplications to be performed is equal to the length of the addition chain. Now we know generate strings' of short additions to. appropriate exponentiation algorithm means, such as the alter division exponentiation algorithm. If we take as a comparison, the binary exponentiation algorithm with countermeasure ("square and multiply always"), - 21og 2 nd multiplications are necessary for its execution. With the exponentiation method considered, we know how to reduce this number of operations to 1.251og 2 è.
Enfin, cette méthode d'exponentiation a l'avantage d'être résistante aux attaques à canaux cachés simples, contrairement aux algorithmes d'exponentiation habituels qui doivent intégrer des contre-mesures pour résister à ces attaques.Finally, this exponentiation method has the advantage of being resistant to simple hidden channel attacks, unlike the usual exponentiation algorithms which must integrate countermeasures to resist these attacks.
En pratique, en mémoire ROM masque n'est codé que l'algorithme d'exponentiation universel, qui est un simple algorithme de multiplication qui parcourt la séquence de registres contenue en mémoire réinscriptible, et pour multiplier simplement les éléments donnés par celle-ci. Ce type d'algorithme est très facile à programmer et les risques d'erreurs de programmation en mémoire ROM masque sont très faibles.In practice, in mask ROM memory is coded only the universal exponentiation algorithm, which is a simple multiplication algorithm which traverses the sequence of registers contained in rewritable memory, and for simply multiplying the elements given by it. This type of algorithm is very easy to program and the risks of programming errors in mask ROM memory are very low.
On remarquera que les algorithmes d'exponentiation utilisés habituellement sont beaucoup plus complexes, comprenant des paramétrages et devant intégrer des contre-mesures contre les attaques à canaux cachés simples ou différentielles. Ces contre-mesures aggravent le risque d'erreurs de programmation en mémoire ROM masque. En effet, les tests des programmes d'exécution de ces algorithmes n'interviennent généralement qu'après leur programmation en mémoire ROM masque. Si une erreur est trouvée, notamment une erreur de paramétrage, c'est l'ensemble des masques de fabrication de la ROM qui est affecté, et une nouvelle ROM doit être produite. Ceci implique des surcoûts industriels non négligeables. En outre, les contre- mesures implémentées, si elles sont généralement efficaces pour les attaques à canaux cachés de type différentielles, on a pu montrer qu'elles l'étaient moins pour des attaques à canaux cachés de type simples.It will be noted that the exponentiation algorithms usually used are much more complex, including parameter settings and having to integrate countermeasures against simple or differential hidden channel attacks. These countermeasures increase the risk of programming errors in mask ROM. Indeed, the tests of the execution programs of these algorithms generally intervene only after their programming in mask ROM memory. If an error is found, in particular a configuration error, all of the ROM manufacturing masks are affected, and a new ROM must be produced. This implies significant industrial additional costs. In addition, the countermeasures implemented, if they are generally effective for attacks with hidden channels of the differential type, we have been able to show that they were less so for attacks with hidden channels of the simple type.
Ainsi, la méthode d'exponentiation qui vient d'être décrite, basée sur les chaînes d'addition- soustraction et utilisant l'algorithme d'exponentiation universel, offre de nombreux avantages par rapport aux autres algorithmes d'exponentiation.Thus, the exponentiation method which has just been described, based on the chains of addition- subtraction and using the universal exponentiation algorithm, offers many advantages over other exponentiation algorithms.
La mise en oeuvre pratique de cette méthode nécessite la génération d'une chaîne d'addition représentant l'exposant e, soit sous forme d'une séquence E(e) d'éléments de cette chaîne, soit sous forme d'une séquence de registres T(e). Cette dernière forme est la plus avantageuse, puisqu'elle nécessite peu d'espace mémoire.The practical implementation of this method requires the generation of an addition chain representing the exponent e, either in the form of a sequence E (e) of elements of this chain, or in the form of a sequence of registers T (e). This latter form is the most advantageous, since it requires little memory space.
Dans cette méthode, on a vu que' la chaîne d'addition peut être générée dans une phase de personnalisation du dispositif, par des moyens externes, puis programmée en mémoire ré-inscriptible (EEPROM ou FLASH EPROM par exemple). En c'as d'erreur dans le paramétrage de l'algorithme d'exponentiation utilisé pour générer la chaîne d'addition, ou en cas de changement de l'exposant (changement de clé), il suffit alors seulement de reprogrammer la mémoire ré- inscriptible.In this method, we have seen that ' the addition chain can be generated in a device personalization phase, by external means, then programmed into rewritable memory (EEPROM or FLASH EPROM for example). In the event of an error in the configuration of the exponentiation algorithm used to generate the addition chain, or in the event of a change in the exponent (change of key), it then suffices only to reprogram the memory re - writable.
Cependant, la mise en oeuvre de la méthode de calcul de R=xe utilisant l'algorithme d'exponentiation universel suppose l'obtention d'une chaîne d'addition représentant l'exposant, au moyen d'un algorithme d'exponentiation arbitraire.However, the implementation of the method of calculating R = x e using the universal exponentiation algorithm supposes obtaining an addition chain representing the exponent, by means of an arbitrary exponentiation algorithm .
Dans le cas d'algorithme de cryptographie de type RSA, l'exposant e représente une clé privée, déterminée pour un dispositif donné (une carte à puce) dans une étape de personnalisation. Ainsi, la chaîne d'addition (la séquence de registres) peut être calculée dans cette même étape de personnalisation par des moyens externes au dispositif, puis mémorisée comme telle une fois pour toute dans la carte, en. mémoire ré-inscriptible (EEPROM, Flash EPROM, ... ) . Si on considère le domaine d'application de la carte à puce, ceci suppose des changements dans le mode de production et de mise en fonctionnalité de ces cartes, ce qui n'est pas souhaitable. En outre, la chaîne d'addition ou la séquence qui la représente occupe plus de place que l'exposant lui-même, habituellement mémorisé sous une forme binaire, ce qui est un inconvénient, la taille de la mémoire réinscriptible étant généralement limitée. En pratique,' il s'avère que les fournisseurs de cartes qui gèrent l'étape de personnalisation ne sont pas favorables à la mise en place d'un tel changement. On peut aussi prévoir que la chaîne d'addition C(e) soit calculée dans une phase d.' initialisation du dispositif, au moyen d'un algorithme d'exponentiation codé dans le dispositif,, et mémorisée alors en mémoire de travail de type RAM. Cela suppose une manipulation de l'exposant par l'algorithme d'exponentiation, une seule fois, par exemple à la mise sous tension du dispositif. Mais le dispositif peut alors être vulnérable aux attaques à canaux cachés, notamment aux attaques à canaux cachés simples. -L'exposant, qui représente en général une clé, pourrait alors être découvert.In the case of an RSA type cryptography algorithm, the exponent e represents a private key, determined for a given device (a smart card) in a personalization step. Thus, the addition chain (the sequence of registers) can be calculated in this same personalization step by means external to the device, then stored as such once and for all in the card, in. rewritable memory (EEPROM, Flash EPROM, ...). If we consider the field of application of the smart card, this supposes changes in the mode of production and putting into functionality of these cards, which is not desirable. In addition, the addition chain or the sequence which represents it occupies more space than the exponent itself, usually stored in binary form, which is a drawback, the size of the rewritable memory being generally limited. In practice, it turns out that the card providers that manage the personalization step does not favor the establishment of such a change. It can also be provided that the addition chain C (e) is calculated in a phase d. ' initialization of the device, by means of an exponentiation algorithm coded in the device, and then stored in working memory of RAM type. This supposes a manipulation of the exponent by the exponentiation algorithm, only once, for example when the device is powered up. However, the device can then be vulnerable to hidden channel attacks, in particular to simple hidden channel attacks. -The exhibitor, which generally represents a key, could then be discovered.
Ainsi, un problème lié à cette méthode d'exponentiation, réside dans la génération de la chaîne d'addition représentant l'exposant e. Un objet de l'invention est de résoudre ce problème de génération de la chaîne d'addition de l' exposant. Dans l'invention, plutôt que de calculer une chaîne d'addition représentative de l'exposant e, dans le dispositif d'exponentiation lui-même ou par des moyens externes, on prévoit que le dispositif utilise une chaîne d'addition aléatoire C(a), qui définit implicitement un nombre a, par essence aléatoire. La méthode d'exponentiation utilisée pour calculer R=xe consiste alors :Thus, a problem linked to this exponentiation method lies in the generation of the addition chain representing the exponent e. An object of the invention is to solve this problem of generating the exponent's addition chain. In the invention, rather than calculating an addition chain representative of the exponent e, in the exponentiation device itself or by external means, it is provided that the device uses a random addition chain C ( a), which implicitly defines a number a, which is essentially random. The exponentiation method used to calculate R = x e then consists of:
- à effectuer un premier calcul d'exponentiation Y=xa en utilisant l'algorithme universel d'exponentiation appliqué à la chaîne aléatoire C(a); à effectuer un deuxième calcul d'exponentiation Z=xe_a selon un algorithme d'exponentiation quelconque.- to perform a first exponentiation calculation Y = x a using the universal exponentiation algorithm applied to the random chain C (a); to perform a second exponentiation calculation Z = x e_a according to any arbitrary exponentiation algorithm.
Le résultat de l'exponentiation est alors obtenu en multipliant les nombres Y et Z : R= xa. xe-a.The result of the exponentiation is then obtained by multiplying the numbers Y and Z: R = x a . x ea .
Selon un premier mode de réalisation de l'invention, la chaîne aléatoire est générée par des moyens externes au dispositif, et programmée dans le dispositif dans une portion de mémoire ré-inscriptible.According to a first embodiment of the invention, the random chain is generated by means external to the device, and programmed in the device in a portion of rewritable memory.
Selon un deuxième mode de réalisation, la chaîne aléatoire est générée par des moyens internes, et mémorisée dans une portion de mémoire de travail. On peut alors prévoir avantageusement de générer une nouvelle chaîne aléatoire à chaque fois que le dispositif d'exponentiation est sollicité pour un nouveau calcul. En outre, cette méthodologie permet de se protéger contre les attaques à canaux cachés différentielles.According to a second embodiment, the random chain is generated by internal means, and stored in a portion of working memory. One can then advantageously provide for generating a new random chain each time the exponentiation device is requested for a new calculation. In addition, this methodology helps protect against differential hidden channel attacks.
Avec un tel dispositif, on n'a plus à craindre d'attaques à canaux cachés. En effet, dans le premier calcul, l'exposant a qui est manipulé est aléatoire; et dans le deuxième calcul, l'exposant manipulé e-a est aussi aléatoire. Il peut donc être effectué par un algorithme d'exponentiation classique, sans craintes vis à vis des attaques à canaux cachés.With such a device, there is no longer any fear of attacks with hidden channels. Indeed, in the first computation, the exponent a which is manipulated is random; and in the second calculation, the exponent manipulated ea is also random. It can therefore be performed by a conventional exponentiation algorithm, without fear of hidden channel attacks.
Dans une variante, on prévoit que l'exposant e-a est calculé en utilisant l'algorithme universel d'exponentiation, après génération d'une chaîne d'addition-soustraction représentative de l'exposant e-a à partir d'un algorithme d'exponentiation quelconque. En effet, e-a n'étant pas connu, car aléatoire, on peut l'utiliser dans tout calcul en général, sans craindre les attaques à canaux cachés. Pour calculer xe-a, il faut préalablement calculer e-a, donc a. De façon remarquable, en utilisant l'algorithme universel d'exponentiation en notation additive (c'est-à-dire où l'opération de multiplication est remplacée par une addition) , on obtient un algorithme universel de multiplication (scalaire) , qui permet de calculer la valeur de a.In a variant, it is expected that the exponent ea is calculated using the universal exponentiation algorithm, after generation of an addition-subtraction chain representative of the exponent ea from any exponentiation algorithm . Indeed, ea not being known, because random, one can use it in any computation in general, without fearing the attacks with hidden channels. To calculate x ea , we must first calculate ea, so a. Remarkably, by using the universal exponentiation algorithm in additive notation (i.e. where the multiplication operation is replaced by an addition), we obtain a universal multiplication algorithm (scalar), which allows to calculate the value of a.
En partant de la séquence de registresStarting from the sequence of registers
T(e) = { (γ(i) : α(i), β(i)) } i r, , cet algorithme de multiplication scalaire universel s'écrit :T (e) = {(γ (i): α (i), β (i))} i r ,, this universal scalar multiplication algorithm is written:
Initialiser Rα(i) — x ; β(u — x pour i = 1 à r, exécuter
Figure imgf000019_0001
Initialize R α (i) - x; β (u - x for i = 1 to r, execute
Figure imgf000019_0001
Au pas r, on obtient
Figure imgf000019_0002
Cette multiplication scalaire est applicable aux éléments d'un ensemble noté additivement, typiquement à des points d'une courbe elliptique. Dans ce cas, R et x représentent des points de cette courbe.
At step r, we get
Figure imgf000019_0002
This scalar multiplication is applicable to the elements of a set noted additively, typically to points of an elliptical curve. In this case, R and x represent points on this curve.
On remarque qu'en initialisant Rα(i) et Rβ(u à la valeur 1, c'est à dire à la valeur du premier élément de la chaîne d'addition C(e), on obtient Rγ(r)=e.Note that by initializing R α (i) and Rβ (u to the value 1, that is to say to the value of the first element of the addition chain C (e), we obtain R γ (r) = e.
Dans l'invention,, on utilise cette propriété . pour calculer le nombre aléatoire a à partir de la chaîne aléatoire C (a) .In the invention, this property is used . to calculate the random number a from the random string C (a).
Ainsi, la mise en oeuvre de la méthode d'exponentiation basée sur l'algorithme d'exponentiation universel est-elle aisée, tout en assurant un haut degré de sécurité du dispositif contre les attaques à canaux cachés.Thus, the implementation of the exponentiation method based on the universal exponentiation algorithm is it easy, while ensuring a high degree of security of the device against attacks with hidden channels.
L'invention concerne donc un dispositif destiné à réaliser des calculs d'exponentiation du type R=xe où x est un • élément d'un ensemble noté de façon multiplicative et e un nombre prédéterminé, caractérisé en ce qu'il comprend des premiers moyens de calculs d'exponentiation à partir d'une représentation d'une chaîne d'addition-soustraction aléatoire C(a) représentant un nombre a, pour calculer Y=xa par la mise en oeuvre d'un algorithme universel d'exponentiation, et des deuxièmes moyens de calcul d'exponentiation mettant en oeuvre un algorithme d'exponentiation quelconque pour calculer Z=xe_a.The invention therefore relates to a device intended to perform exponentiation calculations of the type R = x e where x is an • element of a set noted in a multiplicative manner and e a predetermined number, characterized in that it comprises first exponentiation calculation means from a representation of a random addition-subtraction chain C (a) representing a number a, to calculate Y = x a by the implementation of a universal exponentiation algorithm , and second exponentiation calculation means using any exponentiation algorithm to calculate Z = x e_a .
L'invention et les avantages qui en découlent apparaîtront plus clairement à la lecture de la description qui suit d'un mode de réalisation préféré, donné purement à titre d'exemple non-limitatif, par référence à la figure unique en annexe. Celle-ci est un organigramme des éléments principaux d'un dispositif électronique, par exemple une carte à puce, permettant de mettre en oeuvre l'invention.The invention and the advantages which ensue therefrom will appear more clearly on reading the following description of a preferred embodiment, given purely by way of nonlimiting example, with reference to the single figure in the appendix. This is a flowchart of the main elements of a device electronic, for example a smart card, making it possible to implement the invention.
La figure 1 représente sous forme de schéma bloc un dispositif programmé mettant en oeuvre cette méthode 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 programmés pour l'exécution de calculs, composés d'une unité centrale (UC) 2 reliée fonctionnellement à un ensemble de mémoires dont:FIG. 1 represents in the form of a block diagram a programmed device implementing this exponentiation method. In the example, this device is a smart card intended to execute a cryptographic program. To this end, the device 1 gathers in a chip means programmed for the execution of calculations, composed of a central unit (CPU) 2 functionally connected to a set of memories of which:
- une mémoire 4 accessible en lecture seulement, dans l'exemple du type ROM masque, aussi connue sous l'appellation anglaise "mask read-only emory (mask ROM) ", - une mémoire 6 reprogrammable électriquement, dans l'exemple du type EEPROM (de l'anglais "electrically erasable programmable ROM"), et- a memory 4 accessible in read only, in the example of the mask ROM type, also known by the English name "mask read-only emory (mask ROM)", - a memory 6 electrically reprogrammable, in the example of the type EEPROM (from 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.
On appelle dans la suite mémoire programme, la mémoire qui contient du code exécutable. Ce code peut en pratique être contenu en mémoire 4, accessible en lecture seulement, ou en mémoire 6, réinscriptible.In the following, program memory is called the memory which contains executable code. This code can in practice be contained in memory 4, accessible in read only, or in memory 6, rewritable.
Dans l'exemple, le dispositif 1 comprend en outre un générateur aléatoire 9. Ce générateur aléatoire a pour fonction de générer une chaîne aléatoire C(a). L'unité centrale 2 est également 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". L'une des fonctions du dispositif 1 est de crypter et décrypter des données confidentielles respectivement transmises vers, et reçues de, l'extérieur. Ces données peuvent 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 consiste au calcul d'une signature numérique ou de sa vérification. A cette fin, l'unité centrale 2 exécute un algorithme cryptographique à partir de données de programmation qui, conformément à l'invention, sont stockées dans les parties ROM masque 4' et EEPROM 6.In the example, the device 1 also comprises a random generator 9. The function of this random generator is to generate a random chain C (a). The central unit 2 is also 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 and decrypt confidential data respectively transmitted to and from outside. This data may relate, for example, to personal codes, medical information, accounting on bank or commercial transactions, authorizations to access certain restricted services, etc. Another function is to calculate a digital signature or verify it. To this end, the central unit 2 executes a cryptographic algorithm on the basis of programming data which, according to the invention, are stored in the mask ROM 4 and EEPROM 6 parts.
L'algorithme cryptographique peut être basé par exemple sur un algorithme RSA (Rivert, Shamir et Adleman), ce qui implique un calcul d'exponentiation du type R = xe, où x est une valeur prédéterminée et e, un nombre entier qui constitue une clé. Le nombre R ainsi obtenu constitue une donnée chiffrée, déchiffrée, signée ou vérifiée.The cryptographic algorithm can be based for example on an algorithm RSA (Rivert, Shamir and Adleman), which implies an exponentiation calculation of the type R = x e , where x is a predetermined value and e, an integer which is a key. The number R thus obtained constitutes encrypted, deciphered, signed or verified data.
Dans le dispositif 1, le nombre x, transmis par l'interface de communication 10, est mémorisé en mémoire de travail 8.In the device 1, the number x, transmitted by the communication interface 10, is stored in working memory 8.
Le nombre e (la clé) est lui stocké dans une portion de mémoire ré-inscriptible 6, de type EEPROM dans l'exemple. L'algorithme d'exponentiation universel, c'est à dire un algorithme réalisant une succession de multiplications, est stocké dans une portion de la mémoire programme 4. Un algorithme d'exponentiation arbitraire est stocké dans une autre portion de la mémoire programme 4. Ce peut être un algorithme binaire (SAM) ou un algorithme de type M, M3,...The number e (the key) is stored in a rewritable memory portion 6, of the EEPROM type in the example. The universal exponentiation algorithm, that is to say an algorithm performing a succession of multiplications, is stored in a portion of the program memory 4. An arbitrary exponentiation algorithm is stored in another portion of the program memory 4. It can be a binary algorithm (SAM) or an algorithm of type M, M 3 , ...
Selon l'invention, le dispositif, de calcul d'exponentiation . sollicité pour un calcul d'exponentiation de type R=Xe active le générateur aléatoire 9, pour obtenir la représentation d'une chaîne d'addition-soustraction C(a) aléatoire. Cette chaîne aléatoire est représentative d'un nombre a, par essence, lui aussi aléatoire. Elle peut se représenter sous la forme d'une séquence d'éléments E.(a) . Elle se représente avantageusement sous la forme d'une séquence de registres T(a).According to the invention, the device for calculating exponentiation. solicited for an exponentiation calculation of type R = X e activates the random generator 9, to obtain the representation of a random addition-subtraction chain C (a). This random chain is representative of a number a, in essence, also random. It can be represented in the form of a sequence of elements E. (a). It is advantageously represented in the form of a sequence of registers T (a).
La représentation de cette chaîne aléatoire C(a) est stockée en mémoire de travail 8'. Le dispositif effectue alorsThe representation of this random chain C (a) is stored in working memory 8 '. The device then performs
- un premier calcul d'exponentiation Y=xa à partir de la représentation de la chaîne d'addition- soustraction aléatoire C(a) en mettant en oeuvre l'algorithme d'exponentiation universel codé en mémoire programme.- a first exponentiation calculation Y = x a from the representation of the random addition-subtraction chain C (a) by implementing the universal exponentiation algorithm coded in program memory.
- un deuxième calcul d'exponentiation Z=xe_a en mettant en oeuvre l'algorithme d'exponentiation arbitraire codé en mémoire programme. Le résultat de l'exponentiation R=xa est alors égal à la multiplication des résultats respectifs des premier et deuxième calcul d'exponentiation :- a second exponentiation calculation Z = x e_a by implementing the arbitrary exponentiation algorithm coded in program memory. The result of the exponentiation R = x a is then equal to the multiplication of the respective results first and second exponentiation calculation:
R=Y.Z=xa.xe_a. :R = YZ = x a .x e_a . :
On notera que l'algorithme d'exponentiation universel peut être configuré pour traiter la séquence aléatoire E(a) ou T(a), comme des séquences de doublets ou de triplets d'éléments ou de registres.It will be noted that the universal exponentiation algorithm can be configured to treat the random sequence E (a) or T (a), like sequences of doublets or triplets of elements or registers.
Le deuxième calcul d'exponentiation Z=xe_a est effectué en mettant en oeuvre l'algorithme d'exponentiation arbitraire. Cet algorithme d'exponentiation arbitraire peut être utilisé pour calculer directement l'exponentiationThe second exponentiation calculation Z = x e_a is carried out by implementing the arbitrary exponentiation algorithm. This arbitrary exponentiation algorithm can be used to directly calculate the exponentiation
Z=xe-a. Mais il peut aussi être utilisé pour générer une représentation de chaîne d'addition-soustraction C(e- a) . Le calcul d'exponentiation Z=xe-a est alors effectué à partir de la représentation de cette chaîne C(e-a), en mettant en oeuvre l'algorithme d'exponentiation universel .Z = x ea . But it can also be used to generate a representation of addition-subtraction chain C (e- a). The computation of exponentiation Z = x ea is then carried out from the representation of this chain C (ea), by implementing the universal exponentiation algorithm.
Pour effectuer ce deuxième calcul- d'exponentiationTo perform this second exponentiation calculation
Z=xe~a, une étape préalable de calcul de .la valeur numérique du nombre a à partir de la représentation de la chaîne aléatoire C(a) est nécessaire.Z = x e ~ a , a preliminary step of calculating the numerical value of the number a from the representation of the random chain C (a) is necessary.
Cette valeur numérique est avantageusement obtenue en utilisant l'algorithme -de multiplication universel, qui permet, comme on l'a indiqué plus haut, la multiplication (scalaire) d'éléments d'un ensemble noté additivement. On a vu que cet algorithme dérive de l'algorithme d'exponentiation universel en remplaçant la succession d'opérations de multiplication par une succession d'opérations d'addition. Si on prend un exemple dans lequel la chaîne d'addition . C(a) est ' représentée sous forme d'une séquence de registres _T(a) : T(a) = { (γ(i) : (i) , β (i) ) } i i < E, l'algorithme de mulptiplication scalaire universel s'écrit :This numerical value is advantageously obtained by using the universal multiplication algorithm, which allows, as indicated above, the (scalar) multiplication of elements of a set noted additively. We have seen that this algorithm derives from the universal exponentiation algorithm by replacing the succession of multiplication operations by a succession of addition operations. If we take an example in which the addition chain. C (a) is ' represented as a sequence of registers _T (a): T (a) = {(γ (i): (i), β (i))} i i < E , the universal scalar miletiplication algorithm is written:
Initialiser Rαu) — x ; Rβ(i) <— x pour i = 1 à r, exécuter
Figure imgf000025_0001
Initialize R α u) - x; Rβ (i) <- x for i = 1 to r, execute
Figure imgf000025_0001
On remarque qu'en initialisant Rα(i) et Rβ(i) à la valeur 1, on obtient Rγ(r)=a.Note that by initializing R α (i) and Rβ (i) to the value 1, we obtain R γ (r ) = a.
Dans un exemple pratique, dans lequel le dispositif dispose de deux registres de calcul RO et 10 Ri, on suppose que le générateur aléatoire est configuré pour générer une séquence aléatoire de 0 et 1, et que l'algorithme de multiplication scalaire universel est configuré pour traiter des triplets de registres . 15 Soit la. séquence aléatoire suivante fournie par le générateur 9 :In a practical example, in which the device has two calculation registers RO and 10 Ri, it is assumed that the random generator is configured to generate a random sequence of 0 and 1, and that the universal scalar multiplication algorithm is configured to deal with register triples. 15 Let there be. following random sequence provided by generator 9:
(1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, .1,0,0,1).(1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1 , 1, .1,0,0,1).
Cette séquence est lue par l'algorithme de 20 multiplication scalaire universel comme la séquence de registres aléatoire suivante :This sequence is read by the universal scalar multiplication algorithm as the following random register sequence:
T(a) = { (1:1,1), (0:0,1), (1:1,1), (0:0,1), (1:1,1), (1:1,1), (0:0,1), (1:1,1), (1 : 1, 1) , (0 : 0, 1) } .T (a) = {(1: 1.1), (0: 0.1), (1: 1.1), (0: 0.1), (1: 1.1), (1: 1 , 1), (0: 0.1), (1: 1.1), (1: 1, 1), (0: 0, 1)}.
On a vu plus haut que cette séquence de registres '25 est représentative du nombre 87.We have seen above that this sequence of registers ' 25 is representative of the number 87.
L'algorithme de multiplication scalaire universel traite à chaque pas, un triplet de registres correspondant de la séquence.The universal scalar multiplication algorithm processes at each step a corresponding triplet of registers of the sequence.
Ainsi, après initialisation à 1 des deux registres 30 R0 et RI du dispositif, cet algorithme universel va effectuer successivement les additions suivantes: RI - Rl+Rl (RI contient alors 2) RO - R0+R1 (RO contient alors 3) RI <- Rl+Rl (RI contient 4) RO r- R0+R1 (RO contient 7) RI <- Rl+Ri (RI contient 8) RI <- Rl+Rl (RI contient 16) RO <- R0+R1 (RO contient 23) RI - Rl+Rl (RI contient 32) RI r- Rl+Rl (RI contient 64) RO - R0+R1 (RO contient 87)Thus, after initialization to 1 of the two registers 30 R0 and RI of the device, this universal algorithm will successively carry out the following additions: RI - Rl + Rl (RI then contains 2) RO - R0 + R1 (RO then contains 3) RI <- Rl + Rl (RI contains 4) RO r- R0 + R1 (RO contains 7) RI <- Rl + Ri (RI contains 8) RI <- Rl + Rl (RI contains 16) RO <- R0 + R1 (RO contains 23) RI - Rl + Rl (RI contains 32) RI r- Rl + Rl (RI contains 64) RO - R0 + R1 (RO contains 87)
Le résultat en sortie, contenu ici dans le registre RO,. correspond à la valeur du nombre a.The output result, contained here in the RO register ,. corresponds to the value of the number a.
Le dispositif calcule alors le nombre (e-a) , en effectuant une simple soustraction. On notera que l'algorithme d'exponentiation universel, pour le calcul de Y=x, et l'algorithme de multiplication scalaire universel, pour le calcul de a, peuvent traiter la représentation de la chaîne aléatoire C(a) en séquence, en parallèle. Le dispositif 1 peut ensuite entamer le deuxième calcul d'exponentiation Z=xe-a.The device then calculates the number (ea), by performing a simple subtraction. It will be noted that the universal exponentiation algorithm, for the calculation of Y = x, and the universal scalar multiplication algorithm, for the calculation of a, can process the representation of the random chain C (a) in sequence, parallel. The device 1 can then start the second exponentiation calculation Z = x ea .
On notera que dans l'invention, l'algorithme d'exponentiation arbitraire codé en mémoire programme n'a pas à inclure de contre-mesures vis à vis des attaques à canaux cachés, puisque la connaissance de e-a ne permet pas de retrouver complètement e, étant donné que la valeur de a, aléatoire, est protégée.It will be noted that in the invention, the arbitrary exponentiation algorithm coded in program memory does not have to include countermeasures with respect to hidden channel attacks, since knowledge of ea does not make it possible to completely find th , since the value of a, random, is protected.
Une variante de réalisation de l'invention concerne le mode de génération d'une représentation de la chaîne aléatoire C(a). Le dispositif représenté sur la figure 1 comprend en effet des moyens internes 9 de génération de cette chaîne aléatoire. Dans ce cas, il est possible d'activer ces moyens de génération à chaque fois que le dispositif 1 est sollicité pour un nouveau calcul d'exponentiation R=xe. Dans une autre variante non représentée, la chaîne aléatoire est générée par des moyens externes.. Dans ce cas, ces moyens sont utilisés en phase de personnalisation du dispositif d'exponentiation 1, et la représentation de la chaîne aléatoire ainsi générée est alors mémorisée en mémoire ré-inscriptible 6.An alternative embodiment of the invention relates the generation mode a representation of the random string C (a). The device shown in FIG. 1 in fact comprises internal means 9 for generation of this random chain. In this case, it is possible to activate these generation means each time that the device 1 is requested for a new calculation of exponentiation R = x e . In another variant not shown, the random chain is generated by external means. In this case, these means are used in the personalization phase of the exponentiation device 1, and the representation of the random chain thus generated is then stored in rewritable memory 6.
On a vu qu'une chaîne d'addition-soustraction peut-être représentée par une séquence de doublets ou triplets d'éléments de la chaîne, ou par une séquence de registres. Le dispositif de calcul selon l'invention doit donc être configuré pour traiter des doublets ou des triplets d'éléments ou de registres. Cette configuration est la même pour l'algorithme d'exponentiation universel et l'algorithme de multiplication universel, qui traitent la même chaîne. Cette configuration se traduit par les programmes d'exécution correspondants programmés en mémoire programme.We have seen that an addition-subtraction chain can be represented by a sequence of doublets or triplets of elements of the chain, or by a sequence of registers. The calculation device according to the invention must therefore be configured to process doublets or triplets of elements or registers. This configuration is the same for the universal exponentiation algorithm and the universal multiplication algorithm, which process the same string. This configuration results in the corresponding execution programs programmed in program memory.
Cette configuration dépend aussi du nombre de registres disponibles dans le dispositif.This configuration also depends on the number of registers available in the device.
Dans le cas où le deuxième calcul d'exponentiation Z=xe_a utilise l'algorithme d' exponentiatio . universel, on prévoit que l'algorithme d'exponentiation arbitraire est homogène avec l'algorithme d'exponentiation universel implémenté. En d'autres termes, si l'algorithme d'exponentiation universel est configuré pour traiter des doublets, et utilise deux registres, on prévoit que l'algorithme d'exponentiation arbitraire génère des chaînes étoiles définies à partir de deux registres .In the case where the second computation of exponentiation Z = x e_a uses the algorithm of exponentiatio. universal, it is expected that the arbitrary exponentiation algorithm is homogeneous with the implemented universal exponentiation algorithm. In other words, if the universal exponentiation algorithm is configured to handle doublets, and uses two registers, the arbitrary exponentiation algorithm is expected to generate star chains defined from two registers.
Le générateur aléatoire doit aussi être configuré pour générer une séquence correspondant à une longueur r de chaîne aléatoire donnée. De préférence, s 'agissant de masquer l'exposant e représentant une clé secrète, le générateur aléatoire est configuré pour que les nombres a et e soient sensiblement de même taille, pour rendre impossible toute détermination de cet exposant e par des attaques de type canaux cachés.The random generator must also be configured to generate a sequence corresponding to a given length r of random chain. Preferably, being to hide the exponent e representing a secret key, the random generator is configured so that the numbers a and e are substantially the same size, to make impossible any determination of this exponent e by channel type attacks hidden.
Dans le cas particulier d'un système de cryptographie de type RSA, utilisant le dispositif d'exponentiation 1 pour effectuer des exponentiations de type R=xe, où e représente une clé secrète dont une partie des bits de poids forts est connue, on prévoit que le générateur aléatoire est configuré pour que la taille du nombre a soit sensiblement égale à la taille du nombre e moins sa partie connue. On comprendra que l'invention se prête à de nombreuses variantes de mise en oeuvre. Notamment, on peut prévoir que la chaîne aléatoire est une chaîne d'additions, ou avantageusement, une chaîne étoile.In the particular case of an RSA type cryptography system, using the exponentiation device 1 to perform exponentiations of the R = x e type , where e represents a secret key of which a part of the most significant bits is known, provides that the random generator is configured so that the size of the number a is substantially equal to the size of the number e minus its known part. It will be understood that the invention lends itself to numerous variants of implementation. In particular, it can be provided that the random chain is a chain of additions, or advantageously, a star chain.
La description a été donnée dans le cadre d'un processeur intégré dans une carte à puce. Il est cependant clair que les enseignements se transposent à toutes autres applications, telles que dans les terminaux informatiques, de communication sur réseau ou autre, et dans tout, autre dispositif électronique qui fait appel à des calculs de codage ou de décodage. The description was given in the context of a processor integrated in a smart card. It is however clear that the lessons transpose to all other applications, such as in computer terminals, network communication or other, and in any other electronic device that uses coding or decoding calculations.

Claims

REVENDICATIONS
1. Dispositif (1) destiné à réaliser des calculs d'exponentiation du type R==xe. où x est un élément d'un ensemble noté de façon multiplicative et e un nombre prédéterminé, caractérisé en ce qu'il comprend des premiers moyens de calculs d'exponentiation à partir d'une représentation d'une chaîne d'addition- soustraction aléatoire C(a) représentant un nombre a, pour calculer Y=xa par la mise en oeuvre d'un algorithme universel d'exponentiation, et des deuxièmes moyens de calcul d'exponentiation mettant en oeuvre un algorithme d'exponentiation quelconque pour calculer Z=xe_a.. 1. Device (1) intended to carry out exponentiation calculations of the type R == x e . where x is an element of a set noted in a multiplicative way and e a predetermined number, characterized in that it comprises first means of computation of exponentiation starting from a representation of a chain of random addition-subtraction C (a) representing a number a, to calculate Y = x a by the implementation of a universal exponentiation algorithm, and second exponentiation calculation means implementing any exponentiation algorithm to calculate Z = x e_a . .
2. Dispositif selon la revendication 1, caractérisé en ce que lesdits calculs d'exponentiation sont appliqués à des éléments d'un ensemble noté de façon additive.2. Device according to claim 1, characterized in that said exponentiation calculations are applied to elements of a set noted additively.
3. Dispositif selon la revendication 1 ou 2, caractérisé en ce que lesdits seconds moyens de calcul comprennent des moyens de génération d'une représentation d'une chaîne d'addition-soustraction représentant le nombre e-a, pour calculer Z=xe_a à partir de ladite représentation en mettant en oeuvre un algorithme d'exponentiation universel.3. Device according to claim 1 or 2, characterized in that said second calculation means comprise means for generating a representation of an addition-subtraction chain representing the number ea, to calculate Z = x e_a from of said representation by implementing a universal exponentiation algorithm.
4. Dispositif selon l'une quelconque des revendications 1 à 3 précédentes, caractérisé .en ce que l'algorithme d'exponentiation universel est contenu dans une portion de mémoire programme du type mémoire figée codée par masquage (4) .4. Device according to any one of the preceding claims 1 to 3, characterized .in that the universal exponentiation algorithm is contained in a portion of program memory of the frozen memory type coded by masking (4).
5. Dispositif selon l'une quelconque des revendications 1 à 3 précédentes caractérisé en ce que l'algorithme d'exponentiation universel est contenu dans une portion de mémoire programme, du type mémoire réinscriptible (6) .5. Device according to any one of the preceding claims 1 to 3 characterized in that the universal exponentiation algorithm is contained in a portion of program memory, of the rewritable memory type (6).
6. Dispositif selon l'une quelconque des revendications précédentes, caractérisé en ce qu'il comprend des moyens internes (9) de génération d'une représentation de la chaîne aléatoire C(a).6. Device according to any one of the preceding claims, characterized in that it comprises internal means (9) for generating a representation of the random chain C (a).
7. Dispositif selon la revendication 6, caractérisé en ce que la représentation de la chaîne aléatoire C(a) est stockée dans une portion de mémoire de travail (8) .7. Device according to claim 6, characterized in that the representation of the random chain C (a) is stored in a portion of working memory (8).
8. Dispositif selon la revendication 7, caractérisé en ce que les moyens de génération (9) d'une représentation de la chaîne aléatoire C(a) sont activés à chaque nouveau calcul d'exponentiation de type R=xe.8. Device according to claim 7, characterized in that the means for generating (9) a representation of the random chain C (a) are activated at each new calculation of exponentiation of type R = x e .
9. Dispositif selon l'une quelconque des revendications 1 à 4, caractérisé en ce que la représentation de la chaîne aléatoire C(a) est fournie au dispositif par des moyens de génération externes, et mémorisée dans une portion de mémoire ré-inscriptible (6) . 9. Device according to any one of claims 1 to 4, characterized in that the representation of the random chain C (a) is provided to the device by external generation means, and stored in a portion of rewritable memory ( 6).
10. Dispositif selon l'une quelconque des revendications précédentes, caractérisé en ce que lesdits deuxièmes moyens de calcul sont configurés pour calculer la valeur numérique du nombre a à partir de la représentation de la chaîne aléatoire C(a), en mettant en oeuvre un algorithme de multiplication universel.10. Device according to any one of the preceding claims, characterized in that said second calculation means are configured to calculate the numerical value of the number a from the representation of the random chain C (a), by implementing a universal multiplication algorithm.
11. Dispositif selon la revendication précédente, caractérisé en ce que lesdits premiers et deuxièmes moyens de calcul sont activés pour effectuer en parallèle le calcul d'exponentiation xa et le calcul de la valeur numérique du nombre a.11. Device according to the preceding claim, characterized in that said first and second calculation means are activated to perform in parallel the calculation of exponentiation x a and the calculation of the numerical value of the number a.
12. Dispositif selon l'une quelconque des revendications précédentes, caractérisé en ce que l'algorithme d'exponentiation universel est configuré pour traiter des chaînes de type chaînes d'addition.12. Device according to any one of the preceding claims, characterized in that the universal exponentiation algorithm is configured to process chains of the addition chain type.
13. Dispositif selon l'une quelconque des revendications 1 à 11, caractérisé en ce que l'algorithme d'exponentiation universel est configuré pour traiter des chaînes de type chaînes étoiles.13. Device according to any one of claims 1 to 11, characterized in that the universal exponentiation algorithm is configured to process chains of the star chain type.
14. Dispositif selon l'une quelconque des revendications précédentes, caractérisé en ce que l'algorithme d'exponentiation universel est configuré pour traiter des chaînes représentées sous forme de séquence de registres aléatoire.14. Device according to any one of the preceding claims, characterized in that the universal exponentiation algorithm is configured to process strings represented in the form of a sequence of random registers.
15. Dispositif selon l'une quelconque des revendications précédentes, caractérisé en ce qu'il est mis en oeuvre dans un système cryptographique basé sur un algorithme cryptographique faisant intervenir au moins un calcul d'exponentiation du type R=xe.15. Device according to any one of the preceding claims, characterized in that it is implemented in a cryptographic system based on a cryptographic algorithm involving at least one exponentiation calculation of the type R = xe.
16. Dispositif selon la revendication précédente, caractérisé en ce que le nombre e représente une clé secrète et en ce que les moyens de génération de la chaîne d'addition-soustraction aléatoire sont configurés pour que les longueurs de a et de e soient sensiblement les mêmes.16. Device according to the preceding claim, characterized in that the number e represents a secret key and in that the means for generating the random addition-subtraction chain are configured so that the lengths of a and of e are substantially the same.
17. Dispositif selon la revendication 15, caractérisé en ce que le nombre e représente une clé secrète dont une partie des bits de poids forts est connue et en ce que les moyens de génération de la représentation de la chaîne d'addition-soustraction aléatoire sont configurés pour que la longueur du nombre a soit sensiblement égale à la longueur du nombre e moins sa partie connue.17. Device according to claim 15, characterized in that the number e represents a secret key of which a part of the most significant bits is known and in that the means for generating the representation of the random addition-subtraction chain are configured so that the length of the number a is substantially equal to the length of the number e minus its known part.
18. Carte à puce, caractérisée en ce qu'elle intègre un dispositif selon l'une quelconque des revendications 1 à 17.18. Chip card, characterized in that it incorporates a device according to any one of claims 1 to 17.
19. Utilisation du dispositif selon l'une quelconque des revendications 1 à 17 pour réaliser un calcul d'exponentiation, notamment dans l'exécution d'un algorithme cryptographique. 19. Use of the device according to any one of claims 1 to 17 to carry out an exponentiation calculation, in particular in the execution of a cryptographic algorithm.
PCT/FR2002/001233 2001-04-09 2002-04-09 Device for performing secure exponentiation calculations and use thereof WO2002082257A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR01/04829 2001-04-09
FR0104829A FR2823327B1 (en) 2001-04-09 2001-04-09 DEVICE FOR PERFORMING SECURE EXPONITATION CALCULATIONS AND USE OF SUCH A DEVICE

Publications (1)

Publication Number Publication Date
WO2002082257A1 true WO2002082257A1 (en) 2002-10-17

Family

ID=8862133

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/FR2002/001233 WO2002082257A1 (en) 2001-04-09 2002-04-09 Device for performing secure exponentiation calculations and use thereof

Country Status (2)

Country Link
FR (1) FR2823327B1 (en)
WO (1) WO2002082257A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997047110A1 (en) * 1996-06-05 1997-12-11 Gemplus S.C.A. Public key cryptography method
WO2001031436A1 (en) * 1999-10-28 2001-05-03 Bull Cp8 Security method for a cryptographic electronic assembly based on modular exponentiation against analytical attacks

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997047110A1 (en) * 1996-06-05 1997-12-11 Gemplus S.C.A. Public key cryptography method
WO2001031436A1 (en) * 1999-10-28 2001-05-03 Bull Cp8 Security method for a cryptographic electronic assembly based on modular exponentiation against analytical attacks

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CORON J-S: "RESISTANCE AGAINST DIFFERENTIAL POWER ANALYSIS FOR ELLIPTIC CURVE CRYPTOSYSTEMS", CRYPTOGRAPHIC HARDWARE AND EMBEDDED SYSTEMS. INTERNATIONAL WORKSHOP, August 1999 (1999-08-01), pages 292 - 302, XP000952243 *
MENEZES A J ET AL: "HANDBOOK OF APPLIED CRYPTOGRAPHY", CRC PRESS, BOCA RATON, FL, USA, 1997, pages v-xii, 63-86,122-124,591 - 634, XP000764820, ISBN: 0-8493-8523-7 *
MESSERGES T S ET AL: "Power analysis attacks of modular exponentiation in smartcards", CRYPTOGRAPHIC HARDWARE AND EMBEDDED SYSTEMS. INTERNATIONAL WORKSHOP, August 1999 (1999-08-01), pages 144 - 157, XP000952221 *

Also Published As

Publication number Publication date
FR2823327B1 (en) 2003-08-08
FR2823327A1 (en) 2002-10-11

Similar Documents

Publication Publication Date Title
EP2380306B1 (en) Cryptography circuit protected against observation attacks, in particular of a high order
EP1358732B2 (en) Secure encryption method and component using same
EP2166696B1 (en) protection of encrypted data Integrity using an intermediate cipher state to generate a signature
EP1421473B1 (en) Universal calculation method applied to points on an elliptic curve
EP1381936A1 (en) Countermeasure method in an electronic component using a public key cryptographic algorithm on an elliptic curve
FR2880750A1 (en) MICROPROCESSOR CARD AND CRYPTOGRAPHIC METHOD FOR PROTECTING A SECRET KEY
WO2000059157A1 (en) Countermeasure method in an electric component implementing an elliptical curve type public key cryptography algorithm
EP1804161B1 (en) Detection of a disturbance in a cryptographic calculation
EP1832974A1 (en) Electromagnetic Analysis Protection of a calculation in an electronic circuit
FR2888690A1 (en) CRYPTOGRAPHIC PROCESS FOR THE SECURE IMPLEMENTATION OF AN EXPONENTIATION AND ASSOCIATED COMPONENT
EP1994465A1 (en) Method of securing a calculation of an exponentiation or a multiplication by a scalar in an electronic device
EP1419434A1 (en) Secure method for performing a modular exponentiation operation
EP1224765A1 (en) Countermeasure method in an electronic component which uses an rsa-type public key cryptographic algorithm
WO2006067057A1 (en) Secure and compact exponentiation method for cryptography
EP1279141B1 (en) Countermeasure method in a microcircuit, microcircuit therefor and smart card comprising said microcircuit
WO2002082257A1 (en) Device for performing secure exponentiation calculations and use thereof
EP1530753A2 (en) Method for universal calculation applied to points of an elliptic curve defined by a quartic, related cryptographic method and electronic component
EP1457858A1 (en) Method for securing an electronic system comprising a cryptoprocessor
WO2002099624A1 (en) Method for making secure computation of an exponentiation in an electronic device
FR3004042A1 (en) METHODS OF GENERATING AND USING PRIVATE CRYPTOGRAPHIC KEYS FOR RSA-CRT OR RSA-CRT VARIANTS
FR2856538A1 (en) COUNTERMEASURE METHOD IN AN ELECTRONIC COMPONENT USING A CRYPTOGRAPHIC ALGORITHM OF THE PUBLIC KEY TYPE
EP1350161A1 (en) Device for producing exponentiation calculations, and method for programming and using same
FR3135854A1 (en) Secure provision of keys for fully homomorphic encryption
EP2225693A1 (en) Method for securing a conditional connection, information carrier, software, secured system, and security processor for said method
FR3010562A1 (en) DATA PROCESSING METHOD AND ASSOCIATED DEVICE

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ OM PH PL PT RO RU SD SE SG SI SK SL TJ TM TN TR TT TZ UA UG US UZ VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
REG Reference to national code

Ref country code: DE

Ref legal event code: 8642

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP

WWW Wipo information: withdrawn in national office

Country of ref document: JP