US7840814B2 - Method for managing an executable code downloaded in a reprogrammable on-board system - Google Patents

Method for managing an executable code downloaded in a reprogrammable on-board system Download PDF

Info

Publication number
US7840814B2
US7840814B2 US10/553,348 US55334804A US7840814B2 US 7840814 B2 US7840814 B2 US 7840814B2 US 55334804 A US55334804 A US 55334804A US 7840814 B2 US7840814 B2 US 7840814B2
Authority
US
United States
Prior art keywords
code
original
card
software component
modified
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.)
Expired - Fee Related, expires
Application number
US10/553,348
Other versions
US20070043957A1 (en
Inventor
Alexandre Benoit
Ludovic Rousseau
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Thales DIS France SA
Original Assignee
Gemalto SA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gemalto SA filed Critical Gemalto SA
Assigned to GEMPLUS reassignment GEMPLUS ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: BENOIT, ALEXANDRE, ROUSSEAU, LUDOVIC
Publication of US20070043957A1 publication Critical patent/US20070043957A1/en
Assigned to GEMALTO SA reassignment GEMALTO SA MERGER (SEE DOCUMENT FOR DETAILS). Assignors: GEMPLUS
Application granted granted Critical
Publication of US7840814B2 publication Critical patent/US7840814B2/en
Expired - Fee Related legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/10Mechanisms 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/1008Active credit-cards provided with means to personalise their use, e.g. with PIN-introduction/comparison system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment 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/355Personalisation of cards for use
    • G06Q20/3552Downloading or loading of personalisation data

Definitions

  • the invention concerns a method of managing an executable code designed to be downloaded, in particular into an on-board microprocessor computer system.
  • the present invention applies to any on-board system, reprogrammable by downloading a program consisting of an executable code, in the form of a series of instructions executable by the microprocessor of the on-board system.
  • the invention finds a particularly advantageous application in a context where the executable code consists of an intermediate object code, executable by the microprocessor of the on-board system by means of an interpreter for the intermediate code, commonly referred to as a virtual machine, provided with an execution stack and registers of operands manipulated by these instructions and making it possible to interpret this intermediate code.
  • microprocessor cards of the JavaCard type are in fact reprogrammable by means of an operation of downloading a small program, referred to as an “applet” in English terminology.
  • an applet is in the form of a code for a standard virtual machine.
  • This code written in binary form, serves as an intermediary between the source code and the executable binary code and is obtained for example by using a Java compiler.
  • This intermediate code “bytecode” according to the English terminology, is therefore not directly executable by the microprocessor of the card but must be interpreted in a software fashion by a binary code interpreter called a virtual machine. It suffices for the card in which the applet written in intermediate language is to be executed to be provided with a minimum of specific data processing resources forming the program constituting the virtual machine.
  • the virtual machine used is a sub-assembly of the Java virtual machine.
  • One solution consists of carrying out dynamic access and typing checks during the execution of the applets.
  • the virtual machine then carries out a certain number of checks during the execution of the applets, such as:
  • Control of access to the memory at each reading or writing in a memory area, the virtual machine checks the right of access of the applet to the corresponding data;
  • Dynamic verification of the data types at each instruction from the applet, the virtual machine verifies that the constraints on the data types are satisfied;
  • Another solution then consists of specifying the intermediate code (bytecode) so that it is possible to check that the program is inoffensive statically (that is to say during the downloading operation and before its execution). This is performed by a security device called a verifier. For security reasons, JavaCard cards must therefore possess an on-board verifier.
  • patent application FR 2 797 963 (D1) presents a protocol for managing a downloaded intermediate code associated with a process of static verification of this intermediate code during its downloading, which allows secure execution of the latter by the on-board computer system.
  • a verifier is obtained that is much simpler and much less expensive in terms of code size necessary.
  • the central idea of D1 is to convert the intermediate code off card before it is downloaded in order to simplify its verification once it has been downloaded and stored in the card.
  • a phase of transformation of the intermediate code is therefore carried out off card and it is a case consequently of a modified standardized intermediate code that is downloaded into the card, rather than the original intermediate code obtained by the use of a Java compiler.
  • the intermediate code transformed off card will be more easily verified in static mode according to a predefined verification process since it will have been transformed into a standardized intermediate code a priori satisfying the verification criteria of the predefined verification process that is the object of D1.
  • This prior transformation phase carried out off card therefore advantageously accelerates the verification process.
  • D1 does not make it possible to make the verification process of the intermediate code on which it is based cohabit with a signature system of this intermediate code.
  • D1 does not make it possible to have an intermediate code that it is firstly verifiable in a simple and rapid fashion and secondly signed.
  • the method proposed by D1 makes provision for transforming the intermediate code off card before it is downloaded as explained above and consequently the signature of the developer of the code (or of any other person authorized to sign the code) effected before the transformation imposed off card on the intermediate code becomes, because of the very fact of this modification, invalid. As a result the signature is then no longer verifiable by the card.
  • the possibility left for the card to be able to verify the signature of the downloaded intermediate code is also very important in terms of security. This is because the prior verification of the intermediate code before it is executed does not make it possible to ensure that the intermediate code does not contain any “Trojan horse”. This is because only a manual analysis makes it possible to check that an intermediate code, even if it is correct vis-à-vis the verification, is not aggressive and this check cannot be carried out by the card. More precisely, the card can in fact only verify the validity of a signature attesting that this manual check on the intermediate code was carried out correctly. Hence the importance of being able to implement the downloading of an intermediate code having a valid signature.
  • the aim of the present invention which is based on these various findings, is to mitigate the aforementioned drawbacks related to the use of the verification method that is the object of D1.
  • the invention aims more particularly to make a signature system cohabit with the verification system proposed by D1 during the downloading of an intermediate code into a reprogrammable on-board computer system provided with an intermediate-code interpreter, without however dispensing with the advantages procured by the verification system according to D1, in particular in terms of simplicity and speed.
  • one object of the invention is the use of a method of managing an executable code to be downloaded, intermediate or not, allowing the verification of a signature of this code by an on-board computer system such as a microprocessor card, while leaving the opportunity to effect a transformation of the executable code with a view to a predefined specific use.
  • the transformation of the original executable code may wish to aim at improving its verification at the time of its downloading according to the principles of the verification process set out in D1, when it is a case of an intermediate code executed by means of a virtual machine, or improving its speed of execution by the microprocessor of the card, without such a transformation being able to impair the validity of the signature and therefore its verification by the card.
  • the invention therefore concerns a method of managing an original executable code forming a program intended to be downloaded into a reprogrammable on-board computer system such as a microprocessor card, the said code possessing a cryptographic signature and being executable by the microprocessor of the on-board system after verification by the latter of the validity of the said signature, the said method comprising the steps consisting of at least:
  • the original executable code consists of an intermediate code, executable by the on-board system microprocessor by means of a virtual machine making it possible to interpret this intermediate code.
  • the virtual machine is provided with an execution stack and the downloaded software component, applied on card to the original intermediate code, makes it possible to reconstruct a modified intermediate code a priori satisfying criteria of verification of the said intermediate code according to which the operands of each instruction of the said code belong to the types of data manipulated by this instruction and, at each target switching instruction, the execution stack of the virtual machine is empty.
  • the modified intermediate code obtained by applying the software component is verified, before it is executed by the microprocessor by means of the virtual machine, according to a process verifying that the modified intermediate code satisfies the verification criteria.
  • the downloaded software component applied on card to the original code, makes it possible to reconstruct a modified code such that its execution is more rapid with respect to that of the original code.
  • the downloaded software component applied on card to the original code, makes it possible to reconstruct a modified code such that it procures an optimization in terms of size compared with the original code.
  • FIG. 1 illustrates schematically the steps of the method performed off card
  • FIG. 2 illustrates schematically the step of downloading into the card the original intermediate code and the associated software component dedicated to a predefined specific use
  • FIG. 3 illustrates schematically the steps of the method performed on card.
  • Such reprogrammable systems therefore add the possibility of enhancing the executable program after the system is brought into service by an operation of downloading an applet.
  • the applet that is to be downloaded is in the form of an original executable code CI, consisting in this example of an intermediate code for a virtual machine, typically a sub-assembly of the Java virtual machine resident in the memory of the card.
  • an auditor is brought into play in order to verify that the intermediate code CI does not contain a Trojan horse.
  • the auditor signs the intermediate code CI.
  • the cryptographic signature SIGN can be made using any electronic signature mechanism available to persons skilled in the art.
  • the intermediate code CI signed can then be used on any JavaCard and therefore possesses a signature SIGN attesting to its innocuousness and able to be verified by the card at the time of its downloading.
  • the verification of the electronic signature consists of verifying that the signature is valid.
  • One essential characteristic of the invention consists of downloading the original intermediate code CI, that is to say not modified, into the card CP and adding to it a software component CL making it possible, when it is applied to the original intermediate code, to calculate a modified intermediate code CI′ adapted to a predefined specific use.
  • the original intermediate code CI is shown diagrammatically by code lines in continuous lines
  • the corresponding modified intermediate code CI′ is shown diagrammatically by code lines in continuous lines and dotted lines.
  • the supplementary software CL to be applied to the signed original intermediate code CI is calculated off the card according to the original intermediate code CI and the corresponding modified intermediate code, identified for a predefined specific use.
  • the software component CL is signed and therefore has a signature SIGN′ able to be verified.
  • the main application of the invention is to be able to make a signature system cohabit with the verification system proposed by D1 during the downloading of the intermediate code into the card.
  • the intermediate code CI′ is a modified intermediate code adapted to the predefined specific use consisting of a priori satisfying the verification criteria for the verification process that is the object of D1.
  • the software component is calculated so that, once applied to the original intermediate code CI, a modified intermediate code CI′ is obtained that is standardized according to the teaching of D1 so as to a priori satisfy the verification criteria of the verification process that is the object of D1.
  • the standardized intermediate code according to D1 is such that the operands of each instruction belong to the types of data manipulated by this instruction and the execution stack of the virtual machine is empty at each target switching instruction.
  • the reader can usefully refer to the text of D1.
  • the calculations making it possible to end up with the software component as defined, which are more known to persons skilled in the art.
  • the original intermediate code CI and the associated component CL are then downloaded into the card CP, see FIG. 2 .
  • the software component CL therefore travels with the original intermediate code CI and is intended to be applied on card to the original intermediate code, once stored with the latter in a rewriteable permanent memory of the card.
  • the card first of all verifies that the signature SIGN of the intermediate code CI is valid, so as to ensure that the latter does not include any Trojan horse nor any other malicious code of the same type.
  • the card also verifies the validity of the signature SIGN′ of the software component CL in order to ensure that it too does not contain a Trojan horse.
  • the card applies the software component CL to the original intermediate code CI, see FIG. 3 , so as to reconstruct the modified code CI′ adapted to the predefined specific use consisting, in the main embodiment of the invention, of a priori satisfying the verification criteria of the verification process that is the object of D1.
  • the card can then verify the modified intermediate code before it is executed by the microprocessor by means of the virtual machine using the verification techniques employed in the static verification process of a fragment of program that is the object of D1.
  • the verification process consists of verifying that the modified intermediate code CI′ satisfies the aforementioned verification criteria, namely that the operands of each instruction of the modified code belong to the types of data manipulated by this instruction and, at each target switching instruction, the execution stack of the virtual machine is empty.
  • the reader is requested to refer to the text of D1 for more details, which would be superfluous in the context of the present application.
  • the modified intermediate code is executed by the microprocessor by means of the virtual machine.
  • the method according to the invention makes it possible to make a signature system cohabit advantageously with the verification system proposed by D1 during the downloading of an intermediate code into a reprogrammable on-board computer system. It is therefore possible to download signed applets into the card and to enable the card to verify this signature whilst resulting in a verification process as disclosed in D1. This is made possible by virtue of the software component to be downloaded at the same time as the signed original intermediate code, which makes it possible, when it is applied on card to the latter, to obtain a modified intermediate code complying with the principles of the simple fast verifier disclosed in D1.
  • the intermediate code downloaded into the card according to the invention being the original intermediate code, its signature is not made invalid by any modification process effected off card and, consequently, the card is in a position to verify its signature before its execution.
  • the invention applies to the downloading into a reprogrammable on-board system of an original executable code, intermediate or not according to the system, and of an associated software component such that, when it is applied on card to the original code, the software component makes it possible to reconstruct a modified code adapted for a predefined specific use.
  • the purpose can therefore be other than the obtaining of a modified code permitting the application of the verification process according to D1.
  • the predefined specific use to which the modified code responds can correspond to an optimization in terms of time of the execution of the code.
  • the software component downloaded with the original code can be calculated so that the original code, once modified on card by application of the component, is executed more rapidly.
  • the downloaded software component applied on card to the original code therefore makes it possible to reconstruct a modified code such that its execution is more rapid compared with that of the original code.
  • the software component downloaded with the original code can be calculated so that the original code, once modified on card by application of the component, occupies less memory space.
  • the downloaded software component, applied on card to the original code therefore makes it possible to reconstruct a modified code such that it procures an optimization in terms of size compared with the original code.
  • the example given below by way of illustration concerns a concrete case of application on card of a software component to an original intermediate code with a view to obtaining an optimization in terms of speed of execution and size of the downloaded original code.
  • the downloaded original intermediate code describes a normal operation performed in the chip card programs consisting of recovering the least significant byte of a 16-bit word placed on the stack.
  • This code makes it possible to recover the least significant byte of a 16-bit word placed on the stack. For this, it is necessary to stack a 16-bit word whose most significant byte is at 0x00 and whose least significant byte is at 0xFF (sspush 255), and then do a logic AND between the two 16-bit words on the stack (sand).
  • the function of the downloaded software component intended to be applied on card to the original intermediate code is to replace the series of instructions 0x11, 0x00, 0xFF, 0x53 with the replacement code 0xC9, in order thus to obtain a modified intermediate code for performing the same operation but procuring a saving of 6 bytes compared with the original intermediate code and therefore an optimization in terms of size and speed when it is executed by the microprocessor by means of the virtual machine.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Devices For Executing Special Programs (AREA)
  • Storage Device Security (AREA)
  • Exchange Systems With Centralized Control (AREA)

Abstract

A method for managing an original executable code downloaded into a reprogrammable computer on-board system such as a microprocessor card. The code includes a cryptographic signature and is executable by the microprocessor once the validity of the signature has been checked. Off the card, a modified executable code corresponding to the original code and adapted to a pre-defined specific use is identified. A software component is calculated, which when applied to the original code, enables the modified code to be reconstructed. The software component is signed, and the signed original code and the signed software component are downloaded into the card. On the card, the signature of the original code and the software component are checked, and the software component is applied to the original code in order to reconstruct the modified code for the execution of the same by the microprocessor.

Description

This disclosure is based upon French Application No. 0304628, filed Apr. 14, 2003 and International Application No. PCT/FR2004/050437, filed Apr. 2, 2004, the contents of which are incorporated herein by reference.
BACKGROUND OF THE INVENTION
The invention concerns a method of managing an executable code designed to be downloaded, in particular into an on-board microprocessor computer system.
SUMMARY OF THE INVENTION
In general terms, the present invention applies to any on-board system, reprogrammable by downloading a program consisting of an executable code, in the form of a series of instructions executable by the microprocessor of the on-board system. The invention finds a particularly advantageous application in a context where the executable code consists of an intermediate object code, executable by the microprocessor of the on-board system by means of an interpreter for the intermediate code, commonly referred to as a virtual machine, provided with an execution stack and registers of operands manipulated by these instructions and making it possible to interpret this intermediate code.
More particularly, the description that follows concerns the application of the invention in the context of reprogrammable microprocessor cards of the JavaCard type.
The microprocessor cards of the JavaCard type are in fact reprogrammable by means of an operation of downloading a small program, referred to as an “applet” in English terminology.
For reasons of portability between different on-board computer systems, an applet is in the form of a code for a standard virtual machine. This code, written in binary form, serves as an intermediary between the source code and the executable binary code and is obtained for example by using a Java compiler. This intermediate code, “bytecode” according to the English terminology, is therefore not directly executable by the microprocessor of the card but must be interpreted in a software fashion by a binary code interpreter called a virtual machine. It suffices for the card in which the applet written in intermediate language is to be executed to be provided with a minimum of specific data processing resources forming the program constituting the virtual machine. In the aforementioned example of cards of the JavaCard type, the virtual machine used is a sub-assembly of the Java virtual machine.
The operation of downloading applets onto an on-board computer system provided with an intermediate-code interpreter poses a certain number of security problems. Thus an applet that is unintentionally badly written may incorrectly modify data already present on the system, prevent the main program from being executed correctly, or modify other applets previously downloaded, by making them unusable or harmful.
Also, using an applet written for a malevolent purpose, it is possible to perform an operation of duplicating memory areas in the card and/or imperilling the correct functioning of the chip card. It then becomes possible to have access to confidential or unauthorized data stored in the system, such as the access code in the case of a bank card for example, or attacking the integrity of one or more applications present on the card. Finally, if the card is connected to the outside world, the malfunctionings caused can be propagated outside the card.
Thus solutions have been proposed to remedy the security problems involved in the operation of downloading an intermediate code (bytecode) onto an on-board computer system provided with an intermediate-code interpreter, such as the aforementioned example of the JavaCard.
One solution consists of carrying out dynamic access and typing checks during the execution of the applets. The virtual machine then carries out a certain number of checks during the execution of the applets, such as:
Control of access to the memory: at each reading or writing in a memory area, the virtual machine checks the right of access of the applet to the corresponding data;
Dynamic verification of the data types: at each instruction from the applet, the virtual machine verifies that the constraints on the data types are satisfied;
Detection of stack overflows and illegal accesses to the execution stack of the virtual machine.
This solution does however have the drawback of a very significant slowing down in execution, caused by all the dynamic checks. Such checks also increase the requirements in terms of random access and permanent memory of the system, because of the additional information of the type that it is necessary to associate with the data being manipulated.
Another solution then consists of specifying the intermediate code (bytecode) so that it is possible to check that the program is inoffensive statically (that is to say during the downloading operation and before its execution). This is performed by a security device called a verifier. For security reasons, JavaCard cards must therefore possess an on-board verifier.
Although it allows an execution of the intermediate code that is much more rapid compared with the dynamic verification process, such a static verification process does however have the drawback of being expensive, both in terms of code size necessary for conducting this process and in terms of random access memory size necessary for containing the intermediate results of the verification, and in terms of calculation time.
Starting from the principle stated in the latter solution, patent application FR 2 797 963 (D1) presents a protocol for managing a downloaded intermediate code associated with a process of static verification of this intermediate code during its downloading, which allows secure execution of the latter by the on-board computer system. In this way advantageously a verifier is obtained that is much simpler and much less expensive in terms of code size necessary.
The central idea of D1 is to convert the intermediate code off card before it is downloaded in order to simplify its verification once it has been downloaded and stored in the card. A phase of transformation of the intermediate code is therefore carried out off card and it is a case consequently of a modified standardized intermediate code that is downloaded into the card, rather than the original intermediate code obtained by the use of a Java compiler. Thus the intermediate code transformed off card will be more easily verified in static mode according to a predefined verification process since it will have been transformed into a standardized intermediate code a priori satisfying the verification criteria of the predefined verification process that is the object of D1. This prior transformation phase carried out off card therefore advantageously accelerates the verification process. For a detailed description of this solution, reference can be made to the text of D1.
However, one drawback of the method proposed in D1 is that it does not make it possible to make the verification process of the intermediate code on which it is based cohabit with a signature system of this intermediate code. Thus D1 does not make it possible to have an intermediate code that it is firstly verifiable in a simple and rapid fashion and secondly signed. This is because the method proposed by D1 makes provision for transforming the intermediate code off card before it is downloaded as explained above and consequently the signature of the developer of the code (or of any other person authorized to sign the code) effected before the transformation imposed off card on the intermediate code becomes, because of the very fact of this modification, invalid. As a result the signature is then no longer verifiable by the card.
However, the possibility left for the card to be able to verify the signature of the downloaded intermediate code is also very important in terms of security. This is because the prior verification of the intermediate code before it is executed does not make it possible to ensure that the intermediate code does not contain any “Trojan horse”. This is because only a manual analysis makes it possible to check that an intermediate code, even if it is correct vis-à-vis the verification, is not aggressive and this check cannot be carried out by the card. More precisely, the card can in fact only verify the validity of a signature attesting that this manual check on the intermediate code was carried out correctly. Hence the importance of being able to implement the downloading of an intermediate code having a valid signature.
The aim of the present invention, which is based on these various findings, is to mitigate the aforementioned drawbacks related to the use of the verification method that is the object of D1.
With this objective in view, the invention aims more particularly to make a signature system cohabit with the verification system proposed by D1 during the downloading of an intermediate code into a reprogrammable on-board computer system provided with an intermediate-code interpreter, without however dispensing with the advantages procured by the verification system according to D1, in particular in terms of simplicity and speed.
More generally, one object of the invention is the use of a method of managing an executable code to be downloaded, intermediate or not, allowing the verification of a signature of this code by an on-board computer system such as a microprocessor card, while leaving the opportunity to effect a transformation of the executable code with a view to a predefined specific use. For example, the transformation of the original executable code may wish to aim at improving its verification at the time of its downloading according to the principles of the verification process set out in D1, when it is a case of an intermediate code executed by means of a virtual machine, or improving its speed of execution by the microprocessor of the card, without such a transformation being able to impair the validity of the signature and therefore its verification by the card.
To this end, the invention therefore concerns a method of managing an original executable code forming a program intended to be downloaded into a reprogrammable on-board computer system such as a microprocessor card, the said code possessing a cryptographic signature and being executable by the microprocessor of the on-board system after verification by the latter of the validity of the said signature, the said method comprising the steps consisting of at least:
    • off card:—identifying a modified executable code corresponding to the original code, adapted to a predefined specific use;—from variations between the data of the original code and the corresponding modified code, calculating a software component which, when it is applied to the original code, makes it possible to reconstruct the modified code; and—signing the said software component;
    • downloading the signed original code and the signed software component into the card;
    • on card:—verifying the signatures respectively of the original code and of the software component;—applying the software component to the original code so as to reconstruct the modified code for its execution by the microprocessor.
In a variant, the original executable code consists of an intermediate code, executable by the on-board system microprocessor by means of a virtual machine making it possible to interpret this intermediate code.
According to a first embodiment, in relation to the said variant, the virtual machine is provided with an execution stack and the downloaded software component, applied on card to the original intermediate code, makes it possible to reconstruct a modified intermediate code a priori satisfying criteria of verification of the said intermediate code according to which the operands of each instruction of the said code belong to the types of data manipulated by this instruction and, at each target switching instruction, the execution stack of the virtual machine is empty.
Preferably, the modified intermediate code obtained by applying the software component is verified, before it is executed by the microprocessor by means of the virtual machine, according to a process verifying that the modified intermediate code satisfies the verification criteria.
According to another embodiment, the downloaded software component, applied on card to the original code, makes it possible to reconstruct a modified code such that its execution is more rapid with respect to that of the original code.
According to another embodiment, the downloaded software component, applied on card to the original code, makes it possible to reconstruct a modified code such that it procures an optimization in terms of size compared with the original code.
BRIEF DESCRIPTION OF THE DRAWINGS
Other characteristics and advantages of the invention will emerge more clearly from the description given below, by way of indication and in no way limitingly, with reference to the following figures, in which:
FIG. 1 illustrates schematically the steps of the method performed off card;
FIG. 2 illustrates schematically the step of downloading into the card the original intermediate code and the associated software component dedicated to a predefined specific use, and
FIG. 3 illustrates schematically the steps of the method performed on card.
DETAILED DESCRIPTION
The description that will follow is more particularly oriented towards an application of the invention in an open system context, and more particularly that of reprogrammable microprocessor cards of the JavaCard CP type as depicted in FIG. 2, where the downloaded original code is an intermediate code executed by the microprocessor by means of a virtual machine. However, the fact must not be lost from view that the method according to the invention also applies to a context where the downloaded card is not an intermediate code but a code directly executable by the microprocessor of the on-board system.
Such reprogrammable systems therefore add the possibility of enhancing the executable program after the system is brought into service by an operation of downloading an applet. The applet that is to be downloaded is in the form of an original executable code CI, consisting in this example of an intermediate code for a virtual machine, typically a sub-assembly of the Java virtual machine resident in the memory of the card. Thus, once the intermediate code CI has been generated, an auditor is brought into play in order to verify that the intermediate code CI does not contain a Trojan horse.
Where the intermediate code CI does not actually contain any malicious program of this type, the auditor signs the intermediate code CI. The cryptographic signature SIGN can be made using any electronic signature mechanism available to persons skilled in the art. The intermediate code CI signed can then be used on any JavaCard and therefore possesses a signature SIGN attesting to its innocuousness and able to be verified by the card at the time of its downloading. The verification of the electronic signature consists of verifying that the signature is valid.
One essential characteristic of the invention consists of downloading the original intermediate code CI, that is to say not modified, into the card CP and adding to it a software component CL making it possible, when it is applied to the original intermediate code, to calculate a modified intermediate code CI′ adapted to a predefined specific use. In the figures the original intermediate code CI is shown diagrammatically by code lines in continuous lines, whilst the corresponding modified intermediate code CI′ is shown diagrammatically by code lines in continuous lines and dotted lines.
According to the invention, the supplementary software CL to be applied to the signed original intermediate code CI is calculated off the card according to the original intermediate code CI and the corresponding modified intermediate code, identified for a predefined specific use. In the same way as for the original intermediate code CI, the software component CL is signed and therefore has a signature SIGN′ able to be verified.
The main application of the invention is to be able to make a signature system cohabit with the verification system proposed by D1 during the downloading of the intermediate code into the card. Thus, in the context of this application, the intermediate code CI′ is a modified intermediate code adapted to the predefined specific use consisting of a priori satisfying the verification criteria for the verification process that is the object of D1. Thus, in the main application of the invention, the software component is calculated so that, once applied to the original intermediate code CI, a modified intermediate code CI′ is obtained that is standardized according to the teaching of D1 so as to a priori satisfy the verification criteria of the verification process that is the object of D1. In particular, the standardized intermediate code according to D1 is such that the operands of each instruction belong to the types of data manipulated by this instruction and the execution stack of the virtual machine is empty at each target switching instruction. For a more detailed description, the reader can usefully refer to the text of D1. However, it would be departing from the scope of the present application to detail here the calculations making it possible to end up with the software component as defined, which are more known to persons skilled in the art.
The original intermediate code CI and the associated component CL are then downloaded into the card CP, see FIG. 2. The software component CL therefore travels with the original intermediate code CI and is intended to be applied on card to the original intermediate code, once stored with the latter in a rewriteable permanent memory of the card.
The card first of all verifies that the signature SIGN of the intermediate code CI is valid, so as to ensure that the latter does not include any Trojan horse nor any other malicious code of the same type. The card also verifies the validity of the signature SIGN′ of the software component CL in order to ensure that it too does not contain a Trojan horse.
Once these prior signature verification operations have been successfully performed, the card applies the software component CL to the original intermediate code CI, see FIG. 3, so as to reconstruct the modified code CI′ adapted to the predefined specific use consisting, in the main embodiment of the invention, of a priori satisfying the verification criteria of the verification process that is the object of D1.
The card can then verify the modified intermediate code before it is executed by the microprocessor by means of the virtual machine using the verification techniques employed in the static verification process of a fragment of program that is the object of D1. Thus the verification process consists of verifying that the modified intermediate code CI′ satisfies the aforementioned verification criteria, namely that the operands of each instruction of the modified code belong to the types of data manipulated by this instruction and, at each target switching instruction, the execution stack of the virtual machine is empty. The reader is requested to refer to the text of D1 for more details, which would be superfluous in the context of the present application.
Then, once the verification of the modified intermediate code has been conducted according to the principles of the verifier that is the object of D1, the modified intermediate code is executed by the microprocessor by means of the virtual machine.
Thus the method according to the invention makes it possible to make a signature system cohabit advantageously with the verification system proposed by D1 during the downloading of an intermediate code into a reprogrammable on-board computer system. It is therefore possible to download signed applets into the card and to enable the card to verify this signature whilst resulting in a verification process as disclosed in D1. This is made possible by virtue of the software component to be downloaded at the same time as the signed original intermediate code, which makes it possible, when it is applied on card to the latter, to obtain a modified intermediate code complying with the principles of the simple fast verifier disclosed in D1.
The intermediate code downloaded into the card according to the invention being the original intermediate code, its signature is not made invalid by any modification process effected off card and, consequently, the card is in a position to verify its signature before its execution.
However, though the main application that is being presented concerning a software component adapted for the purpose of verification of the intermediate code according to the principles disclosed in D1, the invention is in no way limited to such an application.
In general, the invention applies to the downloading into a reprogrammable on-board system of an original executable code, intermediate or not according to the system, and of an associated software component such that, when it is applied on card to the original code, the software component makes it possible to reconstruct a modified code adapted for a predefined specific use. The purpose can therefore be other than the obtaining of a modified code permitting the application of the verification process according to D1.
In particular, the predefined specific use to which the modified code responds can correspond to an optimization in terms of time of the execution of the code. Thus the software component downloaded with the original code can be calculated so that the original code, once modified on card by application of the component, is executed more rapidly. In this application of the invention, the downloaded software component applied on card to the original code therefore makes it possible to reconstruct a modified code such that its execution is more rapid compared with that of the original code.
Equally, the software component downloaded with the original code can be calculated so that the original code, once modified on card by application of the component, occupies less memory space. In this application of the invention, the downloaded software component, applied on card to the original code, therefore makes it possible to reconstruct a modified code such that it procures an optimization in terms of size compared with the original code.
The example given below by way of illustration concerns a concrete case of application on card of a software component to an original intermediate code with a view to obtaining an optimization in terms of speed of execution and size of the downloaded original code. In this example, the downloaded original intermediate code describes a normal operation performed in the chip card programs consisting of recovering the least significant byte of a 16-bit word placed on the stack.
Let therefore the following original intermediate code (symbolic notation and Java operation code) be:
    • 0x11 sspush 255
    • 0x00
    • 0xFF
    • 0x53 sand ;
This code makes it possible to recover the least significant byte of a 16-bit word placed on the stack. For this, it is necessary to stack a 16-bit word whose most significant byte is at 0x00 and whose least significant byte is at 0xFF (sspush 255), and then do a logic AND between the two 16-bit words on the stack (sand).
And let the corresponding replacement code be:
    • 0xC9 Xsand255 ;
In this particular example, the function of the downloaded software component intended to be applied on card to the original intermediate code is to replace the series of instructions 0x11, 0x00, 0xFF, 0x53 with the replacement code 0xC9, in order thus to obtain a modified intermediate code for performing the same operation but procuring a saving of 6 bytes compared with the original intermediate code and therefore an optimization in terms of size and speed when it is executed by the microprocessor by means of the virtual machine.
Other applications can of course be envisaged without for all that departing from the scope of the present invention.

Claims (6)

1. A method of managing an original executable code forming a program to be downloaded into a reprogrammable on-board computer system in a microprocessor card, said code possessing a cryptographic signature and being executable by the microprocessor of the on-board system after verification by the latter of the validity of said signature, said method comprising the following steps:
off card:
identifying a modified executable code that is adapted to a predefined specific use, and corresponds to the original code, and
calculating a software component according to the original intermediate code and the corresponding modified intermediate code identified for the predefined specific use, the software component, when applied to the original code, making it possible to produce the modified code;
signing said software component;
downloading the signed original code and the signed software component into the card; and
on card:
verifying the signatures respectively of the original code and of the software component, and
applying the software component to the original code so as to produce the modified intermediate code for execution by the microprocessor.
2. A method according to claim 1, wherein the original executable code consists of an intermediate code, executable by the on-board system microprocessor by means of a virtual machine for interpreting this intermediate code.
3. A method according to claim 2, wherein the virtual machine is provided with an execution stack and wherein the downloaded software component, which is applied on card to the original intermediate code, makes it possible to produce a modified intermediate code a priori satisfying the verification criteria for said intermediate code according to which the operands of each instruction of said code belong to the data types manipulated by this instruction and, on each target switching instruction, the execution stack of the virtual machine is empty.
4. A method according to claim 3, wherein the modified intermediate code obtained by the application of the software component is verified, before the execution by the microprocessor by means of the virtual machine, according to a process verifying that the modified intermediate code satisfies the verification criteria.
5. A method according to claim 1, wherein the downloaded software component, applied on card to the original code, makes it possible to produce a modified code so that execution of the modified code is more rapid compared with that of the original code.
6. A method according to claim 1, wherein the downloaded software component, applied on card to the original code, makes it possible to produce a modified code so that it procures an optimization in terms of size compared with the original code.
US10/553,348 2003-04-14 2004-04-02 Method for managing an executable code downloaded in a reprogrammable on-board system Expired - Fee Related US7840814B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
FR0304628 2003-04-14
FR0304628A FR2853741B1 (en) 2003-04-14 2003-04-14 METHOD FOR MANAGING A DOWNLOADABLE EXECUTABLE CODE IN A REPROGRAMMABLE INBOARD SYSTEM
PCT/EP2004/050437 WO2004090718A1 (en) 2003-04-14 2004-04-02 Method for managing an executable code downloaded in a reprogrammable on-board system

Publications (2)

Publication Number Publication Date
US20070043957A1 US20070043957A1 (en) 2007-02-22
US7840814B2 true US7840814B2 (en) 2010-11-23

Family

ID=33041844

Family Applications (1)

Application Number Title Priority Date Filing Date
US10/553,348 Expired - Fee Related US7840814B2 (en) 2003-04-14 2004-04-02 Method for managing an executable code downloaded in a reprogrammable on-board system

Country Status (8)

Country Link
US (1) US7840814B2 (en)
EP (1) EP1616256B1 (en)
JP (1) JP2006522972A (en)
CN (1) CN1802631A (en)
AT (1) ATE366436T1 (en)
DE (1) DE602004007368T2 (en)
FR (1) FR2853741B1 (en)
WO (1) WO2004090718A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10372796B2 (en) 2002-09-10 2019-08-06 Sqgo Innovations, Llc Methods and systems for the provisioning and execution of a mobile software application
US20220245285A1 (en) * 2021-02-04 2022-08-04 International Business Machines Corporation Cluster resource signature verification

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8151117B2 (en) * 2003-11-05 2012-04-03 Vocalcomm Group, Llc Detection of items stored in a computer system
US7895448B1 (en) * 2004-02-18 2011-02-22 Symantec Corporation Risk profiling
US8706943B2 (en) * 2008-08-08 2014-04-22 Sk Planet Co. Ltd. System for interfacing between a terminal and a smart card, method for same, and smart card applied to same
US10552126B2 (en) * 2013-03-15 2020-02-04 Teradata Us, Inc. Transitioning between code-based and data-based execution forms in computing systems and environments
JP2021005250A (en) * 2019-06-26 2021-01-14 コネクトフリー株式会社 Execution code provision method and software development system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6005942A (en) 1997-03-24 1999-12-21 Visa International Service Association System and method for a multi-application smart card which can facilitate a post-issuance download of an application onto the smart card
WO2000028416A1 (en) * 1998-11-06 2000-05-18 Bull Cp8 Data compaction method for an intermediate object code programme executable in an onboard system provided with data processing resources and corresponding onboard system with multiple applications
FR2797963A1 (en) 1999-08-23 2001-03-02 Trusted Logic MANAGEMENT PROTOCOL, METHOD FOR VERIFYING AND TRANSFORMING A DOWNLOAD PROGRAM FRAGMENT, AND CORRESPONDING SYSTEMS
US20020002703A1 (en) 2000-06-30 2002-01-03 International Business Machines Corporation Device and method for updating code
US20050107069A1 (en) * 2002-02-01 2005-05-19 Eric Vetillard Method and device for securing messages exchanged in a network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6005942A (en) 1997-03-24 1999-12-21 Visa International Service Association System and method for a multi-application smart card which can facilitate a post-issuance download of an application onto the smart card
WO2000028416A1 (en) * 1998-11-06 2000-05-18 Bull Cp8 Data compaction method for an intermediate object code programme executable in an onboard system provided with data processing resources and corresponding onboard system with multiple applications
FR2797963A1 (en) 1999-08-23 2001-03-02 Trusted Logic MANAGEMENT PROTOCOL, METHOD FOR VERIFYING AND TRANSFORMING A DOWNLOAD PROGRAM FRAGMENT, AND CORRESPONDING SYSTEMS
US20020002703A1 (en) 2000-06-30 2002-01-03 International Business Machines Corporation Device and method for updating code
US20050107069A1 (en) * 2002-02-01 2005-05-19 Eric Vetillard Method and device for securing messages exchanged in a network

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
L. Casset. "Formal Development of an Embedded Verifier for Java Card Byte Code", Washington, D.C., 2002, pp. 51-56.
Sun Microsystems: "Java Card 2.1 Virtual Machine Specification", Jun. 7, 1999, pp. 1-46.
X. Leroy, "On-Card Byecode Verification for Java Card", Lecture notes in Computer Science, New York, vol. 2140, 2001, pp. 150-164.
You-Sung Chang, Seungjong Lee, In-Cheol Park, Chong-Min Kyung, "Verification of a microprocessor using real world applications", Jun. 1999, DAC '99: Proceedings of the 36th annual ACM/IEEE Design Automation Conference, Publisher: ACM, pp. 181-184. *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10372796B2 (en) 2002-09-10 2019-08-06 Sqgo Innovations, Llc Methods and systems for the provisioning and execution of a mobile software application
US10552520B2 (en) 2002-09-10 2020-02-04 Sqgo Innovations, Llc System and method for provisioning a mobile software application to a mobile device
US10810359B2 (en) 2002-09-10 2020-10-20 Sqgo Innovations, Llc System and method for provisioning a mobile software application to a mobile device
US10831987B2 (en) 2002-09-10 2020-11-10 Sqgo Innovations, Llc Computer program product provisioned to non-transitory computer storage of a wireless mobile device
US10839141B2 (en) 2002-09-10 2020-11-17 Sqgo Innovations, Llc System and method for provisioning a mobile software application to a mobile device
US20220245285A1 (en) * 2021-02-04 2022-08-04 International Business Machines Corporation Cluster resource signature verification
US11914755B2 (en) * 2021-02-04 2024-02-27 International Business Machines Corporation Cluster resource signature verification

Also Published As

Publication number Publication date
WO2004090718A1 (en) 2004-10-21
EP1616256A1 (en) 2006-01-18
DE602004007368D1 (en) 2007-08-16
EP1616256B1 (en) 2007-07-04
JP2006522972A (en) 2006-10-05
ATE366436T1 (en) 2007-07-15
FR2853741B1 (en) 2005-09-09
US20070043957A1 (en) 2007-02-22
DE602004007368T2 (en) 2008-03-06
CN1802631A (en) 2006-07-12
FR2853741A1 (en) 2004-10-15

Similar Documents

Publication Publication Date Title
EP3674954B1 (en) Security control method and computer system
US6092147A (en) Virtual machine with securely distributed bytecode verification
JP7154365B2 (en) Methods for securing software code
CN107832589B (en) Software copyright protection method and system
JP2008537224A (en) Safe starting method and system
JPH10171648A (en) Application authenticating device
CN101167060A (en) System and method for providing a secure boot architecture
CN103329139A (en) System and method for supporting JIT in a secure system with randomly allocated memory ranges
JP2009288908A (en) Method of detecting failure attack for alterating content of memory, security device, and computer program
US7840814B2 (en) Method for managing an executable code downloaded in a reprogrammable on-board system
JP2006522968A (en) Control execution of programs for virtual machines on portable data carriers
US20130191641A1 (en) Captcha (completely automated public test to tell computers and humans apart) data generation methods and related data management systems and computer program products thereof
Bouffard et al. Reversing the operating system of a Java based smart card
KR20170102285A (en) Security Elements
KR20210024161A (en) Method for analysis of source texts
CN112528305A (en) Access control method, device, electronic equipment and storage medium
JP6906057B2 (en) How to secure your software code
EP1739519A1 (en) Method to secure the execution of a program against attacks by radiation or other
Lanet et al. Memory forensics of a java card dump
US8527835B2 (en) Method for secure data transfer
CN112632482A (en) Target application running method and device and storage medium
CN114981811A (en) Apparatus and method for software security
EP2782006B1 (en) Process and system for verifying computer program on a smart card
Eletriby et al. High performance Java Card operating system
CN117642741A (en) Apparatus and method for pointer authentication

Legal Events

Date Code Title Description
AS Assignment

Owner name: GEMPLUS, FRANCE

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:BENOIT, ALEXANDRE;ROUSSEAU, LUDOVIC;REEL/FRAME:017995/0149;SIGNING DATES FROM 20051124 TO 20051129

AS Assignment

Owner name: GEMALTO SA, FRANCE

Free format text: MERGER;ASSIGNOR:GEMPLUS;REEL/FRAME:025132/0427

Effective date: 20081001

STCF Information on status: patent grant

Free format text: PATENTED CASE

FPAY Fee payment

Year of fee payment: 4

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552)

Year of fee payment: 8

FEPP Fee payment procedure

Free format text: MAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

LAPS Lapse for failure to pay maintenance fees

Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20221123