WO2007006887A1 - Protection against attacks by generating errors on jump instructions - Google Patents
Protection against attacks by generating errors on jump instructions Download PDFInfo
- Publication number
- WO2007006887A1 WO2007006887A1 PCT/FR2006/001519 FR2006001519W WO2007006887A1 WO 2007006887 A1 WO2007006887 A1 WO 2007006887A1 FR 2006001519 W FR2006001519 W FR 2006001519W WO 2007006887 A1 WO2007006887 A1 WO 2007006887A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- program
- instruction
- jump
- security action
- securing
- Prior art date
Links
- 238000000034 method Methods 0.000 claims abstract description 27
- 238000004590 computer program Methods 0.000 claims description 12
- 230000000694 effects Effects 0.000 claims description 4
- 238000003780 insertion Methods 0.000 claims description 4
- 230000037431 insertion Effects 0.000 claims description 4
- 230000002028 premature Effects 0.000 claims description 3
- 238000012986 modification Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 238000012795 verification Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 229910004383 CaII Inorganic materials 0.000 description 1
- BHPQYMZQTOCNFJ-UHFFFAOYSA-N Calcium cation Chemical compound [Ca+2] BHPQYMZQTOCNFJ-UHFFFAOYSA-N 0.000 description 1
- 206010028403 Mutism Diseases 0.000 description 1
- 230000006378 damage Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000005672 electromagnetic field Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07F—COIN-FREED OR LIKE APPARATUS
- G07F7/00—Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
- G07F7/08—Mechanisms 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/0806—Details of the card
- G07F7/0813—Specific details related to card security
- G07F7/082—Features insuring the integrity of the data on or in the card
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
- G06F21/34—User authentication involving the use of external additional devices, e.g. dongles or smart cards
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/3005—Arrangements for executing specific machine instructions to perform operations for flow control
- G06F9/30054—Unconditional branch instructions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/34—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
- G06Q20/341—Active cards, i.e. cards including their own processing means, e.g. including an IC or chip
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/34—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
- G06Q20/355—Personalisation of cards for use
- G06Q20/3558—Preliminary personalisation for transfer to user
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/34—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
- G06Q20/357—Cards having a plurality of specified features
- G06Q20/3576—Multiple memory zones on card
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07F—COIN-FREED OR LIKE APPARATUS
- G07F7/00—Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
- G07F7/08—Mechanisms 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/10—Mechanisms 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 together with a coded signal, e.g. in the form of personal identification information, like personal identification number [PIN] or biometric data
- G07F7/1008—Active credit-cards provided with means to personalise their use, e.g. with PIN-introduction/comparison system
Definitions
- the present invention relates to a method for securing a computer program and to a device, in particular a microcircuit card (also called a "smart card”) implementing such a method.
- a device for generating the security of a program associated with this method.
- the present invention aims in particular securing calls and jumps to pieces of programs having critical functions for the security of the system.
- any program whatever the computer language and storage means used.
- the computer program can be written in machine language, assembler, C, C ++, Java.
- the program can be stored in a permanent memory, for example in a ROM or EEPROM memory, Flash or on a hard disk, or in a volatile memory, for example of the RAM type.
- the present invention aims, in particular, to protect against attacks intended to modify the execution of the execution of a computer program running on a secure electronic entity, (for example, a microcircuit card, a secure PCMCIA card (for example an IBM4758 card), a USB key or a passport (or other piece of identification) integrating a chip with a contactless interface in at least one of its pages).
- a secure electronic entity for example, a microcircuit card, a secure PCMCIA card (for example an IBM4758 card), a USB key or a passport (or other piece of identification) integrating a chip with a contactless interface in at least one of its pages).
- the fault generation attacks are intended, in particular, to force a processor to not, or poorly, perform certain instructions of a computer program.
- the attacked computer program can then proceed in a very different way from the one planned at the time of its conception.
- Such attacks are particularly active on certain instructions of a program, in particular because of the instructions of jump or connections.
- the branching instructions are for example the "if", "case” instructions, in the C language.
- the compilation of such connection instructions in assembly language produces a conditional or unconditional jump instruction to an address or an address. instruction of the program to be achieved.
- the instruction to be reached is identified by a label in an assembly program.
- the conditional or unconditional jump instructions of the C language are translated into "jnz" type instructions (which can be translated as “jump if the result of the previous instruction is not equal to 0"), " jz "(which can be translated as” jump if the result of the previous instruction is equal to 0 "),” jmp "(which can be translated as” jump ").
- the instruction to be reached is identified by its address passed as argument (or parameter) of the jump instruction.
- This address is either an increment or a decrement in number of bytes with respect to the address of the jump instruction, also called relative address, or an absolute address, that is to say, a fixed address within of memory.
- LJMP Long JUMP in English terminology
- the code of the LJMP instruction is 0x02.
- the address 0x405 is the address of the first instruction of a series of instructions corresponding to a program called security action program. If, during a fault attack, the security action program is not executed, then this can jeopardize the security of the system.
- a security action program may, in particular, consist in performing the following operations: an access code verification (PIN or "Personal Identification Number” in English terminology) a verification by a smart card of the code of message authentication (MAC or "Message Authentication Code” in English terminology) of a command it received before executing it - the execution of an encryption program, for example, encrypted data which will be sent to a recipient, the execution of a countermeasure following an attack, in particular, destruction of the smart card, infinite loop, etc.
- PIN Personal Identification Number
- MAC Message Authentication Code
- the processor may be led to read and execute the following code: DO 04 05, that is to say the code a undergoes a modification so that the code 0x02 has been modified by the code OxDO, the latter corresponding to the instruction POP, that is to say to an instruction commanding to stack on the execution stack the value passed in parameter.
- This code corresponds in assembler language to the following instructions: POP 0x04 INC R1
- the code 0x05 corresponds to the INC R1 instruction, that is to say the incrementation instruction of the register R1, this instruction being without parameters.
- the initial instruction encoded on 3 bytes is replaced by two instructions, the POP instruction coded on 2 bytes and the instruction INC R1 coded on a byte.
- a fault attack introduces a kind of desynchronization of the execution of the program, so that the program will then perform actions that the attacker can take advantage.
- the present invention aims at a security method of the software type and does not have the above disadvantages.
- This method proposes a method for securing the execution of a computer program against fault attacks on instructions. of jump.
- This method is applicable in particular in a smart card.
- This method comprises at least one cycle comprising the following steps: identification in this program of a jump instruction responsive to such an attack during the execution of said program, to a safety-critical safety action program, the instruction of jump being formed of an instruction code and an addressing parameter of the security action program, determining the physical address of storage of the security action program, the physical address being determined from the code of the jump instruction and / or code of the instruction according to the jump instruction, assignment, to the addressing parameter contained in the jump instruction, of the value of the physical address of the program of determined security action.
- the method according to the invention thus makes it possible to secure the call or the jump to program portions having functions that are critical for the security of the system.
- the address of the security action is linked to the codes of the jump instruction used to execute the security action program.
- jump instructions includes all of the conditional jump instructions, unconditional jump instructions, and program call instructions.
- the cycle further comprises, before the determining step, at least one step of duplicating said jump instruction to the safety action program forming a sequence of jump instructions.
- the length of the jump instruction sequence is greater than or equal to the length of the code of the longest instruction of the instruction set.
- the method comprises an insertion step, prior to the security action program, of an instruction indicating said physical address of storage of this previously determined security action program.
- the cycle further comprises, before the determining step, a step of inserting at least one other jump instruction to the security action program according to the identified jump instruction, and after the determination step, the following steps:
- the cycle comprises a step of inserting at least one instruction, before the security action program, indicating said physical memory storage addresses of the security action program previously determined for the jump instruction and for each of the other jump instructions inserted.
- the cycle further comprises an insertion step of at least one embodiment.
- instruction before the security action program indicating all the physical addresses of the safe action program storing, said addresses being determined by the set of possible combinations of the codes of the jump instruction and each of the jump instructions inserted.
- the cycle further comprises, after the determining step, a step of inserting at least one instruction after the identified jump instruction, this inserted instruction corresponding to a instruction without dangerous effect on the course of the said program.
- the security action program is a distribution program to at least one elementary security action program.
- the invention provides a device for securing the execution of a program against fault attacks on jump instructions, in particular in a smart card.
- the device comprises: identification means able to identify in this program a jump instruction responsive to such an attack during the execution of said program, to a critical safety action program for security, the jump instruction being formed of an instruction code and an addressing parameter of the security action program, means for determining the physical address of the security action program, the address physical being determined from the code of the jump instruction and / or code of the instruction following the jump instruction, allocation means able to assign, to the addressing parameter contained in the jump instruction, the value of the physical address of the determined security action program.
- This device has the same advantages as the method of securing a program against fault attacks.
- the invention also proposes a computer program stored on an information medium, said program comprising instructions enabling the implementation of a security method according to the invention, when this program is loaded and executed by a computer system. .
- Figure 1 is an example of duplication of a critical jump instruction to a security action program
- FIG. 2 is an example of a combination of the LJMP and LCALL instructions towards a program of safe action and memorization of this program by duplication thereof;
- FIG. 3 is an example of securing a relative jump instruction to a security action program;
- FIG. 4 is an example of the use of a dispatch program for elementary security action programs
- FIG. 5 schematically shows a device in which the invention is implemented.
- a program stored in a memory is composed of instructions and operands.
- program portions can be identified, that is, a set of instructions and operands with critical functions for system security whose execution contributes to the reliability of the program .
- the instructions to be executed after a call or a jump to these Program Portions Critical to System Security These portions can be considered as safe instructions that must be performed to ensure security.
- ROM read only memory
- EEPROM electrically erasable programmable read-only memory
- FLASH FLASH or a hard disk
- volatile memory for example RAM type.
- jump instructions can be identified as being critical, including jump instructions, unconditional jump instructions, and call instructions for a safe action program, for example, the following instructions jnz, jz, jmp, Ijmp, call, Icall, and they should be secured.
- a sequence of instructions is constructed according to the invention that repeats the call of a safe action program, or the jump to this program, so as to execute this program even if a desynchronization of the flow of execution occurs after a disturbance.
- LJMP Long Jump
- This instruction includes a 2-byte operand that indicates the absolute address that the jump is aimed at.
- the storage address of the safe action program is determined according to the code of the jump instruction.
- the physical address of storage of the security action program is, for example, 0x0202.
- this address consists, in particular, of the duplication of the code of the instruction in question, here the value 0x02.
- the parameter of the call or jump instruction to the safe action program is set to the determined address.
- a directive is given to the linker so that the latter effectively stores this program at the same address. address, here instruction CSEG 0202h. Other means may also be provided.
- the result of securing the jump instruction is:
- LJMP 0202h (hexadecimal notation) which will be compiled in machine language according to the following data sequence: 02 02 02. It is also possible to repeat the instruction to the safe action program to ensure that the program security action will be called even if the execution flow is out of sync.
- the instruction 0x02 meaning LJMP with parameter 0x0202 is executed even if the first bytes of the code sequence 02 02 02 02 02 02 02 02 become the parameter of the previous instruction after disturbance, or if the first bytes of the sequence are "skipped" due to a disturbance.
- Such a modification can be done directly in the assembly language program.
- this modification can be performed by the program compiler written in a high level language, for example, in C ++, by means of an inserted compilation directive, for example, before the calls or jumps to a safe action program so that the compiler doubles, triple, etc., the call or jump instructions identified in the executable program compiled in machine language, in order to secure this call or this jump.
- Figure 1 illustrates the example previously considered.
- the main program includes a jump instruction (LJMP 0202h) to the safe action program which has been doubled.
- the security action program includes before the sequence of instructions forming the security action program a compilation directive that requires the compiler to place the following portion of code, that is to say, the security action program , at the address 0202h.
- the assembly code of the security instruction can be placed before compilation in a separate file.
- the compilation directive only concerns the code contained in the file.
- the security action program must in principle include in the last line, or substantially towards the end of this program, an instruction consisting of the return address, indicating the execution address of the suite of the application program.
- the length of the sequence, built by duplication is advantageously greater than or equal to the length of the code of the the longest instruction in the instruction set.
- An alternative embodiment consists in identifying, in the program, the LCALL instruction (or "Long CaII") consisting in calling a program; whose value of this instruction in hexadecimal is 12h which leads to choose for the address a value 12h 12h.
- the complete instruction to double is then "12h 12h 12h".
- this instruction calls, for example, a security action program located at the address 12h 12h in memory, for example in ROM.
- all conditional jump instructions or not, and the calling instructions of a safe action program including instructions jnz, jz, jmp, Ijmp, call, lcall can be secured according to the invention.
- LJMP and LCALL instructions it is also possible to combine the use of the LJMP and LCALL instructions, ie to insert an LCALL instruction after an LJMP critical instruction rather than to duplicate the LJMP instruction.
- the use of this combination is adapted to the call of a security program of terminal type, that is to say, ending the execution of the program without returning to the calling program.
- the use of such a combination may apply to any safe action program.
- the call sequence for the security action program is such that, whatever the modification of the first byte of the launch sequence of the security action program, or the byte read first after a disturbance, this safe action program is started.
- this safe action program is started.
- This technique is also useful for randomly filling a memory, including a ROM.
- the previously described principle can be applied to two adjacent instructions, such as a jump instruction, for example, LJMP or LCALL, and an instruction whose execution is safe for the security of the data.
- sequence in machine language is 02 02 04 04 02 0404.
- sequence in machine language is 02 02 04 02 04 04.
- 04h is the instruction code of the assembler instruction INC A meaning "increment" and the addresses 0202h, 0204h, 0402h, 0404h correspond to the address of the start of storage of each duplication of the security action program.
- the security action program is stored at the address determined and passed as a parameter of the first jump instruction, for example at the address 02 04h according to the example below. above and the other addresses, for example 0202h, 0402h, 0404h, store an action program for processing the detection of a disturbance.
- INC A instruction is coded on one byte, however, otherwise, the second LJMP instruction must be replicated.
- This dispatch program is positioned at the address or addresses. These addresses are determined in a manner to describe the memorization of the security action program. Basic security programs are memorized at other addresses.
- the dispatch program reorientates the call to the appropriate elementary safe action program and therefore manages a multitude of basic security programs.
- a global variable is updated and stores information indicating the basic security action program to be performed when a call to the dispatch function is made.
- the basic security action program if it does not lead to the premature termination of the program, includes a jump instruction to the continuation of the normal program to be performed.
- the call to the dispatch function is secured to the security action programs.
- FIG. 5 represents a device that possesses all the means necessary for implementing the method of the invention for securing a computer program.
- This device is, for example, implanted in a microcomputer and is intended for securing a program stored in a memory, in particular in a memory contained in a smart card.
- this device may be, for example, a microcomputer 500, comprising a storage area containing the computer program to be secured 501.
- the microcomputer also comprises means for identifying, in a program to be secured, a jump instruction to a security action program 502.
- the microcomputer also comprises means for determining the physical address of storage of the security action program 503 or the means for determining the physical address of the storage program 504 which are able to determine the physical address from the code of the jump instruction and / or code of the instruction following the jump instruction.
- the device 500 comprises means 505 for allocating, to the addressing parameter contained in the jump instruction, the value of the physical address of the security action program determined by the determination means 503, 504.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Computer Networks & Wireless Communication (AREA)
- Microelectronics & Electronic Packaging (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Storage Device Security (AREA)
- Executing Machine-Instructions (AREA)
Abstract
The invention relates to a method for securing a program against attacks by error, in particular in a smartcard comprising at least one cycle consisting in identifying in a program a jump instruction towards a security action program, wherein said jump instruction is formed by an instruction code and an addressing parameter of the security action program, in determining a physical address for storing said security action program, therein said physical address is determined according to the jump instruction code, and in allocating the physical address value of a determined security action program to an address parameter contained in the jump instruction,
Description
PROTECTION CONTRE LES ATTAQUES PAR GENERATION DE FAUTES SUR LES INSTRUCTIONS DE SAUT PROTECTION AGAINST ATTACKS BY GENERATING FAULTS ON JUMPING INSTRUCTIONS
La présente invention se rapporte à un procédé de sécurisation d'un programme informatique et à un dispositif, notamment une carte à microcircuit (aussi appelée "carte à puce") mettant en œuvre un tel procédé. L'invention concerne également un dispositif de génération de la sécurisation d'un programme associé à ce procédé.The present invention relates to a method for securing a computer program and to a device, in particular a microcircuit card (also called a "smart card") implementing such a method. The invention also relates to a device for generating the security of a program associated with this method.
La présente invention vise en particulier la sécurisation des appels et des sauts vers des morceaux de programmes ayant des fonctions critiques pour la sécurité du système.The present invention aims in particular securing calls and jumps to pieces of programs having critical functions for the security of the system.
Par ailleurs, on entendra par « sécurisation » d'un programme informatique tout traitement visant à se prémunir contre des attaques notamment par perturbation du fonctionnement d'une entité électronique, aussi appelées « attaques par génération de fautes » (en anglais "Fault Attack").Furthermore, the term "security" of a computer program any treatment to guard against attacks including disruption of the operation of an electronic entity, also called "fault attack attacks" (English "Fault Attack" ).
Par ailleurs, on entendra par programme informatique, tout programme, quel que soit le langage informatique et les moyens de mémorisation utilisés. Par exemple, et de façon non limitative, le programme informatique peut être écrit en langage machine, assembleur, C, C++, Java. Le programme peut être mémorisé dans une mémoire permanente, par exemple dans une mémoire ROM ou EEPROM, Flash ou sur un disque dur, ou dans une mémoire volatile, par exemple de type RAM. La présente invention vise, en particulier, à se protéger contre des attaques destinées à modifier le déroulement de l'exécution d'un programme informatique s'exécutant sur une entité électronique sécurisée, (par exemple,
une carte à microcircuit, une carte PCMCIA sécurisée (par exemple une carte IBM4758), une clef USB ou un passeport (ou autre pièce d'identité) intégrant une puce avec une interface sans contact dans au moins une de ses pages).Moreover, it will be understood by computer program, any program, whatever the computer language and storage means used. For example, and without limitation, the computer program can be written in machine language, assembler, C, C ++, Java. The program can be stored in a permanent memory, for example in a ROM or EEPROM memory, Flash or on a hard disk, or in a volatile memory, for example of the RAM type. The present invention aims, in particular, to protect against attacks intended to modify the execution of the execution of a computer program running on a secure electronic entity, (for example, a microcircuit card, a secure PCMCIA card (for example an IBM4758 card), a USB key or a passport (or other piece of identification) integrating a chip with a contactless interface in at least one of its pages).
Les attaques par génération de fautes visent, notamment, à obliger un processeur à ne pas, ou mal, exécuter certaines instructions d'un programme informatique. Le programme informatique attaqué peut alors se dérouler d'une façon très différente de celle qui avait été prévue au moment de sa conception.The fault generation attacks are intended, in particular, to force a processor to not, or poorly, perform certain instructions of a computer program. The attacked computer program can then proceed in a very different way from the one planned at the time of its conception.
Ces attaques peuvent, entre autres et de façon connue, être effectuées :These attacks can, among other things and in a known manner, be carried out:
- en générant un pic de tension à l'une des bornes d'alimentation du processeur ;generating a voltage spike at one of the processor power terminals;
- en élevant brusquement sa température ;- by raising its temperature abruptly;
- en changeant rapidement sa fréquence d'horloge ou sa tension d'alimentation ;- by rapidly changing its clock frequency or its supply voltage;
- en appliquant un flash de lumière, un rayon laser, ou un champ électromagnétique, sur une partie du silicium qui le compose.- By applying a flash of light, a laser beam, or an electromagnetic field, on a part of the silicon that composes it.
De telles attaques sont particulièrement actives sur certaines instructions d'un programme, notamment du fait des instructions de saut ou de branchements.Such attacks are particularly active on certain instructions of a program, in particular because of the instructions of jump or connections.
On rappellera à cet effet que les instructions de branchement sont par exemple les instructions « if », « case », en langage C. La compilation de telles instructions de branchement en langage assembleur produit une instruction de saut conditionnel ou inconditionnel vers une adresse ou une instruction du programme à atteindre. L'instruction à atteindre est repérée par une étiquette dans un programme en assembleur. Selon le langage assembleur 8051 , les instructions de saut conditionnels ou inconditionnels du langage C sont traduites en instructions de type « jnz » (qui peut être traduit par « saut si le résultat de l'instruction précédente est non égal à 0 »), « jz » (que l'on peut traduire par « saut si le résultat de l'instruction précédente est égal à 0 »), « jmp » (qui peut être traduit par « saut »).
Une fois compilée en langage machine, l'instruction à atteindre est identifiée par son adresse passée en argument (ou paramètre) de l'instruction de saut. Cette adresse est soit un incrément ou un décrément en nombre d'octets par rapport à l'adresse de l'instruction de saut, encore appelée adresse relative, soit une adresse absolue, c'est-à-dire, une adresse fixe au sein de la mémoire.For this purpose, it should be noted that the branching instructions are for example the "if", "case" instructions, in the C language. The compilation of such connection instructions in assembly language produces a conditional or unconditional jump instruction to an address or an address. instruction of the program to be achieved. The instruction to be reached is identified by a label in an assembly program. According to the 8051 assembler language, the conditional or unconditional jump instructions of the C language are translated into "jnz" type instructions (which can be translated as "jump if the result of the previous instruction is not equal to 0"), " jz "(which can be translated as" jump if the result of the previous instruction is equal to 0 ")," jmp "(which can be translated as" jump "). Once compiled in machine language, the instruction to be reached is identified by its address passed as argument (or parameter) of the jump instruction. This address is either an increment or a decrement in number of bytes with respect to the address of the jump instruction, also called relative address, or an absolute address, that is to say, a fixed address within of memory.
Lors d'une attaque par faute, l'exécution d'une instruction de saut peut dans une très grande majorité des cas être perturbée entraînant un saut vers une adresse non prévue par le programme initial. En effet, lors de la perturbation d'une telle instruction, le résultat obtenu est équivalent, par exemple, à une modification du code de l'instruction. Cette valeur est modifiée de manière aléatoire.During a fault attack, the execution of a jump instruction can in a very large majority of cases be disturbed leading to a jump to an address not provided by the initial program. Indeed, during the disruption of such an instruction, the result obtained is equivalent, for example, to a modification of the instruction code. This value is changed randomly.
Ainsi, par exemple, si l'on considère le morceau de programme suivant en langage machine : 02 04 05, ce morceau correspond en langage assembleur à l'instruction LJMP @0x405. L'instruction LJMP, soit Long JUMP en terminologie anglaise, signifie que cette instruction concernant un saut ayant pour paramètre une adresse codée sur 2 octets. Le code de l'instruction LJMP est 0x02. L'adresse 0x405 est l'adresse de la première instruction d'une série d'instruction correspondant à un programme appelé programme d'action sécuritaire. Si, lors d'une attaque par faute, le programme d'action sécuritaire n'est pas exécuté, alors cela peut mettre en péril la sécurité du système.Thus, for example, if we consider the following piece of program in machine language: 02 04 05, this piece corresponds in assembly language to the instruction LJMP @ 0x405. The LJMP instruction, which is Long JUMP in English terminology, means that this instruction pertaining to a jump having for parameter a 2-byte coded address. The code of the LJMP instruction is 0x02. The address 0x405 is the address of the first instruction of a series of instructions corresponding to a program called security action program. If, during a fault attack, the security action program is not executed, then this can jeopardize the security of the system.
Un programme d'action sécuritaire peut, notamment, consister à réaliser les opérations suivantes : une vérification du code d'accès (code PIN ou « Personal Identification Number » en terminologie anglo-saxonne) une vérification par une carte à puce du code d'authentification de message (MAC ou « Message Authentification Code » en terminologie anglo-saxonne) d'une commande qu'elle a reçue avant de l'exécuter - l'exécution d'un programme d'encryptage, par exemple, de données cryptées qui seront envoyées à un destinataire,
l'exécution d'une contre-mesure suite à une attaque, notamment, destruction de la carte à puce, boucle infinie, etc.A security action program may, in particular, consist in performing the following operations: an access code verification (PIN or "Personal Identification Number" in English terminology) a verification by a smart card of the code of message authentication (MAC or "Message Authentication Code" in English terminology) of a command it received before executing it - the execution of an encryption program, for example, encrypted data which will be sent to a recipient, the execution of a countermeasure following an attack, in particular, destruction of the smart card, infinite loop, etc.
Suite à une attaque sur le morceau de programme précédemment décrit conduisant à une modification, notamment aléatoire, des octets à lire, le processeur peut être amené à lire et à exécuter le code suivant : DO 04 05, c'est-à-dire le code a subit une modification de telle sorte que le code 0x02 a été modifié par le code OxDO, ce dernier correspondant à l'instruction POP, c'est-à-dire à une instruction commandant d'empiler sur la pile d'exécution la valeur passée en paramètre. Ce code correspond en langage assembleur, aux instructions suivantes : POP 0x04 INC R1Following an attack on the piece of program previously described leading to a modification, in particular random, bytes to read, the processor may be led to read and execute the following code: DO 04 05, that is to say the code a undergoes a modification so that the code 0x02 has been modified by the code OxDO, the latter corresponding to the instruction POP, that is to say to an instruction commanding to stack on the execution stack the value passed in parameter. This code corresponds in assembler language to the following instructions: POP 0x04 INC R1
En effet, le code 0x05 correspond à l'instruction INC R1 , c'est-à- dire à l'instruction d'incrémentation du registre R1 , cette instruction étant sans paramètre.Indeed, the code 0x05 corresponds to the INC R1 instruction, that is to say the incrementation instruction of the register R1, this instruction being without parameters.
De la sorte, l'instruction initiale codée sur 3 octets est remplacée par deux instructions, l'instruction POP codée sur 2 octets et l'instruction INC R1 codée sur un octet.In this way, the initial instruction encoded on 3 bytes is replaced by two instructions, the POP instruction coded on 2 bytes and the instruction INC R1 coded on a byte.
Ainsi, une attaque par faute, introduit une sorte de désynchronisation de l'exécution du programme, de telle manière à ce que le programme effectuera ensuite des actions dont l'attaquant pourra tirer partie.Thus, a fault attack, introduces a kind of desynchronization of the execution of the program, so that the program will then perform actions that the attacker can take advantage.
De même, une telle attaque permet d'empêcher l'exécution d'un programme d'action sécuritaire lancée lors de son appel au moyen d'une instruction de saut ou d'un appel à un sous-programme, tout en continuant ensuite l'exécution du programme. Ainsi, l'attaquant peut empêcher l'exécution d'un programme d'action sécuritaire du type vérification du code personnel d'accès, encryptage, etc et accéder tout de même à des données sécurisées, des données en clair, etc.Similarly, such an attack makes it possible to prevent the execution of a security action program initiated during its call by means of a jump instruction or a call to a subroutine, while continuing thereafter. execution of the program. Thus, the attacker can prevent the execution of a security action program such as verification of personal access code, encryption, etc. and still access secure data, data in the clear, etc.
La présente invention vise une méthode de sécurisation de type logiciel et ne présentant pas les inconvénients précédents.The present invention aims at a security method of the software type and does not have the above disadvantages.
A cet effet, elle propose un procédé de sécurisation de l'exécution d'un programme informatique contre des attaques par faute sur des instructions
de saut. Ce procédé est applicable notamment dans une carte à puce. Ce procédé comprend au moins un cycle comprenant les étapes suivantes : identification dans ce programme d'une instruction de saut sensible à une telle attaque lors de l'exécution dudit programme, vers un programme d'action sécuritaire critique pour la sécurité, l'instruction de saut étant formée d'un code d'instruction et d'un paramètre d'adressage du programme d'action sécuritaire, détermination de l'adresse physique de mémorisation du programme d'action sécuritaire, l'adresse physique étant déterminée à partir du code de l'instruction de saut et / ou du code de l'instruction suivant l'instruction de saut, attribution, au paramètre d'adressage contenu dans l'instruction de saut, de la valeur de l'adresse physique du programme d'action sécuritaire déterminée. Le procédé selon l'invention permet donc de sécuriser l'appel ou le saut vers des portions de programme ayant des fonctions critiques pour la sécurité du système.For this purpose, it proposes a method for securing the execution of a computer program against fault attacks on instructions. of jump. This method is applicable in particular in a smart card. This method comprises at least one cycle comprising the following steps: identification in this program of a jump instruction responsive to such an attack during the execution of said program, to a safety-critical safety action program, the instruction of jump being formed of an instruction code and an addressing parameter of the security action program, determining the physical address of storage of the security action program, the physical address being determined from the code of the jump instruction and / or code of the instruction according to the jump instruction, assignment, to the addressing parameter contained in the jump instruction, of the value of the physical address of the program of determined security action. The method according to the invention thus makes it possible to secure the call or the jump to program portions having functions that are critical for the security of the system.
Pour ce faire, l'adresse de l'action sécuritaire est liée aux codes de l'instruction de saut utilisée pour aller exécuter le programme d'action sécuritaire.To do this, the address of the security action is linked to the codes of the jump instruction used to execute the security action program.
Dans le contexte de l'invention, la notion d'instructions de saut englobe l'ensemble des instructions de saut conditionnel, des instructions de saut inconditionnel et les instructions d'appel à un programme.In the context of the invention, the concept of jump instructions includes all of the conditional jump instructions, unconditional jump instructions, and program call instructions.
Selon une caractéristique avantageuse de l'invention, le cycle comporte en outre, avant l'étape de détermination, au moins une étape de duplication de ladite instruction de saut vers le programme d'action sécuritaire formant une séquence d'instructions de saut.According to an advantageous characteristic of the invention, the cycle further comprises, before the determining step, at least one step of duplicating said jump instruction to the safety action program forming a sequence of jump instructions.
Ainsi, une séquence d'appel vers le programme d'action sécuritaire est créée de manière à forcer l'appel même si la perturbation génère une désynchronisation ou une modification des premiers octets de la séquence.
Selon une autre caractéristique avantageuse de l'invention, la longueur de la séquence d'instructions de saut est supérieure ou égale à la longueur du code de l'instruction la plus longue du jeu d'instructions.Thus, a call sequence to the security action program is created to force the call even if the disturbance generates a desynchronization or a modification of the first bytes of the sequence. According to another advantageous characteristic of the invention, the length of the jump instruction sequence is greater than or equal to the length of the code of the longest instruction of the instruction set.
Selon une autre caractéristique avantageuse de l'invention, le procédé comprend une étape d'insertion, avant le programme d'action sécuritaire, d'une instruction indiquant ladite adresse physique de mémorisation de ce programme d'action sécuritaire préalablement déterminée.According to another advantageous characteristic of the invention, the method comprises an insertion step, prior to the security action program, of an instruction indicating said physical address of storage of this previously determined security action program.
Cette caractéristique a pour effet d'imposer une adresse de début de mémorisation du programme d'action sécuritaire. Selon une variante de réalisation, le cycle comprend en outre, avant l'étape de détermination, une étape d'insertion d'au moins une autre instruction de saut vers le programme d'action sécuritaire suivant l'instruction de saut identifiée, et après l'étape de détermination, les étapes suivantes :This characteristic has the effect of imposing a start of storage address of the security action program. According to an alternative embodiment, the cycle further comprises, before the determining step, a step of inserting at least one other jump instruction to the security action program according to the identified jump instruction, and after the determination step, the following steps:
- détermination pour chacune desdites autres instructions de saut insérées d'une adresse physique de mémorisation du programme d'action sécuritaire, l'adresse physique étant déterminée à partir du code de l'instruction de saut et / ou du code de l'instruction précédente,determination for each of said other inserted jump instructions of a physical address of storage of the security action program, the physical address being determined from the code of the jump instruction and / or the code of the preceding instruction ,
- attribution au paramètre de chacune desdites instructions de saut insérées de la valeur de l'adresse physique du programme d'action sécuritaire déterminée.assigning to the parameter of each of said inserted jump instructions the value of the physical address of the determined security action program.
Selon cette variante, tout en sécurisant l'instruction de saut en cause, on évite de répéter une séquence comprenant une structure et des codes fixes tout en réalisant, éventuellement, un remplissage de la partie résiduelle d'une mémoire, notamment d'une mémoire ROM. Selon une caractéristique avantageuse de cette variante de réalisation, le cycle comprend une étape d'insertion d'au moins une instruction, avant le programme d'action sécuritaire, indiquant lesdites adresses physiques de mémorisation du programme d'action sécuritaire préalablement déterminées pour l'instruction de saut et pour chacune des autres instructions de saut insérées.According to this variant, while securing the jump instruction in question, it is avoided to repeat a sequence comprising a structure and fixed codes while possibly performing a filling of the residual part of a memory, in particular a memory ROM. According to an advantageous characteristic of this variant embodiment, the cycle comprises a step of inserting at least one instruction, before the security action program, indicating said physical memory storage addresses of the security action program previously determined for the jump instruction and for each of the other jump instructions inserted.
Selon une autre caractéristique avantageuse de cette variante de réalisation, le cycle comprend, en outre, une étape d'insertion d'au moins une
instruction avant le programme d'action sécuritaire indiquant l'ensemble des adresses physiques de mémorisation du programme d'action sécuritaire, lesdites adresses étant déterminées par l'ensemble des combinaisons possibles des codes de l'instruction de saut et de chacune des instructions de saut insérées.According to another advantageous characteristic of this variant embodiment, the cycle further comprises an insertion step of at least one embodiment. instruction before the security action program indicating all the physical addresses of the safe action program storing, said addresses being determined by the set of possible combinations of the codes of the jump instruction and each of the jump instructions inserted.
Selon encore une autre caractéristique avantageuse de cette variante de réalisation, le cycle comprend en outre, après l'étape de détermination, une étape d'insertion d'au moins une instruction après l'instruction de saut identifiée, cette instruction insérée correspondant à une instruction sans effet dangereux sur le déroulement dudit programme.According to yet another advantageous characteristic of this variant embodiment, the cycle further comprises, after the determining step, a step of inserting at least one instruction after the identified jump instruction, this inserted instruction corresponding to a instruction without dangerous effect on the course of the said program.
De la sorte, tout en sécurisant l'instruction de saut à un programme d'action sécuritaire, on augmente le remplissage aléatoire de la mémoire, notamment de la mémoire ROM.In this way, while securing the jump instruction to a safe action program, the random filling of the memory, in particular of the ROM memory, is increased.
Selon encore une autre variante avantageuse de réalisation, le programme d'action sécuritaire est un programme de répartition vers au moins un programme d'action sécuritaire élémentaire.According to yet another advantageous embodiment, the security action program is a distribution program to at least one elementary security action program.
De la sorte, il est possible de gérer plusieurs programmes d'actions sécuritaires pour une même application.In this way, it is possible to manage several security action programs for the same application.
Corrélativement, l'invention propose un dispositif de sécurisation de l'exécution d'un programme contre des attaques par faute sur des instructions de saut, notamment dans une carte à puce. Le dispositif, selon l'invention, comprend : des moyens d'identification aptes à identifier dans ce programme une instruction de saut sensible à une telle attaque lors de l'exécution dudit programme, vers un programme d'action sécuritaire critique pour la sécurité, l'instruction de saut étant formée d'un code d'instruction et d'un paramètre d'adressage du programme d'action sécuritaire, des moyens de détermination de l'adresse physique de mémorisation du programme d'action sécuritaire, l'adresse physique étant déterminée à partir du code de l'instruction de saut et / ou du code de l'instruction suivant l'instruction de saut,
des moyens d'attribution aptes à attribuer, au paramètre d'adressage contenu dans l'instruction de saut, de la valeur de l'adresse physique du programme d'action sécuritaire déterminée.Correlatively, the invention provides a device for securing the execution of a program against fault attacks on jump instructions, in particular in a smart card. The device, according to the invention, comprises: identification means able to identify in this program a jump instruction responsive to such an attack during the execution of said program, to a critical safety action program for security, the jump instruction being formed of an instruction code and an addressing parameter of the security action program, means for determining the physical address of the security action program, the address physical being determined from the code of the jump instruction and / or code of the instruction following the jump instruction, allocation means able to assign, to the addressing parameter contained in the jump instruction, the value of the physical address of the determined security action program.
Ce dispositif présente les mêmes avantages que le procédé de sécurisation d'un programme contre des attaques par faute.This device has the same advantages as the method of securing a program against fault attacks.
L'invention propose également un programme d'ordinateur stocké sur un support d'informations, ledit programme comportant des instructions permettant la mise en œuvre d'un procédé de sécurisation selon l'invention, lorsque ce programme est chargé et exécuté par un système informatique.The invention also proposes a computer program stored on an information medium, said program comprising instructions enabling the implementation of a security method according to the invention, when this program is loaded and executed by a computer system. .
D'autres aspects et avantages de la présente invention apparaissent plus clairement à la lecture de la description de modes particuliers de réalisation qui suit, cette description étant donnée uniquement à titre d'exemple illustratif non limitatif, en regard des dessins annexés sur lesquels : - la figure 1 est un exemple de duplication d'une instruction de saut critique vers un programme d'action sécuritaire ;Other aspects and advantages of the present invention appear more clearly on reading the description of particular embodiments which follows, this description being given solely by way of nonlimiting illustrative example, with reference to the appended drawings in which: Figure 1 is an example of duplication of a critical jump instruction to a security action program;
- la figure 2 est un exemple de combinaison des instructions LJMP et LCALL vers un programme d'action sécuritaire et de mémorisation de ce programme par duplication de celui-ci ; - la figure 3 est un exemple la sécurisation d'une instruction de saut relatif vers un programme d'action sécuritaire ;FIG. 2 is an example of a combination of the LJMP and LCALL instructions towards a program of safe action and memorization of this program by duplication thereof; FIG. 3 is an example of securing a relative jump instruction to a security action program;
- la figure 4 est un exemple d'utilisation d'un programme de répartition vers des programmes d'action sécuritaire élémentaires ;FIG. 4 is an example of the use of a dispatch program for elementary security action programs;
- la figure 5 représente de manière schématique un dispositif dans lequel est mis en œuvre l'invention.- Figure 5 schematically shows a device in which the invention is implemented.
Comme on le sait, un programme mémorisé au sein d'une mémoire est composé d'instructions et d'opérandes. Au sein d'un programme, on peut identifier des portions de programme, c'est-à-dire un ensemble d'instructions et d'opérandes ayant des fonctions critiques pour la sécurité du système dont l'exécution contribue à la fiabilité du programme. C'est ainsi, notamment, que les instructions à exécuter après un appel ou un saut vers ces
portions de programme critiques pour la sécurité du système ces portions peuvent être considérées comme des instructions sécuritaires qu'il faut exécuter pour garantir la sécurité.As is known, a program stored in a memory is composed of instructions and operands. Within a program, program portions can be identified, that is, a set of instructions and operands with critical functions for system security whose execution contributes to the reliability of the program . Thus, in particular, the instructions to be executed after a call or a jump to these Program Portions Critical to System Security These portions can be considered as safe instructions that must be performed to ensure security.
Ces programmes sont mémorisés dans une mémoire permanente, par exemple, une mémoire ROM, EEPROM, FLASH ou un disque dur, ou une mémoire volatile, par exemple de type RAM.These programs are stored in a permanent memory, for example, a ROM, EEPROM, FLASH or a hard disk, or a volatile memory, for example RAM type.
Ainsi, on peut identifier comme étant critiques, des instructions de saut, notamment des instructions de saut conditionnel, des instructions de saut non conditionnel et des instructions d'appel d'un programme d'action sécuritaire, par exemple, les instructions suivantes jnz, jz, jmp, Ijmp, call, Icall, et il convient de les sécuriser.Thus, jump instructions can be identified as being critical, including jump instructions, unconditional jump instructions, and call instructions for a safe action program, for example, the following instructions jnz, jz, jmp, Ijmp, call, Icall, and they should be secured.
Pour ce faire, on construit selon l'invention une séquence d'instructions qui répète l'appel d'un programme d'action sécuritaire, ou le saut vers ce programme, de manière à exécuter ce programme même si une désynchronisation du flot d'exécution intervient suite à une perturbation.To do this, a sequence of instructions is constructed according to the invention that repeats the call of a safe action program, or the jump to this program, so as to execute this program even if a desynchronization of the flow of execution occurs after a disturbance.
Selon un premier mode de réalisation, on prévoit pour les instructions d'appel, ou de saut, à un programme d'action sécuritaire, de déterminer l'adresse physique de mémorisation du programme en fonction du code de l'instruction considérée et ainsi fixer l'opérande de l'instruction. Ainsi, si l'on considère l'instruction LJMP (ou « Long Jump ») en assembleur 8051 , précédemment décrite, celle-ci est codée selon la donnée 0x02. Cette instruction comporte un opérande codé sur 2 octets indiquant l'adresse absolue visée par le saut.According to a first embodiment, provision is made for the call instructions, or jump, to a safe action program, to determine the physical address of storage of the program according to the code of the instruction in question and thus set the operand of the instruction. Thus, if we consider the instruction LJMP (or "Long Jump") assembly 8051, previously described, it is encoded according to the data 0x02. This instruction includes a 2-byte operand that indicates the absolute address that the jump is aimed at.
On détermine l'adresse de mémorisation du programme d'action sécuritaire en fonction du code de l'instruction de saut. Ainsi, compte tenu de la valeur du code de l'instruction « LJMP », l'adresse physique de mémorisation du programme d'action sécuritaire est, par exemple, 0x0202. En effet, l'adresse physique devant être codée sur 2 octets, cette adresse se compose, notamment, de la duplication du code de l'instruction considérée, ici de la valeur 0x02. Ensuite, le paramètre de l'instruction d'appel ou de saut vers le programme d'action sécuritaire est fixé à l'adresse déterminée.
Afin également d'effectivement mémoriser le programme d'action sécuritaire, à l'adresse déterminée, par exemple à l'adresse 0x0202, une directive est donnée à l'éditeur de liens de telle sorte que celui-ci mémorise effectivement ce programme à l'adresse voulue, ici l'instruction CSEG 0202h. D'autres moyens peuvent également être prévu.The storage address of the safe action program is determined according to the code of the jump instruction. Thus, given the value of the code of the instruction "LJMP", the physical address of storage of the security action program is, for example, 0x0202. Indeed, the physical address to be coded on 2 bytes, this address consists, in particular, of the duplication of the code of the instruction in question, here the value 0x02. Then, the parameter of the call or jump instruction to the safe action program is set to the determined address. In order to actually memorize the security action program, at the determined address, for example at the address 0x0202, a directive is given to the linker so that the latter effectively stores this program at the same address. address, here instruction CSEG 0202h. Other means may also be provided.
Le résultat de la sécurisation de l'instruction de saut est donc :The result of securing the jump instruction is:
LJMP 0202h (notation en hexadécimal) ce qui va être compilé en langage machine selon la séquence de données suivante : 02 02 02. II est également possible de répéter l'instruction vers le programme d'action sécuritaire afin de s'assurer que le programme d'action sécuritaire va être appelé même en cas de désynchronisation du flot d'exécution.LJMP 0202h (hexadecimal notation) which will be compiled in machine language according to the following data sequence: 02 02 02. It is also possible to repeat the instruction to the safe action program to ensure that the program security action will be called even if the execution flow is out of sync.
Ainsi, selon l'exemple considéré, on prévoit une répétition de l'instruction de saut vers le programme d'action sécuritaire dans le programme en langage assembleur après avoir déterminé l'adresse physique de mémorisation du programme. On obtient donc la séquence suivante :Thus, according to the example considered, it is expected a repetition of the jump instruction to the security action program in the assembly language program after determining the physical address of the program storage. We thus obtain the following sequence:
LJMP 0202hLJMP 0202h
LJMP 0202h Après compilation, on obtient la séquence de code suivante : 02LJMP 0202h After compilation, we obtain the following code sequence: 02
02 02 02 02 02. De cette manière, l'instruction 0x02 signifiant LJMP avec comme paramètre 0x0202 est exécutée même si les premiers octets de la séquence de code 02 02 02 02 02 02 deviennent le paramètre de l'instruction précédente après perturbation, ou si les premiers octets de la séquence sont « sautés » du fait d'une perturbation.02 02 02 02 02. In this way, the instruction 0x02 meaning LJMP with parameter 0x0202 is executed even if the first bytes of the code sequence 02 02 02 02 02 02 02 become the parameter of the previous instruction after disturbance, or if the first bytes of the sequence are "skipped" due to a disturbance.
Une telle modification peut être réalisée directement dans le programme en langage assembleur. Cependant, selon un autre mode de réalisation, cette modification peut être opérée par le compilateur du programme écrit dans un langage de haut niveau, par exemple, en C++, au moyen de directive de compilation insérée, par exemple, avant les appels ou sauts vers un programme d'action sécuritaire de telle sorte que le compilateur double, triple, etc., les instructions d'appel ou de saut identifiées dans le
programme exécutable compilé en langage machine, dans le but de sécuriser cet appel ou ce saut.Such a modification can be done directly in the assembly language program. However, according to another embodiment, this modification can be performed by the program compiler written in a high level language, for example, in C ++, by means of an inserted compilation directive, for example, before the calls or jumps to a safe action program so that the compiler doubles, triple, etc., the call or jump instructions identified in the executable program compiled in machine language, in order to secure this call or this jump.
La figure 1 illustre l'exemple précédemment considéré. Pour cela, le programme principal comprend une instruction de saut (LJMP 0202h) vers le programme d'action sécuritaire qui a été doublée.Figure 1 illustrates the example previously considered. For this, the main program includes a jump instruction (LJMP 0202h) to the safe action program which has been doubled.
Le programme d'action sécuritaire comprend préalablement à la suite d'instructions formant le programme d'action sécuritaire une directive de compilation qui impose au compilateur de placer la portion de code suivante, c'est-à-dire le programme d'action sécuritaire, à l'adresse 0202h. Selon un mode de réalisation, le code assembleur de l'instruction sécuritaire peut être placé avant compilation dans un fichier séparé. Ainsi, la directive de compilation ne concerne que le code contenu dans le fichier.The security action program includes before the sequence of instructions forming the security action program a compilation directive that requires the compiler to place the following portion of code, that is to say, the security action program , at the address 0202h. According to one embodiment, the assembly code of the security instruction can be placed before compilation in a separate file. Thus, the compilation directive only concerns the code contained in the file.
Le programme d'action sécuritaire doit en principe comporter en dernière ligne, ou sensiblement vers la fin de ce programme, une instruction composée de l'adresse de retour, indiquant l'adresse d'exécution de la suite du programme applicatif.The security action program must in principle include in the last line, or substantially towards the end of this program, an instruction consisting of the return address, indicating the execution address of the suite of the application program.
Toutefois, lorsque le programme d'action sécuritaire entraîne la fin d'exécution de l'application prématurée ou un mutisme, e.g. une boucle sans fin, cette instruction n'est pas nécessaire. De manière à augmenter la probabilité d'exécuter le programme d'action sécuritaire lors d'une perturbation, il est à noter que la longueur de la séquence, construite par duplication, est avantageusement de taille supérieure ou égale à la longueur du code de l'instruction la plus longue du jeu d'instructions. Une variante de réalisation consiste à identifier, dans le programme, l'instruction LCALL (ou « Long CaII ») consistant à appeler un programme ; dont la valeur de cette instruction en hexadécimal est 12h ce qui amène à choisir pour l'adresse une valeur 12h 12h.However, when the safe action program results in the completion of the premature application or a mutism, e.g. an endless loop, this instruction is not necessary. In order to increase the probability of executing the safety action program during a disturbance, it should be noted that the length of the sequence, built by duplication, is advantageously greater than or equal to the length of the code of the the longest instruction in the instruction set. An alternative embodiment consists in identifying, in the program, the LCALL instruction (or "Long CaII") consisting in calling a program; whose value of this instruction in hexadecimal is 12h which leads to choose for the address a value 12h 12h.
L'instruction complète à doubler est alors « 12h 12h 12h ». De la sorte, cette instruction appelle, par exemple, un programme d'action sécuritaire situé à l'adresse 12h 12h en mémoire, par exemple en mémoire ROM. De même, toutes les instructions de saut conditionnel ou non,
et les instructions d'appel d'un programme d'action sécuritaire, notamment les instructions jnz, jz, jmp, Ijmp, call, lcall peuvent être sécurisées selon l'invention.The complete instruction to double is then "12h 12h 12h". In this way, this instruction calls, for example, a security action program located at the address 12h 12h in memory, for example in ROM. Similarly, all conditional jump instructions or not, and the calling instructions of a safe action program, including instructions jnz, jz, jmp, Ijmp, call, lcall can be secured according to the invention.
Ainsi, il est plus difficile pour un attaquant d'empêcher l'exécution d'un programme d'action sécuritaire, puis de continuer le déroulement du programme.Thus, it is more difficult for an attacker to prevent the execution of a safe action program and then continue the program.
Selon un autre mode de réalisation, il est également possible de combiner l'utilisation des instructions LJMP et LCALL, c'est-à-dire d'insérer une instruction LCALL après une instruction critique LJMP plutôt que de dupliquer l'instruction LJMP. L'utilisation de cette combinaison est adaptée à l'appel d'un programme d'action sécuritaire de type terminal, c'est-à-dire terminant l'exécution du programme sans toutefois retourner au programme appelant. Cependant, l'utilisation d'une telle combinaison peut s'appliquer à tout programme d'action sécuritaire.According to another embodiment, it is also possible to combine the use of the LJMP and LCALL instructions, ie to insert an LCALL instruction after an LJMP critical instruction rather than to duplicate the LJMP instruction. The use of this combination is adapted to the call of a security program of terminal type, that is to say, ending the execution of the program without returning to the calling program. However, the use of such a combination may apply to any safe action program.
La combinaison de ces deux instructions ayant, dans exemple ici considéré, les codes d'instruction 02h et 12h, fait qu'il existe quatre adresses possibles issues de la combinaison de ces deux codes d'instructions, soit : 0202h, 0212h, 1202h et 1212h.The combination of these two instructions having, in this example considered, the instruction codes 02h and 12h, makes that there are four possible addresses resulting from the combination of these two instruction codes, namely: 0202h, 0212h, 1202h and 1212h.
De la sorte, on évite de répéter une adresse fixée selon un modèle. De même, on peut ainsi remplir une zone mémoire plus conséquente, notamment, lorsque l'on souhaite remplir une zone résiduelle d'une mémoire, par exemple en mémoire Rom, tel qu'illustré en figure 2.In this way, it avoids repeating a fixed address according to a model. Likewise, it is thus possible to fill a larger memory area, especially when it is desired to fill a residual area of a memory, for example in ROM memory, as illustrated in FIG. 2.
Il est ainsi très difficile pour un fraudeur de détecter la mise en œuvre de l'invention. Ce principe peut être généralisé et donc il peut s'appliquer à plus de deux instructions. Cependant, il est nécessaire que toutes les adresses correspondantes à toutes les combinaisons possibles des codes des instructions considérées comportent le code du programme d'action sécuritaire.It is thus very difficult for a fraudster to detect the implementation of the invention. This principle can be generalized and therefore it can apply to more than two instructions. However, it is necessary that all the addresses corresponding to all the possible combinations of the codes of the instructions considered include the code of the security action program.
De manière générale, selon l'invention, la séquence d'appel au programme d'action sécuritaire est telle que, quelque soit la modification du premier octet de la séquence de lancement du programme d'action sécuritaire,
ou l'octet lu en premier après une perturbation, ce programme d'action sécuritaire est lancé. Pour cela, notamment, on prévoit la séquence suivante : 02 02 12 02 12 02In general, according to the invention, the call sequence for the security action program is such that, whatever the modification of the first byte of the launch sequence of the security action program, or the byte read first after a disturbance, this safe action program is started. For this, in particular, the following sequence is provided: 02 02 12 02 12 02
Ainsi, en dupliquant ou multipliant les instructions d'appel à un programme d'action sécuritaire tel que vu précédemment, ce dernier est exécuté malgré les perturbations.Thus, by duplicating or multiplying the call instructions to a safe action program as seen above, the latter is executed despite the disturbances.
Cette technique est également utile pour remplir aléatoirement une mémoire, notamment, une mémoire ROM.This technique is also useful for randomly filling a memory, including a ROM.
Selon une autre variante, le principe précédemment décrit peut s'appliquer à deux instructions adjacentes, telles qu'une instruction de saut, par exemple, LJMP ou LCALL, et une instruction dont son exécution est sans danger pour la sécurité des données.According to another variant, the previously described principle can be applied to two adjacent instructions, such as a jump instruction, for example, LJMP or LCALL, and an instruction whose execution is safe for the security of the data.
Ainsi, on peut sécuriser l'appel à un programme d'action sécuritaire selon les exemples suivants : Exemple 1 :Thus, we can secure the call for a safe action program according to the following examples: Example 1:
LJMP 0204h soit en langage machine : 02 02 04LJMP 0204h in machine language: 02 02 04
INC A soit en langage machine : 04INC A in machine language: 04
LJMP 0404h soit en langage machine : 02 04 04LJMP 0404h in machine language: 02 04 04
Ainsi la séquence en langage machine est 02 02 04 04 02 0404.Thus the sequence in machine language is 02 02 04 04 02 0404.
Exemple 2 :Example 2
LJMP 0204h soit en langage machine : 02 02 04LJMP 0204h in machine language: 02 02 04
LJMP 0404h soit en langage machine : 02 04 04LJMP 0404h in machine language: 02 04 04
Ainsi la séquence en langage machine est 02 02 04 02 04 04.Thus the sequence in machine language is 02 02 04 02 04 04.
Où 04h est le code d'instruction de l'instruction assembleur INC A signifiant « incrément » et les adresses 0202h, 0204h, 0402h, 0404h correspondent à l'adresse du début de mémorisation de chaque duplication du programme d'action sécuritaire. Selon une variante de réalisation, le programme d'action sécuritaire est mémorisé à l'adresse déterminée et passée en paramètre de la première instruction de saut, par exemple à l'adresse 02 04h selon l'exemple ci-
dessus et les autres adresses, par exemple 0202h, 0402h, 0404h, mémorisent un programme d'action permettant de traiter la détection d'une perturbation.Where 04h is the instruction code of the assembler instruction INC A meaning "increment" and the addresses 0202h, 0204h, 0402h, 0404h correspond to the address of the start of storage of each duplication of the security action program. According to an alternative embodiment, the security action program is stored at the address determined and passed as a parameter of the first jump instruction, for example at the address 02 04h according to the example below. above and the other addresses, for example 0202h, 0402h, 0404h, store an action program for processing the detection of a disturbance.
On notera que l'instruction INC A est codée sur un octet, cependant, dans le cas contraire, la seconde instruction LJMP doit être répliquée.Note that the INC A instruction is coded on one byte, however, otherwise, the second LJMP instruction must be replicated.
Concernant les instructions de saut relatif, notamment l'instruction JNZ indiquant un saut relatif si le contenu du registre A est non nul, il est également possible de sécuriser l'adresse de saut afin de s'assurer que le saut va permettre d'atteindre le programme d'action sécuritaire. Ainsi, tel qu'illustré par la figure 3, l'instruction JNZ ayant le codeRegarding the relative jump instructions, including the JNZ instruction indicating a relative jump if the contents of the register A is non-zero, it is also possible to secure the jump address to ensure that the jump will achieve the security agenda. Thus, as shown in FIG. 3, the JNZ instruction having the code
7Oh et étant suivie de l'adresse relative 7Oh tel que précédemment présenté, on obtient le code 70 70. Ce code est doublé, voir triplé tel que présenté en figure 3.7Oh and being followed by the relative address 7Oh as previously presented, we obtain the code 70 70. This code is doubled, see tripled as shown in FIG.
De sorte à sécuriser également l'adresse d'arrivée du saut, des instructions de type NOP, c'est-à-dire n'exécutant aucun traitement, sont insérées à l'adresse d'arrivée du saut. De cette manière, on augmente en cas de faute, la probabilité que le programme d'action sécuritaire soit exécuté et on s'assure du fait que si la seconde ou la troisième instruction JNZ est exécutée, alors le programme d'action sécuritaire est tout de même exécuté. Selon une variante (en figure 4) du mode de réalisation illustré en figure 1 , on met en œuvre un programme de répartition permettant, non plus de gérer un programme d'action sécuritaire pour l'application, mais plusieurs programmes d'action sécuritaire.In order to also secure the arrival address of the jump, instructions of NOP type, that is to say, not executing any processing, are inserted at the arrival address of the jump. In this way, in the event of a fault, the probability of the security action program being increased is increased and it is ensured that if the second or third JNZ instruction is executed, then the security action program is likewise executed. According to a variant (in FIG. 4) of the embodiment illustrated in FIG. 1, a distribution program is implemented that makes it possible, no longer to manage a security action program for the application, but several security action programs.
Ce programme de répartition est positionné à l'adresse ou aux adresses. Ces adresses sont déterminées de manière décrire pour la mémorisation du programme d'action sécuritaire. Les programmes d'action sécuritaire élémentaires sont, quant à eux, mémorisés à d'autres adresses.This dispatch program is positioned at the address or addresses. These addresses are determined in a manner to describe the memorization of the security action program. Basic security programs are memorized at other addresses.
Le programme de répartition permet de réorienter l'appel au programme d'action sécuritaire élémentaire approprié et gère donc une multitude de programmes d'action sécuritaire élémentaires.The dispatch program reorientates the call to the appropriate elementary safe action program and therefore manages a multitude of basic security programs.
En vue d'implanter ce programme de répartition, et d'être apte à rediriger l'appel vers le programme d'action sécuritaire élémentaire approprié,
une variable globale est mise à jour et mémorise une information indiquant le programme d'action sécuritaire élémentaire à exécuter lorsque un appel à la fonction de répartition est réalisé.In order to implement this distribution program, and to be able to redirect the call to the appropriate elementary security action program, a global variable is updated and stores information indicating the basic security action program to be performed when a call to the dispatch function is made.
Le programme d'action sécuritaire élémentaire, s'il ne conduit pas à la fin prématuré du programme, comprend une instruction de saut vers la suite du programme normal à exécuter.The basic security action program, if it does not lead to the premature termination of the program, includes a jump instruction to the continuation of the normal program to be performed.
Selon ce mode de réalisation, on sécurise l'appel à la fonction de répartition vers les programmes d'action sécuritaire.According to this embodiment, the call to the dispatch function is secured to the security action programs.
La figure 5 représente un dispositif qui possède l'ensemble des moyens nécessaires à la mise en œuvre du procédé de l'invention pour la sécurisation d'un programme informatique.FIG. 5 represents a device that possesses all the means necessary for implementing the method of the invention for securing a computer program.
Ce dispositif est, par exemple, implanté dans un micro-ordinateur et est destiné à la sécurisation d'un programme mémorisé dans une mémoire, notamment dans une mémoire contenue dans une carte à puce. Selon le mode de réalisation choisi, ce dispositif peut être, par exemple, un micro-ordinateur 500, comportant une zone de stockage contenant le programme informatique à sécuriser 501.This device is, for example, implanted in a microcomputer and is intended for securing a program stored in a memory, in particular in a memory contained in a smart card. According to the embodiment chosen, this device may be, for example, a microcomputer 500, comprising a storage area containing the computer program to be secured 501.
Le micro-ordinateur comporte également des moyens d'identification, dans un programme à sécuriser, d'une instruction de saut vers un programme d'action sécuritaire 502.The microcomputer also comprises means for identifying, in a program to be secured, a jump instruction to a security action program 502.
Le micro-ordinateur comporte aussi des moyens de détermination de l'adresse physique de mémorisation du programme d'action sécuritaire 503 ou des moyens de détermination de l'adresse physique de mémorisation du programme de répartition 504 qui sont aptes à déterminer l'adresse physique à partir du code de l'instruction de saut et /ou du code de l'instruction suivant l'instruction de saut.The microcomputer also comprises means for determining the physical address of storage of the security action program 503 or the means for determining the physical address of the storage program 504 which are able to determine the physical address from the code of the jump instruction and / or code of the instruction following the jump instruction.
De plus, le dispositif 500 comporte des moyens 505 pour attribuer, au paramètre d'adressage contenu dans l'instruction de saut, la valeur de l'adresse physique du programme d'action sécuritaire déterminée par les moyens de détermination 503, 504.In addition, the device 500 comprises means 505 for allocating, to the addressing parameter contained in the jump instruction, the value of the physical address of the security action program determined by the determination means 503, 504.
Bien entendu, la présente invention n'est nullement limitée aux modes de réalisation décrits et représentés.
Of course, the present invention is not limited to the embodiments described and shown.
Claims
1. Procédé de sécurisation de l'exécution d'un programme contre des attaques par faute sur des instructions de saut, notamment dans une carte à puce, caractérisé en ce qu'il comprend au moins un cycle comprenant les étapes suivantes : identification dans ce programme d'une instruction de saut sensible à une telle attaque lors de l'exécution dudit programme, vers un programme d'action sécuritaire critique pour la sécurité, l'instruction de saut étant formée d'un code d'instruction et d'un paramètre d'adressage du programme d'action sécuritaire, détermination de l'adresse physique de mémorisation du programme d'action sécuritaire, l'adresse physique étant déterminée à partir du code de l'instruction de saut et / ou du code de l'instruction suivant l'instruction de saut, attribution, au paramètre d'adressage contenu dans l'instruction de saut, de la valeur de l'adresse physique du programme d'action sécuritaire déterminée.1. A method of securing the execution of a program against fault attacks on jump instructions, in particular in a smart card, characterized in that it comprises at least one cycle comprising the following steps: identification in this program of a jump instruction responsive to such an attack during the execution of said program, to a security critical safety action program, the jump instruction being formed of an instruction code and a addressing parameter of the security action program, determination of the physical address of storage of the security action program, the physical address being determined from the code of the jump instruction and / or the code of the instruction following the jump instruction, assigning, to the addressing parameter contained in the jump instruction, the value of the physical address of the determined security action program.
2. Procédé de sécurisation d'un programme selon la revendication2. Method of securing a program according to the claim
1 , caractérisé en ce que le cycle comporte en outre, avant l'étape de détermination, au moins une étape de duplication de ladite instruction de saut vers le programme d'action sécuritaire formant une séquence d'instructions de saut.1, characterized in that the cycle further comprises, before the determining step, at least one step of duplicating said jump instruction to the safety action program forming a sequence of jump instructions.
3. Procédé de sécurisation d'un programme selon la revendication3. Method of securing a program according to the claim
2, dans lequel la longueur de la séquence d'instructions de saut est supérieure ou égale à la longueur du code de l'instruction la plus longue du jeu d'instructions.2, wherein the length of the jump instruction sequence is greater than or equal to the code length of the longest instruction of the instruction set.
4. Procédé de sécurisation d'un programme selon l'une quelconque des revendications précédentes, dans lequel le procédé comprend une étape d'insertion, avant le programme d'action sécuritaire, d'une instruction indiquant ladite adresse physique de mémorisation de ce programme d'action sécuritaire préalablement déterminée.A method of securing a program as claimed in any one of the preceding claims, wherein the method comprises an insertion step, before the security action program, of an instruction indicating said physical address of memorization of this previously determined security action program.
5. Procédé de sécurisation d'un programme selon l'une quelconque des revendications précédentes, selon lequel le cycle comprend en outre, avant l'étape de détermination, une étape d'insertion d'au moins une autre instruction de saut vers le programme d'action sécuritaire suivant l'instruction de saut identifiée, et après l'étape de détermination, les étapes suivantes :5. A method of securing a program according to any one of the preceding claims, wherein the cycle further comprises, before the determining step, a step of inserting at least one other jump instruction to the program. following the jump instruction identified, and after the determining step, the following steps:
- détermination pour chacune desdites autres instructions de saut insérées d'une adresse physique de mémorisation du programme d'action sécuritaire, l'adresse physique étant déterminée à partir du code de l'instruction de saut et / ou du code de l'instruction précédente, - attribution au paramètre de chacune desdites instructions de saut insérées de la valeur de l'adresse physique du programme d'action sécuritaire déterminée.determination for each of said other inserted jump instructions of a physical address of storage of the security action program, the physical address being determined from the code of the jump instruction and / or the code of the preceding instruction assigning to the parameter of each of said inserted jump instructions the value of the physical address of the determined security action program.
6. Procédé de sécurisation d'un programme selon la revendication 5, selon lequel le cycle comprend une étape d'insertion d'au moins une instruction avant le programme d'action sécuritaire indiquant lesdites adresses physiques de mémorisation du programme d'action sécuritaire préalablement déterminées pour l'instruction de saut et pour chacune des autres instructions de saut insérées.6. A method of securing a program according to claim 5, wherein the cycle comprises a step of inserting at least one instruction before the security action program indicating said physical addresses of memory of the security action program previously. determined for the jump instruction and each of the other jump instructions inserted.
7. Procédé de sécurisation d'un programme selon la revendication 5, selon lequel le cycle comprend, en outre, une étape d'insertion d'au moins une instruction, avant le programme d'action sécuritaire, indiquant l'ensemble des adresses physiques de mémorisation du programme d'action sécuritaire, lesdites adresses étant déterminées par l'ensemble des combinaisons possibles des codes de l'instruction de saut et de chacune des instructions de saut insérées. 7. The method of securing a program according to claim 5, wherein the cycle further comprises a step of inserting at least one instruction, before the security action program, indicating all the physical addresses. storing the safe action program, said addresses being determined by the set of possible combinations of the codes of the jump instruction and each of the jump instructions inserted.
8. Procédé de sécurisation selon la revendication 5, dans lequel le cycle comprend en outre, après l'étape de détermination, une étape d'insertion d'au moins une instruction après l'instruction de saut identifiée, cette instruction insérée correspondant à une instruction sans effet dangereux sur le déroulement dudit programme.The method of securing according to claim 5, wherein the cycle further comprises, after the determining step, a step of inserting at least one instruction after the identified jump instruction, said inserted instruction corresponding to a instruction without dangerous effect on the course of the said program.
9. Procédé de sécurisation selon la revendication 1 , caractérisé en ce que le programme d'action sécuritaire est un programme de répartition vers au moins un programme d'action sécuritaire élémentaire.9. Securing method according to claim 1, characterized in that the security action program is a distribution program to at least one elementary security action program.
10. Procédé de sécurisation selon l'une quelconque des revendications précédentes, caractérisé en ce que le programme d'action sécuritaire comprend des instructions de fin prématurée d'exécution du programme.10. Securing method according to any one of the preceding claims, characterized in that the safety action program includes instructions for premature termination of the program.
11. Procédé de sécurisation selon l'une quelconque des revendications 1 à 9, caractérisé en ce que le programme d'action sécuritaire comprend des instructions de réinitialisation de l'exécution du programme.11. Securing method according to any one of claims 1 to 9, characterized in that the security action program includes instructions for resetting the execution of the program.
12. Dispositif de sécurisation de l'exécution d'un programme contre des attaques par faute sur des instructions de saut, notamment dans une carte à puce, caractérisé en ce qu'il comprend : des moyens d'identification (502) aptes à identifier dans ce programme une instruction de saut sensible à une telle attaque lors de l'exécution dudit programme, vers un programme d'action sécuritaire critique pour la sécurité, l'instruction de saut étant formée d'un code d'instruction et d'un paramètre d'adressage du programme d'action sécuritaire, des moyens de détermination de l'adresse physique de mémorisation du programme d'action sécuritaire (503), l'adresse physique étant déterminée à partir du code de l'instruction de saut et / ou du code de l'instruction suivant l'instruction de saut, des moyens d'attribution (505) aptes à attribuer, au paramètre d'adressage contenu dans l'instruction de saut, de la valeur de l'adresse physique du programme d'action sécuritaire déterminée.12. Device for securing the execution of a program against fault attacks on jump instructions, in particular in a smart card, characterized in that it comprises: identifying means (502) able to identify in this program a jump instruction responsive to such an attack during the execution of said program, to a safety critical security action program, the jump instruction being formed of an instruction code and a addressing parameter of the security action program, means for determining the physical address of storage of the security action program (503), the physical address being determined from the code of the jump instruction and / or the code of the instruction following the jump instruction, allocation means (505) capable of assigning, to the addressing parameter contained in the jump instruction, the value of the physical address of the determined security action program.
13. Dispositif de sécurisation d'un programme selon la revendication 12, caractérisé en ce qu'il comprend des moyens de duplication, aptes à dupliquer ladite instruction de saut vers le programme d'action sécuritaire pour former une séquence d'instructions de saut.13. Device for securing a program according to claim 12, characterized in that it comprises duplicating means, able to duplicate said jump instruction to the security action program to form a sequence of jump instructions.
14. Dispositif de sécurisation d'un programme selon la revendication 12 ou la revendication 13, dans lequel le dispositif comprend des moyens d'insertion, avant le programme d'action sécuritaire, d'une instruction indiquant ladite adresse physique de mémorisation de ce programme d'action sécuritaire déterminée par les moyens de détermination.14. Device for securing a program according to claim 12 or claim 13, wherein the device comprises means for inserting, before the safety action program, an instruction indicating said physical address of storage of this program. determined by the means of determination.
15. Dispositif de sécurisation d'un programme selon l'une quelconque des revendications 12 à 14, selon lequel le dispositif comprend :15. Device for securing a program according to any one of claims 12 to 14, wherein the device comprises:
- des moyens d'insertion d'instruction de saut aptes à insérer au moins une autre instruction de saut vers le programme d'action sécuritaire suivant l'instruction de saut identifiée,jump instruction insertion means adapted to insert at least one other jump instruction to the security action program according to the identified jump instruction,
- des moyens de détermination adaptés à déterminer pour chacune desdites autres instructions de saut insérées d'une adresse physique de mémorisation du programme d'action sécuritaire, l'adresse physique étant déterminée à partir du code de l'instruction de saut et / ou du code de l'instruction précédente,determination means adapted to determine for each of said other inserted jump instructions a physical address for storing the security action program, the physical address being determined from the code of the jump instruction and / or the code from the previous statement,
- des moyens d'attribution au paramètre de chacune desdites instructions de saut insérées, de la valeur de l'adresse physique du programme d'action sécuritaire déterminée.means for assigning to the parameter of each of said inserted jump instructions the value of the physical address of the determined security action program.
16. Dispositif de sécurisation d'un programme selon la revendication 15, selon lequel le dispositif comprend des moyens d'insertion d'au moins une instruction avant le programme d'action sécuritaire aptes à indiquer lesdites adresses physiques de mémorisation du programme d'action sécuritaire déterminées par les moyens de détermination pour l'instruction de saut et pour chacune des autres instructions de saut insérées.16. Device for securing a program according to claim 15, wherein the device comprises means for inserting at least one instruction before the safety action program suitable for indicate said physical security program storage addresses determined by the determination means for the jump instruction and for each of the other jump instructions inserted.
17. Dispositif de sécurisation d'un programme selon la revendication 15, selon lequel le dispositif comprend des moyens d'insertion d'au moins une instruction avant le programme d'action sécuritaire aptes à indiquer l'ensemble des adresses physiques de mémorisation du programme d'action sécuritaire, lesdites adresses étant déterminées par l'ensemble des combinaisons possibles des codes de l'instruction de saut et de chacune des instructions de saut insérées.17. Device for securing a program according to claim 15, wherein the device comprises means for inserting at least one instruction before the security action program capable of indicating all the physical memory addresses of the program. of safe action, said addresses being determined by the set of possible combinations of the codes of the jump instruction and each of the jump instructions inserted.
18. Dispositif de sécurisation selon la revendication 15, dans lequel le dispositif comprend des moyens d'insertion d'au moins une instruction après l'instruction de saut identifiée, cette instruction insérée correspondant à une instruction sans effet dangereux sur le déroulement dudit programme.18. Securing device according to claim 15, wherein the device comprises means for inserting at least one instruction after the identified jump instruction, this inserted instruction corresponding to an instruction without dangerous effect on the progress of said program.
19. Dispositif de sécurisation selon la revendication 12, caractérisé en ce que le programme d'action sécuritaire est un programme de répartition vers au moins un programme d'action sécuritaire élémentaire.19. Securing device according to claim 12, characterized in that the security action program is a distribution program to at least one elementary security action program.
20. Programme d'ordinateur stocké sur un support d'informations, ledit programme comportant des instructions permettant la mise en œuvre d'un procédé de sécurisation selon l'une quelconque des revendications 1 à 11 , lorsque ce programme est chargé et exécuté par un système informatique. 20. Computer program stored on an information medium, said program comprising instructions for implementing a security method according to any one of claims 1 to 11, when this program is loaded and executed by a user. computer system.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
FR0507405A FR2888369B1 (en) | 2005-07-11 | 2005-07-11 | PROTECTION AGAINST ATTACKS BY GENERATING FAULTS ON JUMPING INSTRUCTIONS |
FR0507405 | 2005-07-11 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2007006887A1 true WO2007006887A1 (en) | 2007-01-18 |
Family
ID=36010463
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/FR2006/001519 WO2007006887A1 (en) | 2005-07-11 | 2006-06-29 | Protection against attacks by generating errors on jump instructions |
Country Status (2)
Country | Link |
---|---|
FR (1) | FR2888369B1 (en) |
WO (1) | WO2007006887A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI396997B (en) * | 2007-12-28 | 2013-05-21 | Viaccess Sa | Method for securing a conditional jump, information carrier, program, secured system and security processor for this method |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2980600B1 (en) * | 2011-09-23 | 2013-10-25 | Oberthur Technologies | METHOD AND SYSTEM FOR SECURING A SOFTWARE APPLICATION COMPRISING A CONDITIONAL INSTRUCTION BASED ON A BOOLEAN VARIABLE |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0806725A2 (en) * | 1996-05-07 | 1997-11-12 | Sun Microsystems, Inc. | Method and apparatus for easy insertion of assembler code for optimization |
WO2000042511A1 (en) * | 1999-01-11 | 2000-07-20 | Certicom Corp. | Method and apparatus for minimizing differential power attacks on processors |
US20030101351A1 (en) * | 2001-11-28 | 2003-05-29 | Pierre-Yvan Liardet | Blocking of the operation of an integrated circuit |
-
2005
- 2005-07-11 FR FR0507405A patent/FR2888369B1/en not_active Expired - Fee Related
-
2006
- 2006-06-29 WO PCT/FR2006/001519 patent/WO2007006887A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0806725A2 (en) * | 1996-05-07 | 1997-11-12 | Sun Microsystems, Inc. | Method and apparatus for easy insertion of assembler code for optimization |
WO2000042511A1 (en) * | 1999-01-11 | 2000-07-20 | Certicom Corp. | Method and apparatus for minimizing differential power attacks on processors |
US20030101351A1 (en) * | 2001-11-28 | 2003-05-29 | Pierre-Yvan Liardet | Blocking of the operation of an integrated circuit |
Non-Patent Citations (2)
Title |
---|
KADAYIF I ET AL: "Generating physical addresses directly for saving instruction TLB energy", MICROARCHITECTURE, 2002. (MICRO-35). PROCEEDINGS. 35TH ANNUAL IEEE/ACM INTERNATIONAL SYMPOSIUM ON 18-22 NOV. 2002, PISCATAWAY, NJ, USA,IEEE, 18 November 2002 (2002-11-18), pages 185 - 196, XP010626990, ISBN: 0-7695-1859-1 * |
REBAUDENGO M ET AL: "A source-to-source compiler for generating dependable software", SOURCE CODE ANALYSIS AND MANIPULATION, 2001. PROCEEDINGS. FIRST IEEE INTERNATIONAL WORKSHOP ON 10 NOVEMBER 2001, PISCATAWAY, NJ, USA,IEEE, 2001, pages 35 - 44, XP010569440, ISBN: 0-7695-1387-5 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI396997B (en) * | 2007-12-28 | 2013-05-21 | Viaccess Sa | Method for securing a conditional jump, information carrier, program, secured system and security processor for this method |
Also Published As
Publication number | Publication date |
---|---|
FR2888369B1 (en) | 2007-10-26 |
FR2888369A1 (en) | 2007-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1161725B1 (en) | Method for monitoring a programme flow | |
EP0475837B1 (en) | Method of managing an application program stored in an ic card | |
FR2877118A1 (en) | PROTECTION AGAINST ATTACKS BY GENERATING FAULTS ON JUMPING INSTRUCTIONS | |
EP1904946B1 (en) | Detection of faults during a long perturbation | |
EP2453356B1 (en) | Method, computer program and device for securing byte code to be run by a virtual machine | |
EP2565810A1 (en) | Microprocessor protected against memory dump | |
EP0919026A1 (en) | Method for modifying code sequences and related device | |
WO2007068706A1 (en) | Method for making secure execution of an intermediate language software code in a portable appliance | |
WO2007006887A1 (en) | Protection against attacks by generating errors on jump instructions | |
FR2765363A1 (en) | METHOD AND SYSTEM FOR CONTROLLING THE USE OF A SOFTWARE | |
WO2001002955A1 (en) | Method for verifying code transformers for an incorporated system, in particular in a chip card | |
WO2009115712A2 (en) | Method of securing execution of a program | |
EP1770524A2 (en) | Detection of sequence errors in a program execution | |
FR2879781A1 (en) | METHOD AND DEVICE FOR FILLING THE SECURITY OF A MEMORY AND ASSOCIATED MEMORY | |
EP1512071A2 (en) | Code verification method for limited resource microcircuits | |
EP4057169B1 (en) | Method for executing a binary code of a computer program by a microprocessor | |
EP4177780A1 (en) | Method for detecting an attempt at linear extraction of the contents of a memory | |
EP1547005B2 (en) | Microcircuit card whereof the performances can be modified after customization | |
EP3203405B1 (en) | Method for executing instructions of object-oriented applications by an interpreter | |
WO2023083776A1 (en) | Process for detecting an attempted linear extraction of the content of a memory | |
FR2895814A1 (en) | Computer application program execution securing method for chip card, involves initializing program counter and continuing program execution when content of counter is equal to stored number of neutral instructions | |
EP3317832B1 (en) | Monitoring method implemented by an electronic device during a transaction, and corresponding device | |
FR3140186A1 (en) | Method for detecting an attempt to linearly extract the contents of a memory | |
WO2012172245A1 (en) | Secure transfer between non-volatile memory and volatile memory | |
EP1591866A1 (en) | Control of execution of an algorithm by an integrated circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWW | Wipo information: withdrawn in national office |
Country of ref document: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 06778711 Country of ref document: EP Kind code of ref document: A1 |