FR2836569A1 - Memory space for chip card downloaded applications has a data structure and two separate memory parts that improve card security in the face of attacks against applet type applications - Google Patents
Memory space for chip card downloaded applications has a data structure and two separate memory parts that improve card security in the face of attacks against applet type applications Download PDFInfo
- Publication number
- FR2836569A1 FR2836569A1 FR0202581A FR0202581A FR2836569A1 FR 2836569 A1 FR2836569 A1 FR 2836569A1 FR 0202581 A FR0202581 A FR 0202581A FR 0202581 A FR0202581 A FR 0202581A FR 2836569 A1 FR2836569 A1 FR 2836569A1
- Authority
- FR
- France
- Prior art keywords
- memory space
- memory
- parts
- opn
- stack
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
- G06Q20/35765—Access rights to memory zones
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
- G06F9/4484—Executing subprograms
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/3552—Downloading or loading of personalisation data
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Accounting & Taxation (AREA)
- Strategic Management (AREA)
- Microelectronics & Electronic Packaging (AREA)
- General Business, Economics & Management (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
Description
<Desc/Clms Page number 1> <Desc / Clms Page number 1>
Espace mémoire pour données d'application téléchargées dans une carte à puce
La présente invention concerne la gestion d'un espace mémoire destiné à mémoriser des cadres de données d'une application téléchargée qui a été écrite dans un langage de haut niveau orienté objet et qui est exécutée dans un objet électronique portable du type carte à puce. Memory space for application data downloaded to a smart card
The present invention relates to the management of a memory space intended for storing data frames of a downloaded application which has been written in a high level object oriented language and which is executed in a portable electronic object of the smart card type.
Comme montré à la figure 1, la carte à puce CP, dite également carte à microcontrôleur, contient un microprocesseur PR, une mémoire MO du type ROM, une mémoire non volatile de données de machine MDM de type EEPROM et une mémoire à accès aléatoire MDE de données échangées avec l'extérieur de type RAM. Tous les composants PR, MO, MDM et MDE sont reliés par un bus interne BU. As shown in FIG. 1, the chip card CP, also known as a microcontroller card, contains a microprocessor PR, a memory MO of the ROM type, a non-volatile memory of machine data MDM of the EEPROM type and a random access memory MDE of data exchanged with the external RAM type. All PR, MO, MDM and MDE components are connected by an internal BU bus.
La mémoire MO contient des instructions en code natif d'un système d'exploitation OS (Operating System) et des pseudocodes d'une machine virtuelle VM qui s'appuie sur le système d'exploitation, et au moins des applications internes d'authentification et de communication. The MO memory contains instructions in native code of an OS (Operating System) and pseudocodes of a VM virtual machine which is based on the operating system, and at least internal authentication applications and communication.
La mémoire non volatile MDM contient essentiellement des données liées au système d'exploitation et accessibles par codes natifs et des données liées à la machine virtuelle VM et accessibles par pseudocodes ainsi que les pseudocodes et les données d'application. La mémoire MDM contient également des données personnelles liées au possesseur de la carte à puce. The non-volatile memory MDM essentially contains data linked to the operating system and accessible by native codes and data linked to the virtual machine VM and accessible by pseudocodes as well as the pseudocodes and application data. The MDM memory also contains personal data linked to the owner of the smart card.
La mémoire MDE de type RAM contient essentiellement des données échangées avec le monde extérieur à la carte à puce CA, notamment avec une The RAM type MDE memory essentially contains data exchanged with the outside world of the CA smart card, in particular with a
<Desc/Clms Page number 2><Desc / Clms Page number 2>
plate-forme d'accueil, tel qu'un terminal TE doté d'un lecteur de carte à puce LE, à travers une liaison LI à contact ou sans contact. En particulier, la mémoire MDE contient des données au moins d'une application téléchargée, telle qu'une applet AP. reception platform, such as a TE terminal equipped with a LE smart card reader, via a contact or contactless LI link. In particular, the memory MDE contains data from at least one downloaded application, such as an AP applet.
L'applet a été initialement écrite en langage de haut niveau, tel que le langage Java, ou plus particulièrement le langage Java Card, puis compilée en langage intermédiaire. L'applet est composée d'instructions appelées pseudocodes (bytecodes) qui sont prêtes à être exécutées par la machine virtuelle VM qui constitue un interpréteur dans la carte à puce. The applet was initially written in high-level language, such as Java language, or more particularly Java Card language, then compiled in intermediate language. The applet is made up of instructions called pseudocodes (bytecodes) which are ready to be executed by the virtual machine VM which constitutes an interpreter in the smart card.
Par exemple, lorsque la carte à puce est une carte de paiement, le terminal est un terminal bancaire ou un terminal point de vente, ou lorsque la carte à puce est un module d'identité d'abonné téléphonique amovible SIM (Subscriber Identity Module), le terminal est un radiotéléphone cellulaire mobile. Selon d'autres variantes, l'objet électronique portable au lieu d'être une carte à puce peut être un assistant numérique personnel PDA ou un porte-monnaie électronique. For example, when the chip card is a payment card, the terminal is a bank terminal or a point of sale terminal, or when the chip card is a removable telephone subscriber identity module SIM (Subscriber Identity Module) , the terminal is a mobile cellular radiotelephone. According to other variants, the portable electronic object instead of being a smart card can be a PDA personal digital assistant or an electronic purse.
L'invention est dirigée plus particulièrement vers la gestion d'un espace mémorisé EM de taille TEM alloué à des cadres de données d'application mémoire MDE du type RAM de l'objet électronique portable, tel que la carte à puce CP à laquelle on se référera dans la suite. L'applet AP est téléchargée depuis un serveur à travers le terminal d'accueil TE et la liaison LI pour être exécutée principalement dans la carte. The invention is directed more particularly to the management of a memorized space EM of size TEM allocated to memory application data frames MDE of the RAM type of the portable electronic object, such as the smart card CP to which one will be referred to below. The AP applet is downloaded from a server through the TE reception terminal and the LI link to be executed mainly in the card.
Selon la technique antérieure, l'espace mémoire EM réservé à des cadres de données d'une applet According to the prior art, the memory space EM reserved for data frames of an applet
<Desc/Clms Page number 3><Desc / Clms Page number 3>
compilée AP est organisé en une pile PI ayant une taille prédéterminée TP < TEM et une largeur L fixée à deux octets, comme illustré schématiquement aux figures 2 et 3. Les tailles sont ici exprimées en paire d'octets. Dans les figures 2 et 3 sont dessinés seulement deux cadres Cn et Cn+l sur le dessus de la pile, en admettant par convention que la pile croît vers le haut, bien qu'elle pourrait croître vers le bas au lieu de croître vers le haut ; par conséquent le dernier cadre Cn+l empilé est le cadre actif. Les données dans la pile PI sont lues au moyen d'un pointeur de pile PP géré par le processeur PR pour l'application AP. compiled AP is organized in a PI stack having a predetermined size TP <TEM and a width L fixed at two bytes, as illustrated diagrammatically in FIGS. 2 and 3. The sizes are here expressed in pairs of bytes. In Figures 2 and 3 are drawn only two frames Cn and Cn + l on the top of the stack, assuming by convention that the stack grows upwards, although it could grow downwards instead of growing upwards high ; therefore the last Cn + l stacked frame is the active frame. The data in the stack PI is read by means of a stack pointer PP managed by the processor PR for the application AP.
Chaque cadre Cn introduit sur la pile inclut une méthode invoquée respective Mn de l'application AP. Each frame Cn introduced on the stack includes a respective invoked method Mn of the application AP.
Ainsi l'invocation d'une méthode Mn+l dans l'application AP sous le contrôle du processeur PR provoque l'empilement d'un cadre respectif Cn+l sur le dessus de la pile PI dans laquelle sont maintenus empilés les autres cadres Ml à Mn. Les méthodes s'invoquent les unes les autres, la méthode Mn invoquant la méthode Mn+l et la méthode Mn+l ne pouvant que retourner à la méthode précédente Mn, en dépilant et écartant la méthode Mn+l du dessus de la pile PI, ou pouvant invoquer une nouvelle méthode Mn+2. Seulement la méthode Mn+l dans le cadre supérieur Cn+l de la pile est active. Thus the invocation of a method Mn + l in the application AP under the control of the processor PR causes the stacking of a respective frame Cn + l on the top of the stack PI in which the other frames Ml are kept stacked. at Mn. The methods invoke each other, the Mn method invoking the Mn + l method and the Mn + l method can only return to the previous Mn method, by unstacking and discarding the Mn + l method from above the PI stack , or which can invoke a new Mn + 2 method. Only the method Mn + l in the upper frame Cn + l of the stack is active.
Chaque cadre Cn est composé successivement d'une première partie de variable locale VLn ayant une taille fixe respective prédéterminée, d'une deuxième partie de données de machine virtuelle DMn ayant une taille fixe respective prédéterminée, et d'une troisième partie d'opérande OPn ayant une taille variable. Each frame Cn is successively composed of a first part of local variable VLn having a respective predetermined fixed size, of a second part of virtual machine data DMn having a respective fixed predetermined size, and of a third operand part OPn having a variable size.
<Desc/Clms Page number 4> <Desc / Clms Page number 4>
La partie VLn contient aucune, une ou plusieurs variables locales qui sont déclarées lors de l'implémentation de la méthode Mn dans l'espace mémoire EM et avant l'exécution de la méthode Mn. Les variables locales servent à l'exécution de la méthode Mn, leur nombre n'étant pas modifié mais leurs valeurs étant modifiées au cours de l'exécution de la méthode. La taille de la première partie VLn est donc fixe et prédéterminée avant l'exécution de la méthode Mn. Les variables locales peuvent être la désignation de l'objet dont la méthode est appelée, des paramètres de la méthode et d'autres variables locales. The VLn part contains none, one or more local variables which are declared during the implementation of the method Mn in the memory space EM and before the execution of the method Mn. The local variables are used for the execution of the method Mn, their number not being modified but their values being modified during the execution of the method. The size of the first part VLn is therefore fixed and predetermined before the execution of the method Mn. Local variables can be the designation of the object whose method is called, method parameters, and other local variables.
Les données de machine Java Card dans la partie DMn, appelées également données de système (system data), permettent à la machine virtuelle de revenir à la méthode précédente Min-1 et en particulier de positionner convenablement le pointeur de pile PP dans l'espace mémoire EM au niveau de la méthode Min-1 où la méthode courante Mn avait été appelée. Java Card machine data in the DMn part, also called system data, allows the virtual machine to revert to the previous Min-1 method and in particular to correctly position the PP stack pointer in space EM memory at the level of the Min-1 method where the current method Mn had been called.
Les opérandes dans la troisième partie OPn du cadre Cn sont des valeurs utilisées par la machine virtuelle pour exécuter les prochaines opérations et en particulier utilisées comme argument de l'appel de la méthode Mn+l. Comme indiqué à la figure 2 par un chevauchement CHn+l de la partie d'opérande OPn de la méthode Mn et de la partie de variable locale VLn+l de la méthode suivante Mn+l, des opérandes de la méthode Mn peuvent devenir des valeurs locales de la méthode immédiatement sus-jacente Mn+l lors de l'implémentation de la méthode Mn+i, et inversement le résultat de la méthode Mn+l peut devenir un opérande de la méthode immédiatement sous-jacente Mn lors du retour à celle-ci. The operands in the third part OPn of the framework Cn are values used by the virtual machine to execute the next operations and in particular used as argument of the call to the method Mn + l. As indicated in FIG. 2 by an overlap CHn + l of the operand part OPn of the method Mn and of the local variable part VLn + l of the following method Mn + l, operands of the method Mn can become local values of the immediately overlying method Mn + l when implementing the method Mn + i, and conversely the result of the method Mn + l can become an operand of the immediately underlying method Mn when returning to it.
<Desc/Clms Page number 5> <Desc / Clms Page number 5>
Pour une méthode, telle que la méthode Mn+1, soit appelée et donc pour que le cadre de données
Cn+l puisse être construit, l'information de taille maximale Tn+l qu'est susceptible d'atteindre la méthode appelée Mn+l au cours de son exécution est précalculée lors de la création du pseudo-code de l'application à l'extérieur de la carte, puis chargée avec l'applet dans la carte. De plus, un vérificateur VER dans le terminal d'accueil TE recalcule la taille maximale Tn+l qu'est susceptible d'atteindre la méthode appelée Mn+l au cours de son exécution, puis vérifie qu'elle correspond à celle précalculée dans le pseudocode de l'application. Avant d'implémenter la méthode Mn+l dans l'espace mémoire EM alloué à l'applet AP, la machine virtuelle ajoute la taille Tn+l-CHn+l à la somme courante des tailles Tel-0 à Tn-CHn des cadres de méthode déjà empilés en la
pile PI, c'est-à-dire à la taille TPI de la pile afin de la comparer à la taille TEM. Si T+l-CH+i + TPI > TEM est vérifiée, un débordement de pile DB (overflow en anglais) est détecté comme montré à la figure 2, et la machine virtuelle signale une erreur. For a method, such as the method Mn + 1, is called and therefore for the data frame
Cn + l can be constructed, the information of maximum size Tn + l that is likely to reach the method called Mn + l during its execution is precalculated during the creation of the pseudo-code of the application at l outside the map, then loaded with the applet into the map. In addition, a verifier VER in the reception terminal TE recalculates the maximum size Tn + l that is likely to reach the method called Mn + l during its execution, then verifies that it corresponds to that precalculated in the application pseudocode. Before implementing the method Mn + l in the memory space EM allocated to the applet AP, the virtual machine adds the size Tn + l-CHn + l to the current sum of the sizes Tel-0 to Tn-CHn of the frames of method already stacked in the
PI stack, i.e. the TPI size of the stack in order to compare it to the TEM size. If T + l-CH + i + TPI> TEM is verified, a DB stack overflow is detected as shown in Figure 2, and the virtual machine reports an error.
En revanche, si la taille Tn+i-CHn+l de la méthode appelée Mn+l est compatible avec la portion vide restante supérieure dans l'espace mémoire EM, le cadre Cn+l de la méthode Mn+l est écrit pour exécuter celle-ci. On the other hand, if the size Tn + i-CHn + l of the method called Mn + l is compatible with the upper empty portion remaining in the memory space EM, the frame Cn + l of the method Mn + l is written to execute it.
Inversement, lorsqu'une méthode, telle que la méthode Mn+l, est exécutée, le pointeur PP de la pile PI doit rester dans la partie d'opérande OPn+l et ne doit jamais en sortir pour pointer des données de machine virtuelle dans la partie intermédiaire DM+i. Conversely, when a method, such as the method Mn + l, is executed, the pointer PP of the stack PI must remain in the operand part OPn + l and must never leave it to point to virtual machine data in the intermediate part DM + i.
Dans le cas contraire, un"dépassement inférieur"DI (underflow en anglais) de la partie OPn+i survient comme montré à la figure 3. Pour surmonter ce défaut, Otherwise, an "underflow" DI (underflow in English) of the OPn + i part occurs as shown in Figure 3. To overcome this defect,
<Desc/Clms Page number 6><Desc / Clms Page number 6>
certains vérificateurs vérifient initialement, avant l'implémentation d'une méthode Mn+l sur la pile PI qu'un dépassement inférieur ne surviendra jamais en testant tous les chemins possibles dans la méthode avant son exécution afin que tout empilement dans la partie supérieure OPn+l ne soit pas suivi d'un dépilement plus grand jusqu'à atteindre la partie de données de machine DM+l. Si le test de l'un des chemins signale un dépassement inférieur, le vérificateur VER refuse la méthode Mn+l et signale une erreur. some verifiers initially check, before the implementation of a method Mn + l on the PI stack that a lower overflow will never occur by testing all the possible paths in the method before its execution so that any stacking in the upper part OPn + l is not followed by a larger unstacking until reaching the machine data part DM + l. If the test of one of the paths indicates a lower overshoot, the verifier VER refuses the method Mn + l and reports an error.
Cependant, il arrive parfois que les fonctions du vérificateur soient écartées par une introduction malveillante de pseudocodes dans l'applet AP. However, it sometimes happens that the functions of the verifier are bypassed by a malicious introduction of pseudocodes into the AP applet.
L'applet non vérifiée est alors téléchargée dans la carte à puce. Dans ce cas, tout excès d'empilement de méthode au-dessus de la pile PI dans l'espace mémoire EM provoque un débordement DB. Si l'exécution d'une
méthode Mn+l cause un dépassement inférieur DI après dépilage de la partie d'opérande OP+i, des données de machine dans la partie DMn+l sont atteintes, ce qui modifie le contexte de la méthode invoquante Mn. The unverified applet is then downloaded to the smart card. In this case, any excess method stacking on top of the stack PI in the memory space EM causes an overflow DB. If the execution of a
method Mn + l causes a lower overrun DI after unstacking of the operand part OP + i, machine data in the part DMn + l are reached, which modifies the context of the invoking method Mn.
Les données de machine virtuelle dans la partie DMn du cadre Cn de chaque méthode ne doivent pas être modifiées et être sujettes à des attaques par l'implémentation d'apples par des développeurs peu scrupuleux. Par le biais particulièrement d'un dépassement inférieur, les données de machine virtuelle peuvent être modifiées pour retourner à la méthode exécutée avec des paramètres choisis, par exemple pour exécuter des codes choisis avec un contexte déterminé. The virtual machine data in the DMn part of the Cn frame of each method should not be modified and be subject to attack by the implementation of apples by unscrupulous developers. Particularly by means of a lower overflow, the virtual machine data can be modified to return to the method executed with chosen parameters, for example to execute chosen codes with a determined context.
<Desc/Clms Page number 7> <Desc / Clms Page number 7>
L'invention vise à remédier aux conséquences de ces attaques particulièrement lorsque les méthodes d'applet ne sont pas préalablement vérifiées avant leur implémentation dans la mémoire de données échangées dans un objet électronique portable. The invention aims to remedy the consequences of these attacks, particularly when the applet methods are not previously checked before their implementation in the memory of data exchanged in a portable electronic object.
A cette fin, un espace mémoire alloué à une pile de cadres de données d'application téléchargée dans un objet électronique portable, chaque cadre comportant successivement au moins une partie de données de machine et une partie d'opérande ayant une longueur variable lors de l'exécution du code associé au cadre, est caractérisé en ce qu'il est composé d'un premier espace mémoire alloué à l'empilement des parties de données de machine, et d'un deuxième espace mémoire alloué à l'empilement des parties d'opérandes, les premier et deuxième espaces mémoires étant disjoints et ayant des pointeurs indépendants. To this end, a memory space allocated to a stack of application data frames downloaded into a portable electronic object, each frame successively comprising at least one part of machine data and one part of operand having a variable length during the execution of the code associated with the frame, is characterized in that it is composed of a first memory space allocated to the stacking of parts of machine data, and of a second memory space allocated to the stacking of parts d operands, the first and second memory spaces being disjoint and having independent pointers.
Même lorsque l'applet constituant l'application téléchargée et comprenant les méthodes dont les parties sont réparties dans les premier et deuxième espaces mémoires, n'est pas vérifiée, tout code "malicieux"introduit dans l'une des parties d'opérande de l'applet incluses dans le deuxième espace mémoire n'aura aucune conséquence sur les parties de données de machine virtuelle sensibles dans le premier espace mémoire. Even when the applet constituting the downloaded application and comprising the methods the parts of which are distributed in the first and second memory spaces, is not verified, any "malicious" code introduced into one of the operand parts of the The applet included in the second memory space will have no consequence on the sensitive virtual machine data parts in the first memory space.
En général, chaque cadre (frame) d'une méthode peut contenir une partie de variable locale. Dans cette réalisation, le deuxième espace mémoire contient les parties de variable locale empilées alternativement avec les parties d'opérande. In general, each frame of a method can contain a part of local variable. In this embodiment, the second memory space contains the parts of local variable stacked alternately with the parts of operand.
D'autres caractéristiques et avantages de la présente invention apparaîtront plus clairement à la Other characteristics and advantages of the present invention will appear more clearly on
<Desc/Clms Page number 8><Desc / Clms Page number 8>
lecture de la description suivante de plusieurs réalisations préférées de l'invention en référence aux dessins annexés correspondants dans lesquels : - la figure 1 est un bloc-diagramme schématique déjà commenté d'une carte à puce liée à un terminal d'accueil ; - les figures 2 et 3 montrent schématiquement des piles dans un espace mémoire alloué à des méthodes d'applet respectivement lors d'un débordement et d'un dépassement inférieur, selon la technique antérieure déjà commentée ; et - la figure 4 montre schématiquement deux espaces mémoires alloués à des méthodes d'applet selon l'invention. Reading the following description of several preferred embodiments of the invention with reference to the corresponding accompanying drawings in which: - Figure 1 is a schematic block diagram already commented on a smart card linked to a reception terminal; - Figures 2 and 3 schematically show stacks in a memory space allocated to applet methods respectively during an overflow and a lower overflow, according to the prior art already commented; and - Figure 4 schematically shows two memory spaces allocated to applet methods according to the invention.
Selon une réalisation préférée de l'invention, l'objet électronique portable est une carte à puce CP telle que décrite précédemment en référence à la figure 1, à l'exception de l'organisation de l'espace mémoire alloué à des cadres (frames) de données Cn contenant des méthodes Mn d'une applet compilée téléchargée AP dans la mémoire MDE de type RAM de la carte. According to a preferred embodiment of the invention, the portable electronic object is a smart card CP as described above with reference to FIG. 1, with the exception of the organization of the memory space allocated to frames (frames ) of data Cn containing methods Mn of a compiled applet downloaded AP into the memory MDE of RAM type of the card.
Comme montré à la figure 4, l'espace mémoire est selon l'invention scindé en deux espaces mémoires disjoints EM1 et EM2. Les pointeurs PP1 et PP2 des espaces mémoires EM1 et EM2 sont complètement indépendants : le pointeur PP1 ne peut pas atteindre l'espace EM2 et le pointeur PP2 ne peut pas atteindre l'espace EM1. Tout débordement (overflow) ou dépassement inférieur (underflow) dans l'un des espaces mémoires EM1 et EM2 ne peut pas influencer le contenu de l'autre espace mémoire. Dans la figure 4 sont seulement représentés trois cadres Con-1, Cn et Cn+l de méthodes Mon-1, Mn et Mn+l en haut d'une pile As shown in FIG. 4, the memory space according to the invention is split into two disjoint memory spaces EM1 and EM2. The pointers PP1 and PP2 of the memory spaces EM1 and EM2 are completely independent: the pointer PP1 cannot reach the space EM2 and the pointer PP2 cannot reach the space EM1. Any overflow or underflow in one of the EM1 and EM2 memory spaces cannot influence the content of the other memory space. In Figure 4 are shown only three frames Con-1, Cn and Cn + l of methods Mon-1, Mn and Mn + l at the top of a stack
<Desc/Clms Page number 9> <Desc / Clms Page number 9>
de l'applet AP, chaque cadre comportant une partie de variable locale VL-i, VLn, VL+l, une partie de données de machine virtuelle Din-1, DM, DM+i et une partie d'opérande Pn-lt OPn, OPn+1.
of the AP applet, each frame comprising a part of local variable VL-i, VLn, VL + l, a part of virtual machine data Din-1, DM, DM + i and a part of operand Pn-lt OPn , OPn + 1.
Le premier espace mémoire EM1 est propre à recevoir les données sensibles à protéger constituées par les parties de données de machine virtuelle DMn des cadres Cn des méthodes Mn d'applets. The first memory space EM1 is suitable for receiving the sensitive data to be protected constituted by the virtual machine data parts DMn of the frames Cn of the methods Mn of applets.
Le deuxième espace mémoire EM2 est disponible pour les premières parties VLn contenant des variables locales des méthodes Mn et ayant des tailles fixes respectives et pour les troisièmes parties OPn contenant des opérandes des méthodes Mn et ayant des tailles variables respectives, dans les cadres d'applet Cn. La taille T2 du deuxième espace mémoire EM2 est bien souvent plus grande que la taille Tl du premier espace mémoire EM1. The second memory space EM2 is available for the first parts VLn containing local variables of the methods Mn and having respective fixed sizes and for the third parts OPn containing operands of the methods Mn and having respective variable sizes, in the applet frames Cn. The size T2 of the second memory space EM2 is very often larger than the size T1 of the first memory space EM1.
L'empilement alternatif des parties de variable locale VL1 à VLn+l et des parties d'opérande OP1 à OPn+l dans l'espace mémoire commun EM2 permet de conserver le chevauchement CH entre la partie de variable locale VLn d'une méthode Mn et la partie d'opérande OPn+i de la méthode sus-jacente M+ lorsque cette dernière est implémentée. The alternating stacking of the parts of local variable VL1 to VLn + l and of the parts of operand OP1 to OPn + l in the common memory space EM2 makes it possible to preserve the overlap CH between the part of local variable VLn of a method Mn and the operand part OPn + i of the overlying method M + when the latter is implemented.
Quand par exemple la méthode Mn est invoquée alors que la pile d'applet contient les méthodes Ml à Mn-1 avec les parties de données de machine virtuelle DMi à DMn-1 empilées dans l'espace mémoire EM1 et avec les paires de partie de valeur locale et de partie d'opérande VL-OP à VLn-1-OPn-1 empilées dans l'espace mémoire EM2, la machine virtuelle VM incrémente d'abord le pointeur PP2 pour écrire la partie de variable locale VLn sur la pile dans l'espace mémoire EM2, puis incrémente le pointeur PP1 When for example the method Mn is invoked while the applet stack contains the methods Ml to Mn-1 with the virtual machine data parts DMi to DMn-1 stacked in the memory space EM1 and with the part pairs of local value and operand part VL-OP to VLn-1-OPn-1 stacked in the memory space EM2, the virtual machine VM first increments the pointer PP2 to write the part of local variable VLn on the stack in the memory space EM2, then increments the pointer PP1
<Desc/Clms Page number 10><Desc / Clms Page number 10>
pour écrire la partie de données de machine virtuelle DMn dans l'espace mémoire EM1. Finalement, la machine virtuelle VM incrémente à nouveau le pointeur PP2 pour écrire la partie d'opérande OPn au fur et à mesure de l'exécution de la méthode Mn dans l'espace mémoire EM2. Inversement, le dépilage de la méthode Mn pour revenir à la méthode sous-jacente Mn-l s'effectue par un effacement successivement de la partie OPn dans l'espace EM2, de la partie DMn dans l'espace EM1 et de la partie VLn dans l'espace EM2. to write the virtual machine data part DMn to the memory space EM1. Finally, the virtual machine VM again increments the pointer PP2 to write the operand part OPn as the method Mn is executed in the memory space EM2. Conversely, the unstacking of the method Mn to return to the underlying method Mn-1 is carried out by successively erasing the part OPn in the space EM2, the part DMn in the space EM1 and the part VLn in the EM2 space.
Lorsqu'un débordement DE (overflow) survient, par exemple lors de l'implémentation du cadre Cn+l de la méthode Mn+i, ce qui résulte d'un débordement seulement dans l'espace EM2 par la partie d'opérande OPn+l, toutes les données de machine DM à DMn+l empilées dans l'espace mémoire EM1 restent intactes : les données de machine ne sont pas affectées. When an overflow DE occurs, for example during the implementation of the framework Cn + l of the method Mn + i, which results from an overflow only in the space EM2 by the operand part OPn + l, all the machine data DM to DMn + l stacked in the memory space EM1 remain intact: the machine data are not affected.
Lorsqu'un dépassement inférieur DI (underflow) survient par exemple lors du dépilage de la partie d'opérande OP+i de la méthode active Mn+l sur la pile, le pointeur PP2 de l'espace mémoire EM2 pointe dans la partie de variable locale sous-jacente VLn+l, sans atteindre les données de machine DMn+l dans l'autre espace mémoire EM1. When a lower overflow DI (underflow) occurs for example during the unstacking of the operand part OP + i of the active method Mn + l on the stack, the pointer PP2 of the memory space EM2 points in the variable part local locale VLn + l, without reaching the machine data DMn + l in the other memory space EM1.
Pour ces deux défauts, les données de machine virtuelle sensibles empilées dans l'espace mémoire EM1 ne sont affectées selon l'invention et sont donc bien protégées. For these two faults, the sensitive virtual machine data stacked in the memory space EM1 is not affected according to the invention and is therefore well protected.
En condition normale dans la machine virtuelle VM, les débordements dans les deux espaces mémoires EM1 et EM2 sont surveillés, en comparant la taille Tl de l'espace mémoire EM1 à la somme de la taille prédéterminée de la partie de données de machine DMn+l de la méthode courante Mn+l à implémenter et la taille de la pile des parties de données DM] à DMn In normal condition in the virtual machine VM, the overflows in the two memory spaces EM1 and EM2 are monitored, by comparing the size Tl of the memory space EM1 to the sum of the predetermined size of the machine data part DMn + l of the current method Mn + l to be implemented and the stack size of the data parts DM] to DMn
<Desc/Clms Page number 11><Desc / Clms Page number 11>
des méthodes précédentes Mi à Mn dans l'espace mémoire EM1, et en comparant la taille T2 de l'espace mémoire EM2 à la somme de la taille maximale respective de la partie de variable locale OPn+i de la méthode courante Mon+1 la taille prédéterminée respective de la partie de variable locale VLn+i de la méthode courante moins le chevauchement CMn+l, et la taille de la pile des couples de partie de variable locale et de partie d'opérande VOL -OPE à VLn-OPn des méthodes précédentes Ml à Mn dans l'espace mémoire EM2. La méthode courante est refusée lorsque l'une des sommes excède la taille de l'espace mémoire respectif. of the previous methods Mi to Mn in the memory space EM1, and by comparing the size T2 of the memory space EM2 to the sum of the respective maximum size of the part of local variable OPn + i of the current method Mon + 1 la respective predetermined size of the local variable part VLn + i of the current method minus the overlap CMn + l, and the stack size of the pairs of local variable part and operand part VOL -OPE to VLn-OPn of previous methods Ml to Mn in the memory space EM2. The current method is refused when one of the sums exceeds the size of the respective memory space.
Encore en condition normale lors d'un dépassement inférieur DI par dépilage de la partie d'opérande, le pointeur PP2 ne pourra sortir de la partie d'opérande OPn+l de la méthode active Mn+l que pour entrer dans des parties inférieures VL1 à VLn+l et O i à OPn qui ne sont pas sensibles, contrairement aux parties de données de machine virtuelle DM à DMn+l dans l'autre espace mémoire EM1. Still in normal condition during a DI overflow by unstacking the operand part, the pointer PP2 can only leave the operand part OPn + l of the active method Mn + l only to enter the lower parts VL1 to VLn + l and O i to OPn which are not sensitive, unlike the virtual machine data parts DM to DMn + l in the other memory space EM1.
L'invention n'est pas limitée à la séparation très prononcée des espaces mémoires EM1 et EM2 illustrée à la figure 4. En variante, les espaces mémoires EM1 et EM2 sont contigus et leurs pointeurs PP1 et PP2 varient en sens opposé, par exemple l'un croît vers le haut et l'autre croît vers le bas. The invention is not limited to the very pronounced separation of the memory spaces EM1 and EM2 illustrated in FIG. 4. As a variant, the memory spaces EM1 and EM2 are contiguous and their pointers PP1 and PP2 vary in opposite directions, for example l 'one grows up and the other grows down.
Selon une autre réalisation qui peut être combinée à la première, la séparation des espaces mémoires peut être améliorée en choisissant deux espaces dont les instructions d'accès par le processeur PR sont différentes. According to another embodiment which can be combined with the first, the separation of the memory spaces can be improved by choosing two spaces whose access instructions by the processor PR are different.
Claims (3)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| FR0202581A FR2836569B1 (en) | 2002-02-28 | 2002-02-28 | MEMORY SPACE FOR APPLICATION DATA DOWNLOADED IN A CHIP CARD |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| FR0202581A FR2836569B1 (en) | 2002-02-28 | 2002-02-28 | MEMORY SPACE FOR APPLICATION DATA DOWNLOADED IN A CHIP CARD |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| FR2836569A1 true FR2836569A1 (en) | 2003-08-29 |
| FR2836569B1 FR2836569B1 (en) | 2005-02-25 |
Family
ID=27676197
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| FR0202581A Expired - Fee Related FR2836569B1 (en) | 2002-02-28 | 2002-02-28 | MEMORY SPACE FOR APPLICATION DATA DOWNLOADED IN A CHIP CARD |
Country Status (1)
| Country | Link |
|---|---|
| FR (1) | FR2836569B1 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2239334A (en) * | 1989-12-22 | 1991-06-26 | Intel Corp | Communication between execution environments in a data processing system employing an object-oriented memory protection mechanism |
| WO2000022533A1 (en) * | 1998-10-09 | 2000-04-20 | Infineon Technologies Ag | Method for preventing stack manipulations in the case of function calls |
| US6138210A (en) * | 1997-06-23 | 2000-10-24 | Sun Microsystems, Inc. | Multi-stack memory architecture |
| US20010013094A1 (en) * | 2000-02-04 | 2001-08-09 | Hiroaki Etoh | Memory device, stack protection system, computer system, compiler, stack protection method, storage medium and program transmission apparatus |
-
2002
- 2002-02-28 FR FR0202581A patent/FR2836569B1/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2239334A (en) * | 1989-12-22 | 1991-06-26 | Intel Corp | Communication between execution environments in a data processing system employing an object-oriented memory protection mechanism |
| US6138210A (en) * | 1997-06-23 | 2000-10-24 | Sun Microsystems, Inc. | Multi-stack memory architecture |
| WO2000022533A1 (en) * | 1998-10-09 | 2000-04-20 | Infineon Technologies Ag | Method for preventing stack manipulations in the case of function calls |
| US20010013094A1 (en) * | 2000-02-04 | 2001-08-09 | Hiroaki Etoh | Memory device, stack protection system, computer system, compiler, stack protection method, storage medium and program transmission apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| FR2836569B1 (en) | 2005-02-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP1287432A1 (en) | Method for making secure a typed data language in particular in an integrated system and integrated system therefor | |
| JP5132852B2 (en) | Technology to allow access across context barriers using input point objects in small area devices | |
| JP4716573B2 (en) | Technology that allows access across context barriers using global data structures in small area devices | |
| EP1212678B1 (en) | Management protocol, method for verifying and transforming a downloaded programme fragment and corresponding systems | |
| AU2004218703B2 (en) | Security-related programming interface | |
| EP1145107B1 (en) | Token-based linking | |
| JP5132853B2 (en) | Technology that allows access across context barriers using runtime environment privileges in small area devices | |
| FR2977694A1 (en) | MICROPROCESSOR PROTECTS AGAINST A BATTERY OVERFLOW | |
| JP4981210B2 (en) | Technology that allows access across context barriers using a shared object interface on small devices | |
| EP3033857B1 (en) | Binary code authentication | |
| WO2004006088A2 (en) | Making secure downloaded application in particular in a smart card | |
| FR2966946A1 (en) | METHOD FOR CONFIGURING AN ELECTRONIC ENTITY | |
| US7475408B2 (en) | Hosting an application in one of a plurality of execution environments | |
| EP1700218B1 (en) | Method for determining operational characteristics of a program | |
| US7430743B2 (en) | System and method for hosting an application in one of a plurality of execution environments | |
| FR2836569A1 (en) | Memory space for chip card downloaded applications has a data structure and two separate memory parts that improve card security in the face of attacks against applet type applications | |
| EP1960934B1 (en) | Method for making secure execution of an intermediate language software code in a portable appliance | |
| EP1112536A1 (en) | Method for verifying code transformers for an incorporated system, in particular in a chip card | |
| US20080216101A1 (en) | Partial dynamic implementation of java interfaces | |
| EP1881404A1 (en) | Method for dynamic protection of data during intermediate language software execution in a digital device | |
| JP2008537240A (en) | Method for verifying pseudo code loaded on embedded systems, especially smart cards | |
| CN118981356A (en) | A Ethereum ERC20 honeypot contract detector and detection method in blockchain | |
| FR2864650A1 (en) | METHOD FOR UPDATING APPLICATIONS FOR A CHIP CARD | |
| EP2252978B1 (en) | Integrated circuit card having a modifiable operating program and corresponding method of modification | |
| WO2003100607A2 (en) | Code verification method for limited resource microcircuits |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ST | Notification of lapse |
Effective date: 20091030 |