DE102012015899A1 - Method for generating executable program code - Google Patents

Method for generating executable program code Download PDF

Info

Publication number
DE102012015899A1
DE102012015899A1 DE102012015899.8A DE102012015899A DE102012015899A1 DE 102012015899 A1 DE102012015899 A1 DE 102012015899A1 DE 102012015899 A DE102012015899 A DE 102012015899A DE 102012015899 A1 DE102012015899 A1 DE 102012015899A1
Authority
DE
Germany
Prior art keywords
program code
executable
portions
concurrently
security module
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.)
Withdrawn
Application number
DE102012015899.8A
Other languages
German (de)
Inventor
Michael Baldischweiler
Thomas Stocker
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 Mobile Security 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 DE102012015899.8A priority Critical patent/DE102012015899A1/en
Priority to PCT/EP2013/002387 priority patent/WO2014023431A1/en
Publication of DE102012015899A1 publication Critical patent/DE102012015899A1/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/75Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation
    • G06F21/755Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation with measures against power attack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/77Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2153Using hardware token as a secondary aspect

Abstract

In einem Verfahren zum Erzeugen eines auf einem portablen Datenträger ausführbaren Programmcodes wird in einem ersten Schritt (S1) ein dem Programmcode (52) zugrunde liegender Quellcode bereitgestellt. Dann werden nebenläufig ausführbare Anteile (B, C, D) der durch den Quellcode definierten Operationen ermittelt (S2). In einem weiteren Schritt (S3) wird ausführbarer Programmcode aus dem Quellcode erzeugt. Dabei werden solche ausführbaren Programmcodeanteile, die zuvor ermittelten, nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes (52) Sicherheitsmodulspezifisch, vorzugsweise randomisiert, angeordnet (TS31).In a method for generating a program code executable on a portable data carrier, a source code on which the program code (52) is based is provided in a first step (S1). Then, concurrently executable parts (B, C, D) of the operations defined by the source code are determined (S2). In a further step (S3), executable program code is generated from the source code. Executable program code parts that correspond to previously determined, concurrently executable parts (B, C, D) are arranged (TS31) in a security module-specific manner, preferably randomly, for sequential executability of the generated program code (52).

Description

Die vorliegende Erfindung betrifft ein Verfahren zum Erzeugen von auf einem Sicherheitsmodul ausführbarem Programmcode sowie eine Menge entsprechender Sicherheitsmodule zum Ausführen des Programmcodes.The present invention relates to a method for generating program code executable on a security module and to a set of corresponding security modules for executing the program code.

Im Zusammenhang mit der vorliegenden Erfindung ist der Begriff des ausführbaren Programmcodes derart breit auszulegen, dass jedwede Form von Programmcode darunterfällt, der von Prozessoren, Interpretern, virtuellen Maschinen oder dergleichen ausgeführt bzw. interpretiert werden kann. Insofern ist darunter Programmcode zu verstehen, welcher gemäß einem so genannten Zwischencode codiert ist. Als Zwischencode wird vorliegend ein Code in einer Sprache verstanden, welche konzeptionell zwischen einem Code eines Quelltextes einer Hochsprache, beispielsweise „Java”, „C” oder dergleichen, auf der einen Seite und einer maschinennahen Zielsprache, insbesondere einem Maschinencode, auf der anderen Seite angeordnet ist.In the context of the present invention, the term executable program code is to be construed broadly to include any form of program code that may be executed or interpreted by processors, interpreters, virtual machines, or the like. In this respect, this is to be understood as program code which is coded according to a so-called intermediate code. In the present case, an intermediate code is understood to be a code in a language which is arranged conceptually between a code of a source text of a high-level language, for example "Java", "C" or the like, on the one hand and a machine-oriented target language, in particular a machine code, on the other hand is.

Zwischencode kann von einem Compiler beispielsweise im Rahmen einer Übersetzung (Compilierung) eines Quelltextes hin zu Maschinencode als Zwischenergebnis erzeugt werden. Bekanntes Beispiel eines solchen Zwischencodes ist der so genannte „3-Adress-Code”. Zum Ausführen dieses Codes sind verschiedene Interpreter bekannt. Weitere bekannte Beispiele für ausführbaren Zwischencode, welcher von einem entsprechenden Compiler vorwiegend zum plattformunabhängigen Ausführen durch einen „virtuellen” Prozessor, beispielsweise eine Virtuellen Maschine, erzeugt wird, sind so genannte Bytecodes, wie z. B. Java- oder Java CardTM-Bytecode.Intermediate code can be generated by a compiler as part of a translation (compilation) of a source code to machine code as an intermediate result. A known example of such an intermediate code is the so-called "3-address code". To execute this code, various interpreters are known. Other known examples of executable intermediate code, which is generated by a corresponding compiler mainly for platform-independent execution by a "virtual" processor, such as a virtual machine, are so-called bytecodes, such. Java or Java Card bytecode.

Anderseits kann unter „ausführbarem Programmcode” vorliegend auch Programmcode verstanden werden, welcher gemäß einer maschinennahen Zielsprache, insbesondere in Maschinencode, codiert ist. Programmcode dieser Art kann dann direkt von einem Hardware-Prozessor des Sicherheitsmoduls ausgeführt werden.On the other hand, "executable program code" in the present case can also be understood as program code which is coded according to a machine-oriented target language, in particular in machine code. Program code of this type can then be executed directly by a hardware processor of the security module.

In neuerer Zeit stellen Angriffe auf Sicherheitsmodule, insbesondere Chipkarten, ein erhöhtes Sicherheitsrisiko sowohl für den individuellen Nutzer des Sicherheitsmoduls als auch für einen Hersteller der Sicherheitsmodule dar. Die Art der Angriffe ist mannigfaltig. Sie reicht beispielsweise von bloßem Abhören einer Datenkommunikationsverbindung zwischen einem solchen Sicherheitsmodul und einem Endgerät über das Auswerten des Ressourcenverbrauchs des Sicherheitsmoduls beim Durchführen einer Berechnung, beispielsweise des Stromverbrauchs oder der Rechenzeit, bis hin zu technisch sehr aufwendigen Angriffen. Dabei werden beispielsweise Berechnungen des Prozessors des Sicherheitsmoduls gezielt dadurch gestört, dass mittels externen Einwirkens auf das Sicherheitsmodul, beispielsweise mittels gezielter Lichtblitze auf einzelne Speicherzellen eines Speichers des Sicherheitsmoduls, Eingabedaten oder Zwischenergebnisse einer Berechnung manipuliert werden, um anhand der dadurch erhaltenen, manipulierten Ergebnisse auf in dem Sicherheitsmodul gespeicherte sensible Daten, beispielsweise Verschlüsselungsschlüssel, zurückzuschließen.More recently, attacks on security modules, particularly smart cards, present an increased security risk to both the individual user of the security module and to a manufacturer of the security modules. The nature of the attacks is diverse. It ranges, for example, from merely listening to a data communication connection between such a security module and a terminal via evaluation of the resource consumption of the security module when carrying out a calculation, for example of power consumption or computing time, up to technically very complex attacks. For example, calculations by the processor of the security module are specifically disturbed by manipulating input data or intermediate results of a calculation by means of targeted light flashes on individual memory cells of a memory of the security module in order to determine the manipulated results obtained in FIG the security module stored sensitive data, such as encryption key to close back.

Aus Sicht des individuellen Nutzers können bei einem solchen Angriff persönliche oder sonstige sensible Daten, beispielsweise geheime Schlüssel, ausgespäht werden. Für einen Hersteller der Sicherheitsmodule kann bereits ein erfolgreicher Angriff auf ein Sicherheitsmodul einer Serie baugleicher Sicherheitsmodule, neben dem Imageverlust, einen erheblichen Schaden bedeuten, da dann möglicherweise die ganze Serie von Sicherheitsmodulen als kompromittiert angesehen und daher zurückgerufen oder ersetzt werden muss.From the point of view of the individual user, personal or other sensitive data, such as secret keys, can be spied on in such an attack. For a manufacturer of the security modules, a successful attack on a security module of a series of identical security modules, in addition to the loss of image, can cause considerable damage since then the entire series of security modules may have to be considered compromised and therefore recalled or replaced.

Dies kann für einen Hersteller auch in dem Fall problematisch sein, in dem Sicherheitsmodul aus an sich verschiedenen Anwendungsbereichen, beispielsweise aus den Bereichen Telekommunikation, Banking, PayTV, etc., auf einer identischen Produktlinienarchitektur beruhen. Solche Sicherheitsmodule haben dann hinsichtlich der Ausführung von jeweils identisch darin vorliegendem Programmcode, beispielsweise von Teilen des Betriebssystems, dasselbe physikalische Verhalten, so dass ein erfolgreicher Angriff auf ein Sicherheitsmodul aus einem Anwendungsbereich, beispielsweise eine Kreditkarte, negative Auswirkungen auf die Sicherheit eines Sicherheitsmoduls aus einem ganz anderen Bereich, beispielsweise eine SIM-Karte, haben kann.This can also be problematic for a manufacturer in the case in which the security module is based on an identical product line architecture from various application areas, for example from the fields of telecommunications, banking, PayTV, etc. Such security modules then have the same physical behavior with regard to the execution of identical program code, for example parts of the operating system, such that a successful attack on a security module from an application area, for example a credit card, has a negative impact on the security of a security module another area, for example a SIM card.

Aufgabe der vorliegenden Erfindung ist es, Sicherheitsmodule mit darauf ausführbarem Programmcode gegen externe Angriffe zu schützen. Insbesondere sollen die Auswirkungen, welche ein erfolgreicher Angriff auf einen Sicherheitsmodul für andere, baugleiche Sicherheitsmodule hat, begrenzt werden.The object of the present invention is to protect security modules with executable program code against external attacks. In particular, the impact of a successful attack on a security module for other, identical security modules should be limited.

Diese Aufgabe wird durch ein Verfahren und eine Menge von Sicherheitsmodulen mit den Merkmalen der unabhängigen Ansprüche gelöst. Vorteilhafte Ausgestaltungen und Weiterbildungen sind in den abhängigen Ansprüchen angegeben.This object is achieved by a method and a set of security modules having the features of the independent claims. Advantageous embodiments and further developments are specified in the dependent claims.

Die vorliegende Erfindung basiert auf der Grundidee, für ein individuelles Sicherheitsmodul oder für Gruppen von Sicherheitsmodulen jeweils einen sicherheitsmodulspezifischen, d. h. sicherheitsmodul- oder gruppenindividuellen ausführbaren Programmcode in der folgenden Weise zu erzeugen:
In einem ersten Schritt wird ein dem Programmcode zugrunde liegender Quellcode, vorzugsweise in einer Hochsprache, wie z. B. „C”, „Java” oder dergleichen, bereitgestellt.
The present invention is based on the basic idea, for an individual security module or for groups of security modules, of generating in each case a security module-specific, ie security module or group-specific executable program code in the following manner:
In a first step, the program code underlying source code, preferably in a high-level language, such as. "C", "Java" or the like.

Dann werden nebenläufig ausführbare Anteile der durch den Quellcode definierten Operationen ermittelt. Diese Anteile können dabei bereits auf der Ebene des Quellcodes ermittelt werden. Es ist aber auch möglich, dass dieser Schritt erst auf der Ebene eines Zwischencodes zwischen dem Quellcode und dem ausführbaren Programmcode oder erst auf der Ebene des ausführbaren Programmcodes stattfindet. Schließlich können nebenläufig ausführbare Anteile, mit Bezug auf denselben zu erzeugenden Programmcode, auch auf verschiedenen dieser Ebenen ermittelt werden. D. h. das Ermitteln der Anteile kann zu verschiedenen Zeitpunkten und in verschiedenen Phasen einer Übersetzung des Quellcodes zu ausführbarem Programmcode durchgeführt werden.Then concurrently executable portions of the operations defined by the source code are determined. These shares can already be determined at the level of the source code. However, it is also possible that this step takes place only at the level of an intermediate code between the source code and the executable program code or only at the level of the executable program code. Finally, concurrently executable portions, with respect to the same program code to be generated, can also be determined at different ones of these levels. Ie. the determination of the shares may be performed at different times and in different phases of a translation of the source code into executable program code.

In einem weiteren Schritt wird ausführbarer Programmcode aus dem Quellcode erzeugt.In a further step, executable program code is generated from the source code.

Erfindungsgemäß werden im Schritt des Erzeugen des ausführbaren Programmcodes ausführbare Programmcodeanteile, die zuvor ermittelten, nebenläufig ausführbaren Anteilen entsprechen, für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes sicherheitsmodulspezifisch angeordnet.According to the invention, in the step of generating the executable program code, executable program code portions corresponding to previously determined concurrently executable portions are arranged security module-specific for sequential executability of the generated program code.

Eine solche Anordnung der ausführbaren Programmcodeanteile bestimmt die Reihenfolge, in der die Anteile bei einer sequentiellen Ausführung des derart erzeugten Programmcodes ausgeführt werden, mithin das Laufzeitverhalten der durch den ausführbaren Programmcode bereitgestellten Funktionalität. Es versteht sich, dass diese Anordnung dabei derart erfolgt, dass die Gesamtfunktionalität, welche durch den erzeugten, ausführbaren Programmcode bereitgestellt wird, nicht beeinträchtig wird und für jede der möglichen, erzeugbaren, sicherheitsmodulspezifischen Anordnungen identisch ist.Such an arrangement of the executable program code portions determines the order in which the shares are executed in a sequential execution of the thus generated program code, and thus the runtime behavior of the functionality provided by the executable program code. It will be appreciated that this arrangement is such that the overall functionality provided by the generated executable program code is not compromised and is identical for each of the possible producible security module specific arrangements.

Da jeder erzeugte Programmcode sicherheitsmodulspezifisch ist, d. h. gruppenspezifisch oder sogar sicherheitsmodulindividuell, zeigt ein Sicherheitsmodul einer ersten Gruppe beim Ausführen des für diese erste Gruppe erzeugten, ausführbaren Programmcodes ein anderes Laufzeitverhalten als ein Sicherheitsmodul einer zweiten Gruppe beim Ausführen des für diese zweite Gruppe erzeugten – funktional identischen, aber bezüglich des beobachtbaren Laufzeitverhaltens abweichenden – ausführbaren Programmcodes.Since each generated program code is security module specific, i. H. group-specific or even security-module-individual, a security module of a first group exhibits a different runtime behavior when executing the executable code generated for this first group than a security module of a second group executing the functionally identical but differing with respect to the observable runtime behavior for that second group executable program codes.

Auf diese Weise werden die jeweiligen Sicherheitsmodule gegen externe Angriffe geschützt. Insbesondere kann ein Angreifer aus einem erfolgreichen Angriff auf ein Sicherheitsmodul der ersten Gruppe in der Regel keine Informationen gewinnen, welche für Angriffe auf Sicherheitsmodule der zweiten Gruppe nützlich sein könnten.In this way, the respective security modules are protected against external attacks. In particular, an attacker from a successful attack on a security module of the first group usually can not gain information that could be useful for attacks on security modules of the second group.

Als „nebenläufig ausführbar” werden im Zusammenhang mit der vorliegenden Erfindung solche Anteile der durch den Quellcode definierten Operationen verstanden, die paarweise keine kausale Beziehung zueinander aufweisen. Eine solche kausale Beziehung könnte insbesondere darin bestehen, dass eine Berechnung, welche durch Programmcodeanteile entsprechend einem ersten Anteil durchgeführt wird, von Ergebnissen einer Berechnung, welche durch Programmcodeanteile entsprechend einem zweiten Anteil erfolgt, direkt oder indirekt abhängt oder beeinflusst wird. Zwei Anteile, beispielsweise zwei Transaktionen, Prozesse oder Threads, sind somit genau dann nebenläufig ausführbar oder parallelisierbar, wenn eine zeitlich parallele Ausführung, eine verzahnte Ausführung oder eine sequentielle Ausführung in geänderter Reihenfolge zu demselben Resultat führt wie ein sequentielles Ausführen gemäß einer vorgegebenen Reihenfolge.In the context of the present invention, such parts of the operations defined by the source code are understood to be "concurrently executable" and have no causal relationship to one another in pairs. Such a causal relationship could consist, in particular, of a calculation, which is carried out by program code components corresponding to a first component, of results of a calculation, which is carried out by program code components corresponding to a second component, being directly or indirectly dependent or influenced. Two parts, for example two transactions, processes or threads, are thus concurrently executable or parallelizable if a time-parallel execution, a geared execution or a sequential execution in a changed order leads to the same result as a sequential execution according to a predetermined order.

Dabei kann es Anteile geben, die in gewissem Sinne „global” nebenläufig ausführbar sind, d. h. Anteile, die zu keinem anderen Anteil der durch den Quellcode definierten Operationen kausal in Beziehung stehen. Im Allgemeinen aber wird der Begriff „Nebenläufigkeit” als relativer Begriff in dem Sinne verstanden werden müssen, dass eine vorgegebene Menge von Anteilen, paarweise und relativ zueinander, nebenläufig, d. h. beispielweise zeitlich parallel oder in abgeänderter Reihenfolge, ausgeführt werden können. Dies sagt dann allerdings nichts darüber aus, ob, und wenn ja, welche kausale Beziehung zwischen einem oder mehreren dieser Anteile zu anderen, nicht zu der entsprechenden, vorgegebenen Menge von Anteilen gehörenden Anteilen bestehen. Schließlich können nebenläufig ausführbare Anteile auch in verschachtelter Weise auftreten, beispielweise im Falle einer Menge nebenläufig ausführbarer Anteile, die einen oder mehrere Anteile umfassen, welche ihrerseits aus nebenläufig ausführbaren Unteranteilen bestehen.There may be shares that are in a sense "global" concurrently executable, d. H. Shares that are causally related to no other portion of the operations defined by the source code. In general, however, the term "concurrency" will have to be understood as a relative term in the sense that a given set of proportions, in pairs and relative to each other, concurrently, d. H. for example, temporally parallel or in a modified order, can be executed. This, however, does not say anything about whether, and if so, what causal relationship between one or more of these shares is to other shares not belonging to the corresponding predetermined number of shares. Finally, concurrently executable shares may also occur in an interleaved manner, for example in the case of a set of concurrently executable shares comprising one or more shares, which in turn consist of concurrently executable sub-shares.

Die allgemeine Formulierung „Ermitteln von nebenläufig ausführbaren Anteilen” umfasst somit jede dieser Arten von global und/oder relativ zu anderen Anteilen nebenläufig ausführbaren Anteilen. In gleicher Weise gilt, dass im Schritt des sicherheitsmodulspezifischen Anordnen von ausführbaren Programmcodeanteilen, die den ermittelten, nebenläufig ausführbaren Anteilen entsprechen, die Art und der Umfang der nebenläufigen Ausführbarkeit beachtet werden. D. h. eine Neuanordnung eines ausführbaren Programmcodeanteils im erzeugten Programmcode zur nachfolgenden sequentiellen Ausführbarkeit erfolgt lediglich stets relativ zu den entsprechenden, mit Bezug auf diesen ausführbaren Programmcodeanteil nebenläufig ausführbaren Programmcodeanteilen.The general phrase "determining concurrent shares" thus encompasses any of these types of global and / or relative to other proportions of concurrent shares. In the same way, the type and extent of concurrent executability are taken into account in the step of the security-module-specific arrangement of executable program code portions which correspond to the determined concurrently executable portions. Ie. a rearrangement of an executable program code portion in the generated program code for subsequent sequential executability is only always relative to the corresponding, with respect to said executable program code portion concurrently executable program code portions.

Gemäß einer bevorzugten Ausführungsform des vorstehend beschriebenen Verfahrens werden die ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen entsprechen, für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes randomisiert angeordnet. Dies ermöglicht auf sehr einfache und für einen Angreifer nicht vorhersehbare Weise das Erzeugen von sicherheitsmodulspezifischem, ausführbarem Programmcode. Es ist allerdings auch möglich, dass das Anordnen deterministisch erfolgt oder dass eine Vorschrift zum sicherheitsmodulspezifischen Anordnen sowohl deterministische als auch zufällige Elemente umfasst.According to a preferred embodiment of the method described above, the executable program code portions corresponding to concurrently executable portions are randomized for sequential executability of the generated program code. This makes it possible to generate security module-specific, executable program code in a very simple and unforeseeable manner for an attacker. However, it is also possible for the arrangement to be deterministic or for a safety-module-specific arrangement to include both deterministic and random elements.

Wie bereits erwähnt, hat ein sicherheitsmodulspezifisches Anordnen derjenigen ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen entsprechen, die Auswirkung, dass sich bei einer sequentiellen Ausführung des Programmcodes auf dem Sicherheitsmodul ein sicherheitsmodulspezifisches Laufzeitverhalten zeigt. Beobachtungen und Analysen eines Angreifers hinsichtlich des Ressourcenverbrauchs eines Sicherheitsmoduls, welcher sich beim Ausführen einer durch den erfindungsgemäß erzeugten, ausführbaren Programmcode bereitgestellten Funktionalität beobachten lässt, beispielsweise hinsichtlich der Laufzeit oder des Stromverbrauchs, sind damit ebenfalls sicherheitsmodulspezifisch und nicht auf andere Sicherheitsmodule oder andere Gruppen von Sicherheitsmodulen, welche dieselbe Funktionalität umfassen, übertragbar.As already mentioned, a security-module-specific arrangement of those executable program code portions which correspond to concurrently executable portions has the effect that a safety-module-specific runtime behavior manifests itself in a sequential execution of the program code on the security module. Observations and analyzes of an attacker regarding the resource consumption of a security module, which can be observed when executing a functionality provided by the executable code generated according to the invention, for example in terms of runtime or power consumption, are thus security module specific and not to other security modules or other groups of security modules which comprise the same functionality, transferable.

Ein weiterer vorteilhafter technischer Effekt der Erfindung, welcher die Sicherheit eines Sicherheitsmoduls einer ersten Gruppe auch bei einem erfolgreichen Angriff auf ein Sicherheitsmodul einer anderen Gruppe gewährleistet, ist die Tatsache, dass eine beschriebene, sicherheitsmodulspezifische Anordnung von ausführbaren Programmcodeanteilen, welche nebenläufig ausführbaren Anteilen entsprechen, beim Speichern des Programmcodes in einem nichtflüchtigen Speicher des Sicherheitsmoduls in der Regel ein sicherheitsmodulspezifisches Speicherabbild ergibt. Damit kann aus einem erfolgreichen Angriff auf eine Funktionalität eines Sicherheitsmoduls, welche durch gezielte Manipulation einzelner Speicherzellen erfolgt ist, kein Vorteil für einen entsprechenden Angriff auf ein weiteres Sicherheitsmodul mit der gleichen Funktionalität gezogen werden, da dort die entsprechenden Speicherzellen in der Regel, als Folge der erfindungsgemäßen sicherheitsmodulspezifischen Anordnung der Anteile des die Funktionalität bereitstellenden ausführbaren Programmcodes, abweichend belegt sind.A further advantageous technical effect of the invention, which ensures the security of a security module of a first group even in a successful attack on a security module of another group, is the fact that a described security module-specific arrangement of executable program code portions corresponding to concurrently executable portions Saving the program code in a non-volatile memory of the security module usually results in a security module-specific memory image. This can be drawn from a successful attack on a functionality of a security module, which is done by targeted manipulation of individual memory cells, no advantage for a corresponding attack on another security module with the same functionality, since there the corresponding memory cells in the rule, as a result inventive security module-specific arrangement of the portions of the functionality-providing executable program code, are occupied differently.

Im Rahmen des Schritts des Ermitteln von nebenläufig ausführbaren Anteilen kann eine Anzahl von gleichzeitig nebenläufig ausführbaren Anteilen vorgegeben werden. Diese Anzahl von gleichzeitig nebenläufig oder parallel ausführbaren Anteilen entspräche, wenn Programmcode zum Ausführen auf einer Mehrkern- oder Mehrprozessorarchitektur erzeugt werden sollte, beispielsweise der Anzahl der dort bereitstehenden Kerne oder Prozessoren. Je größer diese Anzahl gewählt oder vorgegeben wird, desto großer ist die Anzahl von möglichen Anordnungen entsprechender Anteile für eine sequentielle Ausführung des zu erzeugenden Programmcodes.As part of the step of determining concurrent shares, a number of concurrent shares may be specified. This number of co-concurrent or parallel executable portions would be equivalent if program code were to be generated for execution on a multi-core or multi-processor architecture, such as the number of cores or processors available there. The larger this number is selected or specified, the greater the number of possible arrangements of corresponding components for a sequential execution of the program code to be generated.

Diejenigen ausführbaren Programmcodeanteile, die ermittelten, nebenläufig ausführbaren Anteilen entsprechen, können beim Erzeugen des ausführbaren Programmcodes in einer Tabelle angeordnet werden. Dabei kann die Anordnung innerhalb der Tabelle direkt sicherheitsmodulspezifisch, bevor zugt randomisiert, erfolgen. Es ist aber auch möglich, zuerst eine Tabelle zu erstellen, welche die entsprechenden Programmcodeanteile in einer vorgegebenen Reihenfolge umfasst, beispielsweise in der Reihenfolge, in der die Anteile ermittelt worden sind. In einem nachfolgenden Schritt kann dann eine sicherheitsmodulspezifische Anordnung dieser Anteile, beispielsweise durch Permutation der Tabelleneinträge, erfolgen. Die Reihenfolge, in der die Programmcodeanteile am Ende eines der beschriebenen Prozesse in der Tabelle angeordnet sind, bestimmt die Ausführungsreihenfolge der mittels der Programmcodeanteile codierten implementierten Teilfunktionalitäten bei sequentieller Ausführung des erzeugten Programmcodes.Those executable program code portions that correspond to determined concurrently executable portions may be arranged in a table when the executable program code is generated. In this case, the arrangement within the table directly security module specific, before given randomized, take place. However, it is also possible first to create a table which comprises the corresponding program code portions in a predetermined order, for example in the order in which the shares have been determined. In a subsequent step, a safety module-specific arrangement of these components, for example, by permutation of the table entries, then take place. The order in which the program code portions are arranged in the table at the end of one of the described processes determines the execution order of the implemented partial functionalities encoded by the program code portions in sequential execution of the generated program code.

Grundsätzlich können nebenläufig ausführbare Anteile der durch den bereitgestellten Quellcode definierten Operationen in allgemeiner Weise, auch aus einem bereits für eine sequentielle Ausführung angelegten Programmcode, ermittelt werden. Einige bekannte Programmstrukturen eignen sich allerdings besonders zur Parallelisierung, wie beispielsweise Schleifen. D. h. als nebenläufig ausführbare Anteile der durch den Quellcode definierten Operationen können bevorzugt eine Schleifenoperation definierende Anteile ermittelt werden. Eine Schleife beispielsweise der Form (for i = 0; i < 1000; i++){a[i] := i} kann in bis zu 1000 Anteile aufgeteilt werden, jeder Anteil entsprechend zumindest einem Schleifendurchlauf, welche jeweils nebenläufig ausgeführt werden können. In gleicher Weise können als nebenläufig ausführbare Anteile eine geeignete Rekursion definierende Anteile ermittelt werden. Dies gilt insbesondere dann, wenn in einem Rekursionsaufruf dieselbe Funktion mehr als einmal, unabhängig voneinander und mit verschiedenen Parametern, aufgerufen wird, wie dies beispielsweise bei einer bekannten, rekursiven Implementation des Quick-Sort-Algorithmus der Fall ist.In principle, concurrently executable portions of the operations defined by the provided source code can be determined in a general manner, even from a program code already applied for a sequential execution. However, some known program structures are particularly suitable for parallelization, such as loops. Ie. As concurrently executable portions of the operations defined by the source code, portions defining a loop operation may preferably be determined. A loop, for example, of the form (for i = 0; i <1000; i ++) {a [i]: = i} can be divided into up to 1000 parts, each part corresponding to at least one loop pass, which can each be carried out concurrently. In the same way can be determined as concurrently executable shares a suitable recursion defining shares. This is especially true when in a recursion call the same function is called more than once, independently of each other and with different parameters, as is the case, for example, in a known, recursive implementation of the quick-sort algorithm.

Gemäß einer weiteren bevorzugten Ausführungsform kann zumindest einer der ausführbaren Programmcodeanteile, der einem nebenläufig ausführbaren Anteil entspricht, im Schritt des Erzeugen des ausführbaren Programm codes hinsichtlich zumindest eines vorgegebenen Parameters optimiert werden. Bevorzugte Parameter sind beispielsweise Laufzeit und/ oder Speicherbedarf. Diese Optimierung kann vor oder nach der sicherheitsmodulspezifischen Anordnung mit Bezug auf die anderen ausführbaren Programmcodeanteile erfolgen, welche ebenfalls nebenläufig ausführbaren Anteilen entsprechen. Die Optimierung kann weiterhin in einer oder mehreren verschiedenen Phasen eines Übersetzungsprozesses vom Quellcode zum ausführbaren Programmcode erfolgen, also beispielsweise auch bereits auf Ebene eines Zwischencodes. According to a further preferred embodiment, at least one of the executable program code portions corresponding to a concurrently executable portion may be optimized in the step of generating the executable program code with respect to at least one predetermined parameter. Preferred parameters are, for example, runtime and / or memory requirements. This optimization may be done before or after the security module specific arrangement with respect to the other executable program code portions, which also correspond to concurrently executable portions. The optimization can continue to take place in one or more different phases of a translation process from the source code to the executable program code, that is, for example, already at the level of an intermediate code.

Auf diese Weise kann der erzeugte ausführbare Programmcode, im Vergleich zu einem entsprechenden Programmcode ohne Optimierung, ebenfalls sicherheitsmodulspezifisch ausgebildet werden. Eine Optimierung bezüglich Laufzeit, auch wenn diese nur einzelne Teilfunktionalitäten betrifft, verändert das Laufzeitverhalten der durch den erzeugten, ausführbaren Programmcode bereitgestellten Gesamtfunktionalität. Eine – auch nur teilweise – Optimierung bezüglich des Speicherbedarfs beeinflusst das gesamte Speicherabbild. Eine solche Optimierung kann überdies die Behandlung lokaler Variablen im Bereich der optimierten, ausführbaren Programmcodeanteile beeinflussen, und somit während der Laufzeit beispielsweise auch die Belegung eines Stapelspeichers, verschiedener Prozessorregister oder anderer Speicherbereiche, beispielsweise im Arbeitsspeicher des Prozessors.In this way, the generated executable program code, as compared to a corresponding program code without optimization, also be designed security module specific. Optimization in terms of runtime, even if it affects only individual sub-functionalities, changes the runtime behavior of the overall functionality provided by the generated, executable program code. A - even partial - optimization in terms of memory requirements affects the entire memory image. Such optimization may also affect the handling of local variables in the area of the optimized, executable program code portions, and thus, for example, the occupancy of a stack, various processor registers or other memory areas, for example in the main memory of the processor during runtime.

Besonders bevorzugt werden verschiedene der ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen entsprechen, jeweils hinsichtlich verschiedener Parameter optimiert. Auf diese Weise ergeben sich vielfältige, weitere Möglichkeiten des sicherheitsmodulspezifischen Erzeugen des ausführbaren Programmcodes.More preferably, various of the executable program code portions corresponding to concurrently executable portions are each optimized for different parameters. In this way, there are many other possibilities for security-module-specific generation of the executable program code.

Gemäß einer weiteren bevorzugten Ausführungsform des erfindungsgemäßen Verfahrens wird der Schritt des Ermitteln von nebenläufig ausführbaren Anteilen der durch den Quellcode definierten Operationen von einer Einrichtung durchgeführt oder durch eine solche Einrichtung zumindest unterstützt, welche zum Erzeugen von auf einer Mehrkern- und/oder Mehrprozessorarchitektur parallel ausführbarem Programmcode eingerichtet ist. Eine solche Einrichtung kann auf verschiedenen Ebenen eingreifen oder wirken, beispielsweise in Form von in den Quellcode einfügbaren Compilerdirektiven oder, bei unverändertem Quellcode, durch Funktionalitäten des Compilers selbst.According to a further preferred embodiment of the method according to the invention, the step of determining concurrently executable portions of the operations defined by the source code is performed by or at least assisted by means for generating program code executable in parallel on a multi-core and / or multi-processor architecture is set up. Such a device can intervene or act on different levels, for example in the form of compiler directives which can be inserted in the source code or, if the source code is unchanged, by functionalities of the compiler itself.

D. h. eine solche bereits vorliegende, bekannte Einrichtung, beispielsweise ein Compiler zum Erzeugen von parallel ausführbarem Programmcode, wird erfindungsgemäß „zweckentfremdet”, indem durch diese Einrichtung erzeugter, parallel auf einer Mehrprozessorarchitektur ausführbarer Programmcode als Zwischenergebnis verwendet wird. Der aufwendige und in der Regel komplexe Schritt des Ermitteln von nebenläufig ausführbaren Anteilen wird vollständig von dieser Einrichtung übernommen und, in der Regel zusätzlich konfigurierbar, durchgeführt.Ie. Such an already existing, known device, for example a compiler for generating parallel executable program code, is "misappropriated" according to the invention by using program code generated by this device and executable in parallel on a multiprocessor architecture as an intermediate result. The complex and generally complex step of determining concurrently executable shares is completely taken over by this institution and, as a rule, additionally configurable.

Zum erfindungsgemäßen Erzeugen des sequenziell ausführbaren, sicherheitsmodulspezifischen Programmcodes ist es abschließend lediglich erforderlich, die von der Einrichtung für eine jeweils parallele Ausführung vorgesehenen Anteile, wie beispielsweise parallel ausführbare Threads oder dergleichen, sicherheitsmodulspezifisch, vorzugsweise randomisiert, für eine sequentielle Ausführung auf einem Datenträger mit nur einem Prozessor anzuordnen. Dabei wird ein vermeintlicher Nachteil der parallelen Programmierung, nämlich das notwendig daraus resultierende, nicht genau vorhersehbare Laufzeitverhalten einer entsprechenden, parallelisierten Anwendung, erfindungsgemäß in einen Vorteil umgemünzt, indem nämlich die Nichtvorhersehbarkeit des Laufzeitverhaltens, welche erfindungsgemäß ein Sicherheitsmerkmal des Sicherheitsmoduls ist, durch eine sicherheitsmodulspezifische Anordnung parallelisierbarer Anteile zur sequentiellen Ausführung noch verstärkt wird.Finally, for generating the sequentially executable, security module-specific program code according to the invention, it is only necessary for the shares provided by the device for a respective parallel execution, such as parallel executable threads or the like, to be specific to security modules, preferably randomized, for sequential execution on a data medium with only one Arrange processor. In this case, an alleged disadvantage of the parallel programming, namely the necessarily resulting, not exactly predictable runtime behavior of a corresponding, parallelized application, according to the invention converted into an advantage, namely by the unpredictability of the runtime behavior, which is a security feature of the security module according to the invention, by a security module specific arrangement parallelizable shares for sequential execution is reinforced.

Jedes Sicherheitsmodul einer erfindungsgemäßen Menge von Sicherheitsmodulen umfasst einen Speicher und einen Prozessor zum Ausführen von in dem Speicher gespeichertem, ausführbarem Programmcode. Die erfindungsgemäße Menge von Sicherheitsmodulen umfasst zumindest zwei Gruppen von Sicherheitsmodulen, wobei jede dieser Gruppen zumindest ein Sicherheitsmodul umfasst. Erfindungsgemäß ist der jeweils in einem Speicher eines Sicherheitsmoduls der Menge von Sicherheitsmodulen gespeicherte, ausführbare Programmcode hinsichtlich dessen Funktionalität für jedes Sicherheitsmodul der Menge von Sicherheitsmodulen identisch, unterscheidet sich jedoch hinsichtlich dessen Laufzeitverhalten für jeweils zwei Sicherheitsmodule aus unterschiedlichen Gruppen der Gruppen von Sicherheitsmodulen.Each security module of a set of security modules according to the invention comprises a memory and a processor for executing executable program code stored in the memory. The inventive set of security modules comprises at least two groups of security modules, each of these groups comprising at least one security module. According to the invention, the executable program code stored in each case in a memory of a security module of the set of security modules is identical in terms of functionality for each security module of the set of security modules, but differs in terms of its runtime behavior for two security modules from different groups of security module groups.

Wie vorstehend bereits beschrieben, gewährleistet ein sicherheitsmodulspezifisches, d. h. gruppen- oder sicherheitsmodulindividuelles Laufzeitverhalten einer durch den ausführbaren Programmcode bereitgestellten Funktionalität die Sicherheit eines Sicherheitsmoduls einer Gruppe auch im Hinblick auf einen erfolgreichen Angriff auf ein Sicherheitsmodul einer anderen Gruppe.As already described above, a safety module-specific, d. H. group or security module-specific runtime behavior of a functionality provided by the executable program code, the security of a security module of a group also with regard to a successful attack on a security module of another group.

Wie mit Bezug auf das erfindungsgemäße Verfahren beschrieben, beruht das unterschiedliche Laufzeitverhalten des Programmcodes für zwei Sicherheitsmodule aus unterschiedlichen Gruppen insbesondere darauf, dass sich der Programmcode eines Sicherheitsmoduls einer ersten Gruppe von dem Programmcode eines Sicherheitsmoduls einer zweiten Gruppe darin unterscheidet, dass beim Erzeugen des ausführbaren Programmcodes für die Sicherheitsmodule jeweils ausführbare Programmcodeanteile, die nebenläufig ausführbaren Anteilen entsprechen, für eine sequenzielle Ausführbarkeit des ausführbaren Programmcodes durch den Prozessor des jeweiligen Sicherheitsmoduls gruppenspezifisch angeordnet worden sind. In der Regel wird sich dabei in einem nichtflüchtigen Speicher des Sicherheitsmoduls weiterhin ein sicherheitsmodulspezifisches Speicherabbild ergeben. As described with reference to the method according to the invention, the different runtime behavior of the program code for two security modules from different groups is based in particular on the fact that the program code of a security module of a first group differs from the program code of a security module of a second group in that the executable code is generated for the security modules respectively executable program code portions corresponding concurrently executable shares have been arranged for a sequential executability of the executable program code by the processor of the respective security module group specific. As a rule, a security module-specific memory image will continue to result in a non-volatile memory of the security module.

Das vorliegende System zur Erstellung von ausführbarem Programmcode umfasst ein speziell angepasstes Werkzeug zum Erzeugen des sequentiell ausführbaren Programmcodes für einen Quellcode und ein Werkzeug zur Ermittlung von nebenläufig ausführbaren Anteilen. Das Erzeugungswerkzeug ist eingerichtet die von dem Werkzeug zur Ermittlung ermittelten nebenläufig ausführbaren Programmcodeanteile für eine sequenzielle Ausführung auf dem Sicherheitsmodul bereitzustellen. Vorzugsweise kann ein Multiprozessor-Werkzeug zur Ermittlung verwendet werden. Das Erzeugungswerkzeug ist dagegen ein Monoprozessor-Werkzeug. Das Ermittlungswerkzeug kann die ermittelten nebenläufig ausführbaren Programmcodeanteile für die nebenläufige Ausführung aufbereiten. Die Aufbereitung ergänzt insbesondere die für eine nebenläufige Ausführung nötigen Operationen (Anweisungen), beispielsweise um jedem Prozessor bzw. Programmcodeanteil die (zumindest teilweise gleichen) erforderlichen Werte (Variablen, Zeiger ...) zur Verfügung zu stellen.The present system for generating executable program code comprises a specially adapted tool for generating the sequentially executable program code for a source code and a tool for determining concurrently executable portions. The generation tool is configured to provide the concurrently executable program code portions for sequential execution on the security module determined by the discovery tool. Preferably, a multiprocessor tool may be used for detection. In contrast, the production tool is a monoprocessor tool. The discovery tool may prepare the determined concurrently executable program code portions for the concurrent execution. In particular, the processing supplements the operations (instructions) necessary for a concurrent execution, for example in order to provide the (at least partially the same) required values (variables, pointers) to each processor or program code portion.

Ein Sicherheitsmodul ist vorzugsweise ein Hardware-Sicherheitsmodul. Das Sicherheitsmodul kann ein tragbarer Datenträger sein, wie beispielsweise eine Chipkarte, ein USB-Token, ein RFID-Token oder eine sichere Massenspeicherkarte. Das Sicherheitsmodul kann reversibel mit einem Endgerät verbunden werden oder fest in ein Endgerät eingebaut sein, wie beispielsweise ein eingebautetes SIM-Modul (eUICC), ein TPM-Modul oder NFC-Modul.A security module is preferably a hardware security module. The security module may be a portable data carrier, such as a smart card, a USB token, an RFID token, or a secure mass storage card. The security module can be reversibly connected to a terminal or permanently installed in a terminal, such as a built-in SIM module (eUICC), a TPM module or NFC module.

Die vorliegende Erfindung wird im Folgenden mit Bezug auf die beiliegenden Zeichnungen beispielhaft beschrieben. Darin zeigen:The present invention will be described by way of example with reference to the accompanying drawings. Show:

1 eine bevorzugte Ausführungsform eines Datenträgers aus einer Variante einer erfindungsgemäßen Menge von Datenträgern; 1 a preferred embodiment of a data carrier from a variant of a set of data carriers according to the invention;

2 Schritte einer bevorzugten Ausführungsform eines erfindungsgemäßen Verfahrens zum Erzeugen ausführbaren Programmcodes; 2 Steps of a preferred embodiment of a method according to the invention for generating executable program code;

3A bis 3E Ergebnisse einzelner Teilschritte von Verfahrensschritten aus 2 und 3A to 3E Results of individual substeps of process steps 2 and

4 die Menge von Datenträgern, unterteilt in einzelne Gruppen, mit dem Datenträger aus 1 als Element einer Gruppe. 4 the amount of volumes divided into individual groups with the volume 1 as an element of a group.

Mit Bezug auf 1 umfasst ein Datenträger 10 als Sicherheitsmodul, der hier als Chipkarte dargestellt ist, Datenkommunikationsschnittstellen 20, 20', einen Prozessor 30 sowie verschiedene Speicher 40, 50 und 60. Der Datenträger 10 kann auch in anderer Bauform vorliegen.Regarding 1 includes a disk 10 as a security module, which is shown here as a smart card, data communication interfaces 20 . 20 ' , a processor 30 as well as different memory 40 . 50 and 60 , The disk 10 can also be available in other designs.

Als Datenkommunikationsschnittstellen 20, 20' umfasst der Datenträger 10 ein Kontaktfeld 20 zur kontaktbehafteten Datenkommunikation sowie eine Antennenspule 20' zur kontaktlosen Datenkommunikation. Alternative Datenkommunikationsschnittstellen können vorgesehen sein. Es ist weiterhin möglich, dass der Datenträger 10 lediglich eine Art der Datenkommunikation unterstützt, also lediglich kontaktbehaftet oder kontaktlos.As data communication interfaces 20 . 20 ' includes the disk 10 a contact field 20 for contact-type data communication and an antenna coil 20 ' for contactless data communication. Alternative data communication interfaces may be provided. It is also possible that the disk 10 only one type of data communication supported, so only contact or contactless.

Der nicht flüchtige, nicht wiederbeschreibbare ROM-Speicher 40 umfasst ein Betriebssystem (OS) 42 des Datenträgers 10, welches den Datenträger 10 steuert. Zumindest Teile des Betriebssystems 42 können auch in dem nicht flüchtigen, wiederbeschreibbaren Speicher 50 gespeichert sein. Dieser kann beispielsweise als FLASH-Speicher vorliegen.The non-volatile, non-rewritable ROM 40 includes an operating system (OS) 42 of the disk 10 which the volume 10 controls. At least parts of the operating system 42 also in the non-volatile, rewriteable memory 50 be saved. This can be present for example as FLASH memory.

Der Speicher 50 umfasst datenträgerspezifischen, ausführbaren Programmcode 52, welcher, wie nachfolgend mit Bezug auf die 2 bis 3D beschrieben, erzeugt worden ist.The memory 50 includes disk-specific, executable program code 52 which, as described below with reference to the 2 to 3D described, has been generated.

Der flüchtige, wiederbeschreibbare RAM-Speicher 60 dient dem Datenträger 10 als Arbeitsspeicher.The volatile, rewritable RAM memory 60 serves the disk 10 as a working memory.

Wie in 4 gezeigt, liegen weitere Datenträger 10'', 10''' einer Menge 100 von Datenträgern, unterteilt in verschiedene Gruppen 101, 102, 103, vor. Datenträger innerhalb einer Gruppe sind hinsichtlich der beschriebenen Komponenten jeweils identisch. Datenträger 10, 10'', 10''' unterschiedlicher Gruppen 101, 102, 103 unterscheiden sich darin, dass die Funktionalität, welche durch den ausführbaren Programmcode 52, 52'', 52''' (vgl. 3C, 3E) bereitgestellt wird, jeweils ein gruppenspezifisches Laufzeitverhalten aufweist und gegebenenfalls zu einem gruppenspezifischen Speicherabbild in einem nichtflüchtigen Speicher des jeweiligen Datenträgers führt. Die durch den Programmcode 52, 52', 52'', 52''' bereitgestellte Funktionalität ist allerdings für alle Datenträger 10, 10'', 10''' der Menge 100 von Datenträgern, unabhängig von der Gruppenzugehörigkeit 101, 102, 103, identisch.As in 4 shown, are more disks 10 '' . 10 ''' a lot 100 of data carriers, divided into different groups 101 . 102 . 103 , in front. Data carriers within a group are identical with regard to the components described. disk 10 . 10 '' . 10 ''' different groups 101 . 102 . 103 differ in that the functionality provided by the executable program code 52 . 52 '' . 52 ''' (see. 3C . 3E ), in each case has a group-specific runtime behavior and optionally leads to a group-specific memory image in a nonvolatile memory of the respective data carrier. The by the program code 52 . 52 ' . 52 '' . 52 ''' provided functionality is however for all volumes 10 . 10 '' . 10 ''' the crowd 100 of media, regardless of group membership 101 . 102 . 103 , identical.

Mit Bezug auf 2 werden im Folgenden einzelne Schritte eines Verfahrens zum Erzeugen eines datenträgerspezifischen, ausführbaren Programmcodes 52 für den Datenträger 10 beschrieben.Regarding 2 In the following, individual steps of a method for generating a data carrier-specific, executable program code will be described 52 for the disk 10 described.

In Schritt S1 wird ein Quellcode bereitgestellt. Dieser Quellcode definiert diejenigen Operationen, welche durchgeführt werden müssen, um die gewünschte Funktionalität bereitzustellen. Der Quellcode liegt in der Regel in einer Hochsprache, beispielsweise in „C”, „Java” oder dergleichen vor.In step S1, a source code is provided. This source code defines those operations which must be performed to provide the desired functionality. The source code is usually in a high-level language, for example in "C", "Java" or the like.

In Schritt S2 werden nebenläufig ausführbare Anteile der durch den Quellcode definierten Operationen ermittelt. Ausführbarer Programmcode 52 wird in Schritt S3 erzeugt, wobei in Teilschritt TS31 nebenläufig ausführbare Anteile, wie nachfolgend beschrieben, datenträgerspezifisch, angeordnet werden. Dieser Teilschritt TS31 kann vor dem Erzeugen derjenigen ausführbaren Programmcodeanteile erfolgen, welche den als nebenläufig ausführbar ermittelten Anteilen entsprechen, oder aber danach. In einem optionalen vierten Schritt S4 können einzelne als nebenläufig ausführbar ermittelten Anteile und/oder die dazugehörigen, erzeugten, ausführbaren Programmcodeanteile nach verschiedenen Kriterien optimiert werden. Auch die Optimierung kann bereits während, d. h. im Rahmen des Übersetzungsprozesses, also beim Erzeugen des ausführbaren Programmcodes, erfolgen, bevor beispielsweise abschließend ausführbarer Maschinencode erzeugt wird.In step S2, concurrently executable portions of the operations defined by the source code are determined. Executable program code 52 is generated in step S3, wherein sub-step TS31 concurrently executable shares, as described below, data carrier specific, are arranged. This sub-step TS31 can take place before the generation of those executable program code parts which correspond to the shares determined to be concurrently executable, or else afterwards. In an optional fourth step S4, individual components determined as concurrently executable and / or the associated, generated, executable program code portions can be optimized according to various criteria. The optimization can already during, ie in the context of the translation process, so when generating the executable program code, done before, for example, finally executable machine code is generated.

Eine mögliche Vorgehensweise zum Ermitteln nebenläufig ausführbarer Anteile sowie zur Anordnung der entsprechenden Programmcodeanteile ist in den 3A bis 3C skizziert.A possible procedure for determining concurrently executable shares and for arranging the corresponding program code portions is in the 3A to 3C outlined.

Sofern keine Missverständnisse zu erwarten sind, wird im Folgenden nur noch von „nebenläufig ausführbaren Anteilen” gesprochen, ohne genau zu unterscheiden, auf welcher Ebene diese gerade betrachtet werden. Dies kann beispielsweise die Ebene des Quellcodes, die Ebene eines Zwischencodes oder die Ebene eines Maschinencodes betreffen, je nachdem in welcher Phase eines nachfolgend grob skizzierten Übersetzungsprozesses diese Anteile bestimmt werden. D. h. eine Quellcodesequenz, welche beispielsweise eine Schleifenoperation codiert und in nebenläufig ausführbare Anteile zerlegt werden kann, wird in diesem Sinne mit der entsprechend in den Zwischencode übersetzten Sequenz bzw. mit dem Stück ausführbaren Maschinencode gleichgesetzt, welcher diese Schleifenoperation für den Prozessor codiert.As far as no misunderstandings are to be expected, only "concurrently executable shares" will be discussed below without exactly distinguishing at which level they are currently being considered. This may, for example, relate to the level of the source code, the level of an intermediate code or the level of a machine code, depending on which phase of a subsequently roughly outlined translation process these components are determined. Ie. a source code sequence which, for example, encodes a loop operation and can be decomposed into concurrently executable portions, is in this sense equated with the correspondingly translated intermediate code sequence or machine code which encodes this looping operation for the processor.

Das Ermitteln der nebenläufig ausführbaren Anteile erfolgt in der Regel im Rahmen einer Übersetzung oder Compilierung des Quellcodes in den ausführbaren Programmcode. Eine solche Übersetzung verläuft in bekannter Weise in verschiedenen Teilschritten. Diese können die Schritte der lexikalischen Analyse, der Syntaxanalyse, der semantischen Analyse, der Erzeugung von Zwischencode, der Codeoptimierung und der Codeerzeugung umfassen. Phasen, welche das Ermitteln der nebenläufig ausführbaren Anteile hauptsächlich betreffen können, sind beispielsweise die Syntaxanalyse, in der hierarchische Strukturen des Programms erkannt werden. Alternativ oder zusätzlich können nebenläufig ausführbare Anteile während der Erzeugung von Zwischencode ermittelt werden, bei der die Ergebnisse der vorhergehenden Schritte, welche zur Analyse des Quellcodes dienten, in eine „abstrakte Maschinensprache”, einen geeigneten Zwischencode, wie z. B. den 3-Adress-Code, übersetzt werden, von dem aus dann nachfolgend der tatsächliche Maschinencode für die vorliegende Plattform erzeugt wird. Es ist aber auch möglich, dass nebenläufig ausführbare Anteile, zumindest grob, bereits auf der Ebene des Quellcodes, also vor der Übersetzung, oder erst auf der Ebene des Maschinencodes, d. h. am Ende der Übersetzung, ermittelt werden. Schließlich können verschiedene, nebenläufig ausführbare Anteile in verschiedenen der vorstehend beschriebenen Phasen oder in mehr als einer Phase bestimmt werden.Determining the concurrently executable shares is usually carried out as part of a translation or compilation of the source code in the executable program code. Such a translation proceeds in a known manner in different sub-steps. These may include the steps of lexical analysis, parsing, semantic analysis, intermediate code generation, code optimization, and code generation. Phases which may mainly concern the determination of the concurrently executable portions are, for example, the syntax analysis in which hierarchical structures of the program are recognized. Alternatively or additionally, concurrently executable portions may be determined during the generation of intermediate code, in which the results of the previous steps used to analyze the source code are translated into an "abstract machine language", a suitable intermediate code, such as a. The 3-address code, from which the actual machine code for the present platform is subsequently generated. But it is also possible that concurrently executable shares, at least roughly, already at the level of the source code, ie before the translation, or only at the level of the machine code, d. H. at the end of the translation, to be determined. Finally, various concurrently executable fractions may be determined in various of the above-described phases or in more than one phase.

Ein erster Teilschritt während des Ermitteln von nebenläufig ausführbaren Anteilen, der in 3A illustriert ist, kann eine Zerlegung des Programmcodes, auf einer geeigneten Ebene des Programmcodes 51, in Blöcke betreffen. Jeder dieser Blöcke A bis G umfasst jeweils eine Folge von Anweisungen, welche, wenn der Block erreicht wird, ausgeführt werden müssen, bevor der Block wieder verlassen wird. Es ist jedoch möglich, dass die Reihenfolge, in der einzelne der Blöcke ausgeführt werden können, variieren kann, ohne Einfluss auf das Endergebnis. In analoger Weise ist es möglich, dass Anweisungen innerhalb eines Blockes in verschiedener Reihenfolge ausgeführt werden können, ohne dass sich am Resultat der Berechnung etwas ändert. Diese beiden Fälle deuten auf nebenläufig ausführbare Anteile hin.A first partial step during the determination of concurrent shares, which in 3A may be a decomposition of the program code, at a suitable level of the program code 51 to relate to blocks. Each of these blocks A to G each comprises a sequence of instructions which, when the block is reached, must be executed before the block is exited again. However, it is possible that the order in which each of the blocks can be executed may vary without affecting the end result. In an analogous way, it is possible that statements within a block can be executed in different order without any change in the result of the calculation. These two cases point to concurrently executable shares.

Wie mit Bezug auf 3B angedeutet, hat der bis dahin durchgeführte Übersetzungsprozess ergeben, dass die Blöcke A bis G nicht notwendig in der in 3A angedeuteten Reihenfolge ausgeführt werden müssen. Vielmehr zeigt sich, dass, nachdem die Anweisungen des Blocks A abgearbeitet worden sind, die Blöcke B, C und D parallel, verzahnt oder in beliebiger sequentieller Reihenfolge ausgeführt werden können, bevor das Programm mit Block E fortgesetzt wird. Mit anderen Worten, es besteht keine kausale Beziehung zwischen den Anteilen der Blöcke B, C und D. Keiner dieser Blöcke benötigt eine Eingabe, welche in direkter oder indirekter Weise von einer Ausgabe eines der anderen Blöcke abhängen könnte. Daher können diese Blöcke als – relativ zueinander – nebenläufig ausführbar ermittelt werden. Das gleiche gilt für die Unteranteile F1, F2, ..., Fk des Anteils gemäß Block F.As with respect to 3B indicated that the translation process carried out so far has shown that the blocks A to G are not necessary in the in 3A indicated sequence must be executed. Rather, it turns out that after the instructions of block A have been executed, blocks B, C and D can be executed in parallel, interleaved or in any sequential order before the program continues with block E. In other words, there is no causal relationship between the proportions of blocks B, C, and D. None of these blocks requires one Input which could depend, directly or indirectly, on an output of one of the other blocks. Therefore, these blocks can be determined to be executable concurrently with each other. The same applies to the sub-components F1, F2,..., Fk of the component according to block F.

Gemäß einer ersten Variante kann ausgehend von diesem Zwischenergebnis ausführbarer Programmcode für eine Mehrprozessorarchitektur, beispielsweise mit drei Prozessoren, erzeugt werden. Dabei würde beispielsweise für jeden der drei Blöcke B, C und D ausführbarer Programmcode erzeugt, welcher dann parallel auf jeweils einem der drei Prozessoren ausgeführt werden könnte. In analoger Weise könnte für die Unteranteile F1, F2, ..., Fk jeweils parallel ausführbarer Programmcode für einen der drei Prozessoren erzeugt werden.According to a first variant, starting from this intermediate result, executable program code for a multiprocessor architecture, for example with three processors, can be generated. In this case, for example, executable program code would be generated for each of the three blocks B, C and D, which could then be executed in parallel on a respective one of the three processors. In an analogous manner, parallel executable program code for one of the three processors could be generated for the sub-components F1, F2,..., Fk.

Ausgehend von einem derart für eine Mehrprozessorarchitektur erzeugten, ausführbaren Programmcode kann sequentiell ausführbarer Programmcode für einen Datenträger 10 mit lediglich einem Prozessor erzeugt werden, wie dies in 3C illustriert ist. Dabei sind die Programmcodeanteile, welche den jeweils als nebenläufig ausführbar ermittelten Anteilen B, C und D bzw. F1, F2, ..., Fk, entsprechen, in zufälliger Reihenfolge für eine sequentielle Ausführung neu angeordnet worden. Aufgrund der Tatsache, dass diese Anteile parallel ausführbar sind, d. h. keine kausale Beziehung zueinander aufweisen, bleibt die Funktionalität des Gesamtprogramms identisch erhalten, egal in welcher Reihenfolge die Anordnung erfolgt. Dadurch, dass die Anordnung randomisiert erfolgt, ergibt sich insbesondere eine datenträgerspezifische Anordnung. Wird der entsprechende Programmcode 52 in einem nicht flüchtigen Speicher 50 des Datenträgers 10 gespeichert, ergibt sich ein datenträgerspezifisches Speicherabbild. Bei Ausführung des Programmcodes 52 ist ein datenträgerspezifisches Laufzeitverhalten erkennbar. Diese beiden technischen Effekte ergeben sich unmittelbar aus der Tatsache, dass die Programmcodeanteile, welche den nebenläufig ausführbaren Anteilen B, C, D bzw. F1, F2, ..., Fk entsprechen, datenträgerspezifisch angeordnet worden sind.Starting from an executable program code generated in this way for a multiprocessor architecture, sequentially executable program code for a data carrier 10 be generated with only one processor, as in 3C is illustrated. In this case, the program code portions which correspond to the proportions B, C and D or F1, F2,..., Fk respectively determined to be concurrently executable have been rearranged in a random order for a sequential execution. Due to the fact that these components can be executed in parallel, ie have no causal relationship to one another, the functionality of the overall program remains identical regardless of the order in which the arrangement takes place. The fact that the arrangement is randomized, in particular results in a data carrier-specific arrangement. Will the corresponding program code 52 in a non-volatile memory 50 of the disk 10 stored, results in a volume-specific memory image. When executing the program code 52 is a volume-specific runtime behavior recognizable. These two technical effects arise directly from the fact that the program code portions which correspond to the concurrently executable portions B, C, D or F1, F2,..., Fk have been arranged in a data carrier-specific manner.

Gemäß einer zweiten Variante wird nicht erst, wie mit Bezug auf die erste Variante beschrieben, ausführbarer Programmcode für eine Mehrprozessorarchitektur erzeugt, welcher zum Erzeugen einer sequentiell ausführbaren Version erst wieder zerlegt und in beschriebener Weise neu angeordnet werden muss. Alternativ erfolgt hier die zufällige Anordnung der nebenläufig ausführbaren Anteile auf einer Ebene oberhalb des Maschinencodes, beispielsweise auf der Ebene des erwähnten Zwischencodes. Ausführbarer Programmcode 52 wird dann lediglich zur sequentiellen Ausführung erzeugt, wobei die den nebenläufig ausführbaren Anteilen B, C, D bzw. F1, F2, ..., Fk entsprechenden Programmcodeanteile erneut datenträgerspezifisch, wie in 3C gezeigt, angeordnet werden.According to a second variant, executable program code for a multiprocessor architecture is not first generated, as described with reference to the first variant, which first has to be decomposed and rearranged in a described manner in order to generate a sequentially executable version. Alternatively, the random arrangement of the concurrently executable components takes place here on a plane above the machine code, for example at the level of the mentioned intermediate code. Executable program code 52 is then generated only for sequential execution, wherein the concurrently executable portions B, C, D and F1, F2, ..., Fk corresponding program code portions again volume-specific, as in 3C shown to be arranged.

Die Resultate, d. h. der erzeugte Programmcode 52, der ersten und der zweiten Variante entsprechen einander im Wesentlichen. Leichte Unterschiede können sich dadurch ergeben, dass beispielsweise Programmcode, welcher für eine echt parallele Ausführung auf einer Mehrprozessorarchitektur erzeugt worden ist, zusätzlichen Code umfasst, beispielsweise für eine mehrfache Initialisierung einzelner Variablen für jeden der parallel auszuführenden Zweige. Dieser Code ist in der direkt zur sequentiellen Ausführung erzeugten Version verzichtbar. Insofern ergibt sich ein jeweils unterschiedliches Speicherabbild. Hinsichtlich des Laufzeitverhaltens hingegen sind praktisch keine erkennbaren Unterschiede zu erwarten.The results, ie the generated program code 52 , the first and second variants substantially correspond to each other. Slight differences may arise in that, for example, program code generated for a truly parallel execution on a multiprocessor architecture includes additional code, for example, for multiple initialization of individual variables for each of the branches to be executed in parallel. This code can be dispensed with in the version created directly for sequential execution. In this respect, each results in a different memory image. With regard to the runtime behavior, however, practically no discernible differences are to be expected.

Grundsätzlich wird die Funktionalität zum Ermitteln nebenläufig ausführbarer Anteile durch einen entsprechend eingerichteten Compiler bereitgestellt, insbesondere durch einen Compiler, der eingerichtet ist, Programmcode zu erzeugen, welcher auf einer Mehrprozessorarchitektur echt parallel ausgeführt werden kann. Das beschriebene Verfahren zum Erzeugen des sequentiell ausführbaren, datenträgerspezifischen Programmcodes macht sich, wie beschrieben, einen solchen Compiler oder eine vergleichbare Einrichtung zunutze.In principle, the functionality for determining concurrently executable components is provided by a suitably configured compiler, in particular by a compiler which is set up to generate program code which can be executed in real parallel fashion on a multiprocessor architecture. The method described for generating the sequentially executable, volume-specific program code, as described, makes use of such a compiler or a comparable device.

Es kann weiter vorgesehen sein, dass alternativ oder zusätzlich, auf der Ebene des Quellcodes bereits Anteile vorgegeben werden können, welche nebenläufig ausgeführt werden können. Dies kann beispielsweise mittels geeigneter Compiler-Direktiven erfolgen, die in den Programmcode geeignet eingefügt werden, wie diese z. B. im Zusammenhang mit der Programmierschnittstelle „OpenMP” bekannt sind. Mittels solcher Direktiven kann dem Compiler beispielsweise mitgeteilt werden, dass grundsätzlich als sequentiell ausführbar vorgesehene Anteile, so genannte „sections”, z. B. die vorstehend angegebenen Anteile B, C und D, nebenläufig ausgeführt werden können. Dabei obliegt es dem Programmierer, die Bedingungen der nebenläufigen Ausführbarkeit zu überprüfen.It can further be provided that, alternatively or additionally, shares can already be specified at the level of the source code, which can be executed concurrently. This can be done, for example, by means of suitable compiler directives, which are inserted into the program code as appropriate, such as these. B. in connection with the programming interface "OpenMP" are known. By means of such directives, the compiler can be informed, for example, that components which are basically provided as sequentially executable parts, so-called "sections", e.g. B. the above-mentioned proportions B, C and D, can be carried out in parallel. It is up to the programmer to check the conditions of concurrent executability.

Weiter können mittels geeigneter Direktiven solche Programmcodesequenzen, von denen bekannt ist, dass deren Anweisungen in einfacher Weise parallel ausgeführt werden können, dem Compiler angezeigt werden. Besonders geeignet sind Schleifenkonstruktionen, bei denen die einzelnen Schleifendurchläufe bezüglich Ein- und Ausgabedaten unabhängig voneinander sind. Diese Situation ist in den 3A und 3B mit dem Block F und den Unteranteilen F1, F2, ..., Fk angedeutet. Der Block F könnte beispielsweise die Schleife (for i = 0; i < k; i++){f[i] := 2 × i + 1} umfassen. Mittels einer Compilerdirektive wird der Compiler angewiesen, die Schleife zu parallelisieren. Dieser erkennt, dass die einzelnen Schleifendurchläufe unabhängig voneinander sind und erzeugt entsprechend k nebenläufig ausführbare Unteranteile F1, F2, ..., Fk.Further, by means of suitable directives, such program code sequences, which are known to be able to execute their instructions in a simple manner in parallel, are displayed to the compiler. Particularly suitable are loop constructions in which the individual loop passes are independent of one another with respect to input and output data. This situation is in the 3A and 3B with the block F and the sub-parts F1, F2, ..., Fk indicated. For example, block F could include the loop (for i = 0; i <k; i ++) {f [i]: = 2 x i + 1}. A compiler directive tells the compiler to parallelize the loop. This recognizes that the individual loop passes are independent of each other and generates correspondingly k sub-executable sub-shares F1, F2, ..., Fk.

Es kann vorteilhaft sein, im Schritt des Ermitteln von nebenläufig ausführbaren Anteilen eine Anzahl von gleichzeitig nebenläufig ausführbaren Anteilen vorzugeben. Im vorhergehenden Beispiel hätte somit auch mit Bezug auf den Block F die Anzahl der Unteranteile beschränkt werden können.It may be advantageous to specify a number of simultaneously concurrently executable shares in the step of determining concurrently executable shares. In the previous example, the number of sub-shares could thus have been limited with reference to block F.

Wie bereits erwähnt und mit Bezug auf 3D illustriert, können ein oder mehrere der als nebenläufig ausführbar ermittelten Anteile hinsichtlich eines oder mehrerer Parameter optimiert werden, beispielsweise die Anteile C und B, wobei sich die verschieden schraffiert hervorgehobenen optimierten Anteile C' und B'' ergeben. Bekannte Compiler verfügen dazu in der Regel über entsprechende Compile-Optionen, welche es beispielsweise erlauben, in mehreren Stufen hinsichtlich Ausführungsgeschwindigkeit oder Speicherbedarf optimierten Programmcode zu erzeugen. Dadurch, dass nicht der gesamte Programmcode einheitlich optimiert wird, sondern lediglich ausgewählte Anteile, kann eine weitere datenträgerspezifische Ausgestaltung des in dieser Weise erzeugten Programmcodes 52' erreicht werden. Die Optimierung wirkt sich in der Regel sowohl auf das Laufzeitverhalten als auch auf die benötigten Speicherressourcen aus. Es können auch Optimierungsstufen gewählt werden, welche lediglich geeigneten, optimierten Zwischencode erzeugen. Ausführbarer Programmcode wird dann erst von einer Linker-Funktionalität erzeugt. Auf diese Weise kann einer Optimierung durchgeführt werden, welche nicht lediglich einzelne Module, sondern ein gesamtes Programmpaket betrifft.As already mentioned and with reference to 3D illustrated, one or more of the shares determined as concurrently executable can be optimized with respect to one or more parameters, for example, the proportions C and B, resulting in the different hatched highlighted optimized shares C 'and B''. Known compilers usually have corresponding compile options, which allow, for example, to generate program code optimized in several stages with regard to execution speed or memory requirement. The fact that not the entire program code is uniformly optimized, but only selected portions, a further data carrier specific embodiment of the program code generated in this way 52 ' be achieved. Optimization usually affects both runtime behavior and required memory resources. Optimization levels can also be selected which only generate appropriate, optimized intermediate code. Executable program code is then first generated by a linker functionality. In this way, an optimization can be carried out, which does not concern only individual modules, but an entire program package.

Es versteht sich, dass die Optimierung alternativ oder zusätzlich auch auf solche Anteile A, E und G erstreckt werden kann, die nicht nebenläufig ausführbar sind.It goes without saying that the optimization can alternatively or additionally also be extended to those portions A, E and G which can not be executed concurrently.

In 3E ist exemplarisch ein für einen Datenträger 10'' (vgl. 4) erzeugter, ausführbarer, datenträgerspezifischer Programmcode 52'' gezeigt. Dieser unterscheidet sich von dem Programmcode 52', welcher für den Datenträger 10 erzeugt worden ist, einmal dahingehend, dass die den nebenläufig ausführbaren Anteilen B, C, D bzw. F1, F2, ..., Fk entsprechenden Programmcodeanteile für die sequentielle Ausführbarkeit gemäß einer abweichenden Reihenfolge angeordnet worden sind. Zum zweiten ist lediglich der Programmcodeanteil C optimiert worden, und zwar hinsichtlich eines anderen Parameters (beispielsweise Laufzeit anstelle von Speicherbedarf). Es ist unmittelbar einsichtig, dass das Laufzeitverhalten des Programmcodes 52'' des Datenträgers 10'' unterschiedlich ist von dem Laufzeitverhalten des Programmcodes 52' des Datenträgers 10.In 3E is an example of a disk 10 '' (see. 4 ), executable, volume specific program code 52 '' shown. This differs from the program code 52 ' , which for the disk 10 once in that the sub-executable portions B, C, D, and F1, F2, ..., Fk, respectively, have been arranged for sequential executability according to a different order. Secondly, only the program code portion C has been optimized with respect to another parameter (eg, runtime instead of memory requirement). It is immediately obvious that the runtime behavior of the program code 52 '' of the disk 10 '' is different from the runtime behavior of the program code 52 ' of the disk 10 ,

Claims (16)

Verfahren zur Erzeugung eines auf einem Sicherheitsmodul (10) ausführbaren Programmcodes (52), umfassend die Schritte: – Bereitstellen (S1) eines Quellcodes; – Ermitteln (S2) von nebenläufig ausführbaren Anteilen (B, C, D) der durch den Quellcode definierten Operationen; – Erzeugen (S3) eines ausführbaren Programmcodes (52) aus dem Quellcode; dadurch gekennzeichnet, dass im Schritt des Erzeugers des ausführbaren Programmcodes (52) ausführbare Programmcodeanteile, die ermittelten, nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes (52) sicherheitsmodulspezifisch angeordnet werden (TS31).Method for generating a security module ( 10 ) executable program codes ( 52 ), comprising the steps of: - providing (S1) a source code; - determining (S2) concurrently executable portions (B, C, D) of the operations defined by the source code; Generating (S3) an executable program code ( 52 ) from the source code; characterized in that in the step of the creator of the executable program code ( 52 ) executable program code portions corresponding to determined concurrently executable portions (B, C, D) for sequential executability of the generated program code ( 52 ) are arranged specific to the safety module (TS31). Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass die ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes (52) randomisiert angeordnet werden.A method according to claim 1, characterized in that the executable program code portions corresponding to concurrently executable portions (B, C, D) are for sequential executability of the generated program code (FIG. 52 ) be randomized. Verfahren nach Anspruch 1 oder 2, dadurch gekennzeichnet, dass die ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes (52) derart angeordnet werden, dass sich bei Ausführung des Programmcodes (52) auf dem Sicherheitsmodul (10) ein datenträgerspezifisches Laufzeitverhalten zeigt.A method according to claim 1 or 2, characterized in that the executable program code portions corresponding to concurrently executable portions (B, C, D) are for sequential executability of the generated program code (FIG. 52 ) are arranged such that when the program code is executed ( 52 ) on the security module ( 10 ) shows a volume-specific runtime behavior. Verfahren nach einem der Ansprüche 1 bis 3, dadurch gekennzeichnet, dass die ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes (52) derart angeordnet werden, dass sich beim Speichern des Programmcodes (52) in einem nichtflüchtigen Speicher (50) des Sicherheitsmoduls (10) ein sicherheitsmodulspezifisches Speicherabbild ergibt.Method according to one of claims 1 to 3, characterized in that the executable program code portions which correspond to concurrently executable portions (B, C, D), for a sequential executability of the generated program code ( 52 ) are arranged such that when saving the program code ( 52 ) in a nonvolatile memory ( 50 ) of the security module ( 10 ) yields a security module specific memory map. Verfahren nach einem der Ansprüche 1 bis 4, dadurch gekennzeichnet, dass im Schritt des Ermittelns von nebenläufig ausführbaren Anteilen (B, C, D) eine Anzahl von gleichzeitig nebenläufig ausführbaren Anteilen vorgegeben wird.Method according to one of claims 1 to 4, characterized in that in the step of determining concurrently executable shares (B, C, D) a number of concurrently executable shares is specified. Verfahren nach einem der Ansprüche 1 bis 5, dadurch gekennzeichnet, dass ausführbare Programmcodeanteile, die ermittelten, nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, in einer Tabelle angeordnet werden. Method according to one of claims 1 to 5, characterized in that executable program code portions corresponding to the ascertained concurrently executable portions (B, C, D) are arranged in a table. Verfahren nach einem der Ansprüche 1 bis 6, dadurch gekennzeichnet, dass als nebenläufig ausführbare Anteile (F1, F2, ..., Fk) der durch den Quellcode definierten Operationen eine Schleifenoperation (F) definierende Anteile ermittelt werden.Method according to one of claims 1 to 6, characterized in that as concurrently executable shares (F1, F2, ..., Fk) of the operations defined by the source code a loop operation (F) defining shares are determined. Verfahren nach einem der Ansprüche 1 bis 6, dadurch gekennzeichnet, dass als nebenläufig ausführbare Anteile (B, C, D) der durch den Quellcode definierten Operationen eine Rekursion definierende Anteile ermittelt werden.Method according to one of claims 1 to 6, characterized in that as concurrently executable shares (B, C, D) of the operations defined by the source code, a recursion defining shares are determined. Verfahren nach einem der Ansprüche 1 bis 8, dadurch gekennzeichnet, dass zumindest einer der ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, hinsichtlich eines vorgegebenem Parameters optimiert wird (S4).Method according to one of Claims 1 to 8, characterized in that at least one of the executable program code portions corresponding to concurrently executable portions (B, C, D) is optimized with respect to a given parameter (S4). Verfahren nach Anspruch 9, dadurch gekennzeichnet, dass verschiedene der ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, jeweils hinsichtlich verschiedener Parameter optimiert werden.A method according to claim 9, characterized in that different of the executable program code portions corresponding to concurrently executable portions (B, C, D) are each optimized for different parameters. Verfahren nach einem der Ansprüche 1 bis 10, dadurch gekennzeichnet, dass der Schritt des Ermitteln von nebenläufig ausführbaren Anteilen (B, C, D) der durch den Quellcode definierten Operationen von einer Einrichtung unterstützt wird, die zum Erzeugen von auf einer Mehrkern- oder Mehrprozessorarchitektur parallel ausführbarem Programmcode eingerichtet ist.A method according to any one of claims 1 to 10, characterized in that the step of determining concurrently executable portions (B, C, D) of the operations defined by the source code is supported by means for generating on a multi-core or multiprocessor architecture parallel executable program code is set up. Menge (100) von Sicherheitsmodulen (10; 10'', 10''') des gleichen Herstellers, wobei jeder dieser Sicherheitsmodule (10; 10'', 10''') einen Speicher (40; 50; 60) und einen Prozessor (30) zum Ausführen von in dem Speicher (50) gespeichertem, ausführbarem Programmcode (52'; 52''; 52''') umfasst, wobei die Menge (100) von Sicherheitsmodulen (10; 10'', 10''') zumindest zwei Gruppen (101; 102; 103) von Sicherheitsmodulen (10; 10'', 10''') umfasst und wobei jede dieser Gruppen (101; 102; 103) zumindest ein Sicherheitsmodul (10; 10'', 10''') umfasst, dadurch gekennzeichnet, dass der jeweils in einem Speicher (50) eines Sicherheitsmoduls (10; 10'', 10''') gespeicherte, ausführbare Programmcode (52'; 52''; 52''') hinsichtlich dessen Funktionalität für jedes Sicherheitsmodul (10; 10'', 10''') der Menge (100) von Sicherheitsmodulen (10; 10'', 10''') identisch ist, sich jedoch hinsichtlich dessen Laufzeitverhalten für jeweils zwei Sicherheitsmodul (10; 10'') aus unterschiedlichen der Gruppen (101; 102) von Sicherheitsmodulen (10; 10'', 10''') unterscheidet.Amount ( 100 ) of security modules ( 10 ; 10 '' . 10 ''' ) of the same manufacturer, each of these security modules ( 10 ; 10 '' . 10 ''' ) a memory ( 40 ; 50 ; 60 ) and a processor ( 30 ) for executing in the memory ( 50 stored, executable program code ( 52 '; 52 ''; 52 ''' ), the quantity ( 100 ) of security modules ( 10 ; 10 '' . 10 ''' ) at least two groups ( 101 ; 102 ; 103 ) of security modules ( 10 ; 10 '' . 10 ''' ) and each of these groups ( 101 ; 102 ; 103 ) at least one security module ( 10 ; 10 '' . 10 ''' ), characterized in that each in a memory ( 50 ) of a security module ( 10 ; 10 '' . 10 ''' stored, executable program code ( 52 '; 52 ''; 52 ''' ) regarding its functionality for each security module ( 10 ; 10 '' . 10 ''' ) of the quantity ( 100 ) of security modules ( 10 ; 10 '' . 10 ''' ) is identical, but with respect to its runtime behavior for each two security module ( 10 ; 10 '' ) from different groups ( 101 ; 102 ) of security modules ( 10 ; 10 '' . 10 ''' ) is different. Menge (100) von Sicherheitsmodulen (10; 10'', 10''') nach Anspruch 12, dadurch gekennzeichnet, dass das unterschiedliche Laufzeitverhalten des Programmcodes (52'; 52'') für zwei Sicherheitsmodule (10; 10'') aus unterschiedlichen Gruppen (101; 102) darauf beruht, dass sich der Programmcode (52') eines Sicherheitsmoduls (10) einer ersten Gruppe (101) von dem Programmcode (52'') eines Sicherheitsmoduls (10'') einer zweiten Gruppe (102) darin unterscheidet, dass beim Erzeugen des ausführbaren Programmcodes (52'; 52'') für die Sicherheitsmodule (10; 10'') jeweils solche ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, für eine sequenzielle Ausführbarkeit des ausführbaren Programmcodes (52'; 52'') durch den Prozessor (30) des jeweiligen Sicherheitsmoduls (10; 10'') gruppenspezifisch angeordnet worden sind.Amount ( 100 ) of security modules ( 10 ; 10 '' . 10 ''' ) according to claim 12, characterized in that the different runtime behavior of the program code ( 52 '; 52 '' ) for two security modules ( 10 ; 10 '' ) from different groups ( 101 ; 102 ) is based on the fact that the program code ( 52 ' ) of a security module ( 10 ) of a first group ( 101 ) of the program code ( 52 '' ) of a security module ( 10 '' ) of a second group ( 102 ) in that when generating the executable program code ( 52 '; 52 '' ) for the security modules ( 10 ; 10 '' ) are respectively executable program code portions corresponding to concurrently executable portions (B, C, D) for sequential executability of the executable program code ( 52 '; 52 '' ) by the processor ( 30 ) of the respective security module ( 10 ; 10 '' ) have been arranged group-specific. System zur Erzeugung eines auf einem Sicherheitsmodul (10) sequentiell ausführbaren Programmcodes (52) – ein Werkzeug zum Erzeugen des sequentiell ausführbaren Programmcodes (52) für einen Quellcode; gekennzeichnet durch – ein Werkzeug zur Ermittlung von nebenläufig ausführbaren Anteilen (B, C, D) der durch den Quellcode definierten Operationen; wobei das Werkzeug zum Erzeugen des Programmcodes eingerichtet ist, die von dem Werkzeug zur Ermittlung ermittelten nebenläufig ausführbaren Programmcodeanteile (B, C, D) für eine sequenzielle Ausführung auf dem Sicherheitsmodul (10) bereitzustellen.System for generating one on a security module ( 10 ) sequentially executable program code ( 52 ) - a tool for generating the sequentially executable program code ( 52 ) for a source code; characterized by - a tool for determining concurrently executable portions (B, C, D) of the operations defined by the source code; wherein the tool for generating the program code is set up, which the sequential executable program code portions (B, C, D) for executing sequentially executing on the security module ( 10 ). System nach Anspruch 14 dadurch gekennzeichnet, dass das Ermittlungswerkzeug die ermittelten nebenläufig ausführbaren Programmcodeanteile (B, C, D) für eine nebenläufige Ausführung aufbereitet und das Erzeugungswerkzeug die aufbereiteten Programmcodeanteile (B, C, D) verwendet.System according to claim 14, characterized in that the determining tool processes the ascertained concurrently executable program code portions (B, C, D) for a concurrent execution and the generating tool uses the prepared program code portions (B, C, D). System nach Anspruch 14 oder 15 dadurch gekennzeichnet, dass das Erzeugungswerkzeug ein Monoprozessor- und/ oder Monotasking-Werkzeug ist und das Ermittlungswerkzeug ein Mehrprozessor- und/oder Multitasking-Werkzeug ist und das System zur Ausführung eines Verfahrens nach einem der Ansprüche 1 bis 11 angepasst ist.A system according to claim 14 or 15, characterized in that the generating tool is a monoprocessor and / or monotasking tool and the determining tool is a multiprocessor and / or multitasking tool and the system adapted to carry out a method according to any one of claims 1 to 11 is.
DE102012015899.8A 2012-08-10 2012-08-10 Method for generating executable program code Withdrawn DE102012015899A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
DE102012015899.8A DE102012015899A1 (en) 2012-08-10 2012-08-10 Method for generating executable program code
PCT/EP2013/002387 WO2014023431A1 (en) 2012-08-10 2013-08-08 Method for producing executable program code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102012015899.8A DE102012015899A1 (en) 2012-08-10 2012-08-10 Method for generating executable program code

Publications (1)

Publication Number Publication Date
DE102012015899A1 true DE102012015899A1 (en) 2014-02-13

Family

ID=49182204

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102012015899.8A Withdrawn DE102012015899A1 (en) 2012-08-10 2012-08-10 Method for generating executable program code

Country Status (2)

Country Link
DE (1) DE102012015899A1 (en)
WO (1) WO2014023431A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2818846A1 (en) * 2000-12-22 2002-06-28 Gemplus Card Int Method for protecting electronic component executing cryptographic algorithm against current measurement attack, comprises factorization of exponential in algorithm and permutation of the factors
US6668325B1 (en) * 1997-06-09 2003-12-23 Intertrust Technologies Obfuscation techniques for enhancing software security
EP2009572A1 (en) * 2007-06-29 2008-12-31 Telefonaktiebolaget LM Ericsson (publ) Obfuscating execution traces of computer program code
US20090010424A1 (en) * 2007-07-05 2009-01-08 Broadcom Corporation System and Methods for Side-Channel Attack Prevention
US20110246789A1 (en) * 2010-03-31 2011-10-06 Inside Contactless Integrated circuit protected against horizontal side channel analysis

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002522929A (en) * 1998-07-31 2002-07-23 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Data processing apparatus having means for invalidating an analysis method for detecting a secret characteristic value
DE19837808A1 (en) * 1998-08-20 2000-02-24 Orga Kartensysteme Gmbh Method for executing an encryption program for encrypting data in a microprocessor-based, portable data carrier
DE102004011488B4 (en) * 2004-03-09 2007-07-05 Giesecke & Devrient Gmbh Protection of software against attacks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6668325B1 (en) * 1997-06-09 2003-12-23 Intertrust Technologies Obfuscation techniques for enhancing software security
FR2818846A1 (en) * 2000-12-22 2002-06-28 Gemplus Card Int Method for protecting electronic component executing cryptographic algorithm against current measurement attack, comprises factorization of exponential in algorithm and permutation of the factors
EP2009572A1 (en) * 2007-06-29 2008-12-31 Telefonaktiebolaget LM Ericsson (publ) Obfuscating execution traces of computer program code
US20090010424A1 (en) * 2007-07-05 2009-01-08 Broadcom Corporation System and Methods for Side-Channel Attack Prevention
US20110246789A1 (en) * 2010-03-31 2011-10-06 Inside Contactless Integrated circuit protected against horizontal side channel analysis

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KEERSEBILCK, Philip et al.: SMART CARD (IN-) SECURITY.In: 8th International Conference on DEVELOPMENT AND APPLICATION SYSTEMSSuceava, Romania, 25 - 27. Mai 2006, S. 249-254URL: http://www.dasconference.ro/papers/2006/C18.pdf [abgerufen am 09.04.2013] *
KEERSEBILCK, Philip et al.: SMART CARD (IN-) SECURITY.In: 8th International Conference on DEVELOPMENT AND APPLICATION SYSTEMSSuceava, Romania, 25 – 27. Mai 2006, S. 249-254URL: http://www.dasconference.ro/papers/2006/C18.pdf [abgerufen am 09.04.2013]
Witteman, M: Advances in Smartcard Security.In: Information Security Bulletin, Juli 2002, S. 11-22.URL: http://profs.info.uaic.ro/~fltiplea/IS/Witt2002.pdf[abgerufen am 09.04.2013] *

Also Published As

Publication number Publication date
WO2014023431A1 (en) 2014-02-13

Similar Documents

Publication Publication Date Title
DE112017004843T5 (en) Technologies for deterministic code flow integrity protection
DE102012200613A1 (en) System and method for supporting JIT in a secure system and randomly allocated memory areas
DE112011100258T5 (en) Performing aggressive code optimizations with an ability to cancel the changes made by the aggressive optimizations
DE102006008248A1 (en) Mobile data carrier e.g. chip card, operating method, involves controlling and/or monitoring operation of mobile data carrier by central control unit such that application e.g. service, is allotted according to scheduling mechanism resource
DE10313318A1 (en) Controlled execution of a program intended for a virtual machine on a portable data carrier
DE102014214792A1 (en) Apparatus and method for accessing an encrypted storage section
DE102009050161A1 (en) A method and apparatus for testing a system having at least a plurality of parallel executable software units
DE202016008006U1 (en) Generation of integration tests on a small scale
DE102012015899A1 (en) Method for generating executable program code
WO2016096139A1 (en) Method for providing a security-critical software application on a computer unit
EP2936728B1 (en) Method for operating a portable data carrier and such a portable data carrier
DE102005046696B4 (en) A method for generating protected program code and method for executing program code of a protected computer program and computer program product
EP1709534B1 (en) The running of a program by a virtual machine
DE102004011488B4 (en) Protection of software against attacks
DE102012015897A1 (en) Method for executing program code on security module e.g. chipcard, utilized in e.g. banking, involves determining module-specific sequence in which code portions are executed, and sequentially executing code in determined sequence
DE602004007368T2 (en) METHOD OF MANAGING AN EXPORTABLE CODE DOWNLOADED IN A RECOMMITABLE ONBOARD SYSTEM
DE102015209120A1 (en) Computing device and operating method for this
EP2660747B1 (en) Safety module
DE10254657A1 (en) Microcontroller and associated method for processing the programming of the microcontroller
Czech et al. Unintegrated parton distributions and pion production in pp collisions at RHIC energies
DE10222212A1 (en) Spying-proof modular inversion
DE102008044808B4 (en) Method for generating program code in an operating system memory and an application memory of a data carrier
EP2217999A2 (en) On data processing
DE102004058882A1 (en) Generating program code in a load format and providing executable program code
DE102005063499B4 (en) Compiling device for processor, has selection device selecting commands of categories for representation of functionality of respective partial areas, and generating device to generate program sequence from selected commands

Legal Events

Date Code Title Description
R163 Identified publications notified
R081 Change of applicant/patentee

Owner name: GIESECKE+DEVRIENT MOBILE SECURITY GMBH, DE

Free format text: FORMER OWNER: GIESECKE & DEVRIENT GMBH, 81677 MUENCHEN, DE

R120 Application withdrawn or ip right abandoned