EP1639450A1 - Method for countermeasuring in an electronic component - Google Patents

Method for countermeasuring in an electronic component

Info

Publication number
EP1639450A1
EP1639450A1 EP04741817A EP04741817A EP1639450A1 EP 1639450 A1 EP1639450 A1 EP 1639450A1 EP 04741817 A EP04741817 A EP 04741817A EP 04741817 A EP04741817 A EP 04741817A EP 1639450 A1 EP1639450 A1 EP 1639450A1
Authority
EP
European Patent Office
Prior art keywords
replace
group
exponentiation
integers
randomly
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
EP04741817A
Other languages
German (de)
French (fr)
Inventor
Marc Joye
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gemplus SA
Original Assignee
Gemplus Card International SA
Gemplus SA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gemplus Card International SA, Gemplus SA filed Critical Gemplus Card International SA
Publication of EP1639450A1 publication Critical patent/EP1639450A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/723Modular exponentiation
    • 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/724Finite field arithmetic
    • G06F7/725Finite field arithmetic over elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/3013Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the discrete logarithm problem, e.g. ElGamal or Diffie-Hellman systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/04Masking or blinding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry

Definitions

  • the present invention relates to a countermeasure method in an electronic component implementing a public key encryption algorithm.
  • K secret encryption key
  • the encryption function and the decryption function use the same K key.
  • the drawback of the secret key encryption system is that said system requires the prior communication of the K key between the two persons via a secure channel, before any encrypted message is received. be sent through the unsecured channel.
  • secure channel is understood to mean a channel for which it is impossible to know or modify the information which passes through said channel. Such a secure channel can be produced by a cable connecting two terminals, owned by the two said people.
  • the concept of public key cryptography was invented by Whitfield Diffie and Martin Hellman in 1976
  • Public key cryptography solves the problem of distributing keys across an insecure channel.
  • the principle of public key cryptography is to use a key pair, a public encryption key and a private decryption key. It must be computationally infeasible to find the private decryption key from the public encryption key.
  • a person A wishing to communicate information to a person B uses the public encryption key of person B. Only person B has the private key associated with his public key. Only person B is therefore capable of deciphering the message addressed to him.
  • the difficult computational problem considered by Diffie and Hellman is the resolution of the discrete logarithm in the multiplicative group of a finite field. It is recalled that in a finite body, the number of elements of the body is always expressed in the form q A n, where q is a prime number called the characteristic of the body and n is an integer. A finite field having q A n elements is noted GF (q A n). In the case where the integer n is equal to 1, the finite field is said to be prime.
  • a body has two groups: a multiplicative group and an additive group. In the multiplicative group, the neutral element is noted 1 and the group law is noted multiplically by the symbol. and is called multiplication.
  • Lagrange theorem the order of an element always divides the order of its group.
  • Another advantage of public key cryptography over secret key cryptography is that public key cryptography allows authentication by the use of electronic signature.
  • the first public key encryption scheme was developed in 1977 by Ronald Rivest, Adi Shamir and Léonard Adleman (Communications of the ACM, volume 21, number 2, pages 120-126, 1978), who invented the system RSA encryption.
  • the security of RSA is based on the difficulty of factoring a large number which is the product of two prime numbers.
  • the RSA encryption system is constructed in the multiplicative group G of the ring Z / (nZ) obtained by quoting the ring of integers Z by the ring nZ where n is a large integer which is the product of prime numbers p and Q.
  • Merkle-Hellman backpack This encryption system is based on the difficulty of the problem of the sum of subsets. McEliece: This encryption system is based on the theory of algebraic codes. It is based on the problem of decoding linear codes. - El Gamal:
  • This encryption system is based on the difficulty of the discrete logarithm in a finite body.
  • the elliptic curve encryption system constitutes a modification of existing cryptographic systems to apply them to the domain of elliptic curves.
  • Any elliptic curve defined on a body can be expressed in this form .
  • the set of points (x, y) and the point at infinity form an abelian group, in which the point at infinity is the neutral element and in which the group operation is the addition of points, denoted + and given by the well-known rule of the secant and the tangent (see for example “Elliptic Curve Public Key Cryptosystems” by Alfred Menezes, Kluwer, 1993).
  • the exponentiation is also called scalar multiplication.
  • a common point with most cryptographic algorithms built on a group G is that they include as an parameter an element g belonging to this group.
  • the private key is an integer d chosen randomly.
  • an encryption algorithm based on the problem of the discrete logarithm in a group G, noted multiplicatively. This scheme is analogous to the encryption scheme of El Gamal. Let be a group G and an element g in G.
  • a message m is encrypted as follows:
  • the number corresponding to m is the pair (h, c).
  • the simplest and most used algorithm is the left-right binary exponentiation algorithm.
  • the left-right binary exponentiation algorithm takes as input an element g from a group G and an exponent d.
  • the left-right binary exponentiation algorithm has the following 3 steps:
  • each digit d (i) of the representation of d is an integer between 0 and 2 ⁇ kl for an integer k> l, with d (t) the most significant digit and d (0) the least significant digit.
  • the left-right k-ary exponentiation algorithm can be adapted to take as input a signed representation of the exponent d.
  • the exponent d is given by the signed k-ary representation (d (t), d (tl), ..., d (0)) in which each digit d (i) is an integer between - (2 ⁇ kl) and 2 ⁇ kl for an integer k ⁇ l, with d (t) the most significant digit and d (0) the least significant digit.
  • Step 3b of the previous algorithm is then replaced by: 3b ') If d ⁇ ) is strictly positive, replace A with A.gi; and if d (i) is strictly negative, replace A by A. (gi) ⁇ (-l)
  • This adaptation is particularly interesting when the inverse of the elements g if denoted (gi) A (-l), is easy or inexpensive to calculate. This is for example the case in group G of the points of an elliptical curve. In the case where the inverse of the elements gi is not easy or too costly to calculate, their value is precalculated.
  • ⁇ h A e) in group G and includes the following 4 steps:
  • multiplicative notation in other words, the group law of group G is noted. (multiplication).
  • addition the group law of group G is denoted + (addition). This is for example the case of the group of points of an elliptical curve which is most often given in additive form.
  • the DPA type attack therefore makes it possible to obtain additional information on the intermediate data manipulated by the microprocessor of the electronic component when executing a cryptographic algorithm. This additional information can in certain cases make it possible to reveal the private parameters of the cryptographic algorithm, making the cryptographic system vulnerable.
  • a variant of this countermeasure consists in replacing d by d + rq where r is a random integer and q is a multiple of the order of the element g in the group G; by Lagrange's theorem, a current choice for this multiple is the order of the group G.
  • a variant consists in drawing a random integer r and writing d in the form with d 2 equal to the default value of the integer division of d by r and di equal to the rest of said division.
  • An object of the present invention is a countermeasure method, in particular with respect to attacks of the DPA type.
  • Another object of the invention is a countermeasure method which is easy to implement.
  • this method masks the exponent d and only requires at most three multiplications in G per iteration in step 2). This number of multiplications in G is reduced to two in the case where the product of g and h is precomputed.
  • the following countermeasure method is thus obtained:
  • Another interesting application of the invention relates to exponentation in the group G of the points of an elliptic curve defined on a finite field GF (q ⁇ n).
  • this group G denoted additively, the inversion of a point P, denoted -P, is an inexpensive operation so that it is interesting to represent the exponents in a signed manner.
  • a countermeasure method according to the invention applied to the group of points of an elliptical curve on a finite body GF (q A n) can be written as follows:
  • the countermeasure method applies to any double exponentiation algorithm in a group G, noted in a multiplicative or additive manner.
  • Another preferred embodiment for expressing the exponent d randomly in the form d d 2 .s + di where di, d 2 and s are integers in step la in the countermeasuring methods above. above is to choose a random integer di, set s to the value 1 and take d 2 equal to the difference of d and d x .

Abstract

The invention relates to a method for countermeasuring in an electronic component while using a public key cryptographic algorithm. The invention involves the use of a public key cryptographic algorithm containing an exponentiation calculation y=g^d, in which g and y are elements of specified group G noted in a multiplicative manner and d is a predetermined number.

Description

PROCEDE DE CONTRE-MESURE DANS UN COMPOSANT ELECTRONIQUE COUNTER-MEASUREMENT METHOD IN AN ELECTRONIC COMPONENT
La présente invention concerne un procédé de contre-mesure dans un composant électronique mettant en œuvre un algorithme de chiffrement à clé publique. Dans le modèle classique de la cryptographie à clé secrète, deux personnes désirant communiquer par l'intermédiaire d'un canal non sécurisé doivent au préalable se mettre d' accord sur une clé secrète de chiffrement K. La fonction de chiffrement et la fonction de déchiffrement utilisent la même clé K. L'inconvénient du système de chiffrement à clé secrète est que ledit système requiert la communication préalable de la clé K entre les deux personnes par l'intermédiaire d'un canal sécurisé, avant qu'un quelconque message chiffré ne soit envoyé à travers le canal non sécurisé. Dans la pratique, il est généralement difficile de trouver un canal de communication parfaitement sécurisé, surtout si la distance séparant les deux personnes est importante. On entend par canal sécurisé un canal pour lequel il est impossible de connaître ou de modifier les informations qui transitent par ledit canal. Un tel canal sécurisé peut être réalisé par un câble reliant deux terminaux, possédés par les deux dites personnes. Le concept de cryptographie à clé publique fut inventé par Whitfield Diffie et Martin Hellman en 1976The present invention relates to a countermeasure method in an electronic component implementing a public key encryption algorithm. In the classic model of secret key cryptography, two people wishing to communicate via an insecure channel must first agree on a secret encryption key K. The encryption function and the decryption function use the same K key. The drawback of the secret key encryption system is that said system requires the prior communication of the K key between the two persons via a secure channel, before any encrypted message is received. be sent through the unsecured channel. In practice, it is generally difficult to find a perfectly secure communication channel, especially if the distance between the two people is significant. The term “secure channel” is understood to mean a channel for which it is impossible to know or modify the information which passes through said channel. Such a secure channel can be produced by a cable connecting two terminals, owned by the two said people. The concept of public key cryptography was invented by Whitfield Diffie and Martin Hellman in 1976
(IEEE Transactions on Information Theory, volume 22, numéro 6, pages 644-654, 1976) . La cryptographie à clé publique permet de résoudre le problème de la distribution des clés à travers un canal non sécurisé. Le principe de la cryptographie à clé publique consiste à utiliser une paire de clés, une clé publique de chiffrement et une clé privée de déchiffrement. Il doit être calculatoirement infaisable de trouver la clé privée de déchiffrement à partir de la clé publique de chiffrement. Une personne A désirant communiquer une information à une personne B utilise la clé publique de chiffrement de la personne B. Seule la personne B possède la clé privée associée à sa clé publique. Seule la personne B est donc capable de déchiffrer le message qui lui est adressé.(IEEE Transactions on Information Theory, volume 22, number 6, pages 644-654, 1976). Public key cryptography solves the problem of distributing keys across an insecure channel. The principle of public key cryptography is to use a key pair, a public encryption key and a private decryption key. It must be computationally infeasible to find the private decryption key from the public encryption key. A person A wishing to communicate information to a person B uses the public encryption key of person B. Only person B has the private key associated with his public key. Only person B is therefore capable of deciphering the message addressed to him.
Le problème calculatoire difficile considéré par Diffie et Hellman est la résolution du logarithme discret dans le groupe multiplicatif d'un corps fini. On rappelle que dans un corps fini, le nombre d'éléments du corps s'exprime toujours sous la forme qAn, où q est un nombre premier appelé la caractéristique du corps et n est un nombre entier. Un corps fini possédant qAn éléments est noté GF(qAn). Dans le cas où le nombre entier n est égal à 1, le corps fini est dit premier. Un corps possède deux groupes : un groupe multiplicatif et un groupe additif. Dans le groupe multiplicatif, l'élément neutre est noté 1 et la loi de groupe est notée multiplicativement par le symbole . et est appelée multiplication. Cette loi définit l'opération d'exponentiation dans le groupe multiplicatif G: étant donné un élément g appartenant à G et un entier d, le résultat de l'exponentiation de g par d est l'élément y tel que y=gd=g.g.g g (d fois) dans le groupe G. On rappelle également que l'ordre d'un groupe G est le nombre de ses éléments et que l'ordre d'un élément g dans G est le plus entier positif e tel gΛe=l dans G. Une propriété importante sur l'ordre des éléments d'un groupe est donnée par le l'The difficult computational problem considered by Diffie and Hellman is the resolution of the discrete logarithm in the multiplicative group of a finite field. It is recalled that in a finite body, the number of elements of the body is always expressed in the form q A n, where q is a prime number called the characteristic of the body and n is an integer. A finite field having q A n elements is noted GF (q A n). In the case where the integer n is equal to 1, the finite field is said to be prime. A body has two groups: a multiplicative group and an additive group. In the multiplicative group, the neutral element is noted 1 and the group law is noted multiplically by the symbol. and is called multiplication. This law defines the exponentiation operation in the multiplicative group G: given an element g belonging to G and an integer d, the result of the exponentiation of g by d is the element y such that y = g d = ggg g (d times) in the group G. We also recall that the order of a group G is the number of its elements and that the order of an element g in G is the most positive integer e such g Λ e = l in G. An important property on the order of the elements of a group is given by the the
théorème de Lagrange : l'ordre d'un élément divise toujours l'ordre de son groupe.Lagrange theorem: the order of an element always divides the order of its group.
Le problème du logarithme discret dans le groupe multiplicatif G d'un corps fini consiste à trouver, s'il existe, un entier d tel y=gΛd dans G, étant donné deux éléments y et g appartenant à G.The problem of the discrete logarithm in the multiplicative group G of a finite field consists in finding, if it exists, an integer d such y = g Λ d in G, given two elements y and g belonging to G.
Un autre avantage de la cryptographie à clé publique sur la cryptographie à clé secrète est que la cryptographie à clé publique permet authentification par l'utilisation de signature électronique.Another advantage of public key cryptography over secret key cryptography is that public key cryptography allows authentication by the use of electronic signature.
La première réalisation de schéma de chiffrement à clé publique fut mis au point en 1977 par Ronald Rivest, Adi Shamir et Léonard Adleman (Communications of the ACM, volume 21, numéro 2, pages 120-126, 1978), qui ont inventé le système de chiffrement RSA. La sécurité de RSA repose sur la difficulté de factoriser un grand nombre qui est le produit de deux nombres premiers . Le système de chiffrement RSA est construit dans le groupe multiplicatif G de l'anneau Z/ (nZ) obtenu en quotientant l'anneau des entiers Z par l'anneau nZ où n est un grand nombre entier qui est le produit de nombres premiers p et q. Le problème RSA dans ce groupe G consiste à trouver, s'il existe, un élément m de G tel que c=mAe dans G, étant donné un élément c de G et un entier e relativement premier avec l'ordre du groupe G.The first public key encryption scheme was developed in 1977 by Ronald Rivest, Adi Shamir and Léonard Adleman (Communications of the ACM, volume 21, number 2, pages 120-126, 1978), who invented the system RSA encryption. The security of RSA is based on the difficulty of factoring a large number which is the product of two prime numbers. The RSA encryption system is constructed in the multiplicative group G of the ring Z / (nZ) obtained by quoting the ring of integers Z by the ring nZ where n is a large integer which is the product of prime numbers p and Q. The RSA problem in this group G consists in finding, if there exists, an element m of G such that c = m A e in G, given an element c of G and an integer e relatively prime with the order of the group G.
Depuis, de nombreux systèmes de chiffrement à clé publique ont été proposés, dont la sécurité repose sur différents problèmes calculatoires : (cette liste n'est pas exhaustive) .Since then, numerous public key encryption systems have been proposed, the security of which is based on various computational problems: (this list is not exhaustive).
Sac à dos de Merkle-Hellman : Ce système de chiffrement est basé sur la difficulté du problème de la somme de sous- ensembles . McEliece : Ce système de chiffrement est basé sur la théorie des codes algébriques. Il est basé sur le problème du décodage de codes linéaires . - El Gamal :Merkle-Hellman backpack: This encryption system is based on the difficulty of the problem of the sum of subsets. McEliece: This encryption system is based on the theory of algebraic codes. It is based on the problem of decoding linear codes. - El Gamal:
Ce système de chiffrement est basé sur la difficulté du logarithme discret dans un corps fini .This encryption system is based on the difficulty of the discrete logarithm in a finite body.
Courbes elliptiques :Elliptical curves:
Le système de chiffrement à courbe elliptique constitue une modification de systèmes cryptographiques existant pour les appliquer au domaine des courbes elliptiques .The elliptic curve encryption system constitutes a modification of existing cryptographic systems to apply them to the domain of elliptic curves.
r.r ' •utilisation de courbes elliptiques dans des systèmes cryptographiques fut proposé indépendamment par Victor Miller (Advances in Cryptology - CRYPTO '85, volume 216 de Lecture Notée? in Computer Science, Springer-Verlag, 1986) et Neal Koblitz {Mathematics of Computation, volume 48, numéro 177, pages 203—209, 1987) en 1985. Les applications réelles des courbes elliptiques ont été envisagées au début des années 1990. L'avantage de systèmes cryptographiques à base de courbes elliptiques est qu'ils fournissent une sécurité équivalente aux autres systèmes cryptographiques mais avec des tailles de clé moindres. Ce gain en taille de clé implique une diminution des besoins en mémoire et une réduction des temps de calcul, ce qui rend l'utilisation des courbes elliptiques particulièrement adaptées pour des applications de type carte à puce. Pour mémoire, une courbe elliptique sur un corps fini GF (qAn) est l'ensemble des points (X/-y) appartenant à GF (qΛn) vérifiant l'équation : yA2 + aixy + a3y = xΛ3 + axA2 + a4x + a5 , avec ai dans GF(qAn) et du point à l'infini 0. Toute courbe elliptique définie sur un corps peut s'exprimer sous cette forme .rr '• use of elliptic curves in cryptographic systems was proposed independently by Victor Miller (Advances in Cryptology - CRYPTO '85, volume 216 of Lecture Notée? in Computer Science, Springer-Verlag, 1986) and Neal Koblitz {Mathematics of Computation, volume 48, number 177, pages 203-209, 1987) in 1985. The real applications of elliptic curves were considered in the early 1990s. The advantage of cryptographic systems based on elliptic curves is that they provide equivalent security. to other cryptographic systems but with smaller key sizes. This gain in key size implies a reduction in memory requirements and a reduction in calculation times, which makes the use of elliptical curves particularly suitable for smart card type applications. For the record, an elliptical curve on a finite field GF (q A n) is the set of points (X / -y) belonging to GF (q Λ n) satisfying the equation: y A 2 + aixy + a 3 y = x Λ 3 + a x A 2 + a 4 x + a 5 , with ai in GF (q A n) and from point to infinity 0. Any elliptic curve defined on a body can be expressed in this form .
L'ensemble des points (x,y) et le point à l'infini forment un groupe abélien, dans lequel le point à l'infini est l'élément neutre et dans lequel l'opération de groupe est l'addition de points, notée + et donnée par la règle bien connue de la sécante et de la tangente (voir par exemple « Elliptic Curve Public Key Cryptosystems » par Alfred Menezes, Kluwer, 1993) . Dans ce groupe, la paire (x,y), où l'abscisse x et l'ordonnée y sont des éléments du corps GF(qΛn), forme les coordonnées affines d'un point P de la courbe elliptique.The set of points (x, y) and the point at infinity form an abelian group, in which the point at infinity is the neutral element and in which the group operation is the addition of points, denoted + and given by the well-known rule of the secant and the tangent (see for example “Elliptic Curve Public Key Cryptosystems” by Alfred Menezes, Kluwer, 1993). In this group, the pair (x, y), where the abscissa x and the ordinate y are elements of the body GF (q Λ n), forms the affine coordinates of a point P of the elliptic curve.
L'opération d'addition de points permet de définir une opération d' exponentiation sur courbe elliptique : étant donné un point P appartenant à une courbe elliptique et un entier d, le résultat de l'exponentiation de P par d est le point Q tel que Q=d*P=P+P+...+P (d fois) . Dans le cas des courbes elliptiques, afin d'insister sur la notation additive, l'exponentiation est encore appelée multiplication scalaire.The point addition operation makes it possible to define an exponentiation operation on an elliptical curve: given a point P belonging to an elliptical curve and an integer d, the result of the exponentiation of P by d is the point Q such that Q = d * P = P + P + ... + P (d times). In the case of elliptic curves, in order to insist on the additive notation, the exponentiation is also called scalar multiplication.
La sécurité des algorithmes de cryptographie sur courbes elliptiques est basée sur la difficulté du problème du logarithme discret dans le groupe G formé par les points d'une courbe elliptique, ledit problème consistant à partir de deux points Q et P appartenant à G, de trouver, s'il existe, un entier d tel que Q=d*P. l'The security of cryptographic algorithms on elliptic curves is based on the difficulty of the problem of the discrete logarithm in the group G formed by the points of an elliptic curve, said problem consisting in starting from two points Q and P belonging to G, to find , if it exists, an integer d such that Q = d * P. the
II existe de nombreux algorithmes cryptographiques construits sur un groupe G. Ainsi, il est possible de mettre en œuvre des algorithmes assurant authentification, la confidentialité, le contrôle d'intégrité et l'échange de clé.There are many cryptographic algorithms built on a group G. Thus, it is possible to implement algorithms ensuring authentication, confidentiality, integrity control and key exchange.
Un point commun à la plupart des algorithmes cryptographiques construits sur un groupe G est qu'ils comprennent comme paramètre un élément g appartenant à ce groupe. La clé privée est un entier d choisi aléatoirement. La clé publique est un élément y tel que y=gΛd. Ces algorithmes cryptographiques font généralement intervenir une exponentiation dans le calcul d' un élément z=hAd où d est la clé secrète et h est un élément du groupe G. Dans le paragraphe ci-dessous, on décrit un algorithme de chiffrement basé sur le problème du logarithme discret dans un groupe G, noté multiplicativement . Ce schéma est analogue au schéma de chiffrement d' El Gamal . Soient un groupe G et un élément g dans G. La clé publique de chiffrement est γ=gΛd et la clé privée de déchiffrement est d. Un message m est chiffré de la manière suivante :A common point with most cryptographic algorithms built on a group G is that they include as an parameter an element g belonging to this group. The private key is an integer d chosen randomly. The public key is an element y such that y = g Λ d. These cryptographic algorithms generally involve an exponentiation in the calculation of an element z = h A where d is the secret key and h is an element of group G. In the paragraph below, an encryption algorithm based on the problem of the discrete logarithm in a group G, noted multiplicatively. This scheme is analogous to the encryption scheme of El Gamal. Let be a group G and an element g in G. The public encryption key is γ = g Λ d and the private decryption key is d. A message m is encrypted as follows:
La personne désirant communiquer une information, appelée chiffreur, choisit un entier k aléatoirement et calcule les éléments h=gAk et z=yΛk dans le groupe G, et c=R(z)θ m où R est une fonction appliquant les éléments de G sur l'ensemble des messages et ® désigne l'opérateur du OU exclusif. Le chiffré correspondant à m est la paire (h, c) .The person wishing to communicate information, called an encryptor, chooses an integer k randomly and calculates the elements h = g A k and z = y Λ k in the group G, and c = R (z) θ m where R is a function applying the elements of G on all messages and ® denotes the operator of the exclusive OR. The number corresponding to m is the pair (h, c).
La personne à laquelle est destiné le chiffré, appelée déchiffreur, qui possède la clé secrète d déchiffre m en calculant : z'=hΛd=gΛ(k.d)=yΛk et m=R(z')Θ c. Pour réaliser les exponentiations nécessaires dans les procédés de calcul décrits précédemment, plusieurs algorithmes existent : - algorithme d'exponentiation binaire gauche-droite; algorithme avec chaînes d' addition ou d' addition- soustraction ; algorithme d'exponentiation k-aire gauche-droite/ algorithme d' exponentiation en représentation signée de l'exposant.The person for whom the cipher is intended, called a decipherer, who has the secret key to decipher m by calculating: z '= h Λ d = g Λ (kd) = y Λ k and m = R (z') Θ c. To carry out the exponentiations necessary in the calculation methods described above, several algorithms exist: - left-right binary exponentiation algorithm; algorithm with addition or addition-subtraction chains; exponentiation algorithm k-ary left-right / exponentiation algorithm in signed representation of the exponent.
Ces algorithmes sont détaillés dans le chapitre 14 de « Handbook of Applied Cryptography » par A. J. Menezes, P.C. van Oorschot et S.A. Vanstone, CRC Press, 1997. Cette liste n'est pas exhaustive.These algorithms are detailed in chapter 14 of “Handbook of Applied Cryptography” by A. J. Menezes, P.C. van Oorschot and S.A. Vanstone, CRC Press, 1997. This list is not exhaustive.
L'algorithme le plus simple et le plus utilisé est l'algorithme d'exponentiation binaire gauche-droite.The simplest and most used algorithm is the left-right binary exponentiation algorithm.
L'algorithme d'exponentiation binaire gauche-droite prend en entrée un élément g d'un groupe G et un exposant d. L'exposant d est noté d=(d(t),d(t- l),...,d(0)), où (d(t),d(t-l),...,d(0)) est la représentation binaire de d, avec d(t) le bit le plus significatif et d(0) le bit le moins significatif.The left-right binary exponentiation algorithm takes as input an element g from a group G and an exponent d. The exponent d is noted d = (d (t), d (t- l), ..., d (0)), where (d (t), d (tl), ..., d (0 )) is the binary representation of d, with d (t) the most significant bit and d (0) the least significant bit.
L'algorithme retourne en sortie l'élément y=gAd dans le groupe G.The algorithm returns the element y = g A d in group G as an output.
L'algorithme d'exponentiation binaire gauche- droite comporte les 3 étapes suivantes :The left-right binary exponentiation algorithm has the following 3 steps:
1) Initialiser le registre A avec l'élément neutre de1) Initialize register A with the neutral element of
G 2) Pour i allant de t à 0 exécuter : 2a) Remplacer A par AΛ2 2b) Si d(i)=l remplacer A par A. g 3) Retourner A. L'algorithme d'exponentiation k-aire gauche-droite prend en entrée un élément g d'un groupe G et un exposant d noté d=(d(t) ,d(t-l) ,..., d(0)), où (d(t),d(t- 1) ,...,d(0) ) est la représentation k-aire de d, c'est-à- dire chaque chiffre d(i) de la représentation de d est un entier compris entre 0 et 2Λk-l pour un entier k>l, avec d(t) le chiffre le plus significatif et d(0) le chiffre le moins significatif. L'algorithme retourne en sortie l'élément y=gAd dans le groupe G et comporte les 4 étapes suivantes : 1) Précalculs : la) Poser gi=g Ib) Si k>2, pour i allant de 2 à (2Ak-l) : calculer gi=gAi 2) Initialiser le registre A avec l'élément neutre deG 2) For i going from t to 0 execute: 2a) Replace A with A Λ 2 2b) If d (i) = l replace A with A. g 3) Return A. The left-right k-ary exponentiation algorithm takes as input an element g of a group G and an exponent d noted d = (d (t), d (tl), ..., d (0)) , where (d (t), d (t- 1), ..., d (0)) is the k-ary representation of d, i.e. each digit d (i) of the representation of d is an integer between 0 and 2 Λ kl for an integer k> l, with d (t) the most significant digit and d (0) the least significant digit. The algorithm returns the element y = g A d in group G as an output and includes the following 4 steps: 1) Precalculations: la) Set gi = g Ib) If k> 2, for i going from 2 to (2 A kl): calculate gi = g A i 2) Initialize register A with the neutral element of
GG
3) Pour i allant de t à 0 exécuter : 3a) Remplacer A par AΛ (2Λk)3) For i going from t to 0 execute: 3a) Replace A by A Λ (2 Λ k)
3b) Si d(i) est non-nul, remplacer A par A.gi 4) Retourner A.3b) If d (i) is non-zero, replace A with A.gi 4) Return A.
Dans le cas où k est égal à 1, on remarque que l'algorithme d'exponentiation k-aire gauche-droite n'est autre que l'algorithme d'exponentiation binaire gauche-droite.In the case where k is equal to 1, we notice that the left-right k-ary exponentiation algorithm is none other than the binary left-right exponentiation algorithm.
L'algorithme d'exponentiation k-aire gauche-droite peut être adapté pour prendre en entrée une représentation signée de l'exposant d. L'exposant d est donné par la représentation k-aire signée (d(t) ,d(t-l) ,...,d(0) ) dans laquelle chaque chiffre d(i) est un entier compris entre -(2Λk-l) et 2Λk-l pour un entier k≥l, avec d(t) le chiffre le plus significatif et d(0) le chiffre le moins significatif. L'étape 3b de l'algorithme précédent est alors remplacée par : 3b') Si d<±) est strictement positif, remplacer A par A.gi ; et si d(i) est strictement négatif, remplacer A par A. (gi)Λ(-l)The left-right k-ary exponentiation algorithm can be adapted to take as input a signed representation of the exponent d. The exponent d is given by the signed k-ary representation (d (t), d (tl), ..., d (0)) in which each digit d (i) is an integer between - (2 Λ kl) and 2 Λ kl for an integer k≥l, with d (t) the most significant digit and d (0) the least significant digit. Step 3b of the previous algorithm is then replaced by: 3b ') If d <±) is strictly positive, replace A with A.gi; and if d (i) is strictly negative, replace A by A. (gi) Λ (-l)
Cette adaptation est particulièrement intéressante quand l'inverse des éléments gif noté (gi)A(-l), est facile ou peu coûteux à calculer. Ceci est par exemple le cas dans le groupe G des points d'une courbe elliptique. Dans le cas où l'inverse des éléments gi n'est pas facile ou trop coûteux à calculer, leur valeur est précalculée.This adaptation is particularly interesting when the inverse of the elements g if denoted (gi) A (-l), is easy or inexpensive to calculate. This is for example the case in group G of the points of an elliptical curve. In the case where the inverse of the elements gi is not easy or too costly to calculate, their value is precalculated.
Dans certaines situations, le produit de deux exponentiations, du type (gAd) . (hAe) dans un groupe G où g et h sont des éléments de G et d et e deux entiers dont les représentations binaires respectives sontIn certain situations, the product of two exponentiations, of the type (g A d). (h A e) in a group G where g and h are elements of G and d and e two integers whose respective binary representations are
(d(t),d(t-l),...,d(0)) et (e(t),e(t-l),...,e(0)), doit être calculée. Ceci est notamment le cas dans la vérification d'une signature numérique DSA. Plutôt que de calculer chaque exponentiation gΛd et hAe de façon séparée et d'ensuite en évaluer le produit, l'algorithme d'exponentiation binaire gauche-droite peut s'étendre pour calculer la double exponentiation (gAd) . (hΛe) dans G de la façon suivante :(d (t), d (tl), ..., d (0)) and (e (t), e (tl), ..., e (0)), must be calculated. This is particularly the case in the verification of a DSA digital signature. Rather than calculating each exponentiation g Λ d and h A e separately and then evaluating the product, the left-right binary exponentiation algorithm can be extended to calculate the double exponentiation (g A d). (h Λ e) in G as follows:
1) Initialiser le registre A avec l'élément neutre de1) Initialize register A with the neutral element of
GG
2) Pour i allant de t à 0 exécuter : 2a) Remplacer A par AA22) For i going from t to 0 execute: 2a) Replace A by A A 2
2b) Si d(i)=l remplacer A par A. g 2c) Si e(i)=l remplacer A par A. h2b) If d (i) = l replace A with A. g 2c) If e (i) = l replace A with A. h
3) Retourner A. L'avantage de cette méthode est que le nombre de multiplications pour le calcul de (gAd) . (hAe) est réduit par rapport à deux applications successives de l'algorithme d'exponentiation binaire gauche-droite. Une amélioration en vitesse de l'algorithme précédent consiste à précalculer l'élément u=g.h dans G. Ainsi, l'algorithme de double exponentiation binaire pour le calcul de (gAd) . (hΛe) dans G peut s'écrire :3) Return A. The advantage of this method is that the number of multiplications for the calculation of (g A d). (h A e) is reduced compared to two successive applications of the left-right binary exponentiation algorithm. An improvement in speed of the previous algorithm consists in precomputing the element u = gh in G. Thus, the algorithm of binary double exponentiation for the computation of (g A d). (h Λ e) in G can be written:
1) Précalcul : la) Calculer u=g.h1) Pre-calculation: la) Calculate u = g.h
2) Initialiser le registre A avec l'élément neutre de2) Initialize register A with the neutral element of
GG
3) Pour i allant de t à 0 exécuter : 3a) Remplacer A par AA2 3b) Si d(i)=l et e(i)=0 remplacer A par A. g 3c) Si d(i)=0 et e(i)=l remplacer A par A.h 3c) Si d(i)=l et e(i)=l remplacer A par A.u3) For i going from t to 0 execute: 3a) Replace A by A A 2 3b) If d (i) = l and e (i) = 0 replace A with A. g 3c) If d (i) = 0 and e (i) = l replace A with Ah 3c) If d (i) = l and e (i) = l replace A with Au
4) Retourner A.4) Return A.
L'algorithme de double exponentiation binaire précédent se généralise en prenant en entrée des éléments g et h d'un groupe G et des exposants d et e donnés respectivement par les représentations k-aire d={d(t),d(t-l),...,d(0)) et e=(e{t),e(t-l),...,e(0)), pour un entier k≥l . L'algorithme retourne en sortie l'élément y= (gAd) . <hAe) dans le groupe G et comporte les 4 étapes suivantes :The previous double binary exponentiation algorithm is generalized by taking as input g and h elements from a group G and exponents d and e given respectively by the k-ary representations d = {d (t), d (tl) , ..., d (0)) and e = (e {t), e (tl), ..., e (0)), for an integer k≥l. The algorithm returns the element y = (g A d) as an output. <h A e) in group G and includes the following 4 steps:
1) Précalculs : la) Poser Ib) Si k>2, pour i allant de 2 à (2Ak-l) : calculer gi=gAi et hi=hΛi1) Pre-calculations: a) Ask Ib) If k> 2, for i going from 2 to (2 A kl): calculate gi = g A i and hi = h Λ i
2) Initialiser le registre A avec l'élément neutre de G2) Initialize register A with the neutral element of G
3) Pour i allant de t à 0 exécuter : 3a) Remplacer A par AΛ (2Λk)3) For i going from t to 0 execute: 3a) Replace A by A Λ (2 Λ k)
3b) Si d(i) est non-nul, remplacer A par A.gi 3c) Si e(i) est non-nul, remplacer A par A.hi 4) Retourner A.3b) If d (i) is non-zero, replace A with A.gi 3c) If e (i) is non-zero, replace A with A.hi 4) Return A.
Si les exposants e et d sont données en représentation k-aire signée par d= (d(t) , d(t-l) ,..., d(0) ) et e= (e (t) ,e (t-1) ,..., e (0) ) , les étapes 3b et 3c de l'algorithme précédent sont alors remplacées par :If the exponents e and d are given in k-ary representation signed by d = (d (t), d (tl), ..., d (0)) and e = (e (t), e (t- 1), ..., e (0)), steps 3b and 3c of the previous algorithm are then replaced by:
3b') Si d{i) est strictement positif, remplacer A par A.gi ; et si d(i) est strictement négatif, remplacer A par A.(gi)Λ(-l)3b ') If d {i) is strictly positive, replace A by A.gi; and if d (i) is strictly negative, replace A by A. (gi) Λ (-l)
3c') Si e(i) est strictement positif, remplacer A par A.hi ; et si e(i) est strictement négatif, remplacer A par A. (hi) A (-1)3c ') If e (i) is strictly positive, replace A with A.hi; and if e (i) is strictly negative, replace A by A. (hi) A (-1)
De façon remarquable, l'algorithme de double exponentiation correspondant au cas k=l dans l'algorithme précédent où les exposants d et e sont donnés en représentation binaire signée est particulièrement intéressant pour les applications de type courbe elliptique dans un environnement de type carte à puce car l'inverse d'un élément est peu coûteux et les besoins en mémoire sont réduits. De nombreuses variantes suivant ce cas particulier de k=l sont présentées dans un rapport technique de Jérôme SolinasRemarkably, the double exponentiation algorithm corresponding to the case k = l in the previous algorithm where the exponents d and e are given in signed binary representation is particularly interesting for applications of the elliptic curve type in a card-type environment. puce because the reverse of an element is inexpensive and the memory requirements are reduced. Many variants according to this particular case of k = l are presented in a technical report by Jérôme Solinas
(Rapport technique CORR-2001-41, CACR, Université de(Technical report CORR-2001-41, CACR, University of
Waterloo, Canada) . Cette liste d'algorithmes de double exponentiation n'est pas exhaustive.Waterloo, Canada). This list of double exponentiation algorithms is not exhaustive.
Les algorithmes d'exponentiation et de double exponentiation décrits précédemment sont donnés en l'The exponentiation and double exponentiation algorithms described above are given in the
notation multiplicative ; en d'autres mots, la loi de groupe du groupe G est notée . (multiplication) . Ces algorithmes peuvent être données en notation additive en remplaçant les multiplications par des additions ; en d'autres mots, la loi de groupe du groupe G est notée + (addition) . Ceci est par exemple le cas du groupe des points d'une courbe elliptique qui est le plus souvent donné sous forme additive.multiplicative notation; in other words, the group law of group G is noted. (multiplication). These algorithms can be given in additive notation by replacing the multiplications by additions; in other words, the group law of group G is denoted + (addition). This is for example the case of the group of points of an elliptical curve which is most often given in additive form.
Il est apparu que implémentation sur carte à puce d'un algorithme cryptographique à clé publique construit sur un groupe G était vulnérable à des attaques consistant en une analyse différentielle d'une grandeur physique permettant de retrouver la clé secrète. Ces attaques sont appelées attaques de type DPA, acronyme pour Differential Power Analysis et ont notamment été dévoilées par Paul Kocher (Advances in Cryptology - CRYPTO '99, volume 1966 de Lecture Notes in Computer Science, pages 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étique, ... 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.It appeared that implementation on a smart card of a public key cryptographic algorithm built on a group G was vulnerable to attacks consisting of a differential analysis of a physical quantity making it possible to find the secret key. These attacks are called DPA type attacks, acronym for Differential Power Analysis and were notably unveiled by Paul Kocher (Advances in Cryptology - CRYPTO '99, volume 1966 of Lecture Notes in Computer Science, pages 388-397, Springer-Verlag, 1999 ). Among the physical quantities which can be exploited for these purposes, one can quote the current consumption, the electromagnetic field, ... These attacks are based on the fact that the manipulation of a bit, ie its processing by a particular instruction, has a particular imprint on the physical quantity considered according to its value.
En particulier, lorsqu'une instruction manipule une donnée dont un bit particulier est constant, la valeur des autres bits pouvant varier, l'analyse de la consommation de courant liée à l'instruction montre que la consommation moyenne de l'instruction n'est pas la même suivant que le bit particulier prend la valeur 0 ou 1. L'attaque de type DPA permet donc d'obtenir des informations supplémentaires sur les données intermédiaires manipulées par le microprocesseur du composant électronique lors de l'exécution d'un algorithme cryptographique. Ces informations supplémentaires peuvent dans certain cas permettre de révéler les paramètres privés de l'algorithme cryptographique, rendant le système cryptographique vulnérable .In particular, when an instruction manipulates data of which a particular bit is constant, the value of the other bits may vary, the analysis of the current consumption linked to the instruction shows that the average consumption of the instruction is not not the same depending on whether the particular bit takes the value 0 or 1. The DPA type attack therefore makes it possible to obtain additional information on the intermediate data manipulated by the microprocessor of the electronic component when executing a cryptographic algorithm. This additional information can in certain cases make it possible to reveal the private parameters of the cryptographic algorithm, making the cryptographic system vulnerable.
Une parade efficace aux attaques de type DPA est de rendre aléatoire les entrées de l'algorithme d'exponentiation utilisé pour calculer y=gAd. En d'autres termes, il s'agit de rendre l'exposant d et/ou l'élément g aléatoire. En notation additive, dans le calcul de Q=d*P, il s'agit de rendre l'exposant d et/ou l'élément P aléatoire.An effective counter to DPA attacks is to randomize the inputs of the exponentiation algorithm used to calculate y = g A d. In other words, it is a question of making the exponent d and / or the element g random. In additive notation, in the calculation of Q = d * P, it is a question of making the exponent d and / or the element P random.
Des procédés de contre-mesure appliquant ce principe sont connus.Countermeasure methods applying this principle are known.
Notamment, un procédé de contre-mesure consiste à masquer l'exposant d dans le calcul de y=gAd dans un groupe G en remplaçant d par d+r.q où r est un entier aléatoire et q est l'ordre de l'élément g dans le groupe G. Une variante de cette contre-mesure consiste à remplacer d par d+r.q où r est un entier aléatoire et q est un multiple de l'ordre de l'élément g dans le groupe G ; par le théorème de Lagrange, un choix courant pour ce multiple est l'ordre du groupe G. La valeur de y=gAd dans G s'obtient alors en calculant y=gAd' avec d'=d+r.q. Cette contre-mesure est notamment décrite dans un article de Jean-Sébastien Coron (Cryptographie Hardware and Embedded Systems, volume 1717 de Lecture Notes in Computer Science, pages 292-302, Springer-Verlag, 1999) dans le cas où G est le groupe des points d'une courbe elliptique définie sur un corps fini. Le désavantage de la contre-mesure précédente est qu'elle nécessite la connaissance de l'ordre de l'élément g dans le groupe G ou un multiple de cet ordre. Dans de nombreuses situations, cette valeur est inconnue et trop coûteuse ou impossible à calculer. Un autre désavantage apparaît lorsque l'exposant d est remplacé par d+r.q où q est un multiple relativement grand de l'ordre de l'élément g dans le groupe G car le surcoût engendré par le masquage devient prohibitif. Un autre procédé de contre-mesure, notamment décrit dans un article de Christophe Clavier et Marc Joye (Cryptographie Hardware and Embedded Systems, volume 2162 de Lecture Notes in Computer Science, pages 300-308, Springer-Verlag, 2001) consiste à écrire l'exposant d sous la forme d=(d-r)+r où r est un entier aléatoire et d'ensuite évaluer y=gAd dans le groupe G comme le produit des deux exponentiations gA (d-r) et gAr dans G. Contrairement à la contre-mesure décrite précédemment, cette contre-mesure ne nécessite pas la valeur de l'ordre de g dans G ou d'un de ses multiples. Une variante consiste à tirer un entier aléatoire r et d'écrire d sous la forme avec d2 égal à la valeur par défaut de la division entière de d par r et di égal au reste de ladite division. Le calcul de y=gAd dans le groupe G s'évalue alors comme le produit des deux exponentiations gAdi et hAd2 avec h=gAr dans G. Le désavantage de ce type de contre-mesure est que plusieurs exponentiations sont nécessaires pour le calcul de y=gAd dans G.In particular, a countermeasure method consists in masking the exponent d in the calculation of y = g A d in a group G by replacing d by d + rq where r is a random integer and q is the order of the element g in the group G. A variant of this countermeasure consists in replacing d by d + rq where r is a random integer and q is a multiple of the order of the element g in the group G; by Lagrange's theorem, a current choice for this multiple is the order of the group G. The value of y = g A d in G is then obtained by calculating y = g A d 'with d' = d + rq This countermeasure is notably described in an article by Jean-Sébastien Coron (Cryptography Hardware and Embedded Systems, volume 1717 of Lecture Notes in Computer Science, pages 292-302, Springer-Verlag, 1999) in the case where G is the group of points of an elliptical curve defined on a finite body. The disadvantage of the previous countermeasure is that it requires knowledge of the order of the element g in group G or a multiple of this order. In many situations, this value is unknown and too expensive or impossible to calculate. Another disadvantage appears when the exponent d is replaced by d + rq where q is a relatively large multiple of the order of the element g in group G because the additional cost generated by the masking becomes prohibitive. Another countermeasure method, notably described in an article by Christophe Clavier and Marc Joye (Cryptography Hardware and Embedded Systems, volume 2162 of Lecture Notes in Computer Science, pages 300-308, Springer-Verlag, 2001) consists in writing the 'exponent d in the form d = (dr) + r where r is a random integer and then evaluate y = g A d in group G as the product of the two exponentiations g A (dr) and g A r in G Unlike the countermeasure described above, this countermeasure does not require the value of the order of g in G or one of its multiples. A variant consists in drawing a random integer r and writing d in the form with d 2 equal to the default value of the integer division of d by r and di equal to the rest of said division. The calculation of y = g A d in group G is then evaluated as the product of the two exponentiations g A di and h A d 2 with h = g A r in G. The disadvantage of this type of countermeasure is that several exponentiations are necessary for the calculation of y = g A d in G.
Un objet de la présente invention est un procédé de contre-mesure, notamment vis à vis des attaques de type DPA.An object of the present invention is a countermeasure method, in particular with respect to attacks of the DPA type.
Un autre objet de l'invention est un procédé de contre-mesure aisé à mettre en oeuvre. L'idée à la base de l'invention est de rendre aléatoire l'exposant d en l'exprimant de façon aléatoire sous la forme où di, d∑ et s sont des entiers et d'ensuite calculer l'exponentiation y=gAd dans le groupe G par un algorithme de double exponentiation.Another object of the invention is a countermeasure method which is easy to implement. The idea underlying the invention is to make the exponent d random by expressing it randomly in the form where di, d∑ and s are integers and then calculate the exponentiation y = g A d in the group G by a double exponentiation algorithm.
L'invention concerne donc un procédé de contre- mesure dans un composant électronique mettant en oeuvre un algorithme cryptographique à clé publique, comprenant un calcul d'exponentiation de type y=gΛd où g et y sont des éléments du groupe déterminé G noté de façon multiplicative et d est un nombre prédéterminé, caractérisé en ce qu'il comprend une première étape de masquage pour exprimer de façon aléatoire l'exposant d sous la forme où di, d2 et s sont des entiers et une deuxième étape pour calculer la valeur de y=gAd dans G par un quelconque algorithme de double exponentiation de type (gAdi) . (hΛd2) avec h=gΛs dans G. Ce procédé s'applique de la même façon si le groupe G est noté de façon additive.The invention therefore relates to a countermeasure method in an electronic component implementing a public key cryptographic algorithm, comprising an exponentiation calculation of type y = g Λ d where g and y are elements of the determined group G noted multiplicatively and d is a predetermined number, characterized in that it comprises a first masking step for randomly expressing the exponent d in the form where di, d2 and s are integers and a second step to calculate the value of y = g A d in G by any type of double exponentiation algorithm (g A di). (h Λ d 2 ) with h = g Λ s in G. This process applies in the same way if the group G is noted additively.
D'autres caractéristiques et avantages de l'invention sont présentés dans les descriptions suivantes, faites en référence à des modes de réalisation particuliers.Other characteristics and advantages of the invention are presented in the following descriptions, made with reference to particular embodiments.
On a vu que l'algorithme d'exponentiation le plus simple dans un groupe G est l'algorithme d' exponentiation binaire gauche-droite . De la même façon, les algorithmes de double exponentiation le plus simples sont donnés par les diverses extensions de l'algorithme d'exponentiation binaire gauche-droite. Soit donc g un élément d/ un groupe G et soit d un exposant. Ainsi, un procédé de contre-mesure selon l'invention peut s'écrire comme suit :We have seen that the simplest exponentiation algorithm in a group G is the binary left-right exponentiation algorithm. Similarly, the simplest double exponentiation algorithms are given by the various extensions of the left-right binary exponentiation algorithm. Therefore let g be an element of a group G and be of an exponent. Thus, a countermeasure method according to the invention can be written as follows:
1) Masquage de d : la) Exprimer d de façon aléatoire sous la forme d=d2.s+di où di, d2 et s sont des entiers Ib) Soient et (d2(t),d2(t- 1) ,..., d2 (0) ) les représentations binaires respectives de di et de d2 1) Masking of d: la) Expressing d randomly in the form of d = d 2 .s + di where di, d2 and s are integers Ib) Let and (d 2 (t), d 2 (t- 1), ..., d2 (0)) the respective binary representations of di and d 2
2) Double exponentiation :2) Double exponentiation:
2a) Définir (calculer) l'élément h=gAs dans G2a) Define (calculate) the element h = g A s in G
2b) Initialiser le registre A avec l'élément neutre de G 2c) Pour i allant de t à 0 exécuter : 2cl) Remplacer A par AΛ2 2c2) Si di(i)=l remplacer A par A. g 2c3) Si d2(i)=l remplacer A par A. h 2c4) Retourner A.2b) Initialize the register A with the neutral element of G 2c) For i going from t to 0 execute: 2cl) Replace A by A Λ 2 2c2) If di (i) = l replace A by A. g 2c3) If d 2 (i) = l replace A with A. h 2c4) Return A.
De façon remarquable, ce procédé masque l'exposant d et ne demande qu'au plus trois multiplications dans G par itération à l'étape 2). Ce nombre de multiplications dans G est réduit à deux dans le cas où le produit de g et de h est précalculé. On obtient ainsi le procédé de contre-mesure suivant :Remarkably, this method masks the exponent d and only requires at most three multiplications in G per iteration in step 2). This number of multiplications in G is reduced to two in the case where the product of g and h is precomputed. The following countermeasure method is thus obtained:
1) Masquage de d : la) Exprimer d de façon aléatoire sous la forme d=d2.s+di où di, d2 et s sont des entiers Ib) Soient (di (t) , di (t-1) ,...,dx (0) ) et (d2(t),d2(t- 1) , ..., d2 (0) ) les représentations binaires respectives de di et de d2 1) Masking of d: la) Expressing d randomly in the form of d = d 2 .s + di where di, d 2 and s are integers Ib) Let (di (t), di (t-1), ..., d x (0)) and (d 2 (t), d 2 (t- 1), ..., d 2 (0)) the respective binary representations of di and d 2
2) Double exponentiation :2) Double exponentiation:
2a) Définir (calculer) l'élément h=gAs dans G l'2a) Define (calculate) the element h = g A s in G the
2b) Précalculer u=g.h dans G2b) Precompute u = g.h in G
2c) Initialiser le registre A avec l'élément neutre de G2c) Initialize the register A with the neutral element of G
2d) Pour i allant de t à 0 exécuter : 2dl) Remplacer A par AA22d) For i going from t to 0 execute: 2dl) Replace A by A A 2
2d2) Si di(i)=l et d2(i)=0 remplacer A par A. g 2d3) Si et d2(i)=l remplacer A par A. h 2d4) Si di{i)=l et d2(i)=l remplacer A par A.u 2d5) Retourner A.2d2) If di (i) = l and d 2 (i) = 0 replace A with A. g 2d3) If and d 2 (i) = l replace A with A. h 2d4) If di {i) = l and d 2 (i) = l replace A with Au 2d5) Return A.
Une autre application intéressante de l'invention concerne exponentation dans le groupe G des points d'une courbe elliptique définie sur un corps fini GF (qΛn) . Dans ce groupe G, noté de façon additive, l'inversion d'un point P, notée -P, est une opération peu coûteuse de * sorte qu'il est intéressant de représenter les exposants de façon signée. Soient donc un point P dans le groupe G des points d'une courbe elliptique définie sur un corps fini GF{qΛn) et un exposant d. Ainsi, un procédé de contre-mesure selon l'invention appliqué au groupe des points d'une courbe elliptique sur un corps fini GF(qAn) peut s'écrire comme suit :Another interesting application of the invention relates to exponentation in the group G of the points of an elliptic curve defined on a finite field GF (q Λ n). In this group G, denoted additively, the inversion of a point P, denoted -P, is an inexpensive operation so that it is interesting to represent the exponents in a signed manner. Let there therefore be a point P in the group G of the points of an elliptic curve defined on a finite field GF {q Λ n) and an exponent d. Thus, a countermeasure method according to the invention applied to the group of points of an elliptical curve on a finite body GF (q A n) can be written as follows:
1) Masquage de d : la) Exprimer d de façon aléatoire sous la forme d=d2.s+di où di, d2 et s sont des entiers Ib) Soient (d1(t)rd1(t-l),...,d1(0)) et (d2<t),d2(t- 1) , .,., d2 (0) ) des représentations binaires signées pour di et de d2 3) exponentiation :1) Masking of d: la) Expressing d randomly in the form of d = d 2 .s + di where di, d 2 and s are integers Ib) Let (d 1 (t) r d 1 (tl), ..., d 1 (0)) and (d 2 <t), d 2 (t- 1),.,., d 2 (0)) of the signed binary representations for di and d 2 3) exponentiation:
2a) Définir (calculer) le point R=s*P dans G2a) Define (calculate) the point R = s * P in G
2b) Initialiser un registre A avec l'élément neutre de G 2c) Pour i allant de t à 0 exécuter : 2cl) Remplacer A par 2*A2b) Initialize a register A with the neutral element of G 2c) For i going from t to 0 execute: 2cl) Replace A by 2 * A
2c2) Si di(i) est non nul remplacer A par A+2c2) If di (i) is non-zero replace A by A +
Ci1(I) *PCi 1 (I) * P
2c3) Si d2(i) est non nul remplacer A par A+ d2(i)*R2c3) If d 2 (i) is non-zero replace A by A + d 2 (i) * R
2c4) Retourner A.2c4) Return A.
De façon générale, le procédé de contre-mesure s'applique à tout algorithme de double exponentiation dans un groupe G, noté de façon multiplicative ou additive .In general, the countermeasure method applies to any double exponentiation algorithm in a group G, noted in a multiplicative or additive manner.
Un mode de réalisation préféré pour exprimer l'exposant d de façon aléatoire sous la forme .d=d2. s+di où di, d2 et s sont des entiers à l'étape la dans les procédés de contre-mesure ci-dessus consiste à choisir un entier aléatoire s et à prendre d2 égal à la valeur par défaut de la division entière de d par s et di égal au reste de ladite division. Un autre mode de réalisation préféré pour exprimer l'exposant d de façon aléatoire sous la forme d=d2.s+di où di, d2 et s sont des entiers à l'étape la dans les procédés de contre-mesure ci-dessus consiste à choisir un entier aléatoire di, à fixer s à la valeur 1 et à prendre d2 égal à la différence de d et de dx. A preferred embodiment for expressing the exponent d randomly in the form .d = d2. s + di where di, d 2 and s are integers in step la in the above countermeasures consists of choosing a random integer s and taking d 2 equal to the default value of the integer division d by s and di equal to the rest of said division. Another preferred embodiment for expressing the exponent d randomly in the form d = d 2 .s + di where di, d 2 and s are integers in step la in the countermeasuring methods above. above is to choose a random integer di, set s to the value 1 and take d 2 equal to the difference of d and d x .

Claims

REVENDICATIONS
1. Procédé de contre-mesure dans un composant électronique mettant en oeuvre un algorithme cryptographique à clé publique, comprenant un calcul d'exponentiation de type y=gΛd où g et y sont des éléments du groupe déterminé G noté de façon multiplicative et d est un nombre prédéterminé, caractérisé en ce qu'il comprend une première étape de masquage pour exprimer de façon aléatoire l'exposant d sous la forme d=d2. s+di où di, d2 et s sont des entiers et une deuxième étape pour calculer la valeur de y=gAd dans G par un quelconque algorithme de double exponentiation de type (gΛdi) . (hAd2) avec h=gAs dans G .1. Countermeasure method in an electronic component using a public key cryptographic algorithm, comprising an exponentiation calculation of type y = g Λ d where g and y are elements of the determined group G noted in a multiplicative manner and d is a predetermined number, characterized in that it comprises a first masking step for randomly expressing the exponent d in the form d = d2. s + di where di, d 2 and s are integers and a second step to calculate the value of y = g A d in G by any type of double exponentiation algorithm (g Λ di). (h A d 2 ) with h = g A s in G.
2. Procédé de contre-mesure selon la revendication 1, caractérisé en ce que le groupe G est noté de façon additive.2. A countermeasure method according to claim 1, characterized in that group G is scored additively.
3. Procédé de contre-mesure selon la revendication 1, caractérisé en ce que le procédé comprend les étapes suivantes : 1) Masquage de d : la) Exprimer d de façon aléatoire sous la forme d=d2.s+di où di, d2 et s sont des entiers3. Countermeasure method according to claim 1, characterized in that the method comprises the following steps: 1) Masking of d: la) Expressing d randomly in the form of d = d 2 .s + di where di, d 2 and s are integers
Ib) Soient (dx (t) ,di (t-1) , ...,di (0) ) et (d2 (t) ,d2 (t-1) ,...,d2(0) ) les représentations binaires respectives de di et de d2 2) Double exponentiation :Ib) Let (d x (t), di (t-1), ..., di (0)) and (d 2 (t), d 2 (t-1), ..., d 2 (0 )) the respective binary representations of di and d 2 2) Double exponentiation:
2a) Définir (calculer) l'élément h=gΛs dans2a) Define (calculate) the element h = g Λ s in
G 2b) Initialiser le registre A avec l'élément neutre de GG 2b) Initialize register A with the neutral element of G
2c) Pour i allant de t à 0 exécuter :2c) For i going from t to 0 execute:
2cl) Remplacer A par AA2 2c2) Si di(i)=l remplacer A par A. g2cl) Replace A with A A 2 2c2) If di (i) = l replace A with A. g
2c3) Si d2(i)=l remplacer A par A.h2c3) If d 2 (i) = l replace A with Ah
2c4) Retourner A.2c4) Return A.
4. Procédé de contre-mesure selon la revendication 1, caractérisé en ce que le procédé comprend les étapes suivantes : 1) Masquage de d : la) Exprimer d de façon aléatoire sous la forme d=d2.s+dχ où di, d2 et s sont des entiers Ib) Soient (dx (t) ,di (t-1 ),..., di (0) ) et4. Countermeasure method according to claim 1, characterized in that the method comprises the following steps: 1) Masking of d: la) Expressing d randomly in the form of d = d 2 .s + dχ where di, d2 and s are integers Ib) Let (d x (t), di (t-1), ..., di (0)) and
(d2 (t) , d2 (t-1) ,..., d2 (0) ) les représentations binaires respectives de di et de d2 2 ) Double exponentiation :(d 2 (t), d2 (t-1), ..., d 2 (0)) the respective binary representations of di and d 2 2) Double exponentiation:
2a) Définir (calculer) l'élément h=gΛs dans G2a) Define (calculate) the element h = g Λ s in G
2b) Précalculer u=g.h dans G 2c) Initialiser le registre A avec l'élément neutre de G2b) Precompute u = g.h in G 2c) Initialize register A with the neutral element of G
2d) Pour i allant de t à 0 exécuter : 2dl) Remplacer A par AA22d) For i going from t to 0 execute: 2dl) Replace A by A A 2
2d2) Si di(i)=l et d2(i)=0 remplacer A par A. g2d2) If di (i) = l and d 2 (i) = 0 replace A with A. g
2d3) Si di(i)=0 et d2(i)=l remplacer A par A.h 2d4) Si di(i)=l et d2(i)=l remplacer2d3) If di (i) = 0 and d 2 (i) = l replace A with Ah 2d4) If di (i) = l and d 2 (i) = l replace
A par A.uA by A.u
2d5) Retourner A. 2d5) Return A.
5. Procédé de contre-mesure selon la revendication 2, caractérisé en ce que le procédé comprend les étapes suivantes :5. Countermeasure method according to claim 2, characterized in that the method comprises the following steps:
1) Masquage de d : la) Exprimer d de façon aléatoire sous la forme où di, d2 et s sont des entiers Ib) Soient (dα (t) , di (t-1 ),..., di (0) ) et (d2 (t) , d2 (t-1) ,..., d2 (0) ) des représentations binaires signées pour di et de d2 2) exponentiation :1) Masking of d: la) Expressing d randomly in the form where di, d 2 and s are integers Ib) Let (dα (t), di (t-1), ..., di (0)) and (d 2 (t), d 2 (t-1) , ..., d 2 (0)) of the binary representations signed for di and d 2 2) exponentiation:
2a) Définir (calculer) le point R=s*P dans G2a) Define (calculate) the point R = s * P in G
2b) Initialiser un registre A avec l'élément neutre de G 2c) Pour i allant de t à 0 exécuter :2b) Initialize a register A with the neutral element of G 2c) For i going from t to 0 execute:
2cl) Remplacer A par 2*A 2c2) Si di(i) est non nul remplacer A par A+ d5 (i) *P2cl) Replace A by 2 * A 2c2) If di (i) is non-zero replace A by A + d 5 (i) * P
2c3) Si d2(i) est non nul remplacer A par A+ d2 (i) *R2c3) If d 2 (i) is non-zero replace A by A + d 2 (i) * R
2c4) Retourner A.2c4) Return A.
6. Procédé de contre-mesure selon l'une quelconque des revendications précédentes , caractérisé en ce que, à la première étape de masquage, l'expression de l'exposant d de façon aléatoire sous la forme d=d2.s+di où di, d2 et s sont des entiers, consiste à choisir un entier aléatoire s et à prendre d2 égal à la valeur par défaut de la division entière de d par s et di égal au reste de ladite division.6. Countermeasure method according to any one of the preceding claims, characterized in that, in the first masking step, the expression of the exponent d randomly in the form d = d 2 .s + di where di, d 2 and s are integers, consists in choosing a random integer s and in taking d 2 equal to the default value of the integer division of d by s and di equal to the rest of said division.
7. Procédé de contre-mesure selon l'une quelconque des revendications 1 à 5, caractérisé en ce que l'expression de l'exposant d de façon aléatoire sous la forme où di, d2 et s sont des entiersr consiste à choisir un entier aléatoire di, à fixer s à la valeur 1 et à prendre d2 égal à la différence de d et de di.7. Countermeasure method according to any one of claims 1 to 5, characterized in that the expression of the exponent d randomly in the form where di, d 2 and s are integers r consists of choosing a random integer di, setting s to the value 1 and taking d 2 equal to the difference of d and di.
Composant électronique mettant en œuvre le procédé selon l'une quelconque des revendications précédentes. Electronic component implementing the method according to any one of the preceding claims.
EP04741817A 2003-06-18 2004-06-17 Method for countermeasuring in an electronic component Withdrawn EP1639450A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR0307380A FR2856538B1 (en) 2003-06-18 2003-06-18 COUNTERMEASURE METHOD IN AN ELECTRONIC COMPONENT USING A CRYPTOGRAPHIC ALGORITHM OF THE PUBLIC KEY TYPE
PCT/EP2004/051142 WO2004111833A1 (en) 2003-06-18 2004-06-17 Method for countermeasuring in an electronic component

Publications (1)

Publication Number Publication Date
EP1639450A1 true EP1639450A1 (en) 2006-03-29

Family

ID=33484552

Family Applications (1)

Application Number Title Priority Date Filing Date
EP04741817A Withdrawn EP1639450A1 (en) 2003-06-18 2004-06-17 Method for countermeasuring in an electronic component

Country Status (4)

Country Link
US (1) US20070121935A1 (en)
EP (1) EP1639450A1 (en)
FR (1) FR2856538B1 (en)
WO (1) WO2004111833A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2395424B1 (en) * 2005-01-18 2013-07-31 Certicom Corp. Accelerated verification of digital signatures and public keys
US7912886B2 (en) * 2006-12-14 2011-03-22 Intel Corporation Configurable exponent FIFO
EP2264939B1 (en) * 2008-03-31 2015-03-04 Fujitsu Limited Encrypting method having countermeasure function against power analyzing attacks
EP2169535A1 (en) * 2008-09-22 2010-03-31 Thomson Licensing Method, apparatus and computer program support for regular recoding of a positive integer
US9454494B2 (en) * 2014-08-01 2016-09-27 Honeywell International Inc. Encrypting a communication from a device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2784831B1 (en) * 1998-10-16 2000-12-15 Gemplus Card Int COUNTER-MEASUREMENT METHOD IN AN ELECTRONIC COMPONENT USING A SECRET KEY CRYPTOGRAPHY ALGORITHM
US7599491B2 (en) * 1999-01-11 2009-10-06 Certicom Corp. Method for strengthening the implementation of ECDSA against power analysis
DE19963408A1 (en) * 1999-12-28 2001-08-30 Giesecke & Devrient Gmbh Portable data carrier with access protection by key division
FR2810138B1 (en) * 2000-06-08 2005-02-11 Bull Cp8 METHOD FOR SECURE STORAGE OF SENSITIVE DATA IN A MEMORY OF AN ELECTRONIC CHIP-BASED SYSTEM, IN PARTICULAR A CHIP CARD, AND ON-BOARD SYSTEM IMPLEMENTING THE METHOD
US7127063B2 (en) * 2001-12-31 2006-10-24 Certicom Corp. Method and apparatus for computing a shared secret key
US7551737B2 (en) * 2003-03-31 2009-06-23 International Business Machines Corporation Cryptographic keys using random numbers instead of random primes

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
FR2856538A1 (en) 2004-12-24
WO2004111833A1 (en) 2004-12-23
FR2856538B1 (en) 2005-08-12
US20070121935A1 (en) 2007-05-31

Similar Documents

Publication Publication Date Title
EP1166494B1 (en) Countermeasure procedures in an electronic component implementing an elliptical curve type public key encryption algorithm
EP2946284B1 (en) Cryptography method comprising an operation of multiplication by a scalar or an exponentiation
EP1381936B1 (en) Countermeasure method in an electronic component using a public key cryptographic algorithm on an elliptic curve
EP2162820A1 (en) Montgomery-based modular exponentiation secured against hidden channel attacks
EP1969459A1 (en) Cryptographic method comprising a modular exponentiation secured against hidden-channel attacks, cryptoprocessor for implementing the method and associated chip card
FR2809893A1 (en) COUNTER-MEASUREMENT METHOD IN AN ELECTRONIC COMPONENT USING A PUBLIC KEY CRYPTOGRAPHY ALGORITHM ON AN ELLIPTICAL CURVE
WO2000059157A1 (en) Countermeasure method in an electric component implementing an elliptical curve type public key cryptography algorithm
WO2001080481A1 (en) Cryptography method on elliptic curves
EP1804161B1 (en) Detection of a disturbance in a cryptographic calculation
EP1804160B1 (en) Protection of a cryptographic calculation performed by an integrated circuit
EP1639451A2 (en) Method for countermeasuring by masking the accumulator in an electronic component while using a public key cryptographic algorithm
CA2257907A1 (en) Public key cryptography method
WO2004111833A1 (en) Method for countermeasuring in an electronic component
WO2002028010A1 (en) Method for encoding long messages for rsa electronic signature schemes
WO2002001343A1 (en) Countermeasure methods in an electronic component using a koblitz elliptic curve public key cryptographic algorithm
EP1222528B1 (en) Method for improving the performance of a multiplication operation on a finite characteristic 2 body
FR3010562A1 (en) DATA PROCESSING METHOD AND ASSOCIATED DEVICE
FR2843507A1 (en) Modular exponentiation method for public key cryptography applications, especially for chip card implementation, whereby the method is suitable for parallel processor use and employs multiplier and multiplicand registers
WO2002050658A1 (en) Countermeasure methods in an electronic component using an rsa-type public key encryption algorithm
FR2854997A1 (en) Chip card counter measure having two random numbers providing isomorphic elliptical curve/point coordinates and exponential algorithm applied providing second point coordinates
WO2002093411A1 (en) Device used to perform exponentiation calculations applied to points on an elliptical curve

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

17P Request for examination filed

Effective date: 20060118

AK Designated contracting states

Kind code of ref document: A1

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

DAX Request for extension of the european patent (deleted)
17Q First examination report despatched

Effective date: 20070208

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN

18D Application deemed to be withdrawn

Effective date: 20070821