EP1346271A1 - Method for making secure a logical or mathematical operator in a microprocessor-based electronic module - Google Patents

Method for making secure a logical or mathematical operator in a microprocessor-based electronic module

Info

Publication number
EP1346271A1
EP1346271A1 EP01989651A EP01989651A EP1346271A1 EP 1346271 A1 EP1346271 A1 EP 1346271A1 EP 01989651 A EP01989651 A EP 01989651A EP 01989651 A EP01989651 A EP 01989651A EP 1346271 A1 EP1346271 A1 EP 1346271A1
Authority
EP
European Patent Office
Prior art keywords
operator
sequence
execution
operations
electronic module
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.)
Ceased
Application number
EP01989651A
Other languages
German (de)
French (fr)
Inventor
Nicolas Giraud
Abraham Brolh
Patrice Hameau
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.)
CP8 Technologies SA
Original Assignee
CP8 Technologies 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 CP8 Technologies SA filed Critical CP8 Technologies SA
Publication of EP1346271A1 publication Critical patent/EP1346271A1/en
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/75Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation
    • G06F21/755Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation with measures against power attack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/77Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/0806Details of the card
    • G07F7/0833Card having specific functional components

Definitions

  • the present invention relates to securing on-board systems comprising one or more electronic modules incorporating at least one microprocessor,
  • ROM type memory containing at least one program to be executed and input / output means for communicating with the outside.
  • Some modules also include other accessory circuits such as RAM, EEPROM for more sophisticated applications and are
  • modules are most often produced in the form of a monolithic integrated electronic circuit, or chip. These modules can be used
  • a portable object such as a smart card, microcircuit card or the like which can be used in various fields, in particular the field of bank and / or commercial cards, mobile radiotelephony,
  • the present invention aims to secure certain vulnerable operations in a program, in particular logical or mathematical operators or similar functional circuits by making their identifications more difficult, even much more difficult.
  • the invention provides a method for securing a logical or mathematical operator or a similar functional circuit usable in the execution of a program in an electronic microprocessor module, the method being characterized in that the execution of said operator is replaced by the execution of a sequence of replacement operations having the final result identical to the result of the function of said operator.
  • the sequence of replacement operations is chosen each time the operator is protected, from a set of equivalent sequences.
  • the difficulty of identification is further increased by the multiple changes in the replacement sequence of operations of the operator to be protected during the execution of the same program.
  • all of the sequences include at least four equivalent sequences and preferably eight equivalent sequences, which makes it even more difficult to identify the sequence as the operator sought by fraudsters.
  • the sequence number as a whole of the chosen sequence is determined as a function of certain parameters of the program being executed and / or of a random parameter advantageously obtained from a generator of pseudo-random numbers.
  • This sequence scrambling mechanism proves to be very effective when the operator to be secured is repeated several times in a program such as, for example, the XOR operator in an encryption / decryption processing.
  • the sequences of operations of the same set all have the same execution time.
  • certain sequences include at least one non-operative instruction intended to introduce a delay time in the execution of the sequences concerned.
  • the non-operative instruction is chosen from non-operative instructions with respect to the microprocessor or from instructions normally operative but rendered ineffective by their positions in the sequence of operations. This mechanism of standardizing the execution times of sequences makes their distinctions with each other even more difficult.
  • the operator to be secured is a logical operator, by way of nonlimiting example the logical operator XOR (or exclusive OR).
  • at least one sequence of replacement operations is composed from elementary logical operators. For example at least one sequence of operations is composed from the basic logical operators AND (or AND), OR (or OR) and NOT (or NO).
  • S'1 (x OR NOP y OR y) -AND NOP NOT (x AND NOP y AND y)
  • S '2 (x OR y NOP OR y) AND NOP (NOT x OR NOP NOT y)
  • S'3 NOT (NOT X AND NOP NOT y) AND NOT (x AND y AND y)
  • S'4 NOT (NOT x AND NOP NOT y) AND (NOT x OR NOT y)
  • S'5 NO (NOT (x NOP OR y OR y) OR (x NOP AND y AND y))
  • S'6 NOT ((NOT x AND NOT y NOP) OR (x AND y NOP AND y))
  • S'7 NOT ((NOT x AND NOT y) OR NOT (NOT x OR NOT y))
  • S'8 NOT (
  • the operator to be secured is a mathematical operator such as a half-adder, an adder, a subtractor or a multiplier, or a functional circuit similar to a logical or mathematical operator, such as a combinational circuit, in particular a multiplexer and / or a demultiplexer, an encoder and / or a decoder, a generator and / or parity detector or a comparator.
  • a mathematical operator such as a half-adder, an adder, a subtractor or a multiplier, or a functional circuit similar to a logical or mathematical operator, such as a combinational circuit, in particular a multiplexer and / or a demultiplexer, an encoder and / or a decoder, a generator and / or parity detector or a comparator.
  • the operator is the mathematical operator of the “multiplication by two” obtained by shifting to the left of a bit with zero setting of the least significant bit, the notation in C ANSI of this operator writing (X ⁇ 1).
  • the invention also relates to an electronic module with secure operator and comprising at least one microprocessor and a program to be executed comprising at least one logical or mathematical operator or a similar functional circuit to be secured, the module being characterized in that it comprises means to replace the execution of the operator by the execution of a sequence of operations resulting in a result identical to the result of the operator's function.
  • the electronic module comprises means for selecting the sequence of operations each time the operator is called from among a set of equivalent sequences.
  • the module includes computer processing means for determining the order number in the whole of the sequence chosen as a function of certain parameters of the program being executed and / or of a random parameter generated by a pseudo-random number generator.
  • the invention also relates to an electronic module with a secure operator and comprising at least one microprocessor and a program to be executed comprising at least one logical or mathematical operator or a similar circuit to be secured, characterized in that it comprises the material means and / or software for implementing the method according to the invention presented above.
  • the invention also relates to an on-board system or a microcircuit card comprising an electronic module with a secure operator as defined above in its various variants.
  • FIG. 1 shows a schematic representation of an embodiment of an electronic module with microprocessor and secure XOR operator according to the invention
  • FIG. 2 shows a schematic representation of the equivalent execution of the operator XOR implementing the method according to the invention in the module of FIG. 1.
  • the monolithic electronic module 10 with microprocessor illustrated in FIG. 1 generally comprises a microprocessor or central processing unit CPU 11 connected bidirectionally by an internal bus 12 to a memory RAM 14, ROM ROM 16, EEPROM 18 and I / O I / O interface 20.
  • the module 10 also includes a TIMER timer 22 with automatic reset (optional option) and a pseudo-random number generator GNPA 24 connected to the internal bus 12.
  • ROM 16 actual application programs such as for example bank card transaction applications or health card transaction applications which for reasons of confidentiality and security include encryption / decryption subroutines, operator authentication or transaction validation in which the XOR operator is frequently present, in particular to perform byte by byte comparisons.
  • this very commonly used operator is generally part of the set of arithmetic instructions with two operands (OPl and 0P2) of the central unit CPU or microprocessor 11.
  • the means for implementing the method for securing the operator XOR are mainly software in the form of a routine for calculating secure XOR (or XORSEC routine) presented diagrammatically in FIG. 2.
  • a routine for calculating secure XOR or XORSEC routine
  • the execution of the XOR instruction is replaced in the XORSEC routine by the execution of a sequence of operations, in this case but not necessarily operations of a lower degree of complexity as for example elementary operations, having for final result a result identical to the result of the function of the operator XOR (condition easily verified among others by truth tables with identical outputs).
  • sequence S5 automatically chosen to replace the operator XOR consists of five elementary operations whose signature will be very different from the operator XOR.
  • the simplest variant for implementing the method according to the invention is thus produced.
  • the sequence of replacement operations is determined each time the XOR operator is called from among the set of equivalent sequences, in this case the set ES constituted by the eight sequences S1 to S8 given above.
  • the difficulty of identifying the operator XOR is further increased by the multiple changes in the sequence of operations replacing the operator XOR during the execution of the program, the sequences SI to S8 likely to be used. all with different signatures.
  • said random parameter is obtained from a generator of pseudo-random numbers.
  • the XORSEC routine comprises four main processing phases, namely in the order of execution:
  • phase CAL-XORSEC (i) of execution of the subroutine CAL-XORSEC (i) by logical calculation with the operands OPl and OP2 of the sequence of operations If selected by the phase CAL_NDO,
  • the XORSEC routine presents another still improved variant with regard to the difficulty of identification in which the set of replacement sequences consists of sequences of the same duration of execution (and therefore more difficult to distinguish).
  • certain sequences include at least one non-operative instruction intended to introduce a delay time in the execution of the sequences concerned.
  • the non-operative instruction is chosen from non-operative instructions with respect to the microprocessor or from instructions normally operative but rendered ineffective by their positions in the sequence of operations.
  • S'5 NOT (NOT (x NOP OR y OR y) OR (x NOP AND y AND y))
  • S'6 NOT ((NOT x AND NOT y NOP) OR (x AND y NOP AND y))
  • S '7 NOT ((NOT x AND NOT y) OR NOT (NOT x OR NOT y))
  • S'8 NOT (NOT (x OR y OR y) OR NOT (NOT x OR NOT y))
  • the invention is not limited to its application to the securing of logical operators but is also applicable to the securing of mathematical operators such as half-adders, adders, subtractors and multipliers or of functional circuits similar to logical or mathematical operators, such as combinational circuits, in particular multiplexers and / or demultiplexers, coders and / or decoders, generators and / or parity detectors or comparators.
  • mathematical operators such as half-adders, adders, subtractors and multipliers or of functional circuits similar to logical or mathematical operators, such as combinational circuits, in particular multiplexers and / or demultiplexers, coders and / or decoders, generators and / or parity detectors or comparators.
  • the operator to be secured is the mathematical operator of the “multiplication by two” obtained by shifting a bit to the left with the least significant bit set to zero.
  • this operator is also designated (X ⁇ 1).
  • the smart card accommodating the electronic module with secure operator according to the invention can be replaced by any other on-board system.
  • An embodiment of the invention is now presented in its implementation by means of an electronic module.
  • the method for securing a logical or mathematical operator or a similar functional circuit usable in the execution of a program in an electronic module comprising a microprocessor and a memory is characterized in that the execution of said operator by the microprocessor is replaced by the execution of a sequence of replacement operations resulting in a result identical to the result of the function of said operator, said result being stored in the memory.
  • the electronic module with secure operator and comprising at least a microprocessor and a memory, and the memory storing a program to be executed comprising at least one logical or mathematical operator or a similar functional circuit to be secured, is characterized in that it comprises means to replace the execution of the operator by means of the microprocessor by the execution of a sequence of operations having as final result a result identical to the result of the function of the operator, said result being stored in the memory.

Abstract

The invention concerns a method for making secure a logical or mathematical operator, in the present case the XOR operator, usable in executing a programme in a microprocessor-based electronic module. The invention is characterised in that the execution of the XOR operator is replaced by the execution (CAL-XORSEC (i)) of a sequence (Si) of operations having as final result a result identical to the result of the XOR function. The sequence of operations (Si), in the present case, consisting of elementary operations based on AND, OR, and NOT, is selected from a set of eight equivalent sequences (S1 to S8) after determining (CAL-NDO) a serial number NDO = i based on parameters of the programme and/or a random parameter R supplied by a pseudo-random number generator (24).

Description

PROCEDE DE SECURISATION D'UN OPERATEUR LOGIQUE OU MATHEMATIQUE DANS UN MODULE ELECTRONIQUE A MICROPROCESSEURMETHOD FOR SECURING A LOGICAL OR MATHEMATIC OPERATOR IN AN ELECTRONIC MODULE WITH MICROPROCESSOR
La présente invention concerne la sécurisation des systèmes embarqués comportant un ou plusieurs modules électroniques incorporant au moins un microprocesseur,The present invention relates to securing on-board systems comprising one or more electronic modules incorporating at least one microprocessor,
10 une mémoire de type ROM contenant au moins un programme à exécuter et des moyens d' entrée/sortie pour communiquer avec l'extérieur. Certains modules comportent également d'autres circuits accessoires tels des mémoires RAM, EEPROM pour des applications plus élaborées et sont10 a ROM type memory containing at least one program to be executed and input / output means for communicating with the outside. Some modules also include other accessory circuits such as RAM, EEPROM for more sophisticated applications and are
15 également connus sont le nom de microcontrôleurs .15 also known are the name of microcontrollers.
De tels modules sont réalisés le plus souvent sous la forme d'un microcircuit électronique intégré monolithique, ou puce. Ces modules peuvent être utilisésSuch modules are most often produced in the form of a monolithic integrated electronic circuit, or chip. These modules can be used
20 d'une part comme tels une fois protégés physiquement et montés par exemple sur un objet portatif type carte à puce, carte à microcircuit ou analogue utilisable dans divers domaines, notamment le domaine des cartes bancaires et/ou commerciales, la radiotéléphonie mobile,On the one hand as such once physically protected and mounted for example on a portable object such as a smart card, microcircuit card or the like which can be used in various fields, in particular the field of bank and / or commercial cards, mobile radiotelephony,
25 la télévision à péage, la santé et les transports, et d'autre part dans d'autres systèmes embarqués allant par exemple de systèmes relativement simples, tels que des capteurs et des interrupteurs, vers des systèmes plus complexes tels des contrôleurs industriels, des25 pay television, health and transport, and on the other hand in other on-board systems ranging for example from relatively simple systems, such as sensors and switches, to more complex systems such as industrial controllers,
30 multicommutateurs et autres sous-ensembles et appareils contrôlés électroniquement jusqu'aux systèmes industriels complets contrôlés électroniquement.30 multi-switches and other electronically controlled sub-assemblies and devices up to complete electronically controlled industrial systems.
La multiplication des applications dans la vie couranteThe proliferation of applications in everyday life
35 des cartes à puce et autres systèmes embarqués et la généralisation de leur utilisation dans certains domaines, comme celui des cartes bancaires, des cartes santé ou de la télévision à péage a rendu nécessaire l'introduction de procédures sécuritaires, par exemple des procédures cryptographiques et/ou des procédures de brouillage de données, par exemple les données transitant sur le bus interne du microcontrôleur. Ces procédures sécuritaires concernent notamment l' authentification de l'utilisateur, l'authentification de la transaction et de sa validité, le maintien de la confidentialité des données, le cryptage/décryptage des données.35 smart cards and other embedded systems and the generalization of their use in certain fields, such as bank cards, health cards or pay TV made it necessary to introduce secure procedures, for example cryptographic procedures and / or data scrambling procedures, for example data passing over the bus internal of the microcontroller. These security procedures relate in particular to user authentication, authentication of the transaction and its validity, maintenance of data confidentiality, encryption / decryption of data.
Si l'utilisation frauduleuse des cartes à puce n'est pas un phénomène nouveau, l'accroissement du volume et de la valeur des transactions sur carte à puce a amené les fraudeurs à utiliser des méthodes et des moyens de plus en plus sophistiqués. En particulier des attaques par rayonnements brefs et ciblés sur la puce ont pour conséquence de modifier les données et/ou les codes transitant de la ROM vers le microprocesseur sur le bus interne avec pour résultat l'inexécution ou l'exécution irrégulière de certaines parties du code, par exemple l'exécution d'instructions inopérantes en lieu et place d'une ou plusieurs opérations sécuritaires.If the fraudulent use of smart cards is not a new phenomenon, the increase in the volume and value of smart card transactions has led fraudsters to use increasingly sophisticated methods and means. In particular, short and targeted radiation attacks on the chip have the effect of modifying the data and / or the codes passing from the ROM to the microprocessor on the internal bus, resulting in the non-execution or irregular execution of certain parts of the code, for example the execution of inoperative instructions in place of one or more security operations.
II s'avère que le repérage précis de la position d'une opération donnée sensible (par exemple relevant du cryptage et/ou du décryptage) dans un programme encodé dans une mémoire ROM permet de mieux cibler l'attaque et d'accroître de façon significative le pouvoir de nuisance de cette dernière. Pour procéder à cette localisation, les fraudeurs utilisent la méthode dite SPA (en anglais Simple Power Analysis) qui consiste à relever la consommation de courant en certains points du microcontrôleur. La méthode SPA peut être complétée par la méthode DPA (en anglais Differential Power Analysis) basée sur l'analyse comparative des signaux. De ce point de vue il arrive que l'exécution de certaines opérations programmées (telle que l'opération XOR [OU exclusif] fréquemment utilisée en cryptage / décryptage) révèle une « signature » suffisamment caractéristique pour permettre l'identification de l'opération en cause et par suite sa localisation dans le programme.It turns out that the precise location of the position of a given sensitive operation (for example relating to encryption and / or decryption) in a program encoded in a ROM memory makes it possible to better target the attack and to increase in a way significant the nuisance power of the latter. To carry out this localization, fraudsters use the so-called SPA method (in English Simple Power Analysis) which consists in recording the current consumption at certain points of the microcontroller. The SPA method can be supplemented by the DPA method (in English Differential Power Analysis) based on the comparative analysis of signals. From this point from sight it sometimes happens that the execution of certain programmed operations (such as the XOR [OR exclusive] operation frequently used in encryption / decryption) reveals a "signature" sufficiently characteristic to allow the identification of the operation in question and by following its localization in the program.
La présente invention a pour but de sécuriser certaines opérations vulnérables dans un programme, notamment les opérateurs logiques ou mathématiques ou des circuits fonctionnels analogues en rendant leurs identifications plus difficiles, voire beaucoup plus difficiles.The present invention aims to secure certain vulnerable operations in a program, in particular logical or mathematical operators or similar functional circuits by making their identifications more difficult, even much more difficult.
A cette fin 1 ' invention propose un procédé de sécurisation d'un opérateur logique ou mathématique ou d'un circuit fonctionnel analogue utilisable dans l'exécution d'un programme dans un module électronique à microprocesseur, le procédé étant caractérisé en ce que l'exécution dudit opérateur est remplacée par l'exécution d'une séquence d'opérations de remplacement ayant pour résultat final un résultat identique au résultat de la fonction dudit opérateur.To this end the invention provides a method for securing a logical or mathematical operator or a similar functional circuit usable in the execution of a program in an electronic microprocessor module, the method being characterized in that the execution of said operator is replaced by the execution of a sequence of replacement operations having the final result identical to the result of the function of said operator.
Ainsi la signature très caractéristique d'un opérateur complexe, tel que l'opérateur XOR, est remplacée par le signal d'une séquence d'opérations souvent moins complexes, mais pas nécessairement, par exemple d'une séquence d'opérations élémentaires de signatures voisines ou identiques peu caractérisées, l'identification de l'opérateur étant ainsi rendue plus difficile.Thus the signature very characteristic of a complex operator, such as the operator XOR, is replaced by the signal of a sequence of operations often less complex, but not necessarily, for example of a sequence of elementary operations of signatures neighbors or identical little characterized, the identification of the operator being thus made more difficult.
Selon un mode de mise en oeuvre préférentiel du procédé selon l'invention la séquence d'opérations de remplacement est choisie à chaque appel de l'opérateur à protéger parmi un ensemble de séquences équivalentes. Ainsi la difficulté de l'identification est encore accrue par les multiples changements de la séquence d'opérations remplaçante de 1 ' opérateur à protéger au cours de l'exécution d'un même programme. Avantageusement l'ensemble des séquences comporte au moins quatre séquences équivalentes et de préférence huit séquences équivalentes, ce qui rend encore plus difficile l'identification de la séquence en tant que l'opérateur recherché par les fraudeurs .According to a preferred embodiment of the method according to the invention, the sequence of replacement operations is chosen each time the operator is protected, from a set of equivalent sequences. Thus the difficulty of identification is further increased by the multiple changes in the replacement sequence of operations of the operator to be protected during the execution of the same program. Advantageously, all of the sequences include at least four equivalent sequences and preferably eight equivalent sequences, which makes it even more difficult to identify the sequence as the operator sought by fraudsters.
Selon une première variante de l'invention le numéro d'ordre dans son ensemble de la séquence choisie est déterminé en fonction de certains paramètres du programme en cours d'exécution et/ou d'un paramètre aléatoire obtenu avantageusement à partir d'un générateur de nombres pseudo-aléatoires . Ce mécanisme de brouillage des séquences s'avère très efficace lorsque l'opérateur à sécuriser est répété plusieurs fois dans un programme comme par exemple l'opérateur XOR dans un traitement de cryptage/ décryptage.According to a first variant of the invention, the sequence number as a whole of the chosen sequence is determined as a function of certain parameters of the program being executed and / or of a random parameter advantageously obtained from a generator of pseudo-random numbers. This sequence scrambling mechanism proves to be very effective when the operator to be secured is repeated several times in a program such as, for example, the XOR operator in an encryption / decryption processing.
Selon une seconde variante de l'invention (non exclusive de la première variante) les séquences d'opérations d'un même ensemble présentent toutes la même durée d'exécution. Avantageusement certaines séquences comportent au moins une instruction non-opérative destinée à introduire un temps de retard dans l'exécution des séquences concernées. En particulier l'instruction non-opérative est choisie parmi des instructions non- opératives vis à vis du microprocesseur ou parmi des instructions normalement opératives mais rendues sans effet par leurs positions dans la séquence d'opérations. Ce mécanisme d'uniformisation des durées d'exécution des séquences rend leurs distinctions les unes par rapport aux autres encore plus difficiles. Selon une première application du procédé selon l'invention, l'opérateur à sécuriser est un opérateur logique, à titre d'exemple non limitatif l'opérateur logique XOR (ou OU exclusif) . Avantageusement au moins une séquence d'opérations de remplacement est composée à partir d'opérateurs logiques élémentaires. Par exemple au moins une séquence d'opérations est composée à partir des opérateurs logiques élémentaires AND (ou ET) , OR (ou OU) et NOT (ou NON) .According to a second variant of the invention (not exclusive of the first variant), the sequences of operations of the same set all have the same execution time. Advantageously, certain sequences include at least one non-operative instruction intended to introduce a delay time in the execution of the sequences concerned. In particular, the non-operative instruction is chosen from non-operative instructions with respect to the microprocessor or from instructions normally operative but rendered ineffective by their positions in the sequence of operations. This mechanism of standardizing the execution times of sequences makes their distinctions with each other even more difficult. According to a first application of the method according to the invention, the operator to be secured is a logical operator, by way of nonlimiting example the logical operator XOR (or exclusive OR). Advantageously at least one sequence of replacement operations is composed from elementary logical operators. For example at least one sequence of operations is composed from the basic logical operators AND (or AND), OR (or OR) and NOT (or NO).
L'invention concerne également, en ce qui a trait à la sécurisation de l'opérateur XOR, les ensembles de séquences d'opérations de remplacement SI à S8 et S'1 à S' 8 données ci-dessous : SI = (x OR y) AND NOT (x AND y)The invention also relates, as regards the securing of the operator XOR, the sets of sequences of replacement operations SI to S8 and S'1 to S '8 given below: SI = (x OR y) AND NOT (x AND y)
52 = (x OR y) AND (NOT x OR NOT y)52 = (x OR y) AND (NOT x OR NOT y)
53 = NOT (NOT x AND NOT y) AND NOT (x AND y)53 = NOT (NOT x AND NOT y) AND NOT (x AND y)
54 = NOT (NOT x AND NOT y) AND (NOT X OR NOT y)54 = NOT (NOT x AND NOT y) AND (NOT X OR NOT y)
55 = NOT (NOT (x OR y) OR (x AND y)) S6 = NOT ( (NOT x AND NOT y) OR (x AND y) )55 = NOT (NOT (x OR y) OR (x AND y)) S6 = NOT ((NOT x AND NOT y) OR (x AND y))
57 = NOT ( (NOT x AND NOT y) OR NOT (NOT x OR NOT y) )57 = NOT ((NOT x AND NOT y) OR NOT (NOT x OR NOT y))
58 = NOT (NOT (x OR y) OR NOT (NOT x OR NOT y) ) et avec des séquences d'opérations de remplacement de même durée d'exécution : S'1 = (x OR NOP y OR y) -AND NOP NOT (x AND NOP y AND y) S' 2 = (x OR y NOP OR y) AND NOP (NOT x OR NOP NOT y) S'3 = NOT (NOT X AND NOP NOT y) AND NOT (x AND y AND y) S'4 = NOT (NOT x AND NOP NOT y) AND (NOT x OR NOT y) S'5 = NO (NOT (x NOP OR y OR y) OR (x NOP AND y AND y) ) S'6 = NOT ( (NOT x AND NOT y NOP) OR (x AND y NOP AND y) ) S'7 = NOT ( (NOT x AND NOT y) OR NOT (NOT x OR NOT y) ) S'8 = NOT (NOT (x OR y OR y) OR NOT (NOT x OR NOT y) ) dans lesquelles l'instruction NOP correspond à une instruction non-opérative vis à vis du microprocesseur. Selon d'autres applications du procédé selon l'invention, l'opérateur à sécuriser est un opérateur mathématique tel qu'un demi-additionneur, un additionneur, un soustracteur ou un multiplicateur, ou un circuit fonctionnel analogue à un opérateur logique ou mathématique, tel qu'un circuit combinatoire, notamment un multiplexeur et/ou un démultiplexeur, un codeur et/ou un décodeur, un générateur et/ou détecteur de parité ou un comparateur.58 = NOT (NOT (x OR y) OR NOT (NOT x OR NOT y)) and with replacement operation sequences of the same execution time: S'1 = (x OR NOP y OR y) -AND NOP NOT (x AND NOP y AND y) S '2 = (x OR y NOP OR y) AND NOP (NOT x OR NOP NOT y) S'3 = NOT (NOT X AND NOP NOT y) AND NOT (x AND y AND y) S'4 = NOT (NOT x AND NOP NOT y) AND (NOT x OR NOT y) S'5 = NO (NOT (x NOP OR y OR y) OR (x NOP AND y AND y)) S'6 = NOT ((NOT x AND NOT y NOP) OR (x AND y NOP AND y)) S'7 = NOT ((NOT x AND NOT y) OR NOT (NOT x OR NOT y)) S'8 = NOT (NOT (x OR y OR y) OR NOT (NOT x OR NOT y)) in which the NOP instruction corresponds to a non-operative instruction with respect to the microprocessor. According to other applications of the method according to the invention, the operator to be secured is a mathematical operator such as a half-adder, an adder, a subtractor or a multiplier, or a functional circuit similar to a logical or mathematical operator, such as a combinational circuit, in particular a multiplexer and / or a demultiplexer, an encoder and / or a decoder, a generator and / or parity detector or a comparator.
En particulier selon une seconde application du procédé selon l'invention, l'opérateur est l'opérateur mathématique de la « multiplication par deux » obtenue par décalage à gauche d'un bit avec mise à zéro du bit de poids faible, la notation en C ANSI de cet opérateur s 'écrivant (X<<1) .In particular, according to a second application of the method according to the invention, the operator is the mathematical operator of the “multiplication by two” obtained by shifting to the left of a bit with zero setting of the least significant bit, the notation in C ANSI of this operator writing (X << 1).
L'invention concerne également, en ce qui a trait à la sécurisation de l'opérateur (X<<1) , les séquences de remplacement S''l à S' '4 équivalentes suivantes : S' '1 = (x ADD x)The invention also relates, with regard to securing the operator (X << 1), the following replacement sequences S''l to S '' 4 equivalent: S '' 1 = (x ADD x )
S' '2 = (x AND FOh) ADD x ADD (x AND OFh)S '' 2 = (x AND FOh) ADD x ADD (x AND OFh)
S ' ' 3 = (NOT ( (NOT x) ADD (NOT x) ) ) SUB 1S '' 3 = (NOT ((NOT x) ADD (NOT x))) SUB 1
S" 4 = (y ADD x) SUB (y SUB x) , dans lesquelles l'opérateur ADD est l'opérateur d'addition standard sur un octet, l'instruction SUB est l'opérateur de soustraction standard sur un octet et le suffixe « h » indique une valeur hexadécimale .S "4 = (y ADD x) SUB (y SUB x), in which the operator ADD is the standard addition operator on one byte, the instruction SUB is the standard subtraction operator on one byte and the suffix "h" indicates a hexadecimal value.
L'invention concerne également un module électronique à opérateur sécurisé et comportant au moins un microprocesseur et un programme à exécuter comportant au moins un opérateur logique ou mathématique ou un circuit fonctionnel analogue à sécuriser, le module étant caractérisé en ce qu'il comporte des moyens pour remplacer l'exécution de l'opérateur par l'exécution d'une séquence d'opérations ayant pour résultat final un résultat identique au résultat de la fonction de 1 ' opérateur .The invention also relates to an electronic module with secure operator and comprising at least one microprocessor and a program to be executed comprising at least one logical or mathematical operator or a similar functional circuit to be secured, the module being characterized in that it comprises means to replace the execution of the operator by the execution of a sequence of operations resulting in a result identical to the result of the operator's function.
Avantageusement le module électronique selon l'invention comporte des moyens de sélection de la séquence d'opérations à chaque appel de l'opérateur parmi un ensemble de séquences équivalentes . Selon une variante très intéressante le module comporte des moyens de traitement informatique pour déterminer le numéro d'ordre dans l'ensemble de la séquence choisie en fonction de certains paramètres du programme en cours d'exécution et/ou d'un paramètre aléatoire généré par un générateur de nombres pseudo-aléatoires .Advantageously, the electronic module according to the invention comprises means for selecting the sequence of operations each time the operator is called from among a set of equivalent sequences. According to a very interesting variant, the module includes computer processing means for determining the order number in the whole of the sequence chosen as a function of certain parameters of the program being executed and / or of a random parameter generated by a pseudo-random number generator.
L'invention concerne également un module électronique à opérateur sécurisé et comportant au moins un microprocesseur et un programme à exécuter comportant au moins un opérateur logique ou mathématique ou un circuit analogue à sécuriser, caractérisé en ce qu'il comporte les moyens matériels et/ou logiciels pour mettre en oeuvre le procédé selon l'invention présenté ci-avant.The invention also relates to an electronic module with a secure operator and comprising at least one microprocessor and a program to be executed comprising at least one logical or mathematical operator or a similar circuit to be secured, characterized in that it comprises the material means and / or software for implementing the method according to the invention presented above.
L'invention concerne également un système embarqué ou une carte à microcircuit comportant un module électronique à opérateur sécurisé tel que défini ci-avant dans ses différentes variantes.The invention also relates to an on-board system or a microcircuit card comprising an electronic module with a secure operator as defined above in its various variants.
D'autres buts, avantages et caractéristiques de 1 ' invention apparaîtront à la lecture de la description qui va suivre de la mise en oeuvre du procédé selon l'invention appliqué à la sécurisation de l'opérateur XOR et d'un mode de réalisation d'un module électronique à microprocesseur selon l'invention donnés à titre d'exemple non limitatif en référence aux dessins ci- annexés dans lesquels : la figure 1 montre une représentation schématique d'un mode de réalisation d'un module électronique à microprocesseur et à opérateur XOR sécurisé selon l'invention; et - la figure 2 montre une représentation schématique de 1 ' exécution équivalente de 1 ' opérateur XOR mettant en oeuvre le procédé selon l'invention dans le module de la figure 1.Other objects, advantages and characteristics of the invention will appear on reading the description which follows of the implementation of the method according to the invention applied to securing the operator XOR and of an embodiment of an electronic microprocessor module according to the invention given by way of nonlimiting example with reference to the attached drawings in which: FIG. 1 shows a schematic representation of an embodiment of an electronic module with microprocessor and secure XOR operator according to the invention; and FIG. 2 shows a schematic representation of the equivalent execution of the operator XOR implementing the method according to the invention in the module of FIG. 1.
Le module électronique monolithique 10 à microprocesseur illustré à la figure 1 selon la présente invention et décrit à titre d'exemple non limitatif comporte d'une façon générale un microprocesseur ou unité centrale CPU 11 relié de façon bidirectionnelle par un bus interne 12 à une mémoire vive RAM 14, une mémoire morte ROM 16, une mémoire EEPROM 18 et une interface entrée/sortie I/O 20. Le module 10 comporte également un minuteur TIMER 22 à réarmement automatique (en variante optionnelle) et un générateur de nombres pseudo-aléatoires GNPA 24 reliés au bus interne 12.The monolithic electronic module 10 with microprocessor illustrated in FIG. 1 according to the present invention and described by way of nonlimiting example generally comprises a microprocessor or central processing unit CPU 11 connected bidirectionally by an internal bus 12 to a memory RAM 14, ROM ROM 16, EEPROM 18 and I / O I / O interface 20. The module 10 also includes a TIMER timer 22 with automatic reset (optional option) and a pseudo-random number generator GNPA 24 connected to the internal bus 12.
Sont implantés en ROM 16 des programmes d'applications proprement dits tels que par exemple des applications de transactions sur carte bancaire ou des applications de transactions sur carte santé qui pour des raisons de confidentialité et de sécurité comportent des sous- programmes de cryptage/décryptage, d' authentification d'opérateur ou de validation de transaction dans lesquels l'opérateur XOR est fréquemment présent notamment pour réaliser des comparaisons octet par octet.Are implemented in ROM 16 actual application programs such as for example bank card transaction applications or health card transaction applications which for reasons of confidentiality and security include encryption / decryption subroutines, operator authentication or transaction validation in which the XOR operator is frequently present, in particular to perform byte by byte comparisons.
En ce qui concerne l'exécution de l'opérateur XOR, cet opérateur très communément utilisé fait en général partie du jeu d'instructions arithmétiques à deux opérandes (OPl et 0P2) de l'unité centrale CPU ou microprocesseur 11. Dans le mode de réalisation ici décrit les moyens de mise en oeuvre du procédé de sécurisation de l'opérateur XOR sont principalement logiciels sous la forme d'une routine de calcul de XOR sécurisé (ou routine XORSEC) présentée schématiquement à la figure 2. Ainsi à chaque appel de l'instruction XOR (OP1, OP2 ) le programme est dérouté avec les deux opérandes OP1 et OP2 vers la routine XORSEC qui sera exécutée en lieu et place de l'instruction XOR, étant entendu que 1 ' exécution de la routine XORSEC réalise une fonction équivalente à celle de l'instruction XOR d'origine.With regard to the execution of the operator XOR, this very commonly used operator is generally part of the set of arithmetic instructions with two operands (OPl and 0P2) of the central unit CPU or microprocessor 11. In the embodiment described here, the means for implementing the method for securing the operator XOR are mainly software in the form of a routine for calculating secure XOR (or XORSEC routine) presented diagrammatically in FIG. 2. Thus at each call of the instruction XOR (OP1, OP2) the program is diverted with the two operands OP1 and OP2 towards the routine XORSEC which will be executed in place of the instruction XOR, it being understood that the execution of the routine XORSEC performs a function equivalent to that of the original XOR instruction.
Selon la caractéristique principale de l'invention l'exécution de l'instruction XOR est remplacée dans la routine XORSEC par l'exécution d'une séquence d'opérations, en l'espèce mais non nécessairement des opérations d'un degré de complexité inférieur comme par exemple des opérations élémentaires, ayant pour résultat final un résultat identique au résultat de la fonction de l'opérateur XOR (condition aisément vérifiée entre autres par des tables de vérité à sorties identiques) .According to the main characteristic of the invention, the execution of the XOR instruction is replaced in the XORSEC routine by the execution of a sequence of operations, in this case but not necessarily operations of a lower degree of complexity as for example elementary operations, having for final result a result identical to the result of the function of the operator XOR (condition easily verified among others by truth tables with identical outputs).
A titre d'exemples non limitatifs un jeu de huit séquences SI à S8 équivalentes à l'instruction XOR est donné ci-dessous :By way of nonlimiting examples, a set of eight sequences SI to S8 equivalent to the instruction XOR is given below:
51 = (x OR y) AND NOT (x AND y)51 = (x OR y) AND NOT (x AND y)
52 = (x OR y) AND (NOT x OR NOT y)52 = (x OR y) AND (NOT x OR NOT y)
53 = NOT (NOT x AND NOT y) AND NOT (x AND y) S4 = NOT (NOT x AND NOT y) AND (NOT x OR NOT y)53 = NOT (NOT x AND NOT y) AND NOT (x AND y) S4 = NOT (NOT x AND NOT y) AND (NOT x OR NOT y)
55 = NO (NOT (x OR y) OR (x AND y))55 = NO (NOT (x OR y) OR (x AND y))
56 = NOT ( (NOT x AND NOT y) OR (x AND y) )56 = NOT ((NOT x AND NOT y) OR (x AND y))
57 = NOT ( (NOT x AND NOT y) OR NOT (NOT x OR NOT y) )57 = NOT ((NOT x AND NOT y) OR NOT (NOT x OR NOT y))
58 = NOT (NOT (x OR y) OR NOT (NOT x OR NOT y) ) On remarquera que toutes ces séquences Si à S8 sont basées sur l'utilisation d'au moins deux des trois instructions logiques élémentaires AND (ou ET) , NOT (ou NON) et OR (ou OU) et présentent la même sortie de table de vérité que pour l'instruction XOR.58 = NOT (NOT (x OR y) OR NOT (NOT x OR NOT y)) It will be noted that all these sequences Si to S8 are based on the use of at least two of the three elementary logic instructions AND (or AND), NOT (or NOT) and OR (or OR) and have the same output from the table of truth only for the XOR instruction.
En utilisant la présentation classique des tables de vérité à deux entrées x, y et une sortie s, on peut écrire pour les opérateurs XOR, AND et OR et pour la séquence S5 (choisie à titre d'exemple non limitatif) les quatre tables de vérités suivantes:Using the classic presentation of truth tables with two inputs x, y and one output s, we can write for the operators XOR, AND and OR and for the sequence S5 (chosen by way of nonlimiting example) the four tables of following truths:
XOR AND OR x y s i [XOR) x y s ι [AND) x y s (OR)XOR AND OR x y s i [XOR) x y s ι [AND) x y s (OR)
0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0
0 1 1 0 1 0 0 1 10 1 1 0 1 0 0 1 1
1 0 1 1 0 0 1 0 11 0 1 1 0 0 1 0 1
1 1 0 1 1 1 1 1 11 1 0 1 1 1 1 1 1
et pour S5 = NOT (NOT (x OR y) OR (x AND y)) avec A = (x OR y) , B= NOT A, C= (x AND y) D = (NOT(x OR y) OR (x AND y) = B OR C, et S(S5) = E = NOT Dand for S5 = NOT (NOT (x OR y) OR (x AND y)) with A = (x OR y), B = NOT A, C = (x AND y) D = (NOT (x OR y) OR (x AND y) = B OR C, and S (S5) = E = NOT D
x y A B C D Ex y A B C D E
0 0 0 1 0 1 00 0 0 1 0 1 0
0 1 1 0 0 0 10 1 1 0 0 0 1
1 0 1 0 0 0 11 0 1 0 0 0 1
1 1 1 0 1 1 01 1 1 0 1 1 0
On vérifie ainsi que s(S5) = E est identique à s (XOR)We thus verify that s (S5) = E is identical to s (XOR)
On remarquera que la séquence S5 choisie d'office pour remplacer 1 ' opérateur XOR se compose de cinq opérations élémentaires dont la signature sera très différente de l'opérateur XOR. On réalise ainsi la variante la plus simple de mise en oeuvre du procédé selon l'invention. Selon une caractéristique optionnelle de l'invention, mais très avantageuse, utilisée dans le mode de réalisation ici décrit la séquence d'opérations de remplacement est déterminée à chaque appel de l'opérateur XOR parmi l'ensemble de séquences équivalentes, en l'espèce l'ensemble ES constitué par les huit séquences SI à S8 données ci-dessus. Ainsi la difficulté de l'identification de l'opérateur XOR est encore accrue par les multiples changements de la séquence d'opérations remplaçante de l'opérateur XOR au cours de l'exécution du programme, les séquences SI à S8 susceptibles d'être utilisées présentant toutes des signatures différentes.It will be noted that the sequence S5 automatically chosen to replace the operator XOR consists of five elementary operations whose signature will be very different from the operator XOR. The simplest variant for implementing the method according to the invention is thus produced. According to an optional feature of the invention, but very advantageous, used in the embodiment described here, the sequence of replacement operations is determined each time the XOR operator is called from among the set of equivalent sequences, in this case the set ES constituted by the eight sequences S1 to S8 given above. Thus the difficulty of identifying the operator XOR is further increased by the multiple changes in the sequence of operations replacing the operator XOR during the execution of the program, the sequences SI to S8 likely to be used. all with different signatures.
Selon une autre caractéristique optionnelle de l'invention, mais également très avantageuse, utilisée dans le mode de réalisation ici décrit, le numéro d'ordre NDO = i (i allant de 1 à 8) dans son ensemble (SI à S8) de la séquence Si choisie pour être exécutée est déterminé en fonction de certains paramètres du programme en cours d'exécution et/ou d'un paramètre aléatoire. Avantageusement ledit paramètre aléatoire est obtenu à partir d'un générateur de nombres pseudo-aléatoires. Ce mécanisme de brouillage des séquences rendant aléatoire la séquence effectivement choisie pour remplacer l'opérateur XOR à chaque appel s'avère très efficace, surtout dans un traitement de cryptage/décryptage lorsque l'opérateur XOR est appelé plusieurs fois dans le programme .According to another optional feature of the invention, but also very advantageous, used in the embodiment described here, the sequence number NDO = i (i ranging from 1 to 8) as a whole (SI to S8) of the sequence If chosen to be executed is determined according to certain parameters of the program being executed and / or a random parameter. Advantageously, said random parameter is obtained from a generator of pseudo-random numbers. This sequence scrambling mechanism making the sequence actually chosen to replace the XOR operator random at each call is very effective, especially in an encryption / decryption processing when the XOR operator is called several times in the program.
Ainsi telle qu'illustrée à la figure 2 la routine XORSEC comporte quatre phases de traitement principales, à savoir dans l'ordre d'exécution :Thus as illustrated in FIG. 2, the XORSEC routine comprises four main processing phases, namely in the order of execution:
- une phase d'entrée ou d'initialisation IN-XORSEC, avec notamment la mémorisation des valeurs compteur de programme, et des opérandes OPl et OP2 , - une phase CAL-NDO de détermination par le calcul du numéro d'ordre NDO = i (i allant de 1 à 8) de la séquence d'opérations Si à exécuter en remplacement de l'instruction XOR avec branchement vers la sous-routine CAL-XORSEC (i) correspondante et présente dans l'ensemble CAL-XORSEC des huit sous-routines CAL-XORSEC ( 1 ) à CAL- XORSEC ( 8) ,- an IN-XORSEC input or initialization phase, with in particular the memorization of the program counter values, and of the operands OP1 and OP2, - a CAL-NDO phase of determination by the calculation of the sequence number NDO = i (i ranging from 1 to 8) of the sequence of operations Si to be executed in replacement of the instruction XOR with connection to the subroutine CAL-XORSEC (i) corresponding and present in the CAL-XORSEC set of the eight CAL-XORSEC (1) to CAL- XORSEC (8) subroutines,
- une phase CAL-XORSEC ( i ) d'exécution de la sous-routine CAL-XORSEC ( i) par calcul logique avec les opérandes OPl et OP2 de la séquence d'opérations Si sélectionnée par la phase CAL_NDO,- a phase CAL-XORSEC (i) of execution of the subroutine CAL-XORSEC (i) by logical calculation with the operands OPl and OP2 of the sequence of operations If selected by the phase CAL_NDO,
- une phase OUT-XORSEC de retour au programme principal pour reprise de son exécution et transfert des résultats de la phase CAL-XORSEC (i) équivalant au calcul d'un XOR entre les deux opérandes OPl et OP2.- an OUT-XORSEC phase of return to the main program for resumption of its execution and transfer of the results of the CAL-XORSEC phase (i) equivalent to the calculation of an XOR between the two operands OP1 and OP2.
On notera que pour la phase CAL-NDO, le générateur GNPA aléatoire 24 fournit sur demande un octet aléatoire R utilisé comme paramètre de calcul seul ou avec d'autres paramètres extraits des valeurs des opérandes OPl et OP2 , le calcul ayant pour résultat final un octet F(R) . De cet octet on extrait en utilisant par exemple une opération du type NOD = i = F(R) AND 07h les trois bits de poids faible pour obtenir la valeur binaire de NOD = i (de 000 à 111 soit OOh à 07h) , numéro d'ordre de la séquence Si à exécuter. Il est à noter que la valeur du numéro d'ordre est une donnée sensible de l'algorithme considéré.It will be noted that for the CAL-NDO phase, the random GNPA generator 24 supplies on request a random byte R used as a calculation parameter alone or with other parameters extracted from the values of the operands OP1 and OP2, the calculation having as final result a byte F (R). From this byte, using, for example, an operation of the NOD = i = F (R) AND 07h type, extract the three least significant bits to obtain the binary value of NOD = i (from 000 to 111 or OOh at 07h), number order of the Si sequence to execute. It should be noted that the value of the sequence number is a sensitive datum of the algorithm considered.
Pour terminer, la routine XORSEC présente une autre variante encore améliorée en ce qui concerne la difficulté d'identification dans laquelle l'ensemble des séquences de remplacement est constitué de séquences de même durée d'exécution (et de ce fait plus difficile à distinguer) . Pour ce faire certaines séquences comportent au moins une instruction non-opérative destinée à introduire un temps de retard dans l'exécution des séquences concernées. En particulier l'instruction non- opérative est choisie parmi des instructions non- opératives vis à vis du microprocesseur ou parmi des instructions normalement opératives mais rendues sans effet par leurs positions dans la séquence d'opérations.Finally, the XORSEC routine presents another still improved variant with regard to the difficulty of identification in which the set of replacement sequences consists of sequences of the same duration of execution (and therefore more difficult to distinguish). . To do this, certain sequences include at least one non-operative instruction intended to introduce a delay time in the execution of the sequences concerned. In particular, the non-operative instruction is chosen from non-operative instructions with respect to the microprocessor or from instructions normally operative but rendered ineffective by their positions in the sequence of operations.
Si l'on considère que les opérations élémentaires AND, OR et NOT ont des durées d'exécution sensiblement égales (par exemple 4 temps de cycle de l'horloge de l'unité centrale CPU 11), comme pour l'opération « blanche » non- opérative NOP, l'ensemble ES des séquences SI à S8 est modifié en un nouvel ensemble de séquences uniformisées à 9 opérations ES' s 'écrivant à titre d'exemple non limitatif comme il suit (et dans lequel les opérations ajoutées apparaissent en gras) :If we consider that the elementary operations AND, OR and NOT have substantially equal execution times (for example 4 cycle times of the clock of the central unit CPU 11), as for the “white” operation nonoperative NOP, the set ES of sequences SI to S8 is modified into a new set of standardized sequences with 9 operations ES 'written as a nonlimiting example as follows (and in which the added operations appear in bold):
S'1 = (x OR NOP y OR y) AND NOP NOT (x AND NOP y AND y)S'1 = (x OR NOP y OR y) AND NOP NOT (x AND NOP y AND y)
S' 2 = (x OR y NOP OR y) AND NOP (NOT x OR NOP NOT y)S '2 = (x OR y NOP OR y) AND NOP (NOT x OR NOP NOT y)
S' 3 = NOT (NOT x AND NOP NOT y) AND NOT (x AND y AND y) S'4 = NOT (NOT x AND NOP NOT y) AND (NOT x OR NOT y)S '3 = NOT (NOT x AND NOP NOT y) AND NOT (x AND y AND y) S'4 = NOT (NOT x AND NOP NOT y) AND (NOT x OR NOT y)
S'5 = NOT (NOT (x NOP OR y OR y) OR (x NOP AND y AND y) ) S'6 = NOT ( (NOT x AND NOT y NOP) OR (x AND y NOP AND y) ) S'7 = NOT ( (NOT x AND NOT y) OR NOT (NOT x OR NOT y) ) S'8 = NOT (NOT (x OR y OR y) OR NOT (NOT x OR NOT y) )S'5 = NOT (NOT (x NOP OR y OR y) OR (x NOP AND y AND y)) S'6 = NOT ((NOT x AND NOT y NOP) OR (x AND y NOP AND y)) S '7 = NOT ((NOT x AND NOT y) OR NOT (NOT x OR NOT y)) S'8 = NOT (NOT (x OR y OR y) OR NOT (NOT x OR NOT y))
Par exemple, pour la séquence S'5:For example, for the sequence S'5:
S'5 = NOT (NOT (x NOP OR y OR y) OR (x NOP AND y AND y)) avec x'= x NOP, A = (x' OR y) , A#= A OR y , B= NOT A', C= (x' AND y) , C = C AND y, D = B OR C et s (S" 5) = E = NOT DS'5 = NOT (NOT (x NOP OR y OR y) OR (x NOP AND y AND y)) with x '= x NOP, A = (x' OR y), A # = A OR y, B = NOT A ', C = (x' AND y), C = C AND y, D = B OR C and s (S "5) = E = NOT D
On peut écrire la table vérité de la séquence S'5 qui vérifie également s (S'5) ≈ s (XOR)We can write the truth table of the sequence S'5 which also checks s (S'5) ≈ s (XOR)
S ' 5 x y x' A A' B C c D ES '5 x y x' A A 'B C c D E
0 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 10 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 1 1
1 0 1 1 1 0 0 0 0 11 0 1 1 1 0 0 0 0 1 1
1 1 1 1 1 0 1 1 1 01 1 1 1 1 0 1 1 1 0
On remarquera que pour des séquences à neuf opérations élémentaires le temps machine reste très raisonnable.It will be noted that for sequences with nine elementary operations the machine time remains very reasonable.
L'invention n'est pas limitée à son application à la sécurisation d'opérateurs logiques mais est également applicable à la sécurisation d'opérateurs mathématiques tels que les demi-additionneurs, les additionneurs, les soustracteurs et les multiplicateurs ou de circuits fonctionnels analogues aux opérateurs logiques ou mathématiques, tels des circuits combinatoires, notamment des multiplexeurs et/ou des démultiplexeurs, des codeurs et/ou des décodeurs, des générateurs et/ou des détecteurs de parité ou des comparateurs.The invention is not limited to its application to the securing of logical operators but is also applicable to the securing of mathematical operators such as half-adders, adders, subtractors and multipliers or of functional circuits similar to logical or mathematical operators, such as combinational circuits, in particular multiplexers and / or demultiplexers, coders and / or decoders, generators and / or parity detectors or comparators.
Par exemple selon une autre application du procédé selon l'invention l'opérateur à sécuriser est l'opérateur mathématique de la « multiplication par deux » obtenue par décalage à gauche d'un bit avec mise à zéro du bit de poids faible. En notation C ANSI, cet opérateur est également désigné (X<<1) .For example, according to another application of the method according to the invention, the operator to be secured is the mathematical operator of the “multiplication by two” obtained by shifting a bit to the left with the least significant bit set to zero. In C ANSI notation, this operator is also designated (X << 1).
Ainsi à chaque appel de l'opérateur (X<<1), son exécution sera remplacée par l'exécution d'une séquence d'opérations choisie parmi les séquences équivalentes suivantes : S' '1 = (x ADD x)Thus each time the operator is called (X << 1), its execution will be replaced by the execution of a sequence of operations chosen from the following equivalent sequences: S '' 1 = (x ADD x)
S' '2 = (x AND FOh) ADD x ADD (x AND OFh)S '' 2 = (x AND FOh) ADD x ADD (x AND OFh)
S" 3 = (NOT ((NOT x) ADD (NOT x) ) ) SUB 1S "3 = (NOT ((NOT x) ADD (NOT x))) SUB 1
S" 4 = (y ADD x) SUB (y SUB x) , dans lesquelles l'opérateur ADD est l'opérateur d'addition standard sur un octet, l'instruction SUB est l'opérateur de soustraction standard sur un octet et le suffixe « h » indique une valeur hexadécimale. D'une façon générale, le choix de la séquence équivalente S''i et sa mise en oeuvre sont réalisés de façon analogue, parfois identique, à ce qui a été décrit en détails ci- avant pour l'opérateur XOR.S "4 = (y ADD x) SUB (y SUB x), in which the operator ADD is the standard addition operator on one byte, the instruction SUB is the standard subtraction operator on one byte and the suffix "h" indicates a hexadecimal value. In general, the choice of the equivalent sequence S''i and its implementation are carried out in a similar manner, sometimes identical, to what has been described in detail above for the operator XOR.
On notera également que sans sortir du cadre de l'invention, la carte à puce accueillant le module électronique à opérateur sécurisé selon l'invention peut être remplacée par tout autre système embarqué.It will also be noted that without departing from the scope of the invention, the smart card accommodating the electronic module with secure operator according to the invention can be replaced by any other on-board system.
Une forme de réalisation de l'invention est maintenant présentée dans sa mise en œuvre au moyen d'un module électronique. Le procédé de sécurisation d'un opérateur logique ou mathématique ou d'un circuit fonctionnel analogue utilisable dans l'exécution d'un programme dans un module électronique comprenant un microprocesseur et une mémoire, est caractérisé en ce que l'exécution dudit opérateur par le microprocesseur est remplacée par l'exécution d'une séquence d'opérations de remplacement ayant pour résultat final un résultat identique au résultat de la fonction dudit opérateur, ledit résultat étant mémorisé dans la mémoire. Le module électronique à opérateur sécurisé et comportant au moins un microprocesseur et une mémoire, et la mémoire stockant un programme à exécuter comportant au moins un opérateur logique ou mathématique ou un circuit fonctionnel analogue à sécuriser, est caractérisé en ce qu'il comporte des moyens pour remplacer l'exécution de l'opérateur au moyen du microprocesseur par l'exécution d'une séquence d'opérations ayant pour résultat final un résultat identique au résultat de la fonction de l'opérateur, ledit résultat étant mémorisé dans la mémoire . An embodiment of the invention is now presented in its implementation by means of an electronic module. The method for securing a logical or mathematical operator or a similar functional circuit usable in the execution of a program in an electronic module comprising a microprocessor and a memory, is characterized in that the execution of said operator by the microprocessor is replaced by the execution of a sequence of replacement operations resulting in a result identical to the result of the function of said operator, said result being stored in the memory. The electronic module with secure operator and comprising at least a microprocessor and a memory, and the memory storing a program to be executed comprising at least one logical or mathematical operator or a similar functional circuit to be secured, is characterized in that it comprises means to replace the execution of the operator by means of the microprocessor by the execution of a sequence of operations having as final result a result identical to the result of the function of the operator, said result being stored in the memory.

Claims

REVENDICATIONS : CLAIMS:
1. Procédé de sécurisation d'un opérateur logique ou mathématique ou d'un circuit fonctionnel analogue utilisable dans l'exécution d'un programme dans un module électronique (10) à microprocesseur, le procédé étant caractérisé en ce que l'exécution dudit opérateur est remplacée par l'exécution d'une séquence d'opérations de remplacement ayant pour résultat final un résultat identique au résultat de la fonction dudit opérateur.1. Method for securing a logical or mathematical operator or a similar functional circuit usable in the execution of a program in an electronic module (10) with microprocessor, the method being characterized in that the execution of said operator is replaced by the execution of a sequence of replacement operations resulting in a result identical to the result of the function of said operator.
2. Procédé selon la revendication 1 caractérisé en ce que ladite séquence d'opérations de remplacement est choisie à chaque appel dudit opérateur parmi un ensemble de séquences équivalentes .2. Method according to claim 1 characterized in that said sequence of replacement operations is chosen each time said operator is called from a set of equivalent sequences.
3. Procédé selon la revendication 2 caractérisé en ce que le numéro d'ordre dans ledit ensemble de la séquence choisie est déterminé en fonction de certains paramètres du programme en cours d'exécution et/ou d'un paramètre aléatoire obtenu à partir d'un générateur de nombres pseudo-aléatoires (24) .3. Method according to claim 2 characterized in that the sequence number in said set of the chosen sequence is determined as a function of certain parameters of the running program and / or of a random parameter obtained from a pseudo-random number generator (24).
4. Procédé selon la revendication 2 caractérisé en ce que certaines séquences comportent au moins une instruction non-opérative destinée à introduire un temps de retard dans l'exécution des séquences concernées, ladite instruction non-opérative étant choisie parmi des instructions non-opératives vis à vis du microprocesseur (11) ou parmi des instructions normalement opératives mais rendues sans effet par leurs positions dans la séquence d' opérations .4. Method according to claim 2 characterized in that certain sequences comprise at least one non-operative instruction intended to introduce a delay time in the execution of the sequences concerned, said non-operative instruction being chosen from non-operative instructions vis with respect to the microprocessor (11) or among instructions normally operative but rendered ineffective by their positions in the sequence of operations.
5. Procédé selon la revendication 2 caractérisé en ce qu'au moins une séquence d'opérations de remplacement est composée à partir d'opérateurs logiques élémentaires. 5. Method according to claim 2 characterized in that at least one sequence of replacement operations is composed from elementary logical operators.
6. Procédé selon la revendication 5 caractérisé en ce qu'au moins une séquence d'opérations de remplacement est composée à partir des opérateurs logiques élémentaires AND ou ET, OR ou OU et NOT ou NON.6. Method according to claim 5 characterized in that at least one sequence of replacement operations is composed from elementary logical operators AND or AND, OR or OR and NOT or NO.
7. Module électronique (10) comportant au moins un microprocesseur (11) et un programme à exécuter comportant au moins un opérateur logique ou mathématique ou un circuit fonctionnel analogue à sécuriser, le module étant caractérisé en ce qu'il comporte des moyens pour remplacer l'exécution dudit opérateur par l'exécution d'une séquence d'opérations ayant pour résultat final un résultat identique au résultat de la fonction dudit opérateur .7. Electronic module (10) comprising at least one microprocessor (11) and a program to be executed comprising at least one logical or mathematical operator or a similar functional circuit to be secured, the module being characterized in that it includes means for replacing the execution of said operator by the execution of a sequence of operations having as final result a result identical to the result of the function of said operator.
8. Module électronique (10) selon la revendication 7 caractérisé en ce qu'il comporte des moyens de sélection de ladite séquence d'opérations à chaque appel dudit opérateur parmi un ensemble de séquences équivalentes.8. Electronic module (10) according to claim 7 characterized in that it comprises means for selecting said sequence of operations on each call of said operator from a set of equivalent sequences.
9. Module électronique (10) selon la revendication 8 caractérisé en ce qu'il comporte des moyens de traitement informatique pour déterminer le numéro d'ordre dans ledit ensemble de la séquence choisie en fonction de certains paramètres du programme en cours d'exécution et/ou d'un paramètre aléatoire généré par un générateur de nombres pseudo-aléatoires (24) .9. Electronic module (10) according to claim 8 characterized in that it includes computer processing means for determining the sequence number in said set of the sequence chosen as a function of certain parameters of the program being executed and / or a random parameter generated by a pseudo-random number generator (24).
10. Système embarqué caractérisé en qu'il comporte un module électronique (10) selon la revendication 7. 10. On-board system characterized in that it comprises an electronic module (10) according to claim 7.
EP01989651A 2000-12-21 2001-12-20 Method for making secure a logical or mathematical operator in a microprocessor-based electronic module Ceased EP1346271A1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
FR0016723 2000-12-21
FR0016723A FR2818772A1 (en) 2000-12-21 2000-12-21 METHOD OF SECURING A LOGIC OR MATHEMATICAL OPERATOR IMPLANTED IN A MICROPROCESSOR ELECTRONIC MODULE, AND THE ASSOCIATED ELECTRONIC MODULE AND THE ON-LINE SYSTEM
PCT/FR2001/004124 WO2002050641A1 (en) 2000-12-21 2001-12-20 Method for making secure a logical or mathematical operator in a microprocessor-based electronic module

Publications (1)

Publication Number Publication Date
EP1346271A1 true EP1346271A1 (en) 2003-09-24

Family

ID=8857968

Family Applications (1)

Application Number Title Priority Date Filing Date
EP01989651A Ceased EP1346271A1 (en) 2000-12-21 2001-12-20 Method for making secure a logical or mathematical operator in a microprocessor-based electronic module

Country Status (6)

Country Link
EP (1) EP1346271A1 (en)
CN (1) CN100470438C (en)
AU (1) AU2002228116A1 (en)
FR (1) FR2818772A1 (en)
MX (1) MXPA03005710A (en)
WO (1) WO2002050641A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10310781A1 (en) * 2003-03-12 2004-09-30 Infineon Technologies Ag Method for operating a microprocessor and a microprocessor arrangement
EP1986122A1 (en) 2007-04-23 2008-10-29 Stmicroelectronics Sa Secure processing unit
CN102298653B (en) * 2010-06-25 2015-07-22 北京国电智深控制技术有限公司 Method and device for configuring algorithm execution sequence number
FR2969787B1 (en) * 2010-12-24 2013-01-18 Morpho APPLE PROTECTION
ITTO20111229A1 (en) * 2011-12-29 2013-06-30 Milano Politecnico PROCEDURE AND SYSTEM TO PROTECT ELECTRONIC DEVICES, ITS COMPUTER PRODUCT
US10142099B2 (en) 2013-01-11 2018-11-27 Qualcomm Incorporated Method and apparatus for a computable, large, variable and secure substitution box

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998052319A1 (en) * 1997-05-12 1998-11-19 Yeda Research And Development Co. Ltd. Improved method and apparatus for protecting public key schemes from timing and fault attacks
WO1999001815A1 (en) * 1997-06-09 1999-01-14 Intertrust, Incorporated Obfuscation techniques for enhancing software security
WO2001031436A1 (en) * 1999-10-28 2001-05-03 Bull Cp8 Security method for a cryptographic electronic assembly based on modular exponentiation against analytical attacks

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2638869B1 (en) * 1988-11-10 1990-12-21 Sgs Thomson Microelectronics SECURITY DEVICE AGAINST UNAUTHORIZED DETECTION OF PROTECTED DATA
US5493240A (en) * 1995-03-01 1996-02-20 International Business Machines Corporation Static combinatorial logic circuits for reversible computation
FR2745924B1 (en) * 1996-03-07 1998-12-11 Bull Cp8 IMPROVED INTEGRATED CIRCUIT AND METHOD FOR USING SUCH AN INTEGRATED CIRCUIT
CN2266754Y (en) * 1996-05-07 1997-11-05 路丹阳 Finger-print information antifake credit card
FI104937B (en) * 1997-01-27 2000-04-28 Sonera Oyj A subscriber identity module, a mobile station and a method for performing a smart card operation
CA2258338C (en) * 1999-01-11 2009-02-24 Certicom Corp. Method and apparatus for minimizing differential power attacks on processors

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998052319A1 (en) * 1997-05-12 1998-11-19 Yeda Research And Development Co. Ltd. Improved method and apparatus for protecting public key schemes from timing and fault attacks
WO1999001815A1 (en) * 1997-06-09 1999-01-14 Intertrust, Incorporated Obfuscation techniques for enhancing software security
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 (1)

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

Also Published As

Publication number Publication date
WO2002050641A1 (en) 2002-06-27
AU2002228116A1 (en) 2002-07-01
FR2818772A1 (en) 2002-06-28
MXPA03005710A (en) 2004-11-12
CN100470438C (en) 2009-03-18
CN1488091A (en) 2004-04-07

Similar Documents

Publication Publication Date Title
WO2001095274A1 (en) Method for making secure the pre-initialising phase of a silicon chip integrated system, in particular a smart card and integrated system therefor
CA2957774C (en) Process for securing and verifying a document
EP0720098B1 (en) Apparatus for securing information systems organised around microprocessors
WO2012085482A1 (en) Protection of applets against hidden-channel analyses
EP1346271A1 (en) Method for making secure a logical or mathematical operator in a microprocessor-based electronic module
Asthana et al. A novel biometric crypto system based on cryptographic key binding with user biometrics
EP1715410B1 (en) Protection of a calculation performed by an integrated circuit
WO2004046017A2 (en) Integer division method against covert channel attacks
EP3283968B1 (en) Method for sharing a memory between at least two functional entities
FR2792141A1 (en) METHOD FOR SECURING ONE OR MORE ELECTRONIC ASSEMBLIES IMPLEMENTING A SAME CRYPTOGRAPHIC ALGORITHM WITH SECRET KEY, A USE OF THE PROCEDURE AND THE ELECTRONIC ASSEMBLY
EP1279141B1 (en) Countermeasure method in a microcircuit, microcircuit therefor and smart card comprising said microcircuit
FR2843506A1 (en) Universal calculation method for application to the points of an ellipse and for use in cryptography, wherein an elliptic curve is represented as a quadratic equation and identical programmed calculations are implemented
FR2804225A1 (en) Algorithm of module exponentiation for protecting against decoding public key by producing variable i from 0 to k-1, which is the binary representation of lower weight Y(O) toward of larger weight bit Y(k-1)
EP2521063A1 (en) Protection of a volatile memory against viruses by changing instructions
CA2988357A1 (en) Encryption method, corresponding encryption method, devices and programs
WO2003023725A1 (en) Authentication protocol with memory integrity verification
WO2011151545A1 (en) Method of compressing and decompressing an executable or interpretable program
EP1770524A2 (en) Detection of sequence errors in a program execution
US20080016583A1 (en) Method for Protecting a Logic or Mathematical operator Installed in an Electronic Module with a Microprocessor, as well as the Associated Embarked Electronic Module and the System
WO2002099624A1 (en) Method for making secure computation of an exponentiation in an electronic device
FR2831739A1 (en) METHOD FOR THE SECURE IMPLEMENTATION OF A FUNCTIONAL MODULE IN AN ELECTRONIC COMPONENT AND CORRESPONDING COMPONENT
WO2008152302A2 (en) Obtaining derived values depending on a secret master value
EP1949292A1 (en) Method for securely handling data during the running of cryptographic algorithms on embedded systems
CA2988357C (en) Encryption method, corresponding encryption method, devices and programs
WO2009083371A1 (en) Method for securing a conditional connection, information carrier, software, secured system, and security processor for said method

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

AK Designated contracting states

Kind code of ref document: A1

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

AX Request for extension of the european patent

Extension state: AL LT LV MK RO SI

17Q First examination report despatched

Effective date: 20071213

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

Free format text: STATUS: THE APPLICATION HAS BEEN REFUSED

18R Application refused

Effective date: 20100110