[go: up one dir, main page]

DE10323033A1 - Load an executable program into a portable data carrier - Google Patents

Load an executable program into a portable data carrier Download PDF

Info

Publication number
DE10323033A1
DE10323033A1 DE2003123033 DE10323033A DE10323033A1 DE 10323033 A1 DE10323033 A1 DE 10323033A1 DE 2003123033 DE2003123033 DE 2003123033 DE 10323033 A DE10323033 A DE 10323033A DE 10323033 A1 DE10323033 A1 DE 10323033A1
Authority
DE
Germany
Prior art keywords
file
access right
data carrier
loading
file system
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.)
Ceased
Application number
DE2003123033
Other languages
German (de)
Inventor
Erich Englbrecht
Robert Hockauf
Thorsten Ulbricht
Rudolf Schubert
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.)
Giesecke and Devrient GmbH
Original Assignee
Giesecke and Devrient GmbH
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 Giesecke and Devrient GmbH filed Critical Giesecke and Devrient GmbH
Priority to DE2003123033 priority Critical patent/DE10323033A1/en
Priority to PCT/EP2004/005365 priority patent/WO2004104916A2/en
Priority to EP04739254A priority patent/EP1629379A2/en
Publication of DE10323033A1 publication Critical patent/DE10323033A1/en
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/468Specific access rights for resources, e.g. using capability register

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Bei einem Verfahren zum Laden eines ausführbaren Programms (36) in ein Dateisystem (28) eines tragbaren Datenträgers, wobei das Dateisystem (28) eine Mehrzahl unterschiedlicher Zugriffsrechtseinstellungen (44, 58) für die im Dateisystem (28) angelegten Dateien (30) unterstützt, wird das ausführbare Programm (36) während des Ladevorgangs als Datei (30) mit einer ersten Zugriffsrechtseinstellung (44) im Dateisystem (28) gespeichert, und die Zugriffsrechtseinstellung (44, 58) dieser Datei (30) wird nach einem erfolgreichen Abschluß des Ladevorgangs auf eine zweite Zugriffsrechtseinstellung (58) geändert. Ein tragbarer Datenträger und ein Computerprogrammprodukt weisen entsprechende Merkmale auf. Durch die Erfindung kann die Ausführung unvollständig oder fehlerhaft in den Datenträger geladener Programme zuverlässig verhindert werden.In a method for loading an executable program (36) into a file system (28) of a portable data carrier, the file system (28) supporting a plurality of different access rights settings (44, 58) for the files (30) created in the file system (28), the executable program (36) is stored during the loading process as a file (30) with a first access right setting (44) in the file system (28), and the access right setting (44, 58) of this file (30) is opened after a successful completion of the loading process changed a second access right setting (58). A portable data carrier and a computer program product have corresponding features. The invention can reliably prevent the execution of incomplete or incorrectly loaded programs in the data carrier.

Description

Die Erfindung betrifft allgemein das technische Gebiet des Ladens eines ausführbaren Programms in ein Dateisystem eines tragbaren Datenträgers, wobei das Dateisystem eine Mehrzahl unterschiedlicher Zugriffsrechtseinstellungen unterstützt. Ein tragbarer Datenträger im Sinne des vorliegenden Dokuments kann insbesondere eine Chipkarte (Smart Card) in unterschiedlichen Bauformen oder ein Chipmodul sein.The Invention relates generally to the technical field of loading a executable Program in a file system of a portable data carrier, wherein the file system has a number of different access rights settings supported. On portable disk In the sense of the present document, a chip card (Smart Card) in different designs or a chip module.

Tragbare Datenträger werden mit immer mehr Speicherplatz und immer größerer Rechenleistung hergestellt. In einem internen Forschungsprojekt der Giesecke & Devrient GmbH wird gegenwärtig untersucht, inwieweit ein UNIX®-artiges Betriebssystem in einem modernen tragbaren Datenträger implementiert werden kann. In diesem Zusammenhang ist insbesondere eine Implementierung des unter der Marke Linux® bekannten Betriebssystems vorgesehen. Das Buch "Understanding the Linux Kernel" von D. P. Bovet und M. Cesati, O'Reilly Verlag, 2. Auflage, Dezember 2002, enthält eine detaillierte technische Beschreibung dieses Betriebssystems.Portable data carriers are being manufactured with more and more storage space and ever greater computing power. An internal research project of Giesecke & Devrient GmbH is currently investigating the extent to which a UNIX ® -like operating system can be implemented in a modern portable data carrier. In this context, an implementation of the operating system known under the Linux ® brand is planned. The book "Understanding the Linux Kernel" by DP Bovet and M. Cesati, O'Reilly Verlag, 2nd edition, December 2002, contains a detailed technical description of this operating system.

Allgemein sind bereits tragbare Datenträger mit einer Funktionalität zum Laden von ausführbarem Programmcode während des Einsatzes des Datenträgers bekannt. Solche Datenträger sind beispielsweise in Kapitel 5.10 des Buches "Handbuch der Chipkarten" von W. Rankl und W. Effing, Carl Hanser Verlag, 3. Auflage, 1999, Seiten 252–281, beschrieben.Generally are already portable with a functionality for loading executable program code while the use of the data carrier known. Such media are, for example, in Chapter 5.10 of the book "Handbuch der Chipkarten" by W. Rankl and W. Effing, Carl Hanser Verlag, 3rd edition, 1999, pages 252-281.

Das Laden von Programmcode in einen Datenträger, der ein UNIX-artiges Betriebssystem aufweist, erscheint auf den ersten Blick wenig problematisch, weil das Betriebssystem die benötigten Funktionen grundsätzlich bereitstellt. Schwierigkeiten ergeben sich jedoch insbesondere durch die Tatsache, daß die Stromversorgung des tragbaren Datenträgers und die Kommunikationsverbindung mit einem externen Terminal jederzeit unterbrochen oder gestört werden können. Findet zum Zeitpunkt der Unterbrechung oder Störung gerade ein Ladevorgang statt, dann wird das geladene Programm möglicherweise unvollständig oder fehlerhaft im Datenträger gespeichert. Wenn ein solches Programm ausgeführt werden würde, könnte dies zumindest ein undefiniertes und gegebenenfalls sogar ein die Sicherheit des Datenträgers kompromittierendes Verhalten zur Folge haben.The Loading program code into a disk that is a UNIX-like operating system appears at first glance to be less problematic because the operating system the required Functions basically provides. However, difficulties arise in particular from the fact that the Power supply to the portable data carrier and the communication link be interrupted or disturbed at any time with an external terminal can. If a charging process is taking place at the time of the interruption or malfunction, then the loaded program may become incomplete or incorrectly stored in the data carrier. When such a program will be run would, could this is at least an undefined and possibly even a die Disk security result in compromising behavior.

Es ist daher Aufgabe der Erfindung, einen Mechanismus bereitzustellen, durch den die Ausführung unvollständig oder fehlerhaft in den Datenträger geladener Programme zuverlässig verhindert werden kann. Vorzugsweise soll dieser Mechanismus nur geringen zusätzlichen Verwaltungsaufwand benötigen. In bevorzugten Ausgestaltungen soll die Erfindung ferner eine Möglichkeit bereitstellen, durch die unvollständig oder fehlerhaft geladene Programme leicht erkannt und gelöscht werden können.It the object of the invention is therefore to provide a mechanism through which the execution incomplete or incorrectly loaded in the disk Programs reliable can be prevented. This mechanism should preferably only little additional Need administrative effort. In preferred embodiments, the invention is also a possibility provide by the incomplete or incorrectly loaded Programs easily recognized and deleted can be.

Erfindungsgemäß wird diese Aufgabe ganz oder zum Teil gelöst durch ein Verfahren gemäß Anspruch 1, einen tragbaren Datenträger gemäß Anspruch 8 und ein Computerprogrammprodukt gemäß Anspruch 9. Die abhängigen Ansprüche betreffen bevorzugte Ausgestaltungen der Erfindung.According to the invention Task completely or partially solved by a method according to claim 1, a portable disk according to claim 8 and a computer program product according to claim 9. The dependent claims relate to preferred embodiments of the invention.

Die Erfindung geht von der Grundüberlegung aus, eine im Dateisystem des Datenträgers bereits vorhandene Funktionalität, mit der unterschiedliche Zugriffsrechte auf die im Dateisystem enthaltenen Dateien eingestellt werden können, auch zur Lösung der erfindungsgemäßen Aufgabe zu nutzen. Es ergibt sich somit eine vorteilhafte Synergie, weil der Ladezustand des Programms mit äußerst geringem Verwaltungsaufwand im Dateisystem abgebildet werden kann.The Invention is based on the basic idea one in the file system of the disk existing functionality, with the different access rights to the files contained in the file system can be set also to solve the task according to the invention to use. This results in an advantageous synergy because the state of charge of the program with extremely little administrative effort can be mapped in the file system.

Erfindungsgemäß ist vorgesehen, daß das ausführbare Programm während des Ladevorgangs als Datei mit einer ersten Zugriffsrechtseinstellung im Dateisystem gespeichert wird, und daß die Zugriffsrechtseinstellung dieser Datei nach einem erfolgreichen Abschluß des Ladevorgangs auf eine zweite Zugriffsrechtseinstellung geändert wird. Grundsätzlich ist in diesem Zusammenhang nur erforderlich, daß sich die erste und die zweite Zugriffsrechtseinstellung voneinander unterscheiden. In bevorzugten Ausgestaltungen werden jedoch die Zugriffsrechtseinstellungen "passend" gewählt, nämlich derart, daß die erste Zugriffsrechtseinstellung das Schreiben in die Datei, nicht aber deren Ausführung gestattet, und daß die zweite Zugriffsrechtseinstellung die Ausführung der Datei gestattet.According to the invention, that the executable program while the loading process as a file with a first access right setting stored in the file system, and that the access right setting this file after a successful loading to a second access right setting is changed. Basically is in this context it is only necessary that the first and the second Differentiate access rights setting from each other. In preferred configurations however, the access rights settings are selected "appropriately", namely such that the first access right setting writing to the file, not but their execution allowed, and that the second access right setting allows the execution of the file.

Ein unvollständiger Ladevorgang wird vorzugsweise daran erkannt, daß die während des Ladevorgangs beschriebene Datei noch die erste Zugriffsrechtseinstellung aufweist, obwohl der Ladevorgang bereits – offensichtlich erfolglos – beendet worden ist. Eine derartige Überprüfung kann beispielsweise bei jedem Hochfahren des Datenträgers nach einem Spannungsausfall und/oder bei jedem Versuch der Ausführung eines Programms erfolgen. Als unvollständig erkannte Dateien werden dann vorzugsweise aus dem Dateisystem gelöscht.On incomplete Charging process is preferably recognized by the fact that the described during the charging process File still has the first access right setting, though the loading process already - obviously unsuccessful - ended has been. Such a review can for example, every time the data carrier is started up after a power failure and / or every attempt to execute a program. As incomplete recognized files are then preferably deleted from the file system.

Wie eingangs bereits erwähnt, weist der Datenträger vorzugsweise ein UNIX-artiges Betriebssystem auf. Die dort üblicherweise verwendeten Dateisysteme umfassen für jede Datei ein einstellbares Lesezugriffsrecht, ein einstellbares Schreibzugriffsrecht und ein einstellbares Ausführungsrecht. Diese Rechte sind üblicherweise für den Eigentümer der Datei, eine mit dem Dateieigentümer assoziierte Benutzergruppe und alle anderen Benutzer getrennt einstellbar. Die Erfindung ist jedoch nicht auf Betriebs- und Dateisysteme beschränkt, die genau diese Zugriffsrechtsstruktur vorsehen. Vielmehr kann die Erfindung bei jedem Betriebs- und Dateisystem eingesetzt werden, das unterschiedliche erste und zweite Zugriffsrechtseinstellungen für zumindest einige Dateien zuläßt.As already mentioned at the beginning, the data carrier preferably has a UNIX-like operating system. The file systems usually used there include a configurable for each file res read access right, an adjustable write access right and an adjustable execution right. These rights can usually be set separately for the owner of the file, a user group associated with the file owner and all other users. However, the invention is not restricted to operating systems and file systems which provide precisely this access right structure. Rather, the invention can be used with any operating and file system that allows different first and second access right settings for at least some files.

Grundsätzlich kann die Erfindung in allen Phasen des Lebenszyklus des Datenträgers eingesetzt werden. Besonders bevorzugt dient die Erfindung jedoch zum Laden von Programmcode in einen Datenträger, dessen Initialisierung und Personalisierung bereits abgeschlossen sind und der sich bei einem Benutzer im Einsatz befindet. In diesem Fall wird das Laden von Programmcode in den Datenträger oft auch als "Nachladen" bezeichnet.Basically can the invention is used in all phases of the life cycle of the data carrier become. However, the invention is particularly preferably used for charging of program code in a data carrier, its initialization and personalization have already been completed and the at is in use by a user. In this case, the loading of program code in the data carrier often referred to as "reloading".

Das erfindungsgemäße Computerprogrammprodukt kann ein körperliches Medium mit gespeicherten Programmbefehlen sein, beispielsweise ein Halbleiterspeicher oder eine Diskette oder eine CD-ROM. Das Computerprogrammprodukt kann jedoch auch ein nicht-körperliches Medium sein, beispielsweise ein über ein Computernetzwerk übermitteltes Signal. Insbesondere kann das Computerprogrammprodukt ein Ladeprogramm enthalten, das im Zuge der Herstellung oder der Initialisierung oder der Personalisierung oder der Anwendung eines tragbaren Datenträgers in diesen eingebracht wird.The Computer program product according to the invention can be a physical Medium with stored program instructions, for example a Semiconductor memory or a floppy disk or a CD-ROM. The computer program product can also be a non-physical Medium, for example an over a computer network transmitted Signal. In particular, the computer program product can be a loading program included in the course of manufacturing or initialization or the personalization or application of a portable storage device in this is introduced.

In bevorzugten Ausgestaltungen weisen der Datenträger und/oder das Computerprogrammprodukt Merkmale auf, die den oben beschriebenen und/oder den in den abhängigen Verfahrensansprüchen genannten Merkmalen entsprechen.In preferred embodiments have the data carrier and / or the computer program product Features that correspond to those described above and / or those mentioned in the dependent method claims Match characteristics.

Weitere Merkmale, Vorteile und Aufgaben der Erfindung gehen aus der folgenden genauen Beschreibung eines Ausführungsbeispiels und mehrerer Ausführungsalternativen hervor. Es wird auf die schematischen Zeichnungen verwiesen, in denen zeigen:Further Features, advantages and objects of the invention will appear from the following detailed description of an embodiment and several alternative versions out. Reference is made to the schematic drawings in show them:

1 ein Blockdiagramm mit Funktionseinheiten eines Datenträgers nach einem Ausführungsbeispiel der Erfindung, der an ein externes Terminal angeschlossen ist, und 1 a block diagram with functional units of a data carrier according to an embodiment of the invention, which is connected to an external terminal, and

2 eine schematische Darstellung eines erfolgreich abgeschlossenen Ladevorgangs eines Programms in den Datenträger von 1. 2 a schematic representation of a successfully completed loading of a program in the disk of 1 ,

Der in 1 dargestellte Datenträger 10 weist auf einem einzigen Halbleiterchip einen Prozessor 12, einen Speicher 14 und eine Schnittstellenschaltung 16 zur kontaktlosen oder kontaktgebundenen Kommunikation mit einem externen Terminal 18 auf. Der Speicher 14 ist in mehrere Speicherfelder unterteilt. Im vorliegenden Ausführungsbeispiel sind als Speicherfelder ein als RAM ausgestalteter Arbeitsspeicher 20, ein als ROM ausgestalteter Festwertspeicher 22 und ein als EEPROM ausgestalteter, nicht-flüchtiger Speicher 24 vorgesehen.The in 1 shown disk 10 has a processor on a single semiconductor chip 12 , a memory 14 and an interface circuit 16 for contactless or contact-based communication with an external terminal 18 on. The memory 14 is divided into several memory fields. In the present exemplary embodiment, a working memory configured as RAM is used as memory fields 20 , a read-only memory designed as a ROM 22 and a non-volatile memory configured as an EEPROM 24 intended.

Im Speicher 14 – und zwar teils im Festwertspeicher 22 und teils im nichtflüchtigen Speicher 24 – befindet sich Programmcode, der ein Betriebssystem 26 implementiert. Das Betriebssystem 26 ist im vorliegenden Ausführungsbeispiel eine auf den Einsatz im Datenträger 10 zugeschnittene Variante des unter der Marke Linux bekannten Betriebssystems. Insbesondere ist das Betriebssystem 26 an die erhebliche Ressourcenbeschränkung des Datenträgers 10 im Hinblick auf Rechenleistung, Speicherplatz und Peripheriegeräte angepaßt. Das Betriebssystem 26 ist ferner dazu eingerichtet, bei einer plötzlichen Unterbrechung der Stromversorgung des Datenträgers 10 und/oder der Kommunikationsverbindung zum externen Terminal 18 sicherheitskritische Betriebszustände des Datenträgers 10 auszuschließen.In the storage room 14 - partly in the read-only memory 22 and partly in non-volatile memory 24 - there is program code that is an operating system 26 implemented. The operating system 26 is in the present embodiment for use in the data carrier 10 tailored version of the operating system known under the Linux brand. In particular, the operating system 26 the significant resource constraints of the disk 10 adapted in terms of computing power, storage space and peripheral devices. The operating system 26 is also set up in the event of a sudden interruption in the power supply of the data carrier 10 and / or the communication link to the external terminal 18 safety-critical operating states of the data carrier 10 excluded.

Im nicht-flüchtigen Speicher 24 ist ein Dateisystem 28 mit einer baumartigen Verzeichnis- und Dateistruktur angelegt. Eine Datei des Dateisystems 28 ist in 1 beispielhaft mit dem Bezugszeichen 30 dargestellt. In der für Unix-Dateisysteme üblichen Weise sind jeder Datei des Dateisystems 28 – z.B. der Datei 30 – Zugriffsrechte zugeordnet, die angeben, ob die Datei gelesen und/oder beschrieben und/oder ausgeführt werden darf. Diese Zugriffsrechte sind für einen Eigentümer der Datei, eine dem Eigentümer zugeordnete Benutzergruppe sowie für alle anderen Benutzer getrennt angegeben: Eine genauere Darstellung der genannten Zugriffsrechte und weiterer Dateiattribute findet sich auf den Seiten 15 und 16 des eingangs bereits zitierten Buches "Understanding the Linux Kernel".In non-volatile memory 24 is a filesystem 28 with a tree-like directory and file structure. A file of the file system 28 is in 1 for example with the reference symbol 30 shown. In the usual way for Unix file systems are every file of the file system 28 - e.g. the file 30 - Assigned access rights that specify whether the file can be read and / or written and / or executed. These access rights are specified separately for an owner of the file, a user group assigned to the owner and for all other users: A more detailed description of the access rights mentioned and other file attributes can be found on pages 15 and 16 of the book "Understanding the Linux Kernel" already cited at the beginning. ,

Das Betriebssystem 26 weist ein internes Ladeprogramm 32 auf, das mit einem externen Ladeprogramm 34 des Terminals 18 zusammenwirkt, um ein ausführbares Programm 36 in den Datenträger 10 zu laden. Statt der hier beispielhaft gezeigten Ausgestaltung, bei der das interne Ladeprogramm 32 ein Modul des Betriebssystems 26 ist, kann das interne Ladeprogramm 32 in Ausführungsalternativen auch ganz oder zum Teil als Anwendungsprogramm im Dateisystem 28 vorliegen.The operating system 26 has an internal loader 32 on that with an external loader 34 of the terminal 18 interacts to create an executable program 36 in the disk 10 to load. Instead of the configuration shown here by way of example, in which the internal loading program 32 a module of the operating system 26 the internal loader 32 in execution alternatives also in whole or in part as an application program in the file system 28 available.

Das in den Datenträger 10 zu ladende Programm 36 kann entweder lokal im Terminal 18 gespeichert sein oder von einem Hintergrundsystem (in 1 nicht gezeigt), an das das Terminal 18 angeschlossen ist, an das Terminal 18 übertragen werden. Im hier beschriebenen Beispiel liegt das ausführbare Programm 36 in dem unter dem Namen ELF (Executable and Linking Format) bekannten Format vor, während in Ausführungsvarianten andere oder zusätzliche Dateiformate für das ausführbare Programm 36 vorgesehen sein können.That in the disk 10 program to be loaded 36 can either locally in the terminal 18 stored or from a background system (in 1 not shown) to which the terminal 18 is connected to the terminal 18 be transmitted. The executable program is in the example described here 36 in the format known as ELF (Executable and Linking Format), while in execution variants different or additional file formats for the executable program 36 can be provided.

Der Ablauf eines fehlerfreien Ladevorgangs ist in 2 beispielhaft gezeigt, wobei die Zeitachse in der Darstellung von 2 von oben nach unten verläuft. Der Ladevorgang wird entweder von dem externen Ladeprogramm 34 oder von dem internen Ladeprogramm 32 angestoßen. In einer anfänglichen Initialisierungsphase 40 bzw. 42 tauschen das externe Ladeprogramm 34 und das interne Ladeprogramm 32 eine Anforderung und eine entsprechende Bestätigung sowie gegebenenfalls weitere Verwaltungsdaten aus.The process of an error-free loading process is in 2 shown by way of example, the time axis in the representation of 2 runs from top to bottom. The charging process is either carried out by the external charging program 34 or from the internal loader 32 initiated. In an initial initialization phase 40 respectively. 42 exchange the external charging program 34 and the internal loader 32 a request and a corresponding confirmation and, if necessary, further administrative data.

Das interne Ladeprogramm 32 legt im Zuge der Initialisierungsphase 42 die anfangs noch leere Datei 30 im Dateisystem 28 an. Die Datei 30 wird hierbei mit einer ersten Zugriffsrechtseinstellung 44 angelegt, in der nur ein Schreibzugriffsrecht 46 ("W"-Flag) gesetzt ist. Ein Lesezugriffsrecht 48 und ein Ausführungsrecht 50 ("R"-Flag und "X"-Flag) sind für die Datei 30 nicht gesetzt. In unterschiedlichen Ausführungsformen können die drei Zugriffsrechte 46, 48, 50 dem Eigentümer der Datei 30 und/oder einer übergeordneten Benutzergruppe und/oder allen Benutzern zugeordnet sein.The internal loader 32 sets in the course of the initialization phase 42 the initially empty file 30 in the file system 28 on. The file 30 here with a first access right setting 44 created in which only a write access right 46 ("W" flag) is set. A read access right 48 and an execution right 50 ("R" flag and "X" flag) are for the file 30 not set. In different embodiments, the three access rights 46 . 48 . 50 the owner of the file 30 and / or a higher-level user group and / or all users.

Im Anschluß an die Initialisierungsphase 40 bzw. 42 beginnt eine Übertragungsphase 52 bzw. 54, in der das externe Ladeprogramm 34 das zu ladende Programm 36 an das interne Ladeprogramm 32 übermittelt. In manchen Ausgestaltungen kann diese Übertragung in einem stetigen Datenstrom erfolgen. In der beispielhaften Darstellung von 2 ist dagegen vorgesehen, das ausführbare Programm 36 in mehrere Fragmente einer vorgegebenen Größe zu unterteilen. Diese Fragmente werden in jeweils einem Teilschritt der Übertragungsphase 52 bzw. 54 an das interne Ladeprogramm 32 gesendet und dort sogleich in die Datei 30 eingeschrieben. Geeignete Übertragungsprotokolle, die gegebenenfalls auch Authentisierungs-, Sicherungs-, Fehlererkennungs- und/oder Fehlerkorrekturfunktionen aufweisen können, sind als solche gut bekannt.Following the initialization phase 40 respectively. 42 a transmission phase begins 52 respectively. 54 in which the external loader 34 the program to be loaded 36 to the internal loader 32 transmitted. In some configurations, this transmission can take place in a continuous data stream. In the exemplary representation of 2 however, the executable program is provided 36 to divide into several fragments of a given size. These fragments are each in a substep of the transmission phase 52 respectively. 54 to the internal loader 32 sent and there immediately into the file 30 enrolled. Suitable transmission protocols, which may also have authentication, security, error detection and / or error correction functions, are well known as such.

Bei einem fehlerfreien Ladevorgang ist das ausführbare Programm 36 am Ende der Übertragungsphase 52, 54 vollständig in den Datenträger 10 geladen und in die Datei 30 eingeschrieben worden. Die erste Zugriffsrechtseinstellung 44 wurde bislang nicht verändert.If the loading process is error-free, the executable program is 36 at the end of the transmission phase 52 . 54 completely in the disk 10 loaded and into the file 30 been registered. The first access right setting 44 has not been changed so far.

In einer Abschlußphase 56 überprüft das interne Ladeprogramm 32 nun, ob das ausführbare Programm 36 tatsächlich vollständig und fehlerfrei geladen wurde. Im einfachsten Fall wird dies immer dann angenommen, wenn während der Übertragungsphase 52, 54 gemäß dem verwendeten Übertragungsprotokoll kein Fehler festgestellt wurde. Bevorzugt findet aber in der Abschlußphase 56 eine weitere Überprüfung statt. Hierbei kann z.B. die Länge der gespeicherten Datei 30 mit einer vom externen Ladeprogramm 34 übermittelten Längenangabe verglichen werden, oder es wird eine Prüfsumme der im Dateisystem 28 gespeicherten Datei 30 berechnet und mit einer vom externen Ladeprogramm 34 übermittelten Prüfsumme verglichen. Geeignete Algorithmen zur Prüfsummenberechnung sind als solche z.B. unter den Bezeichnungen CRC (Cyclic Redundancy Check) oder MD5 (Message Digest 5) oder SHA-1 (Secure Hash Algorithm 1) gut bekannt.In a final phase 56 checks the internal loader 32 now whether the executable program 36 was actually loaded completely and without errors. In the simplest case, this is always assumed if during the transmission phase 52 . 54 no error was found according to the transmission protocol used. However, preference is given to the final phase 56 another review instead. For example, the length of the saved file 30 with one from the external loader 34 transmitted length specification are compared, or there is a checksum of the in the file system 28 saved file 30 calculated and with one from the external loader 34 transmitted checksum compared. Suitable algorithms for checksum calculation are well known as such, for example, under the names CRC (Cyclic Redundancy Check) or MD5 (Message Digest 5) or SHA-1 (Secure Hash Algorithm 1).

Wenn in der Abschlußphase 56 kein Ladefehler detektiert wurde, wird die Datei 30 auf eine zweite Zugriffsrechtseinstellung 58 gesetzt. Im vorliegenden Ausführungsbeispiel sind in der zweiten Zugriffsrechtseinstellung 58 das Schreibzugriffsrecht 46 ("W"-Flag) gelöscht und das Lesezugriffsrecht 48 ("R"-Flag) sowie das Ausführungsrecht 50 ("X"-Flag) gesetzt. Die Datei 30 kann nun unter Steuerung des Betriebssystems 26 als ausführbares Programm 36 ausgeführt werden. Der Ladevorgang ist damit erfolgreich abgeschlossen; in manchen Ausgestaltungen kann eine entsprechende Rückmeldung vom internen Ladeprogramm 32 an das externe Ladeprogramm 34 erfolgen.If in the final phase 56 no loading error has been detected, the file will 30 to a second access right setting 58 set. In the present exemplary embodiment, the second access right setting 58 the write access right 46 ("W" flag) cleared and read access right 48 ("R" flag) as well as the execution right 50 ("X" flag) set. The file 30 can now be controlled by the operating system 26 as an executable program 36 be carried out. The loading process is now successfully completed; In some configurations, a corresponding feedback from the internal loading program 32 to the external charging program 34 respectively.

Falls das interne Ladeprogramm 32 während der Übertragungsphase 54 oder der Abschlußphase 56 einen Ladefehler meldet, kann der Ladevorgang entweder neu gestartet oder abgebrochen werden. Der bereits geschriebene Teil der Datei 30 wird dann vorzugsweise sogleich aus dem Dateisystem 28 gelöscht.If the internal loader 32 during the transmission phase 54 or the final phase 56 reports a charging error, the charging process can either be restarted or canceled. The part of the file already written 30 is then preferably immediately from the file system 28 deleted.

Eine derartige sofortige Säuberung des Dateisystems 28 durch das interne Ladeprogramm 32 ist jedoch nicht möglich, wenn der Datenträger 10 während des Ladevorgangs plötzlich vom Terminal 18 getrennt wird. Dies kann entweder wegen einer Betriebsstörung oder aufgrund eines gezielten Angriffsversuchs geschehen.Such an immediate file system cleanup 28 through the internal charging program 32 is however not possible if the disk 10 suddenly during the loading process from the terminal 18 is separated. This can happen either due to a malfunction or due to a targeted attempt to attack.

Wenn der Datenträger 10 nach einer solchen Trennung vom Terminal 18 – und dem damit verbundenen Ausfall der Versorgungsspannung – wieder hochfährt, führt er eine Kontrolle des Dateisystems 28 aus. Wird dabei eine durch einen Ladevorgang angelegte Datei – hier z.B. die Datei 30 – gefunden, die noch die erste Zugriffsrechtseinstellung 44 aufweist, so ist dies ein Zeichen dafür, daß ein laufender Ladevorgang unterbrochen wurde und daher die Datei unvollständig oder fehlerhaft ist. Die betroffene Datei wird dann aus dem Dateisystem 28 gelöscht. Ob eine im Dateisystem 28 enthaltene Datei prinzipiell ein ausführbares Programm darstellt, kann in der Regel durch eine Überprüfung der ersten Bytes der Datei ermittelt werden. So weisen z.B. die ersten sechzehn Bytes eines ausführbaren Programms im ELF-Format stets vorgegebene Werte auf, die auch als "magische Werte" bezeichnet werden.If the disk 10 after such a disconnection from the terminal 18 - and the associated failure of the supply voltage - starts up again, it checks the file system 28 out. If a file is created by a loading process - here, for example, the file 30 - found the first access right setting 44 , this is a sign that an ongoing loading process has been interrupted and the file is therefore incomplete or incorrect. The affected File then becomes from the file system 28 deleted. Whether one in the file system 28 The file contained in principle represents an executable program, can usually be determined by checking the first bytes of the file. For example, the first sixteen bytes of an executable program in ELF format always have predetermined values, which are also referred to as "magic values".

Alternativ oder zusätzlich zu der gerade beschriebenen Überprüfung des Dateisystems 28 bei jedem Hochfahren des Datenträgers 10 kann auch vorgesehen sein, daß das Betriebssystem 26 bei jedem Versuch der Ausführung einer Datei – z.B. der Datei 30 -, die nicht durch ein gesetztes "X"-Flag als ausführbar gekennzeichnet ist, diese Datei löscht. Im Vergleich zu der an sich bekannten Vorgehensweise, bei der das Betriebssystem 26 lediglich die Ausführung einer nicht mit einem Ausführungsrecht gekennzeichneten Datei verweigert, wird durch die zusätzliche Löschung derartiger Dateien bei einem Ausführungsversuch eine laufende Bereinigung des Dateisystems 28 bewirkt.Alternatively or in addition to the file system check just described 28 every time the data carrier is started up 10 can also be provided that the operating system 26 with every attempt to execute a file - e.g. the file 30 - which is not marked as executable by a set "X" flag, deletes this file. Compared to the procedure known per se, in which the operating system 26 only the execution of a file that is not marked with an execution right is refused, the additional deletion of such files in the event of an attempt to execute will result in ongoing cleanup of the file system 28 causes.

Claims (9)

Verfahren zum Laden eines ausführbaren Programms (36) in ein Dateisystem (28) eines tragbaren Datenträgers (10), wobei das Dateisystem (28) eine Mehrzahl unterschiedlicher Zugriffsrechtseinstellungen (44, 58) für die im Dateisystem (28) angelegten Dateien (30) unterstützt, dadurch gekennzeichnet, daß das ausführbare Programm (36) während des Ladevorgangs als Datei (30) mit einer ersten Zugriffsrechtseinstellung (44) im Dateisystem (28) gespeichert wird, und daß die Zugriffsrechtseinstellung (44, 58) dieser Datei (30) nach einem erfolgreichen Abschluß des Ladevorgangs auf eine zweite Zugriffsrechtseinstellung (58) geändert wird.Procedure for loading an executable program ( 36 ) into a file system ( 28 ) of a portable data carrier ( 10 ), where the file system ( 28 ) a variety of different access rights settings ( 44 . 58 ) for those in the file system ( 28 ) created files ( 30 ), characterized in that the executable program ( 36 ) while loading as a file ( 30 ) with a first access right setting ( 44 ) in the file system ( 28 ) is saved and that the access rights setting ( 44 . 58 ) this file ( 30 ) after a successful completion of the loading process for a second access right setting ( 58 ) will be changed. Verfahren nach Anspruch 1, dadurch gekennzeichnet, daß ein erfolglos beendeter Ladevorgang daran erkannt wird, daß die während des Ladevorgangs beschriebene Datei (30) nach Beendigung des Ladevorgangs noch die erste Zugriffsrechtseinstellung (44) aufweist, und daß diese Datei (30) dann aus dem Dateisystem (28) gelöscht wird.A method according to claim 1, characterized in that an unsuccessful loading process is recognized by the fact that the file described during the loading process ( 30 ) the first access right setting after the loading process ( 44 ) and that this file ( 30 ) then from the file system ( 28 ) is deleted. Verfahren nach Anspruch 1 oder Anspruch 2, dadurch gekennzeichnet, daß die erste Zugriffsrechtseinstellung (44) das Schreiben in die Datei (30), nicht aber die Ausführung der Datei (30) gestattet.Method according to claim 1 or claim 2, characterized in that the first access right setting ( 44 ) writing to the file ( 30 ), but not the execution of the file ( 30 ) allowed. Verfahren nach einem der Ansprüche 1 bis 3, dadurch gekennzeichnet, daß die zweite Zugriffsrechtseinstellung (58) die Ausführung der Datei (30) gestattet.Method according to one of claims 1 to 3, characterized in that the second access right setting ( 58 ) the execution of the file ( 30 ) allowed. Verfahren nach einem der Ansprüche 1 bis 4, dadurch gekennzeichnet, daß die Mehrzahl von Zugriffsrechtseinstellungen (44, 58) mindestens ein für jede Datei (30) einstellbares Lesezugriffsrecht (48), mindestens ein für jede Datei (30) einstellbares Schreibzugriffsrecht (46) und mindestens ein für jede Datei (30) einstellbares Ausführungsrecht (50) umfaßt.Method according to one of claims 1 to 4, characterized in that the plurality of access right settings ( 44 . 58 ) at least one for each file ( 30 ) adjustable read access right ( 48 ), at least one for each file ( 30 ) adjustable write access right ( 46 ) and at least one for each file ( 30 ) adjustable execution right ( 50 ) includes. Verfahren nach einem der Ansprüche 1 bis 5, dadurch gekennzeichnet, daß im Zusammenhang mit der Feststellung, ob der Ladevorgang erfolgreich war, eine Prüfsummenberechnung ausgeführt wird.Method according to one of claims 1 to 5, characterized in that that in Related to determining whether the loading was successful a checksum calculation accomplished becomes. Verfahren nach einem der Ansprüche 1 bis 6, dadurch gekennzeichnet, daß der Datenträger (10) ein UNIX-artiges Betriebssystem (26), insbesondere ein Linux-Betriebssystem aufweist.Method according to one of claims 1 to 6, characterized in that the data carrier ( 10 ) a UNIX-like operating system ( 26 ), in particular a Linux operating system. Tragbarer Datenträger (10), insbesondere Chipkarte oder Chipmodul, mit einem Prozessor (12) und mindestens einem Speicher (14), wobei der Speicher (14) Programmbefehle enthält, die den Prozessor (12) zur Ausführung eines Verfahrens nach einem der Ansprüche 1 bis 7 veranlassen.Portable disk ( 10 ), in particular chip card or chip module, with a processor ( 12 ) and at least one memory ( 14 ), the memory ( 14 ) Contains program instructions that the processor ( 12 ) to carry out a method according to one of claims 1 to 7. Computerprogrammprodukt, das maschinenlesbare Programmbefehle für einen Prozessor (12) eines tragbaren Datenträgers (10) aufweist, die den Prozessor (12) zur Ausführung eines Verfahrens nach einem der Ansprüche 1 bis 7 veranlassen.Computer program product containing machine-readable program instructions for a processor ( 12 ) of a portable data carrier ( 10 ) which the processor ( 12 ) to carry out a method according to one of claims 1 to 7.
DE2003123033 2003-05-20 2003-05-20 Load an executable program into a portable data carrier Ceased DE10323033A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
DE2003123033 DE10323033A1 (en) 2003-05-20 2003-05-20 Load an executable program into a portable data carrier
PCT/EP2004/005365 WO2004104916A2 (en) 2003-05-20 2004-05-18 Loading an executable program into a portable data carrier
EP04739254A EP1629379A2 (en) 2003-05-20 2004-05-18 Loading an executable program into a portable data carrier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE2003123033 DE10323033A1 (en) 2003-05-20 2003-05-20 Load an executable program into a portable data carrier

Publications (1)

Publication Number Publication Date
DE10323033A1 true DE10323033A1 (en) 2004-12-23

Family

ID=33461832

Family Applications (1)

Application Number Title Priority Date Filing Date
DE2003123033 Ceased DE10323033A1 (en) 2003-05-20 2003-05-20 Load an executable program into a portable data carrier

Country Status (3)

Country Link
EP (1) EP1629379A2 (en)
DE (1) DE10323033A1 (en)
WO (1) WO2004104916A2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102012008147A1 (en) * 2012-04-24 2013-10-24 Tobias Volk Radio frequency identification (RFID) transponder has memory that is organized in RFID tag file system which is provided with own file allocation table that manages files independently, so as to read or delete files

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1834911B (en) * 2005-03-14 2010-04-28 华为技术有限公司 Method of realizing program loading operation
CN101833464A (en) * 2010-04-16 2010-09-15 深圳市五巨科技有限公司 Method and device for sectionally loading application programs by mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6856993B1 (en) * 2000-03-30 2005-02-15 Microsoft Corporation Transactional file system
US7299463B2 (en) * 2001-09-28 2007-11-20 Intel Corporation Method for atomically updating a plurality of files

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102012008147A1 (en) * 2012-04-24 2013-10-24 Tobias Volk Radio frequency identification (RFID) transponder has memory that is organized in RFID tag file system which is provided with own file allocation table that manages files independently, so as to read or delete files

Also Published As

Publication number Publication date
WO2004104916A2 (en) 2004-12-02
EP1629379A2 (en) 2006-03-01
WO2004104916A3 (en) 2005-05-12

Similar Documents

Publication Publication Date Title
DE69809527T2 (en) External storage device and data processing method
EP1611510B1 (en) Controlled execution of a program used for a virtual machine on a portable data carrier
DE102007008651A1 (en) Chip card and method for activating a chip card function
EP3308278B1 (en) Method for updating personalization data
EP3224756B1 (en) Method for installing software on a chip card by means of an installation machine
DE10323033A1 (en) Load an executable program into a portable data carrier
EP2524333B1 (en) Method for providing a secure counter on a terminal
EP3329415B1 (en) Chipcard with a main and a persistent application allows an update of the main application without changes to the user data stored in the persistens application
EP1492008B1 (en) Error event handling during installation of an application program in a portable data carrier
EP1308842B1 (en) Method and device for the management of a memory device
DE10247794B4 (en) Managing a failed trial counter in a portable disk
EP1365363B1 (en) Method for carrying out a data transaction by means of a transaction device which consists of a main- and a separable auxiliary component
DE10328238B4 (en) Method for loading smart cards with initialization and / or personalization data
EP3271825B1 (en) Method for storing user data in a document
DE102023102191A1 (en) Installing an operating system in a processor device, in particular a security module
EP2573677B1 (en) Data exchange between applications
DE10301969A1 (en) Memory defragmentation, especially with a portable data carrier
DE102004058882A1 (en) Generating program code in a load format and providing executable program code
EP2012280A2 (en) Portable data carrier and method for personalising a portable data carrier
DE102014224186B4 (en) Procedure for reloading an application onto a document
EP4517570A1 (en) Method and system for verifying the integrity of a rule engine database
DE102013014187A1 (en) Method and device for transmitting information
EP1922618A1 (en) Method for executing a succession of very similar commands in a portable data storage medium
DE102012020782A1 (en) Management of data elements in a stack
DE102014110990A1 (en) Method for changing the control data of a chip card and chip card system

Legal Events

Date Code Title Description
OP8 Request for examination as to paragraph 44 patent law
R016 Response to examination communication
R002 Refusal decision in examination/registration proceedings
R003 Refusal decision now final

Effective date: 20121003