This invention generally relates to a method for updating chip card applications.
In particular, it is provided for loading a new release of an application into a chip card while preserving the data that had been used by the earlier releases of the application.
Most of the present chip card systems use virtual machines, the most popular of which being that of “Java Card” (a registered trademark of the Sun Microsystems company). In that system, the persistent data of the applications are stored as objects, especially as instances of classes as defined in the programs being loaded in the card. Thus, due to the persistent nature of these objects, the programs become permanently active in the card, unlike what happens in the conventional systems (workstations, desk computers). That raises a particular issue for updating the programs, since one cannot take advantage of a moment when the program is not active to update it.
Moreover, most of the platforms use an optimized binary code format (so-called “CAP File” format in the case of “Java Card”). With that format, only those data that are strictly necessary for executing the program can be loaded into a card. Particularly, it does not always include those data that are required for performing an application updating.
Lastly, a chip card is a quite particular execution context, since it is very widely distributed and often contains confidential information. Particularly, updating an application by deleting the current application and its data, reloading the new application then reloading the data can hardly be contemplated. This is because the application initialization data are generally critical and should strictly not be manipulated out of the card production sites, under highly controlled safety conditions.
The nature of the problems being experienced highly depends on the characteristics of the desired updating. For updating an application, the problems are as follows:
In some cases, access to the application to be updated can be gained through other applications, especially when the application exports shareable interfaces and when the application is actually a library. From a purely technical point of view, such updating procedures raise the same issues as the simple updating of applications, except that the updating should be applied to all those applications that import the amended functions.
This invention will then more specifically aim at providing a loading mechanism for a new release of an application, which supersedes an earlier application already loaded into a card, with safety and uninterrupted service warranties, such mechanism then making it possible to amend the applications without any service interruption.
It contemplates to achieve that result through a specific loading control option and a loading format that would be compatible with the format as defined in the “Java Card” specification.
In order to make such achievements, it provides generally a method for loading a new release of an application into a computer device in an object-oriented programming language and permitting, among others, the introduction of additional classes, the modification of the class hierarchy and the definition of further fields and methods.
According to the invention, that method comprises the steps of:
Said matching information will advantageously comprise lookup tables.
Said tables can be omitted when these objects are not to be modified, for example, and in a non limiting way when no further class is added to the new application release or when the newly added classes do not change the class hierarchy.
The method according to the invention may include the implementation of procedures for updating the application data after the new application release has been installed.
An illustrative, non-limiting example of a mode for carrying out the invention will be described below with reference to the accompanying drawings, in which:
a and 1b are comparative tables showing the class hierarchy of the application, in both its original release (
a and 3b are comparative tables showing a hierarchy with the required property, namely the original hierarchy (
The invention is implemented in several steps of:
The loading file should contain specific information making it possible to provide the matching to one or several earlier releases of the application. In order to generate the updating file, the following objects should be made available:
If the loading file of the original application includes information about the class types and names, then it is not needed to have the class files of the original application.
The input data should observe the following requirements:
The generated loading file is a regular loading file that should then be loaded into any card. That file contains an optional component with the following information for each earlier release of the application being considered:
These additional pieces of information are only required for the updating operations. The same binary file can then be used for loading the application and for updating applications.
In a first example, the class hierarchy of the application in both its original release and its new release are shown in
The example below relates to a specific case in which the additional table will not necessarily be included in the loading file, which is possible provided that:
a and 3b show a hierarchy with the required property in which the new hierarchy (
The file should also contain a lookup table for matching the static fields of the original application to those of the new application release. That table is similar to the previous one; it is, however, indexed by the identifiers of the new static fields; those items in the table that correspond to new fields contain an invalid identifier (I0 in the example), and the other items contain the identifier of the same field in the original release.
Once the appropriate file is generated, it should be loaded into the card. The card condition prior to loading is supposedly as shown in
Loading is performed using the regular link editing procedure of the system.
One of the loading steps consists in initializing the static fields. The standard initialization procedure is applied, except for those fields that are inherited from the original application. For these fields, the initial value as defined in the new release of the application is ignored and the earlier value is duplicated.
The next step will then consist in modifying the links of the objects so that they would point to the new classes. All the objects in the application should then be browsed and the lookup table for matching the earlier classes to the new ones should be used for identifying the new class of the object.
The result is displayed in
During that step, it may happen that the objects should be modified if further fields have been added to their classes. In such a case, a new object (with the new fields) is allocated, the values of the earlier fields are duplicated from the object's earlier version, and the values of the new fields are initialized to their default values (0 for the integers, “false” for the Boolean operators and “null” for the pointers). The references to the earlier object are then updated through techniques that are conventionally implemented in the memory retrievers.
The ultimate step consists in letting the application perform all the operations that are needed for updating the data and, in particular, carrying out the initialization of the new fields (static fields, or fields inserted in objects). Those applets that have to perform an updating should implement a specific interface wherein a procedure is defined. The updating will then consist in browsing the table of applets recorded in the system and, for each applet that is an instance of a class as defined in the updated package and implemented by the updating interface, invoking the procedure with the appropriate parameters.
Number | Date | Country | Kind |
---|---|---|---|
0315487 | Dec 2003 | FR | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/FR04/03353 | 12/22/2004 | WO | 6/26/2006 |