Verfahren zum Laden einer Applikation in einen Datenträger Method for loading an application into a data carrier
Die Erfindung betrifft ein Verfahren zum Laden einer Applikation in einen Datenträger mit einem darin implementierten Betriebssystem und einer dem Betriebssystem zugeordneten Library.The invention relates to a method for loading an application into a data carrier with an operating system implemented therein and a library assigned to the operating system.
Ein Datenträger im Sinn der Erfindung ist ein Rechnersystem, bei dem die Ressourcen, d.h. Speicherressourcen und/ oder Rechenkapazität (Rechen¬ leistung) begrenzt sind, z.B. eine Chipkarte (Smart Card, Mikroprozessor- Chipkarte). Der Datenträger hat einen Körper, in dem eine CPU (ein Mikro¬ prozessor) angeordnet ist, und der jede beliebige standardisierte oder nicht standardisierte Gestalt haben kann, beispielsweise die Gestalt einer flachen Chipkarte ohne Norm oder nach einer Norm wie z.B. ISO 7810 (z.B. ID-I, ID- 00, ID-000) oder die eines volumigen Tokens. Der Datenträger kann weiter eine oder mehrere beliebige Schnittstellen für kontaktlose und/ oder kon¬ taktbehaftete Kommunikation mit einem Lesegerät oder Datenverarbei¬ tungssystem (z.B. Personal Computer, Workstation, Server) haben.A data carrier in the sense of the invention is a computer system in which the resources, i. Memory resources and / or computing capacity (computing power) are limited, e.g. a chip card (smart card, microprocessor chip card). The data carrier has a body in which a CPU (a Mikro¬ processor) is arranged, and may have any standardized or non-standardized shape, such as the shape of a flat chip card without standard or according to a standard such. ISO 7810 (e.g., ID-I, ID-00, ID-000) or a volumetric token. The data carrier can furthermore have one or more arbitrary interfaces for contactless and / or contact-based communication with a reading device or data processing system (for example personal computer, workstation, server).
Im Datenträger ist ein Betriebssystem zum Betrieb des Datenträgers imple¬ mentiert. Weiter können in dem Datenträger ein oder mehrere Applikatio¬ nen implementiert sein. Durch die Applikationen sind Funktionen des Da¬ tenträgers verwirklicht, so dass der Datenträger beispielsweise die Funktion einer Teilnehmerkarte für ein Mobilfunksystem (z.B. SIM-Karte, USIM- Karte), einer Zahlungsverkehrkarte, einer Karte im Bereich des Gesund¬ heitswesens oder einer anderen Karte hat.An operating system for operating the data carrier is implemented in the data carrier. Furthermore, one or more applications can be implemented in the data carrier. Functions of the data carrier are realized by the applications, so that the data carrier has, for example, the function of a subscriber card for a mobile radio system (eg SIM card, USIM card), a payment transaction card, a card in the area of health care or another card ,
Dem Betriebssystem ist eine Library (gleichbedeutend Bibliotheksdatei) mit einer Mehrzahl von Libraryfunktionen zugeordnet, die durch im Datenträ¬ ger implementierte Applikationen genutzt werden können, so dass die Ap¬ plikationen den Programmcode, der den Libraryfunktionen entspricht, nicht selbst enthalten müssen. Beispielsweise in J AVA-Karten enthalten dagegen
die zu ladenden Applikationen (Applets) neben den Datenelemente in der Regel auch den zugehörigen Code.The operating system is assigned a library (equivalent to a library file) with a plurality of library functions that can be used by applications implemented in the data carrier, so that the applications do not themselves have to contain the program code which corresponds to the library functions. For example, in J AVA cards contain it the applications (applets) to be loaded next to the data elements usually also the associated code.
Herkömmlicherweise enthält die Library eines Datenträgers, der einem vor¬ bestimmten Standard genügt, sämtliche Libraryfunktionen, die in dem Stan¬ dard definiert sind. Damit ist sichergestellt, dass jede Applikation, die in dem Datenträger implementiert ist, oder die später noch in den Datenträger geladen wird, sämtliche Libraryfunktionen zur Verfügung hat, die sie benö¬ tigt. Allerdings nimmt die Library eine große Menge an Speicher im Daten¬ träger ein. Dieser Speicher fehlt beispielsweise, wenn zusätzliche Applikati¬ onen in den Datenträger geladen werden sollen. Dabei ist gerade bei Daten¬ trägern die Menge an verfügbarem Speicher relativ begrenzt.Conventionally, the library of a data carrier which satisfies a predetermined standard contains all the library functions defined in the standard. This ensures that any application that is implemented in the data carrier, or that is later loaded into the data carrier, has all the library functions that it needs. However, the library occupies a large amount of memory in the data carrier. This memory is missing, for example, if additional applications are to be loaded into the data carrier. In this case, the amount of available memory is relatively limited, especially for data carriers.
Der Erfindung liegt die Aufgabe zu Grunde, ein Verfahren zum Laden einer Applikation in einen Datenträger zu schaffen, bei dem mit dem verfügbaren Speicher des Datenträgers sparsam umgegangen wird.The invention is based on the object to provide a method for loading an application into a data carrier, in which the available memory of the data carrier is handled sparingly.
Die Aufgabe wird durch ein Verfahren nach Anspruch 1 gelöst. Vorteilhafte Ausgestaltungen der Erfindung sind in den abhängigen Ansprüchen ange¬ geben.The object is achieved by a method according to claim 1. Advantageous embodiments of the invention are given in the dependent claims.
Das erfindungsgemäße Verfahren gemäß dem unabhängigen Anspruch 1 geht von einem Datenträger aus, mit einem darin implementierten Betriebs¬ system und einer dem Betriebssystem zugeordneten Library, in der Library¬ funktionen ablegbar sind. In den Datenträger können Applikationen geladen werden. Die Erfindung gibt ein Verfahren zum Laden einer Applikation in den Datenträger an. Gemäß der Erfindung wird die Applikation in den Da¬ tenträger geladen und werden höchstens diejenigen Libraryfunktionen in die Library geladen, die von der Applikation benötigt werden.
Da nur die benötigten Libraryfunktionen in den Datenträger geladen wer¬ den, wird kein Speicher durch überflüssige Libraryfunktionen verschenkt.The inventive method according to the independent claim 1 is based on a data carrier, with an operating system implemented therein and a library assigned to the operating system in which library functions can be stored. Applications can be loaded into the data carrier. The invention specifies a method for loading an application into the data carrier. According to the invention, the application is loaded into the data carrier and at most those library functions which are required by the application are loaded into the library. Since only the required library functions are loaded into the data carrier, no memory is given away by superfluous library functions.
Daher ist gemäß Anspruch 1 ein Verfahren zum Laden einer Applikation in einen Datenträger geschaffen, bei dem mit dem verfügbaren Speicher des Datenträgers sparsam umgegangen wird.Therefore, according to claim 1, a method for loading an application into a data carrier is created in which the available memory of the data carrier is used sparingly.
Die benötigten Library funktionen können wahlweise zeitlich vor oder nach der Applikation in den Datenträger geladen werden. Wahlweise kann ein relativ großer Zeitabstand zwischen dem Laden der Applikation und dem Laden der Libraryfunktionen liegen. Alternativ können die Applikation und die Libraryfunktionen zeitlich eng benachbart in den Datenträger geladen werden.The required library functions can be loaded into the data carrier either before or after the application. Optionally, there may be a relatively large amount of time between loading the application and loading the library functions. Alternatively, the application and the library functions can be loaded closely adjacent to one another in terms of time.
Vorzugsweise wird die Library daraufhin überprüft, ob in ihr Libraryfunkti¬ onen enthalten sind, die von der Applikation benötigt werden. Anschließend werden nur diejenigen von der Applikation benötigten Library funktionen in die Library geladen werden, die gemäß der Überprüfung noch nicht in der Library enthalten sind. Beim Laden einer ersten Applikation in den Daten¬ träger, der zu diesem Zeitpunkt noch keine Applikationen enthält, kann die Überprüfung der Library wahlweise entfallen.The library is then preferably checked as to whether it contains library functions which are required by the application. Subsequently, only the library functions required by the application will be loaded into the library, which according to the check are not yet contained in the library. When loading a first application in the Daten¬ carrier, which at this time still contains no applications, the review of the library can optionally be omitted.
Vorzugsweise wird, bevor eine erste Applikation in den Datenträger geladen wird, eine leere Library im Datenträger bereitgestellt.Preferably, before a first application is loaded into the volume, an empty library is provided in the volume.
Gemäß einer Weiterbildung der Erfindung wird nach einem Entfernen einer Applikation aus dem Datenträger die Library überprüft, woraufhin nicht mehr benötigte Libraryfunktionen aus der Library entfernt werden.
Gemäß einer anderen Weiterbildung der Erfindung werden in die Library zu ladende Libraryfunktionen mit einer Signatur versehen. Dabei wird vor dem oder beim Laden der Libraryfunktion die Signatur der Libraryfunktion über¬ prüft und die Libraryfunktion nur dann in die Library geladen, falls dies gemäß der Signatur zulässig ist. Auf diese Weise können Libraryfunktionen mit bösartigen Inhalten wie Viren, Trojanern, Würmern oder dergleichen abgehalten werden.According to one embodiment of the invention, the library is checked after removing an application from the disk, after which no longer required library functions are removed from the library. According to another embodiment of the invention, library functions to be loaded into the library are provided with a signature. In this case, the signature of the library function is checked before or during loading of the library function and the library function is only loaded into the library if this is permissible according to the signature. In this way library functions with malicious contents such as viruses, Trojans, worms or the like can be held.
Im folgenden wird die Erfindung an Hand von Ausführungsbeispielen und unter Bezugnahme auf die Zeichnung näher erläutert, in der zeigt:In the following the invention will be explained in more detail with reference to exemplary embodiments and with reference to the drawing, in which:
Fig. 1 schematisch eine Smart Card mit einem Betriebssystem, einer dem Betriebssystem zugeordneten Library und einem Applikationsspei¬ cher mit einer Mehrzahl von darin abgespeicherten Applikationen.1 shows schematically a smart card with an operating system, a library associated with the operating system and an application memory with a plurality of applications stored therein.
Fig. 1 zeigt eine Smart Card 10 als ein Beispiel für einen Datenträger. In der Smart Card 10 ist ein Betriebssystem 20 implementiert, sowie eine dem Be¬ triebssystem zugeordnete Library 21 mit einer Mehrzahl von Libraryfunkti¬ onen a, b, c, ... . Weiter enthält die Smart Card 10 einen Applikationsspeicher 30 mit einer Mehrzahl von darin abgespeicherten Applikationen I, II, ... .Fig. 1 shows a smart card 10 as an example of a data carrier. In the smart card 10, an operating system 20 is implemented, as well as a Be¬ operating system associated library 21 with a plurality of Libraryfunkti¬ onen a, b, c, .... Next, the smart card 10 includes an application memory 30 having a plurality of applications stored therein I, II, ....
Beim Laden einer neuen Applikation in den Applikationsspeicher 30 wird die Library 21 auf ihren Bestand an Libraryfunktionen überprüft. Nur noch nicht vorhandene Library funktionen, die aber von der neuen Applikation benötigt werden, werden in die Library 21 geladen.
In der Smart Card 10 ist ein Speicherbereich vorgesehen, in dem die Informa¬ tion gespeichert ist, welche Libraryfunktionen a, b, c bereits in der Library 21 enthalten sind.When loading a new application into the application memory 30, the library 21 is checked for its library of library functions. Only library functions which are not yet available, but which are required by the new application, are loaded into the library 21. In the smart card 10, a memory area is provided in which the information is stored, which library functions a, b, c are already contained in the library 21.
Der Speicherbereich ist in einer ersten Ausgestaltung aus der Smart Card 10 zumindest auslesbar und optional auch überschreibbar. Insbesondere kann der Speicherbereich eine Datei im MF der Smart Card 10 sein, die nach einer Authentisierung der Instanz, die die Anwendung laden möchte, für diese auslesbar ist. Außerhalb der Smart Card 10 erfolgt die Überprüfung, welche Libraryfunktionen noch in die Library 21 zu laden sind. Der Speicherbereich wird nach einem erfolgreichen Ergänzen der Library von außen durch einen schreibenden Zugriff aktualisiert. Aufwendiger aber sicherer ist es, die Ak¬ tualisierung des Speicherbereiches nur durch die Smart Card 10 selbst zu gestatten. In diesem Fall behandelt die Smart Card 10 das Ergänzen der Lib¬ rary 21 und das Eintragen der Änderungen in den Speicherbereich als ato¬ mare Transaktion. Das heißt sie sichert ab, dass immer entweder beide Schritte erfolgreich durchgeführt werden oder keiner der Schritte wirksam wird, wie es durch so genannte „Roll-Back" oder „Roll-Forward- Mechanismen" bekannt ist.The memory area is in a first embodiment of the smart card 10 at least readable and optionally also overwritable. In particular, the memory area may be a file in the MF of the smart card 10 which, after an authentication of the instance that wants to load the application, can be read out for it. Outside of the Smart Card 10, it is checked which library functions are still to be loaded into the library 21. The memory area is updated from the outside by a write access after a successful addition of the library. However, it is more expensive but safer to permit the updating of the memory area only by the smart card 10 itself. In this case, the smart card 10 treats the addition of the library 21 and the entry of the changes in the storage area as an ato-mare transaction. That is, it ensures that either either steps are successfully performed or none of the steps become effective, as known by so-called "roll-back" or "roll-forward mechanisms".
Der Speicherbereich ist in einer zweiten Ausgestaltung ein interner Spei¬ cherbereich der Smart Card 10. Die Smart Card 10 überprüft anhand der In¬ formationen in dem Speicherbereich, ob die Library 21 für das Laden der Anwendung zu ergänzen ist. Sie könnte zu diesem Zweck die der Smart Card 10 bereits vorliegende, zu ladende Anwendung auswerten. Bevorzugt erhält die Smart Card 10 jedoch als separates Datenelement ein Anforde¬ rungsprofil der zu ladenden Anwendung, in welchem die benötigten Libra¬ ryfunktionen und gegebenenfalls deren Versionen aufgeführt sind.
Nachdem die Smart Card 10 intern überprüft hat, welche Libraryfunktionen zu ergänzen sind, sendet es diese Information als Antwort an das Terminal, das beispielsweise ein Computer mit Kartenleser und optionaler Netzwerk- anbindung sein kann. Die zum Laden der Anwendung auf die Smart Card 10 berechtigte Instanz kann der Inhaber des Computer oder der Betreiber eines mit dem Computer über das Netzwerk verbundenen Servers sein. Das Ter¬ minal sendet die zu ergänzenden Library funktionen an die Smart Card 10. Die Smart Card 10 ergänzt die Library 21 mit den erhaltenen Libraryfunkti¬ onen ergänzt und notiert die Ergänzungen in dem dafür vorgesehenen Spei¬ cherbereich.In a second embodiment, the memory area is an internal memory area of the smart card 10. Based on the information in the memory area, the smart card 10 checks whether the library 21 for loading the application is to be supplemented. You could evaluate for this purpose the smart card 10 already present, to be loaded application. However, the smart card 10 preferably receives as a separate data element a requirement profile of the application to be loaded, in which the required Libra¬ ryfunktionen and optionally their versions are listed. After the smart card 10 has internally checked which library functions are to be supplemented, it sends this information in response to the terminal, which can be, for example, a computer with card reader and optional network connection. The authorized entity to load the application onto the smart card 10 may be the owner of the computer or the operator of a server connected to the computer via the network. The terminal sends the library functions to be supplemented to the smart card 10. The smart card 10 supplements the library 21 with the library functions obtained and notes the additions in the memory area provided for this purpose.
Die zu ladende Anwendung umfasst vorzugsweise nur Daten und keinen ausführbaren Code.
The application to be loaded preferably comprises only data and no executable code.