DE102012015897A1 - 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 - Google Patents

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 Download PDF

Info

Publication number
DE102012015897A1
DE102012015897A1 DE201210015897 DE102012015897A DE102012015897A1 DE 102012015897 A1 DE102012015897 A1 DE 102012015897A1 DE 201210015897 DE201210015897 DE 201210015897 DE 102012015897 A DE102012015897 A DE 102012015897A DE 102012015897 A1 DE102012015897 A1 DE 102012015897A1
Authority
DE
Germany
Prior art keywords
program code
security module
executable
executable program
portions
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
DE201210015897
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 DE201210015897 priority Critical patent/DE102012015897A1/en
Publication of DE102012015897A1 publication Critical patent/DE102012015897A1/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
    • G06F21/53Monitoring 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 by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The method involves detecting executable program code portions of a program code (52) stored in a memory (50), where the code portions are concurrently executable. A security module-specific sequence in which the concurrently executable code portions are sequentially executed is determined based on security module-specific default stored in a security module i.e. data carrier (10), and the program code is sequentially executed in the determined sequence. Security module-specific running time characteristics are displayed during execution of the program code. Independent claims are also included for the following: (1) a method for generating a program code (2) a security module.

Description

Die vorliegende Erfindung betrifft ein Verfahren zum Ausführen von auf einem Sicherheitsmodul ausführbarem Programmcode, ein entsprechendes Sicherheitsmodul, eine Menge solcher Sicherheitsmodule sowie ein Verfahren zum Erzeugen solchen Programmcodes.The present invention relates to a method for executing program code executable on a security module, a corresponding security module, a set of such security modules and a method for generating such 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 Virtuelle 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 portable 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 portable 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. In this case, for example. Specific calculations of the processor of the security module disturbed by the fact that by external action on the security module, for example by means of targeted light flashes on individual memory cells of a memory of the security module, input data or intermediate results of a calculation to be manipulated based on the resulting manipulated results stored in the security module reconnect sensitive data, such as encryption keys.

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 einen 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 Sicherheitsmodule 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 einen Sicherheitsmodule aus einem Anwendungsbereich, beispielsweise eine Kreditkarte, negative Auswirkungen auf die Sicherheit eines Sicherheitsmodules aus einem ganz anderen Bereich, beispielsweise eine SIM-Karte, haben kann.This can also be problematic for a manufacturer in the case in which security modules based on different application areas, for example in the fields of telecommunications, banking, PayTV, etc., are based on an identical product line architecture. 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, so 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 ein 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 den Gegenstand der unabhängigen Ansprüche gelöst. Vorteilhafte Ausgestaltungen und Weiterbildungen sind in den abhängigen Ansprüchen angegeben.This object is solved by the subject matter of the independent claims. Advantageous embodiments and further developments are specified in the dependent claims.

Ein erfindungsgemäßes Verfahren zum Ausführen von ausführbarem Programmcode auf einem Sicherheitsmodul umfasst folgende Schritte: In einem ersten Schritt werden solche ausführbaren Programmcodeanteile des Programmcodes durch das Sicherheitsmodul erkannt, die nebenläufig ausführbar sind. In einem zweiten Schritt wird, ebenfalls durch das Sicherheitsmodul, eine sicherheitsmodulspezifische Reihenfolge festgelegt, in der die nebenläufig ausführbaren Programmcodeanteile bei einer sequentiellen Ausführung des Programmcodes durch das Sicherheitsmodul sequentiell ausgeführt werden sollen. Schließlich wird der Programmcode in einem dritten Schritt sequentiell durch das Sicherheitsmodul ausgeführt, wobei die nebenläufig ausführbaren Programmcodeanteile in der im zweiten Schritt festgelegten Reihenfolge sequentiell ausgeführt werden.A method according to the invention for executing executable program code on a security module comprises the following steps: In a first step, such executable program code portions of the program code are recognized by the security module, which runs concurrently are executable. In a second step, also by the security module, a security module-specific order is determined in which the concurrently executable program code portions are to be executed sequentially in a sequential execution of the program code by the security module. Finally, in a third step, the program code is executed sequentially by the security module, wherein the concurrently executable program code portions are executed sequentially in the order determined in the second step.

Ein erfindungsgemäßes Sicherheitsmodul umfasst einen Speicher und einen Prozessor zum Ausführen von in dem Speicher gespeichertem, ausführbarem Programmcode. Das Sicherheitsmodul zeichnet sich durch eine Erkennungseinrichtung aus. Diese ist eingerichtet, solche ausführbaren Programmcodeanteile des ausführbaren Programmcodes zu erkennen, die nebenläufig ausführbar sind. Weiter umfasst das Sicherheitsmodul erfindungsgemäß eine Reihenfolgenfestlegungseinrichtung, welche eingerichtet ist, eine sicherheitsmodulspezifische Reihenfolge festzulegen, in der die nebenläufig ausführbaren Programmcodeanteile bei einer sequentiellen Ausführung des Programmcodes durch das Sicherheitsmodul sequentiell ausgeführt werden sollen.A security module according to the invention comprises a memory and a processor for executing executable program code stored in the memory. The security module is characterized by a recognition device. This is set up to recognize such executable program code portions of the executable program code, which are concurrently executable. Furthermore, the security module according to the invention comprises an order setting device, which is set up to define a security module-specific order in which the concurrently executable program code portions are to be executed sequentially in a sequential execution of the program code by the security module.

Eine erfindungsgemäße Menge solcher Sicherheitsmodule umfasst zumindest zwei Gruppen von Sicherheitsmodulen, wobei jede dieser Gruppen wiederum zumindest ein Sicherheitsmodul umfasst. Der jeweils in einem Speicher eines Sicherheitsmoduls gespeicherte, ausführbare Programmcode ist für jedes Sicherheitsmodul der Menge zumindest bezüglich der Anordnung nebenläufig ausführbarer Programmcodeanteile identisch. In der Regel stimmt der in das Sicherheitsmoduln verschiedener Gruppen gespeicherte, ausführbare Programmcode vollständig überein. Abweichungen im Programmcode rühren allenfalls von einer Optimierung einzelner Programmcodeanteile für Sicherheitsmodule vorgegebener Gruppen her, die nachfolgend näher beschrieben wird. Jedoch unterscheiden sich jeweils zwei Sicherheitsmodule aus unterschiedlichen der Gruppen von Sicherheitsmodulen, auch bei darin identisch vorliegendem Programmcode, hinsichtlich deren Laufzeitverhalten beim Ausführen des Programmcodes.An inventive set of such security modules comprises at least two groups of security modules, each of these groups in turn comprising at least one security module. The executable program code stored in each case in a memory of a security module is identical for each security module of the set at least with respect to the arrangement of concurrently executable program code portions. In general, the executable program code stored in the security module of various groups is completely the same. Deviations in the program code result from optimizing individual program code portions for security modules of predefined groups, which will be described in more detail below. However, two security modules each differ from different groups of security modules, even if the program code is identically present, with regard to their runtime behavior when executing the program code.

Das erfindungsgemäße Festlegen das Sicherheitsmodulspezifischen Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile bei einer sequentiellen Ausführung des Programmcodes ausgeführt werden, bestimmt das Laufzeitverhalten der durch den ausführbaren Programmcode bereitgestellten Funktionalität. Es versteht sich, dass die Festlegung der Reihenfolge dabei derart erfolgt, dass die Gesamtfunktionalität, welche durch den ausgeführten Programmcode bereitgestellt wird, nicht beeinträchtig wird und für jede der möglichen, festlegbaren Reihenfolgen identisch ist.The inventive setting the security module-specific order in which the concurrently executable program code portions are executed in a sequential execution of the program code determines the runtime behavior of the functionality provided by the executable program code. It is understood that the order is determined in such a way that the overall functionality provided by the executed program code is not affected and is identical for each of the possible determinable sequences.

Da jede festgelegte Reihenfolge sicherheitsmodulspezifisch ist, d. h. gruppenspezifisch oder sogar sicherheitsmodulindividuell, zeigt ein Sicherheitsmodul einer ersten Gruppe beim Ausführen des Programmcodes ein anderes Laufzeitverhalten als ein Sicherheitsmodul einer zweiten Gruppe beim Ausführen des Programmcodes.Since each specified sequence is security module specific, i. H. group-specific or even security module-individual, a security module of a first group when running the program code shows a different runtime behavior than a security module of a second group when executing the program code.

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.

Wie bereits erwähnt, erfolgt das Festlegen einer sicherheitsmodulspezifischen Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile sequentiell ausgeführt werden sollen, derart, dass sich beim Ausführen des Programmcodes ein Sicherheitsmodulspezifisches Laufzeitverhalten zeigt.As already mentioned, the setting of a security-module-specific sequence in which the concurrently executable program code portions are to be carried out sequentially, is such that a security module-specific runtime behavior is displayed when executing the program code.

Gemäß einer ersten bevorzugten Ausführungsform des Verfahrens erfolgt das Festlegen dieser sicherheitsmodulspezifischen Reihenfolge, zumindest teilweise, randomisiert. Das bedeutet, dass zufällig erzeugte Werte das Festlegen der Reihenfolge zumindest beeinflussen. Dazu kann das Sicherheitsmodul bzw. die Reihenfolgenfestlegungseinrichtung des Sicherheitsmoduls beispielsweise auf einen (Pseudo)-Zufallsgenerator im Sicherheitsmodul zurückgreifen. Eine solche zufällige Ausführungsreihenfolge ist für einen Angreifer nicht vorhersehbar und nicht reproduzierbar. Dies erschwert bereits einen Angriff auf ein einzelnes Sicherheitsmodul, da Messwerte, welche das Laufzeitverhalten betreffen und welche während der Ausführung des Programmcodes erfasst werden, wie beispielsweise partielle Laufzeiten, Abstrahlung, Stromverbrauch, Belegung einzelner Speicherzellen oder Register, etc., für jede Ausführung des Programmcodes verschieden ausfallen können. Weiterhin ist die Wahrscheinlichkeit, dass die Ausführungsreihenfolge, die für einen zweites Sicherheitsmodul oder ein Sicherheitsmodul einer zweiten Gruppe – ebenfalls zufallsbasiert – festgelegt wird, mit der für ein erstes Sicherheitsmodul einer ersten Gruppe festgelegten übereinstimmt, zu vernachlässigen.According to a first preferred embodiment of the method, the setting of this security module-specific sequence takes place, at least partially, randomized. This means that randomly generated values at least influence the setting of the order. For this purpose, the security module or the sequence setting device of the security module can, for example, fall back on a (pseudo) random generator in the security module. Such a random execution order is unpredictable to an attacker and not reproducible. This already complicates an attack on a single security module, since measured values which relate to the runtime behavior and which are detected during the execution of the program code, such as partial runtime, radiation, power consumption, occupancy of individual memory cells or registers, etc., for each execution of the program code may be different. Furthermore, the probability that the execution order, which is defined for a second security module or a security module of a second group, also based on randomness, which corresponds to that defined for a first security module of a first group, is negligible.

Gemäß einer zweiten bevorzugten Ausführungsform des Verfahrens kann das Festlegen einer sicherheitsmodulspezifischen Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile sequentiell ausgeführt werden sollen, zumindest teilweise auf Basis einer in dem Sicherheitsmodul gespeicherten, sicherheitsmodulspezifischen Vorgabe erfolgen. Eine solche Vorgabe kann beispielsweise im Rahmen einer Personalisierung in das Sicherheitsmodul eingebracht werden. Die Vorgabe kann, wie erwähnt, gruppenspezifisch oder sicherheitsmodulindividuell sein.According to a second preferred embodiment of the method, specifying a security module-specific order in which the concurrently executable program code portions are to be executed sequentially may be based, at least in part, on a security module-specific one stored in the security module Default. Such a specification can be introduced, for example, as part of a personalization in the security module. The specification can, as mentioned, be group-specific or security-module-individual.

In diesem Fall wäre die Ausführungsreihenfolge der entsprechenden Programmcodeanteile für jedes Ausführen des Programmcodes konstant. Es kann zusätzlich vorgesehen sein, dass die Vorgabe, beispielsweise in regelmäßigen oder unregelmäßigen Abständen oder in Abhängigkeit der Häufigkeit, mit der der Programmcode ausgeführt wird, geändert wird. Eine solche Änderung kann durch das Sicherheitsmodul selbst erfolgen oder von außen initiiert werden, beispielsweise durch einen Nutzer des Sicherheitsmoduls oder eine das Sicherheitsmodul ausgebende Stelle. Eine Änderung durch die ausgebende Stelle kann beispielsweise dann erfolgen, wenn das Sicherheitsmodul über ein Terminal mit dieser Stelle in Kontakt tritt.In this case, the execution order of the respective program code portions would be constant for each execution of the program code. It may additionally be provided that the specification is changed, for example at regular or irregular intervals or depending on the frequency with which the program code is executed. Such a change can be made by the security module itself or initiated from the outside, for example by a user of the security module or a body issuing the security module. A change by the issuing body can take place, for example, when the security module comes in contact with this body via a terminal.

Es versteht sich, dass beide Ausführungsformen nicht in reiner Form vorliegen müssen, sondern „gemischt” werden können. D. h. die Ausführungsreihenfolge kann sowohl auf zufällig erzeugten Werten als auch auf in dem Sicherheitsmodul gespeicherten, deterministischen Vorgaben beruhen. Es ist schließlich möglich, dass ein Sicherheitsmodul beide Ausführungsformen unterstützt und verwendet. Dabei kann, beispielsweise in regelmäßigen oder unregelmäßigen Abständen oder auf eine externe Eingabe hin, von einer zur anderen Ausführungsform oder zu einer Mischform gewechselt werden.It is understood that both embodiments need not be in pure form, but can be "mixed". Ie. the execution order may be based on both randomly generated values and deterministic presets stored in the security module. Finally, it is possible for a security module to support and use both embodiments. It can be changed, for example, at regular or irregular intervals or to an external input, from one to another embodiment or to a mixed form.

Sofern das Sicherheitsmodul in der Lage ist, anhand des ausführbaren Programmcodes zu erkennen, dass ein wiederholtes Ausführen eines der als nebenläufig ausführbar erkannten, ausführbaren Programmcodeanteile die Gesamtfunktionalität des Programmcodes nicht beeinträchtigt, kann diese Erkenntnis zusätzlich verwendet werden, um das Laufzeitverhalten beim Ausführen des Programmcodes zu variieren – und damit sicherheitsmodulindividuell zu gestalten. Ein oder mehrere entsprechende Programmcodeanteile können, beispielsweise zufallsbasiert, ausgewählt und bei einer Ausführung des Programmcodes mehrfach ausgeführt werden, wobei die entsprechende Anzahl wiederum, vorzugsweise randomisiert, variieren kann.If the security module is able to recognize from the executable program code that repeatedly executing one of the executable program code portions recognized as concurrently executable does not affect the overall functionality of the program code, that knowledge may additionally be used to match the runtime behavior in executing the program code vary - and thus customize the security module. One or more corresponding program code portions may be selected, for example randomly, and executed a plurality of times during execution of the program code, wherein the corresponding number may in turn vary, preferably randomized.

Schließlich ist es möglich, dass das Sicherheitsmodul das Ausführen eines als nebenläufig erkannten Programmcodeanteils während des Ausführens des Programmcodes, vorzugsweise randomisiert, verzögert. Auch dadurch ergibt sich eine Möglichkeit, ein beobachtbares Laufzeitverhalten zu variieren.Finally, it is possible for the security module to delay the execution of a code code portion identified as being concurrent during the execution of the program code, preferably randomly. This also provides a way to vary an observable runtime behavior.

Der Schritt des Erkennens solcher ausführbaren Programmcodeanteile des Programmcodes, die nebenläufig ausführbar sind, kann auf verschiedene Arten erfolgen.The step of recognizing such executable program code portions of the program code which are concurrently executable may be done in various ways.

Gemäß einer ersten Variante können beispielsweise aus dem Gebiet des Compilerbaus bekannte Techniken verwendet werden, um ausführbaren Programmcode mit dem Ziel des Auffinden und Separieren nebenläufig ausführbarer Anteile zu analysieren. Entsprechende Funktionalitäten können durch die Erkennungseinrichtung des Sicherheitsmoduls implementiert sein. Auf diese Weise wird es beispielsweise möglich, dass ausführbarer Programmcode, welcher ursprünglich zum Ausführen auf einer Mehrkern- oder Mehrprozessorarchitektur erzeugt worden ist, um dort parallel ausgeführt zu werden, auf einem erfindungsgemäßen Sicherheitsmodul – sequentiell – gemäß dem erfindungsgemäßen Verfahren ausgeführt wird. Dazu werden diejenigen Programmcodeanteile, die zum parallelen Ausführen auf beispielsweise mehreren Prozessoren vorgesehen waren, d. h. von einem entsprechenden Compiler erzeugt worden sind, erfindungsgemäß als nebenläufig ausführbar erkannt – und nachfolgend sequentiell gemäß der festgelegten, sicherheitsmodulspezifischen Reihenfolge ausgeführt. Ebenso ist es möglich, dass der Programmcode bereits zur sequentiellen Ausführung erzeugt worden ist, gleichwohl aber nebenläufig ausführbare Programmcodeanteile umfasst. Gemäß dem Programmcode sind diese Anteile in einer vorgegebenen Reihenfolge zur sequentiellen Ausführung angeordnet. Erfindungsgemäß können diese Programmcodeanteile erkannt und deren Ausführungsreihenfolge sicherheitsmodulspezifisch neu festgelegt werden. Damit wird ein Sicherheitsmodulspezifisches Laufzeitverhalten beim Ausführen des Programmcodes erreicht, ohne dass der Programmcode an sich sicherheitsmodulspezifisch ausgebildet sein muss.According to a first variant, techniques known from the field of compiler construction, for example, can be used to analyze executable program code with the aim of finding and separating concurrently executable portions. Corresponding functionalities can be implemented by the recognition device of the security module. In this way, it becomes possible, for example, that executable program code which was originally generated for execution on a multi-core or multiprocessor architecture in order to be executed there in parallel is executed on a security module according to the invention - sequentially - in accordance with the method according to the invention. For this purpose, those program code portions intended to be executed in parallel on, for example, a plurality of processors, i. H. have been generated by a corresponding compiler, according to the invention recognized as concurrently executable - and subsequently executed sequentially according to the specified, security module-specific order. It is also possible that the program code has already been generated for the sequential execution, but nevertheless comprises sub-executable program code portions. According to the program code, these portions are arranged in a predetermined order for sequential execution. According to the invention, these program code portions can be recognized and their execution order can be newly defined in a security module-specific manner. Thus, a security module-specific runtime behavior is achieved when executing the program code, without the program code itself must be designed security module specific.

Gemäß einer zweiten Variante können die nebenläufig ausführbaren Programmcodeanteile von dem Sicherheitsmodul dadurch als nebenläufig ausführbar erkannt werden, dass diese Anteile in dem ausführbaren Programmcode bereits als nebenläufig ausführbar gekennzeichnet sind. D. h. der durch das Sicherheitsmodul auszuführende ausführbare Programmcode ist eigens für diese Variante erzeugt bzw. angepasst worden. Das Erkennen der nebenläufig ausführbaren Programmcodeanteile durch die Erkennungseinrichtung des Sicherheitsmoduls erfordert dann keine komplexe Analyse des Programmcodes mehr. Dies ist insbesondere für Sicherheitsmodule mit beschränkten Ressourcen, wie beispielsweise Chipkarten, vorteilhaft.According to a second variant, the concurrently executable program code portions can be recognized by the security module as concurrently executable that these portions are already identified as executable in the executable program code. Ie. the executable program code to be executed by the security module has been specially created or adapted for this variant. The recognition of the concurrently executable program code portions by the detection device of the security module then no longer requires a complex analysis of the program code. This is particularly advantageous for security modules with limited resources, such as smart cards.

Ein erfindungsgemäßes Verfahren zum Erzeugen von ausführbarem Programmcode, welcher vorteilhaft gemäß der zuletzt beschriebenen Variante des Verfahrens zum Ausführen des Programmcodes ausgeführt werden kann, umfasst folgende Schritte:
In einem ersten Schritt wird ein dem Programmcode zugrunde liegender Quellcode, vorzugsweise in einer Hochsprache, wie z. B. „C”, „Java” oder dergleichen, bereitgestellt. 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.
An inventive method for generating executable program code, which advantageously according to the last-described variant The method for executing the program code may include the following steps:
In a first step, the program code underlying source code, preferably in a high-level language, such as. "C", "Java" or the like. 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. Erfindungsgemäß werden im Schritt des Erzeugen des ausführbaren Programmcodes ausführbare Programmcodeanteile, die zuvor ermittelten, nebenläufig ausführbaren Anteilen entsprechen, als nebenläufig ausführbar gekennzeichnet. Die Art der Kennzeichnung kann variieren. Bekannte Kennzeichnungs- oder Codierungstechniken können verwendet werden.In a further step, executable program code is generated from the source code. According to the invention, in the step of generating the executable program code, executable program code portions that correspond to previously determined concurrently executable portions are identified as being executable concurrently. The type of labeling can vary. Known labeling or coding techniques can be used.

In einem optionalen Schritt können die als nebenläufig ausführbar gekennzeichneten, ausführbaren Programmcodeanteile für eine sequenzielle Ausführbarkeit des erzeugten Programmcodes angeordnet werden. Dieser Schritt kann eine Modifikation der Programmcodeanteile umfassen. Eine solche Modifikation kann beispielsweise dazu dienen, ursprünglich zur parallelen Ausführung auf einer Mehrkern- oder Mehrprozessorarchitektur vorgesehenen Programmcode für eine sequentielle Ausführung anzupassen, falls dies notwendig ist.In an optional step, the executable code portions designated as concurrently executable may be arranged for sequential executability of the generated program code. This step may include a modification of the program code portions. Such a modification may be used, for example, to adapt, if necessary, initially for parallel execution on multicore or multiprocessor architecture, program code for sequential execution.

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” mit Bezug auf das erfindungsgemäße Verfahren zum Erzeugen vom Programmcode und die Formulierung „Erkennen von ausführbaren Programmcodeanteilen, die nebenläufig ausführbar sind” mit Bezug auf das erfindungsgemäße Verfahren zum Ausführen vom Programmcode umfasst somit jede dieser Arten von global und/oder relativ zu anderen Anteilen nebenläufig ausführbaren Anteilen. Wie aus dem Vorstehenden ersichtlich, ist der Begriff „Ermitteln von nebenläufig ausführbaren Anteilen” breiter zu verstehen und umfasst den Begriff des „Erkennens von Programmcodeanteilen, die nebenläufig ausführbar sind”. Das „Ermitteln” kann, wie beschrieben, auf einer oder mehreren Stufen (Quellcode, Zwischencode, ausführbarer Programmcode) stattfinden, das „Erkennen” erfolgt lediglich anhand des vorliegenden, erzeugten ausführbaren Programmcodes.The general formulation "determining concurrently executable portions" with reference to the inventive method for generating the program code and the phrase "recognizing executable program code portions which are concurrently executable" with reference to the inventive method for executing the program code thus comprises each of these types of globally and / or relative to other units of concurrent shares. As can be seen from the above, the term "determining concurrent shares" is to be understood more broadly and includes the concept of "recognizing code portions that are concurrently executable". The "determination" can, as described, take place on one or more stages (source code, intermediate code, executable program code), the "recognition" is carried out only on the basis of the existing, generated executable program code.

Weiter gilt, dass im Schritt des Festlegens der datenspezifischen Ausführungsreihenfolge im Verfahren zum Ausführen von Programmcode, die Art und der Umfang der nebenläufigen Ausführbarkeit beachtet werden. D. h. eine sicherheitsmodulspezifische Festlegung einer Position eines ausführbaren Programmcodeanteils innerhalb einer Reihenfolge ausführbarer Programmcodeanteile im erzeugten Programmcode zur nachfolgenden sequentiellen Ausführbarkeit erfolgt stets relativ zu den entsprechenden, mit Bezug auf diesen ausführbaren Programmcodeanteil nebenläufig ausführbaren Programmcodeanteilen.Further, in the step of specifying the data-specific execution order in the process of executing program code, the kind and the scope of concurrent executability are considered. Ie. A safety-module-specific definition of a position of an executable program code portion within an order of executable program code portions in the generated program code for subsequent sequential executability is always relative to the corresponding program code portions concurrently executable with respect to that executable program code portion.

Im Rahmen des Schritts des Ermitteln von nebenläufig ausführbaren Anteilen im Verfahren zur Erzeugung vom Programmcode 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, späteren Ausführungsreihenfolgen entsprechender Anteile bei einer sequentiellen Ausführung des entsprechenden Programmcodes. As part of the step of determining concurrent shares in the program code generation process, 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 greater this number is chosen or given, the greater the number of possible, later execution sequences of corresponding shares in a sequential execution of the corresponding program code.

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. Dies erlaubt auf besonders einfache Weise, nebenläufig ausführbare Programmcodeanteile zu kennzeichnen. Es muss lediglich die Tabelle gekennzeichnet werden. Ebenfalls vereinfacht wird gemäß dieser Ausführungsform mit Blick auf das beschriebene Verfahren zum Ausführen des Programmcodes das Festlegen einer Ausführungsreihenfolge der entsprechenden, nebenläufig ausführbaren Programmcodeanteile. Diese Reihenfolge kann beispielsweise bereits durch eine Permutation der Tabelleneinträge definiert und festgelegt werden.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. This allows a particularly simple way to identify concurrently executable program code portions. All you have to do is mark the table. Also, according to this embodiment, in view of the described method of executing the program code, it is simplified to set an execution order of the corresponding concurrently executable program code portions. For example, this order can already be defined and defined by a permutation of the table entries.

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 Erzeugens des ausführbaren Programmcodes hinsichtlich zumindest eines vorgegebenen Parameters optimiert werden. Bevorzugte Parameter sind beispielsweise Laufzeit und/oder Speicherbedarf. Diese Optimierung kann vor oder nach das 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 Erzeugens 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 Verfahrens zum Erzeugen des Programmcodes 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 for generating the program code, 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 parallel generating on a multi-core and / or multi-processor architecture executable program code 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, according to the invention "misappropriated" by using this device generated in parallel on a multiprocessor architecture executable program code is used 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 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, zu kennzeichnen. Optional können diese Anteile, wie erwähnt, für eine sequentielle Ausführung auf einem Sicherheitsmodul mit nur einem Prozessor modifiziert und angeordnet werden.Finally, in order to generate the sequentially executable program code according to the invention, it is only necessary to mark the components provided by the device for a respectively parallel execution, such as, for example, threads which can be executed in parallel or the like. Optionally, as mentioned, these portions may be modified and arranged for sequential execution on a single-processor security module.

Im Rahmen des Verfahrens zum Ausführen des Programmcodes wird dann 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 Festlegung der Reihenfolge der Ausführung parallelisierbarer Anteile zur sequentiellen Ausführung noch verstärkt wird.In the context of the method for executing the program code, an alleged disadvantage of parallel programming, namely the necessarily resulting, not exactly predictable runtime behavior of a corresponding, parallelized application, is converted according to the invention into an advantage, namely by the unpredictability of the runtime behavior, which according to the invention is a security feature of the security module is reinforced by a security module-specific determination of the order of execution of parallelizable shares for sequential execution.

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 erfindungsgemäßen Datenträgers; 1 a preferred embodiment of a data carrier according to the invention;

2 eine bevorzugte Ausführungsform einer erfindungsgemäßen Menge von Datenträgern, unterteilt in einzelne Gruppen, mit dem Datenträger aus 1 als Element einer ersten Gruppe; 2 a preferred embodiment of a set of data carriers according to the invention, divided into individual groups, with the disk 1 as an element of a first group;

3 Schritte einer bevorzugten Ausführungsform eines erfindungsgemäßen Verfahrens zum Ausführen von Programmcode; 3 Steps of a preferred embodiment of a method according to the invention for executing program code;

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

5A bis 5C Ergebnisse einzelner Teilschritte von Verfahrensschritten aus 3 und 4. 5A to 5C Results of individual substeps of process steps 3 and 4 ,

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 ausführbaren Programmcode 52. Gemäß einer Variante kann dieser Programmcode, wie nachfolgend mit Bezug auf die 4 bis 5C beschrieben, erzeugt worden sein. Weiter umfasst der Speicher 50 eine Erkennungseinrichtung 54, welche in der Regel als Softwareapplikation vorliegt. Die Erkennungseinrichtung 54 ist, wie mit Bezug auf die 3 und 5A bis 5C nachstehend detailliert beschrieben, eingerichtet, solche ausführbaren Programmcodeanteile B, C, D (vgl. 5A) des ausführbaren Programmcodes 52 zu erkennen, die nebenläufig ausgeführt werden können. Weiter umfasst der Speicher 50 eine in der Regel ebenfalls als Softwareapplikation bereitgestellte Reihenfolgenfestlegungseinrichtung 56. Diese ist, wie nachstehend mit Bezug auf 3 beschrieben, eingerichtet, eine datenträgerspezifische Reihenfolge festzulegen, in der die nebenläufig ausführbaren Programmcodeanteile B, C, D bei einer sequentiellen Ausführung des Programmcodes 52 durch den Datenträger 10 sequentiell ausgeführt werden sollen (vgl. 3, 5A–C).The memory 50 Includes executable program code 52 , According to a variant, this program code, as described below with reference to the 4 to 5C described, generated. Next includes the memory 50 a recognition device 54 , which is usually available as a software application. The recognition device 54 is how with respect to the 3 and 5A to 5C described in detail below, such executable program code portions B, C, D (see. 5A ) of the executable program code 52 to recognize, which can be executed concurrently. Next includes the memory 50 a sequence determination device, which is usually also provided as a software application 56 , This is as below with reference to 3 described, set to specify a volume-specific order in which the concurrently executable program code portions B, C, D in a sequential execution of the program code 52 through the disk 10 should be executed sequentially (see. 3 . 5A -C).

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 2 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 bereitgestellt wird, jeweils ein gruppenspezifisches Laufzeitverhalten aufweist. Die durch den Programmcode 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. Das gruppenspezifische, jeweils unterschiedliche Laufzeitverhalten beruht, wie nachfolgend mit Bezug auf 3 beschrieben, darauf, dass die jeweils in den Datenträgern 10, 10', 10'' vorliegende Reihenfolgenfestlegungseinrichtung 56, 56', 56'' die Reihenfolge, in der nebenläufig ausführbare Programmcodeanteile B, C, D bei einer sequentiellen Ausführung des Programmcodes 52 ausgeführt werden, gruppenspezifisch festlegt. Diese Festlegung erfolgt erst zur Laufzeit, d. h. während der Ausführung des Programmcodes 52. Ein Ausführen kann dabei, wie erwähnt, auch ein Interpretieren umfassen. As in 2 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 is provided, each having a group-specific runtime behavior. The by the program code 52 provided functionality is however for all volumes 10 . 10 ' . 10 '' the crowd 100 of media, regardless of group membership 101 . 102 . 103 , identical. The group-specific, respectively different runtime behavior is based, as described below with reference to 3 described, that in each case in the data carriers 10 . 10 ' . 10 '' present order setting means 56 . 56 ' . 56 '' the sequence in the concurrently executable program code portions B, C, D in a sequential execution of the program code 52 be executed, group-specific determines. This determination is made at runtime, ie during execution of the program code 52 , As mentioned, an execution may also include an interpretation.

Mit Bezug auf 3 werden im Folgenden einzelne Schritte eines Verfahrens zum Ausführen von ausführbarem Programmcode 52 auf dem Datenträger 10 beschrieben.Regarding 3 In the following, individual steps of a method for executing executable program code will be described 52 on the disk 10 described.

In einem ersten Schritt T1 analysiert die Erkennungseinrichtung 54 des Datenträgers 10 den Programmcode 52 zum Erkennen nebenläufig ausführbarer Programmcodeanteile B, C, D.In a first step T1, the recognition device analyzes 54 of the disk 10 the program code 52 for recognizing concurrently executable program code portions B, C, D.

Dabei kann die Erkennungseinrichtung 54 grundsätzlich eingerichtet sein, zur sequentiellen oder parallelen Ausführung erzeugten, ausführbaren Programmcode 52 mittels bekannter, nachstehend mit Bezug auf die 3A bis 3C mit Bezug auf Schritt S2 des Verfahrens aus 4 beschriebener Verfahren zu untersuchen und dabei nebenläufig ausführbare Programmcodeanteile B, C, D zu erkennen.In this case, the detection device 54 be established in principle, generated for sequential or parallel execution, executable program code 52 by means of known, hereinafter with reference to the 3A to 3C with reference to step S2 of the method 4 to investigate procedures described concurrently executable program code portions B, C, D.

Gemäß einer bevorzugten Variante erkennt die Erkennungseinrichtung 54 nebenläufig ausführbare Programmcodeanteile B, C, D allerdings daran, dass diese im Programmcode 52 bereits als solche, d. h. als nebenläufig ausführbar, explizit gekennzeichnet sind. Die Art der Kennzeichnung kann dabei variieren. Ein entsprechender Programmcode 52, der bereits als nebenläufig ausführbar gekennzeichnete Programmcodeanteile B, C, D, umfasst, kann beispielsweise mit einem Verfahren, welches nachfolgend mit Bezug auf 4 beschrieben wird, erzeugt werden.According to a preferred variant, the recognition device recognizes 54 concurrently executable program code portions B, C, D, however, because they are in the program code 52 already explicitly marked as such, ie as concurrently executable. The type of labeling can vary. An appropriate program code 52 which already comprises code code portions B, C, D identified as executable in a concurrently executable manner, can be obtained, for example, by a method which is described below with reference to FIG 4 will be generated.

In einem weiteren Schritt T2 des Verfahrens zum Ausführen des Programmcodes 52 auf dem Datenträger 10 legt die Reihenfolgenfestlegungseinrichtung 56 die Reihenfolge fest, in der die in Schritt T1 als nebenläufig ausführbar erkannten Programmcodeanteile B, C, D bei einer sequentiellen Ausführung des Programmcodes 52 in dem Datenträger 10 ausgeführt werden sollen. Diese Festlegung erfolgt zur Laufzeit. Die festgelegte Ausführungsreihenfolge ist dabei spezifisch für den Datenträger 10 bzw. die Gruppe 101, der der Datenträger 10 angehört, und unterscheidet sich von einer für einen Datenträger 10', 10'' einer anderen Gruppe 102, 103 festgelegten Reihenfolge. Damit wird das Ziel erreicht, dass Datenträger 10, 10', 10'' verschiedener Gruppen 101, 102, 103 beim Ausführen des gleichen Programmcodes 52 jeweils ein unterschiedliches Laufzeitverhalten aufweisen, mithin die während der Ausführung für einen Angreifer messbaren oder beobachtbaren Parameter, wie beispielsweise Stromverbrauch oder Abstrahlung des Datenträgers, jeweils unterschiedlich sind.In a further step T2 of the method for executing the program code 52 on the disk 10 sets the order setting means 56 determines the sequence in which the program code portions B, C, D recognized as concurrently executable in step T1 in a sequential execution of the program code 52 in the disk 10 to be executed. This determination is made at runtime. The specified execution order is specific to the volume 10 or the group 101 that the volume 10 is different, and different from one for a volume 10 ' . 10 '' another group 102 . 103 specified order. This achieves the goal that disks 10 . 10 ' . 10 '' different groups 101 . 102 . 103 when executing the same program code 52 each have a different runtime behavior, therefore, during the execution of an attacker measurable or observable parameters, such as power consumption or radiation of the data carrier, each are different.

Gemäß einer ersten Variante legt die Reihenfolgenfestlegungseinrichtung 56 diese Ausführungsreihenfolge bei jeder Ausführung des Programmcodes 52 neu fest. Bevorzugt erfolgt die Festlegung zumindest teilweise randomisiert, d. h. unter Einsatz (pseudo-)zufällig erzeugter Werte. Dazu kann der Datenträger 10 einen Zufallsgenerator (nicht gezeigt) umfassen.According to a first variant, the order setting means sets 56 this execution order with each execution of the program code 52 new firm. Preferably, the determination is carried out at least partially randomized, ie using (pseudo-) randomly generated values. This can be the disk 10 a random number generator (not shown).

Gemäß einer zweiten Variante erfolgt die Festlegung deterministisch. In der Regel ist diese Festlegung dann für mehrere aufeinanderfolgende Ausführungen des Programmcodes 52 konstant. Dies kann beispielsweise dadurch erreicht werden, dass der Algorithmus, der zur Festlegung der Reihenfolge verwendet wird, durch die Reihenfolgenfestlegungseinrichtung 56 vollständig bestimmt ist und – bis auf die Anzahl der jeweils nebenläufig ausführbaren Programmcodeanteile B, C, D – keine weiteren Eingaben benötigt. Eine deterministische Festlegung kann alternativ auf einer in dem Datenträger 10 gespeicherten Vorgabe (nicht gezeigt) beruhen. Andere Arten der deterministischen Festlegung sind möglich.According to a second variant, the determination is deterministic. As a rule, this definition is then for several consecutive executions of the program code 52 constant. This can be achieved, for example, by using the algorithm used to determine the order by the order setting means 56 is completely determined and - except for the number of concurrently executable program code portions B, C, D - no further input needed. A deterministic determination may alternatively be made to one in the volume 10 stored preset (not shown) are based. Other types of deterministic determination are possible.

Gemäß einer dritten Variante werden sowohl zufällige als auch deterministische Eingaben verwendet, um die Ausführungsreihenfolge festzulegen.According to a third variant, both random and deterministic inputs are used to determine the execution order.

Es ist möglich, dass Regeln oder Vorgaben, welche die Reihenfolgenfestlegungseinrichtung 56 zur Festlegung der Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile B, C, D bei einer sequentiellen Ausführung des Programmcodes 52 ausgeführt werden sollen, von Zeit zu Zeit geändert werden. Dies kann aufgrund verschiedener Ereignisse erfolgen, beispielsweise als Folge einer entsprechenden Änderungseingabe eines Nutzers des Datenträgers 10, aufgrund einer Datenkommunikation mit einer den Datenträger 10 ausgebenden Stelle oder dergleichen. Ein anderes Ereignis kann ein erkannter oder vermuteter Angriff auf den Datenträger 10 sein. Eine Änderung der Regel und/oder Vorgaben kann aber auch abhängig von einer Anzahl erfolgter Ausführungen des Programmcodes 52 durch den Datenträger 10 sein oder aber zu regelmäßig oder unregelmäßig, z. B. zufällig gewählten Zeitpunkten erfolgen.It is possible that rules or prescriptions which the order setting means 56 for determining the order in which the concurrently executable program code portions B, C, D in a sequential execution of the program code 52 should be changed from time to time. This can be due to various events, for example, as a result of a corresponding change input by a user of the disk 10 , due to a data communication with the disk 10 issuing body or the like. Another event may be a detected or suspected attack on the disk 10 be. However, a change in the rule and / or specifications may also depend on a number of executions of the program code 52 through the disk 10 be or too regular or irregular, z. B. happen at random times.

In einem dritten Schritt T3 schließlich wird der Programmcode 52 auf dem Datenträger 10 sequentiell ausgeführt. Dabei werden die nebenläufig ausführbaren Programmcodeanteile in der wie vorstehend beschrieben festgelegten Reihenfolge sequentiell ausgeführt. Das Interpretieren oder Ausführen des Programmcodes 52 kann dabei, abhängig von der Art des Programmcodes 52, durch einen Virtuellen Prozessor (nicht gezeigt), beispielsweise eine Virtuelle Maschine, erfolgen, falls der Programmcode 52 beispielsweise als Byte-Code vorliegt, oder durch den Prozessor 30 des Datenträgers 10, wenn der Programmcode 52 dafür erzeugt worden ist.Finally, in a third step T3, the program code 52 on the disk 10 executed sequentially. In this case, the concurrently executable program code portions are sequentially executed in the order set as described above. Interpreting or executing the program code 52 can do this, depending on the type of program code 52 , by a virtual processor (not shown), for example a virtual machine, if the program code 52 for example, as a byte code, or by the processor 30 of the disk 10 if the program code 52 has been created for it.

Mit Bezug auf 4 werden im Folgenden einzelne Schritte eines Verfahrens zum Erzeugen eines ausführbaren Programmcodes 52 für den Datenträger 10 beschrieben, welcher geeignet ist, mit den vorstehend mit Bezug auf 3 beschriebenen Verfahren auf dem Datenträger 10 ausgeführt zu werden.Regarding 4 In the following, individual steps of a method for generating an executable program code will be described 52 for the disk 10 which is suitable, with the above with reference to 3 described method on the disk 10 to be executed.

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 S31 nebenläufig ausführbare Anteile, wie bereits erwähnt, als solche gekennzeichnet werden. In einem optionalen Teilschritt S32 können die als nebenläufig ausführbar gekennzeichneten Programmcodeanteile für eine sequentielle Ausführung des erzeugten Programmcodes 52 angeordnet werden. Dieser Schritt kann beispielsweise unterbleiben, wenn die vorstehend beschriebene Erkennungseinrichtung 54 entsprechende Funktionalitäten unterstützt.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 S31 concurrently executable shares, as already mentioned, are characterized as such. In an optional substep S32, the program code portions designated as concurrently executable may be used for a sequential execution of the generated program code 52 to be ordered. This step may be omitted, for example, if the detection device described above 54 supports corresponding functionalities.

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 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, d. H. 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 ist in den 5A bis 5C skizziert.One possible approach for determining concurrent executable shares is in the 5A to 5C 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. Ein Erkennen von nebenläufig ausführbaren Programmcodeanteilen kann allerdings auch auf Basis von bereits erzeugtem. ausführbarem Programmcode (Zwischencode, Maschinencode) erfolgen (vgl. Schritt T1 in 3).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. However, recognizing concurrently executable program code portions may also be based on already generated. executable program code (intermediate code, machine code) (see step T1 in 3 ).

Eine genannte Ü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, wie erwähnt, 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.Said 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 translation, or, as mentioned, only at the level of the machine code, ie at the end of the translation, are determined. Finally, various, concurrently executable shares in different of the phases described above or in more than one phase.

Ein erster Teilschritt während des Ermittelns 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 sub - 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 Übersetzungs- oder Analyseprozess 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 or analysis 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 portions of blocks B, C, and D. None of these blocks require an input that could be directly or indirectly dependent 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 52 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, als solche gekennzeichnet worden, wie dies durch die Schraffur angedeutet ist, und anschließend für eine sequentielle Ausführung angeordnet worden. Die Kennzeichnung ist dabei derart ausgebildet, dass die Reihenfolgenfestlegungseinrichtung 56 beim Festlegen der Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile bei einer sequentiellen Ausführung des Programmcodes 52 ausgeführt werden sollen (vgl. Schritt T2 in 3), erkennen kann, welche Anteile jeweils relativ zueinander nebenläufig ausführbar sind. Im gezeigten Beispiel sind dies die Anteile B, C, D bzw. die Unteranteile F1 bis Fk des Anteils F.Starting from an executable program code generated in such a way for a multiprocessor architecture, sequentially executable program code 52 for a disk 10 be generated with only one processor, as in 3C is illustrated. In this case, the program code portions which correspond to the shares B, C and D or F1, F2,..., Fk respectively determined as concurrently executable have been designated as such, as indicated by the hatching, and subsequently for a sequential one Execution has been arranged. The marking is designed such that the order setting device 56 when determining the order in which the concurrently executable program code portions in a sequential execution of the program code 52 should be executed (see step T2 in 3 ), which parts can be executed in each case relative to each other. In the example shown, these are the components B, C, D or the sub-components F1 to Fk of the component F.

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 Anteile bei einer sequentiellen Ausführung ausgeführt werden.Due to the fact that these shares are executable in parallel, d. H. have no causal relationship to each other, the functionality of the entire program remains identical, regardless of the order in which the shares are executed in a sequential execution.

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 gekennzeichnet und angeordnet werden muss. Alternativ erfolgt hier die 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 als solche gekennzeichnet werden, wie dies in 3C gezeigt ist.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 disassembled and marked and arranged in the manner described in order to generate a sequentially executable version. Alternatively, here the arrangement of the concurrently executable shares 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 are again identified as such, as in 3C is shown.

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. Ein Erkennen von nebenläufig ausführbaren Programmcodeanteilen anhand bereits erzeugten, ausführbaren Programmcodes kann ähnliche Techniken verwenden und unabhängig von einem Übersetzungsprozess erfolgen.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. Recognition of concurrently executable program code portions from already generated executable program codes may use similar techniques and be independent of a translation process.

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.

Solche „sections” können in einzelnen Fällen aber auch auf Ebene des bereits erzeugten, ausführbaren Programmcodes als nebenläufig ausführbar erkannt werden.Such "sections" can be recognized in individual cases but also on the level of the already generated, executable program code as concurrently executable.

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 * 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.

In einzelnen Fällen ist es aber auch möglich, Schleifenstrukturen und ähnliche Konstrukte auf der Ebene des ausführbaren Programmcodes zu erkennen und in die entsprechenden nebenläufig ausführbaren Programmcodeanteile zu zerlegen.In individual cases, however, it is also possible to recognize loop structures and similar constructs at the level of the executable program code and to divide them into the corresponding concurrently executable program code portions.

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, können ein oder mehrere der als nebenläufig ausführbar ermittelten Anteile hinsichtlich eines oder mehrerer Parameter optimiert werden. 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, one or more of the shares determined as concurrently executable can be optimized with respect to one or more parameters. 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.

Claims (15)

Verfahren zum Ausführen von ausführbarem Programmcode (52) auf einem Sicherheitsmodul (10), umfassend die Schritte: – Erkennen (T1) von ausführbaren Programmcodeanteilen (B, C, D) des Programmcodes (52), die nebenläufig ausführbar sind, – Festlegen (T2) einer sicherheitsmodulspezifischen Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile (B, C, D) sequentiell ausgeführt werden sollen und – sequentielles Ausführen (T3) des Programmcodes (52), wobei die nebenläufig ausführbaren Programmcodeanteile (B, C, D) in der festgelegten Reihenfolge sequentiell ausgeführt werden.Method for executing executable program code ( 52 ) on a security module ( 10 ), comprising the steps of: - recognizing (T1) executable program code portions (B, C, D) of the program code ( 52 ), which are concurrently executable, - determining (T2) a security-module-specific order in which the concurrently executable program code portions (B, C, D) are to be executed sequentially and - sequential execution (T3) of the program code ( 52 ), wherein the concurrently executable program code portions (B, C, D) are sequentially executed in the specified order. Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass die nebenläufig ausführbaren Programmcodeanteile (B, C, D) dadurch als nebenläufig ausführbar erkannt werden, dass diese Programmcodeanteile (B, C, D) in dem ausführbaren Programmcode (52) als nebenläufig ausführbar gekennzeichnet sind.A method according to claim 1, characterized in that the concurrently executable program code portions (B, C, D) are recognized as concurrently executable by the fact that these program code portions (B, C, D) are included in the executable program code ( 52 ) are marked as executable. Verfahren nach Anspruch 1 oder 2, dadurch gekennzeichnet, dass das Festlegen einer sicherheitsmodulspezifischen Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile (B, C, D) sequentiell ausgeführt werden sollen, zumindest teilweise randomisiert erfolgt.The method of claim 1 or 2, characterized in that the setting of a security module-specific order in which the concurrently executable program code portions (B, C, D) are to be carried out sequentially, at least partially randomized. Verfahren nach einem der Ansprüche 1 bis 3, dadurch gekennzeichnet, dass das Festlegen einer sicherheitsmodulspezifischen Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile (B, C, D) sequentiell ausgeführt werden sollen, zumindest teilweise auf Basis einer in dem Sicherheitsmodul (10) gespeicherten, sicherheitsmodulspezifischen Vorgabe erfolgt.Method according to one of claims 1 to 3, characterized in that the setting of a security module-specific order in which the concurrently executable program code portions (B, C, D) are to be carried out sequentially, at least partially based on a in the security module ( 10 ) stored, security module specific default is done. Verfahren nach einem der Ansprüche 1 bis 4, dadurch gekennzeichnet, dass das Festlegen einer sicherheitsmodulspezifischen Reihenfolge, in der die nebenläufig ausführbaren Programmcodeanteile (B, C, D) sequentiell ausgeführt werden sollen, derart erfolgt, dass sich beim Ausführen des Programmcodes (52) ein Sicherheitsmodulspezifisches Laufzeitverhalten zeigt.Method according to one of claims 1 to 4, characterized in that the setting of a security module-specific order in which the concurrently executable program code portions (B, C, D) are to be carried out sequentially, takes place such that when executing the program code ( 52 ) shows a security module-specific runtime behavior. 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 Erzeugens des ausführbaren Programmcodes (52) ausführbare Programmcodeanteile, die ermittelten, nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, als nebenläufig ausführbar gekennzeichnet werden (S31).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 generating the executable program code ( 52 ) executable program code portions that correspond to determined concurrently executable portions (B, C, D) are identified as executable (S31). Verfahren nach Anspruch 6, dadurch gekennzeichnet, dass die als nebenläufig ausführbar gekennzeichneten, ausführbaren Programmcodeanteile (B, C, D) für eine sequentielle Ausführbarkeit des Programmcodes (52) angeordnet werden (S32).Method according to Claim 6, characterized in that the executable program code portions (B, C, D) designated as concurrently executable for a sequential executability of the program code ( 52 ) (S32). Verfahren nach einem der Ansprüche 6 oder 7, dadurch gekennzeichnet, dass die als nebenläufig ausführbar gekennzeichneten, ausführbaren Programmcodeanteile (B, C, D) in einer Tabelle angeordnet werden.Method according to one of Claims 6 or 7, characterized in that the executable program code portions (B, C, D) designated as concurrently executable are arranged in a table. Verfahren nach einem der Ansprüche 6 bis 8, dadurch gekennzeichnet, dass zumindest einer der ausführbaren Programmcodeanteile, die nebenläufig ausführbaren Anteilen (B, C, D) entsprechen, hinsichtlich eines vorgegebenen Parameters optimiert wird (S4).Method according to one of Claims 6 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 predetermined parameter (S4). Verfahren nach einem der Ansprüche 6 bis 9, 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 6 to 9, 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 adapted to generate on a multi-core or multiprocessor architecture parallel executable program code is set up. Sicherheitsmodul (10), umfassend einen Speicher (40; 50; 60) und einen Prozessor (30) zum Ausführen von in dem Speicher (50) gespeichertem, ausführbarem Programmcode (52), gekennzeichnet durch eine Erkennungseinrichtung (54), die eingerichtet ist, solche ausführbaren Programmcodeanteile (B, C, D) des ausführbaren Programmcodes (52) zu erkennen, die nebenläufig ausgeführt werden können, sowie eine Reihenfolgenfestlegungseinrichtung (56), die eingerichtet ist, eine sicherheitsmodulspezifische Reihenfolge festzulegen, in der die nebenläufig ausführbaren Programmcodeanteile (B, C, D) bei einer sequentiellen Ausführung des Programmcodes (52) durch das Sicherheitsmodul (10) sequentiell ausgeführt werden sollen.Security module ( 10 ), comprising a memory ( 40 ; 50 ; 60 ) and a processor ( 30 ) for executing in the memory ( 50 stored, executable program code ( 52 ), characterized by a recognition device ( 54 ), which is set up such executable program code portions (B, C, D) of the executable program code ( 52 ), which can be executed concurrently, as well as an order setting device ( 56 ), which is set up to define a security-module-specific order in which the concurrently executable program code portions (B, C, D) are executed during a sequential execution of the program code ( 52 ) through the security module ( 10 ) should be executed sequentially. Sicherheitsmodul (10) nach Anspruch 11, dadurch gekennzeichnet, dass die Erkennungseinrichtung (54) eingerichtet ist, nebenläufig ausführbare Programmcodeanteile (B, C, D) des Programmcodes (52) dadurch als nebenläufig ausführbar zu erkennen, dass diese Anteile in dem ausführbaren Programmcode (52) als nebenläufig ausführbar gekennzeichnet sind.Security module ( 10 ) according to claim 11, characterized in that the recognition device ( 54 ), concurrently executable program code portions (B, C, D) of the program code ( 52 ) by recognizing as concurrent executable that these portions of the executable program code ( 52 ) are marked as executable. Sicherheitsmodul (10) nach Anspruch 11 oder 12, dadurch gekennzeichnet, dass die Reihenfolgenfestlegungseinrichtung (56) eingerichtet ist, die sicherheitsmodulspezifische Reihenfolge randomisiert, vorzugsweise mit Hilfe eines Zufallsgenerators, und/oder auf Basis einer in dem Speicher des Sicherheitsmoduls (10) gespeicherten, sicherheitsmodulspezifischen Vorgabe festzulegen.Security module ( 10 ) according to claim 11 or 12, characterized in that the order setting means ( 56 ), randomizes the security module-specific order, preferably with the aid of a random number generator, and / or on the basis of one in the memory of the security module ( 10 ) specified security module specific specification. Menge (100) von Sicherheitsmodulen (10; 10', 10'') gemäß einem der Ansprüche 11 bis 13, 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) für jedes Sicherheitsmodul (10; 10'; 10'') der Menge (100) von Sicherheitsmodulen (10; 10'; 10'') bezüglich der Anordnung nebenläufig ausführbarer Programmcodeanteile (B, C, D) identisch ist, sich jedoch hinsichtlich dessen Laufzeitverhalten für jeweils zwei Sicherheitsmodule (10; 10'; 10'') aus unterschiedlichen der Gruppen (101; 102; 103) von Sicherheitsmodulen (10; 10'; 10'') unterscheidet. Amount ( 100 ) of security modules ( 10 ; 10 ' . 10 '' ) according to any one of claims 11 to 13, wherein the amount ( 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 ) for each security module ( 10 ; 10 '; 10 '' ) of the quantity ( 100 ) of security modules ( 10 ; 10 '; 10 '' ) with respect to the arrangement of concurrently executable program code portions (B, C, D) is identical, but with respect to its runtime behavior for each two security modules ( 10 ; 10 '; 10 '' ) from different groups ( 101 ; 102 ; 103 ) of security modules ( 10 ; 10 '; 10 '' ) is different. Menge (100) von Sicherheitsmodulen (10; 10'; 10'') nach Anspruch 14, dadurch gekennzeichnet, dass das unterschiedliche Laufzeitverhalten des Programmcodes (52) für zwei Sicherheitsmodule (10; 10'; 10'') aus unterschiedlichen Gruppen (101; 102; 103) darauf beruht, dass die Reihenfolgenfestlegungseinrichtung (56; 56'; 56'') eines Sicherheitsmoduls (10) einer Gruppe (101; 102; 103) jeweils eingerichtet ist, eine gruppenspezifische Reihenfolge festzulegen, in der die nebenläufig ausführbaren Programmcodeanteile (B, C, D) bei einer sequentiellen Ausführung des Programmcodes (52) sequentiell ausgeführt werden sollen.Amount ( 100 ) of security modules ( 10 ; 10 '; 10 '' ) according to claim 14, characterized in that the different runtime behavior of the program code ( 52 ) for two security modules ( 10 ; 10 '; 10 '' ) from different groups ( 101 ; 102 ; 103 ) is based on that the order setting means ( 56 ; 56 '; 56 '' ) of a security module ( 10 ) of a group ( 101 ; 102 ; 103 ) is set to define a group-specific order in which the concurrently executable program code portions (B, C, D) in a sequential execution of the program code ( 52 ) should be executed sequentially.
DE201210015897 2012-08-10 2012-08-10 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 Withdrawn DE102012015897A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE201210015897 DE102012015897A1 (en) 2012-08-10 2012-08-10 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

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE201210015897 DE102012015897A1 (en) 2012-08-10 2012-08-10 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

Publications (1)

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

Family

ID=49999011

Family Applications (1)

Application Number Title Priority Date Filing Date
DE201210015897 Withdrawn DE102012015897A1 (en) 2012-08-10 2012-08-10 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

Country Status (1)

Country Link
DE (1) DE102012015897A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100229161A1 (en) * 2009-03-04 2010-09-09 Renesas Technology Corp. Compile method and compiler
US20100262839A1 (en) * 2007-06-29 2010-10-14 Johan Eker Obfuscating Execution Traces of Computer Program Code
US20110239201A1 (en) * 2008-12-01 2011-09-29 Kpit Cummins Infosystems Ltd Method and system for parallelization of sequencial computer program codes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100262839A1 (en) * 2007-06-29 2010-10-14 Johan Eker Obfuscating Execution Traces of Computer Program Code
US20110239201A1 (en) * 2008-12-01 2011-09-29 Kpit Cummins Infosystems Ltd Method and system for parallelization of sequencial computer program codes
US20100229161A1 (en) * 2009-03-04 2010-09-09 Renesas Technology Corp. Compile method and compiler

Similar Documents

Publication Publication Date Title
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
Fischetti et al. Improving branch-and-cut performance by random sampling
DE112018004660T5 (en) USE COMMENTS TO PROVIDE OPTIMIZATION
DE112017004962T5 (en) Control flow integrity
DE102009050161A1 (en) A method and apparatus for testing a system having at least a plurality of parallel executable software units
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
EP2936728B1 (en) Method for operating a portable data carrier and such a portable data carrier
WO2016096139A1 (en) Method for providing a security-critical software application on a computer unit
EP3159821B1 (en) Processor system with applet security settings
EP1709534B1 (en) The running of a program by a virtual machine
DE602004007368T2 (en) METHOD OF MANAGING AN EXPORTABLE CODE DOWNLOADED IN A RECOMMITABLE ONBOARD SYSTEM
DE102012015899A1 (en) Method for generating executable program code
DE102004011488B4 (en) Protection of software against attacks
DE602004001293T2 (en) Program integrity check by means of statistics
DE10307797B4 (en) Device and method for determining an irregularity in a sequence of a utility
DE102005048029B4 (en) Compiler and method for compiling
EP2660747B1 (en) Safety module
DE102012022874A1 (en) application installation
DE10254657A1 (en) Microcontroller and associated method for processing the programming of the microcontroller
DE102009033211A1 (en) Chip card for monitoring data integrity and software development integrity, has software module generating software counter-measures and counter-measures relative to redundant data engaged or integrated into components of tool chain
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
DE102014118240B4 (en) Apparatus and method for restricting an original set of program fragments to a subset of program fragments
DE202017007536U1 (en) Inductive equivalence in instruction machining

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