DE102018202936A1 - Computer program, in particular for a control unit of a motor vehicle - Google Patents

Computer program, in particular for a control unit of a motor vehicle Download PDF

Info

Publication number
DE102018202936A1
DE102018202936A1 DE102018202936.9A DE102018202936A DE102018202936A1 DE 102018202936 A1 DE102018202936 A1 DE 102018202936A1 DE 102018202936 A DE102018202936 A DE 102018202936A DE 102018202936 A1 DE102018202936 A1 DE 102018202936A1
Authority
DE
Germany
Prior art keywords
operating system
hsm
control unit
encryption
microprocessor
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.)
Pending
Application number
DE102018202936.9A
Other languages
German (de)
Inventor
Florian Kraemer
Matthias Hartl
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.)
Robert Bosch GmbH
Original Assignee
Robert Bosch 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 Robert Bosch GmbH filed Critical Robert Bosch GmbH
Priority to DE102018202936.9A priority Critical patent/DE102018202936A1/en
Priority to PCT/EP2019/054665 priority patent/WO2019166398A1/en
Publication of DE102018202936A1 publication Critical patent/DE102018202936A1/en
Pending 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • H04L9/003Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • H04L9/0662Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • H04L9/0897Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage involving additional devices, e.g. trusted platform module [TPM], smartcard or USB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry
    • H04L2209/127Trusted platform modules [TPM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

Vorrichtung (1) umfassend zumindest
- ein Echtzeitbetriebssystem (25) für einen Zugriff auf einen Mikroprozessor (17),
- ein Verschlüsselungsprogramm (18), welches auf dem Echtzeitbetriebssystem (25) betrieben wird und in welchem mindestens ein Verschlüsselungsalgorithmus implementiert ist, sowie
- eine virtuelle Schnittstelle (23), über die auf das Verschlüsselungsprogramm (18) zugegriffen werden kann,

Figure DE102018202936A1_0000
Device (1) comprising at least
a real-time operating system (25) for access to a microprocessor (17),
an encryption program (18) which is operated on the real-time operating system (25) and in which at least one encryption algorithm is implemented, as well as
a virtual interface (23) via which the encryption program (18) can be accessed,
Figure DE102018202936A1_0000

Description

Stand der TechnikState of the art

In bekannten Steuergeräten für Kraftfahrzeuge werden mehrheitlich Mikrocontroller eingesetzt. Um den stetig wachsenden Anforderungen an Sicherheit gerecht zu werden, kommen dabei häufig so genannte Hardware Security Modules (HSM) zum Einsatz, die auch als „Hardware-Sicherheits-Module“ bezeichnet werden können. Mit einem HSM kann insbesondere eine Verschlüsselung besonders sicher durchgeführt werden. HSMs zeichnen sich dadurch aus, dass sie eine weitgehend unabhängige Einheit vom Rest des Mikrocontrollers bilden. Gegenüber physikalischen Angriffen existieren bei bekannten HSMs tatsächlich Verbesserungspotentiale hinsichtlich der Sicherheit. Physikalische Angriffe bezeichnen hier Angriffe, die über eine andere Ebene versuchen einen Angriff auszuführen als die Ebene des HSM selbst. Ein physikalischer Angriff wäre beispielsweise ein Angriff, bei welchem ohne genaue Kenntnis der zu Grunde liegenden Datenstruktur über eine höhere Ebene einer Datenverwaltung versucht wird auf Daten zuzugreifen. Ein weiterer physikalischer Angriff wäre ein Angriff bei dem physikalische Effekte beobachtet werden, die durch die Durchführung der Sicherheitsfunktionen mit dem HSM auftreten. Häufig muss ein HSM zudem als eine zusätzliche Hardwarekomponente vorgesehen sein, die in einem Steuergerät hardwaremäßig neben weiteren Komponenten implementiert sein muss. Dies gilt insbesondere dann, wenn ein hohes Sicherheitslevel erreicht werden soll.In known control devices for motor vehicles, microcontrollers are used for the most part. In order to meet the ever-increasing demands for security, so-called hardware security modules (HSM) are often used, which can also be referred to as "hardware security modules". In particular, encryption can be carried out particularly securely with an HSM. HSMs are characterized by the fact that they form a largely independent unit from the rest of the microcontroller. Compared to physical attacks exist with known HSMs actually potential for improvement in terms of security. Physical attacks here denote attacks that attempt to attack at a different level than the level of the HSM itself. For example, a physical attack would be an attack that attempts to access data over a higher level of data management without knowing the underlying data structure access. Another physical attack would be an attack in which physical effects caused by performing the security functions with the HSM are observed. Frequently, an HSM must also be provided as an additional hardware component, which must be implemented in hardware in a control unit alongside other components. This is especially true when a high level of security is to be achieved.

Offenbarung der ErfindungDisclosure of the invention

Hier wird eine besonders vorteilhafte Vorrichtung vorgestellt, die insbesondere in einem Steuergerät eines Kraftfahrzeugs implementiert sein kann. Die abhängigen Ansprüche geben besonders vorteilhafte Weiterbildungen der Vorrichtung an.Here, a particularly advantageous device is presented, which can be implemented in particular in a control device of a motor vehicle. The dependent claims specify particularly advantageous developments of the device.

Mit der beschriebenen Vorrichtung wird insbesondere eine Softwarekomponente als Ersatz für ein HSM vorgeschlagen. Die beschriebene Vorrichtung bzw. ein Teil dessen kann somit insbesondere auch als Software-HSM bezeichnet werden. Mit dieser Bezeichnung soll zum Ausdruck gebracht werden, dass die beschriebene Vorrichtung die Funktionalität eines HSM in Form einer Software realisiert. Ein Software-HSM enthält also insbesondere keine Hardware. Daher könnte für die beschriebene Vorrichtung bzw. für einen Teil davon auch der hier neu geschaffene Begriff „Software Security Module“ (SSM) verwendet werden, der in Analogie zu einem „Hardware Security Module“ (HSM) zu verstehen ist.With the described device, in particular, a software component is proposed as a replacement for an HSM. The described device or a part thereof can thus be referred to in particular as software HSM. This designation is intended to express that the device described realizes the functionality of an HSM in the form of software. In particular, a software HSM contains no hardware. Therefore, the term "Software Security Module" (SSM) newly created here could also be used for the described device or for a part thereof, which is to be understood in analogy to a "Hardware Security Module" (HSM).

Durch die beschriebene Vorrichtung kann insbesondere auf Mikroprozessoren, insbesondere in Verbindung mit Mikrokernelbetriebssystemen, auch ohne ein in Hardware implementiertes HSM, ein vergleichbares Maß an Sicherheit durch Verschlüsselung erreicht werden. Damit können auch Mikroprozessoren, welche ursprünglich beispielsweise für den Endverbrauchermarkt vorgesehen waren und welche kein HSM aufweisen bzw. welche an kein HSM angebunden sind, bei der Umsetzung von Sicherheitsanforderungen verwendet werden.By means of the described device, a comparable degree of security can be achieved by encryption, in particular on microprocessors, in particular in connection with microkernel operating systems, even without an HSM implemented in hardware. Thus, microprocessors, which were originally intended for example for the consumer market and which have no HSM or which are not connected to any HSM, can be used in the implementation of security requirements.

Ein Mikrokernel bzw. ein Mikrokernelbetriebssystem ist ein Kernel bzw. ein Betriebssystem, welches mit einem sehr schlanken Programmarchitektur arbeitet, welche auf besonders hardwarenahe Funktionen zugreifen darf. Bei Linux-Betriebssystemen sind die Zugriffsberechtigungen des Betriebssystems, von Treibern und von Anwendungsprogrammen normalerweise in einzelne Stufen unterteilt, die anhand von Ringen erklärt werden. Nur das Betriebssysteme darf die höchste Berechtigungsstufe ausüben. Treiber etc. dürfen auf diese höchste Berechtigungsstufe nicht zugreifen, sondern nur über durch das Betriebssystem bereitgestellte Schnittstellen. Übliche Betriebssysteme, wie beispielsweise eine aktuelle Linux-Version verfügt über annähernd 20 Millionen Zeilen programmierter Code, welcher Zugriff auf die höchste Berechtigungsstufe hat. Ein Mikrokernel bzw. ein Mikrokernelbetriebssystem hat im Vergleich dazu einen sehr kurzen Code, welcher über die höchste Berechtigungsstufe verfügt, beispielsweise weniger als 100.000 Zeilen oder sogar weniger als 75.000 Zeilen Code. Die geringe Menge an Code fördert die Möglichkeit der Zertifizierung, weil der Aufwand der Zertifizierung bzw. Überprüfung des Codes normalerweise eine Vielzahl von Korrekturen und Prüfschleifen umfasst. Die geringe Menge an Code reduziert darüber hinaus die Angriffsfläche gegenüber Angriffen, weil statistisch eine geringere Anzahl an Programmierfehlern vorhanden ist, die jeweils potentielle Angriffsflächen bieten könnten.A microkernel or a microkernel operating system is a kernel or an operating system, which works with a very slender program architecture, which may access particularly hardware-related functions. For Linux operating systems, the access privileges of the operating system, drivers, and application programs are usually divided into individual levels that are explained by means of rings. Only the operating system may exercise the highest level of authorization. Drivers etc. may not access this highest level of authorization, but only via interfaces provided by the operating system. Common operating systems, such as a current Linux version, have approximately 20 million lines of programmed code that has access to the highest level of privilege. A microkernel or microkernel operating system, by contrast, has a very short code that has the highest level of privilege, for example less than 100,000 lines or even fewer than 75,000 lines of code. The small amount of code promotes the possibility of certification because the expense of certifying or verifying the code usually involves a multitude of corrections and loopbacks. The small amount of code also reduces the attack surface from attacks because there is a statistically lower number of programming errors that could potentially provide potential attack surfaces.

Die beschriebene Vorrichtung kann insbesondere in Steuergeräten für Kraftfahrzeuge eingesetzt werden. Beispielsweise kann die beschriebene Vorrichtung in Multimedia-Geräten oder in Steuergeräten für das autonome Fahren, Airbagsteuergeräten oder in beliebigen anderen Steuergeräten für Kraftfahrzeuge eingesetzt werden. Die Vorrichtung kann dabei insbesondere einen unmittelbaren Zugriff auf Hardware ermöglichen, so dass die beschriebene Vorrichtung bzw. ein Teil davon auch ohne ein lauffähige Betriebssystem auf einer Hardware betrieben werden kann. Die Vorrichtung kann insbesondere auch so eingerichtet sein, dass sie unmittelbar auf einem System zum Betrieb einer virtuellen Umgebung betrieben werden kann und so selbst eine virtuelle Maschine in einer entsprechenden Systemumgebung bildet. Insbesondere umfasst die beschriebene Vorrichtung ein Echtzeitbetriebssystem für einen Zugriff auf einen Mikroprozessor. Insbesondere im Bereich des automatisierten oder autonomen Fahrens werden aufgrund der erforderlichen Rechenleistung regelmäßig neben Mikrocontrollern auch Mikroprozessoren eingesetzt. Ein Mikroprozessor ist ein Prozessor, dessen sämtliche Elemente auf einem Mikrochip vorgesehen sind. Ein Mikrocontroller ist ein Ein-Chip-Computersystem.The device described can be used in particular in control units for motor vehicles. For example, the described device may be used in multimedia devices or in autonomous driving controllers, airbag control devices, or any other automotive control devices. In particular, the device can provide immediate access to hardware, so that the described device or a part thereof can also be operated on a hardware without an operable operating system. In particular, the device can also be set up such that it can be operated directly on a system for operating a virtual environment and thus itself forms a virtual machine in a corresponding system environment. In particular, the described apparatus a real-time operating system for access to a microprocessor. In particular, in the field of automated or autonomous driving microprocessors are regularly used in addition to microcontrollers due to the required computing power. A microprocessor is a processor whose entire elements are provided on a microchip. A microcontroller is a one-chip computer system.

Mikroprozessoren in Steuergeräten für Kraftfahrzeuge verfügen regelmäßig nicht über HSMs. Die beschriebene Vorrichtung kann dabei eine hinsichtlich der Sicherheit zu einem HSM gleichwertige Lösung darstellen.Microprocessors in automotive control units do not regularly have HSMs. The device described can be an equivalent in terms of security to a HSM solution.

Das Echtzeitbetriebssystem ist ein Betriebssystem, mit dem die Abwicklung von Programmen auf dem Mikroprozessor in Echtzeit gesteuert und überwacht wird. Das Echtzeitbetriebssystem ist vorzugsweise als ein RTOS (real time operating system) ausgebildet. Vorzugsweise ist das Echtzeitbetriebssystem nach dem POSIX-Standard (portable operating system interface) ausgebildet. Die relativ starke Isolation sicherheitsrelevanter, hardwarenaher Funktionen, die ein RTOS bzw. ein Mikrokernel-Betriebssystem bereitstellt, wird in Verbindung mit einer eng abgrenzten Schnittstelle der hier beschriebenen Vorrichtung letztlich genutzt, um ein hohes Sicherheitsniveau bereit zu stellen. Mit einer abgegrenzten Schnittstelle ist hier eine klar definierte schlanke Schnittstelle gemeint, die wenig verschiedene Funktionen bereit stellt. Die hohe Isolation schützt vor physikalischen Angriffen auf das SSM. Die eng abgegrenzte, insbesondere schlanke Schnittstelle verhindert, dass Angriffe über Programmierfehler im SSM erfolgen können.The real-time operating system is an operating system that controls and monitors the execution of programs on the microprocessor in real time. The real-time operating system is preferably designed as an RTOS (real time operating system). The real-time operating system is preferably designed according to the POSIX standard (portable operating system interface). The relatively strong isolation of security-related, hardware-related functions provided by an RTOS or a microkernel operating system is ultimately used in conjunction with a narrowly defined interface of the device described here in order to provide a high level of security. A demarcated interface means a well-defined, lean interface that provides few different functions. The high isolation protects against physical attacks on the SSM. The narrow, especially slim interface prevents attacks via programming errors in the SSM.

Weiterhin umfasst die Vorrichtung ein Verschlüsselungsprogramm, welches auf dem Echtzeitbetriebssystem betrieben wird. In dem Verschlüsselungsprogramm ist mindestens ein Verschlüsselungsalgorithmus implementiert. Insbesondere das Verschlüsselungsprogramm kann auch als ein Software-HSM bzw. als ein Software Security Module (SSM) bezeichnet werden.Furthermore, the device comprises an encryption program which is operated on the real-time operating system. At least one encryption algorithm is implemented in the encryption program. In particular, the encryption program can also be referred to as a software HSM or as a software security module (SSM).

Weiterhin umfasst die Vorrichtung eine virtuelle Schnittstelle, über die auf das Verschlüsselungsprogramm zugegriffen werden kann.Furthermore, the device comprises a virtual interface, via which the encryption program can be accessed.

Die Kommunikation mit Diensten des Verschlüsselungsprogramms ist nur über die virtuelle Schnittstelle als eine klar definierte Schnittstelle möglich. Damit kann bei dem Verschlüsselungsprogramm die mögliche Angriffsfläche klein gehalten werden, über die ein möglicher Angreifer unzulässigerweise auf das Verschlüsselungsprogramm zugreifen könnte. Mit dem Begriff „Angriffsfläche“ ist hier die Gesamtmenge aller Möglichkeiten gemeint mit denen unberechtigterweise auf das Verschlüsselungsprogramm zugegriffen werden kann.The communication with services of the encryption program is only possible via the virtual interface as a clearly defined interface. Thus, in the encryption program the possible attack surface can be kept small, about which a potential attacker could inappropriately access the encryption program. The term "attack surface" here means the total amount of all possibilities with which the encryption program can be accessed without authorization.

In einer bevorzugten Ausführungsform der Vorrichtung ist der mindestens eine Verschlüsselungsalgorithmus zumindest zum Generieren eines Sicherheitsschlüssels eingerichtet.In a preferred embodiment of the device, the at least one encryption algorithm is set up at least for generating a security key.

Zusätzliche oder Alternativ können alle oder einige Schlüssel schon bei der Implementierung oder bei einer Erstinitialisierung fest in der Vorrichtung integriert sein, so dass Maßnahmen zum Generieren von Sicherheitsschlüsseln ggf. entfallen können.Additionally or alternatively, all or some keys may already be integrated in the device during the implementation or during a first initialization, so that measures for generating security keys may possibly be omitted.

Als Verschlüsselungsalgorithmus kommt insbesondere jeder Algorithmus in Betracht, der auch in einem in Hardware implementierten HSM eingesetzt werden kann.In particular, any algorithm that can also be used in an HSM implemented in hardware comes into consideration as the encryption algorithm.

Insbesondere die im Folgenden aufgeführten Algorithmen kommen hier in Betracht: RSA, ECDSA, Diffle-Hellman, Elliptic Curve Cryptography, AES, DES, Triple-DES, IDEA, SHA-1.In particular, the algorithms listed below are considered: RSA, ECDSA, Diffle-Hellman, Elliptic Curve Cryptography, AES, DES, Triple-DES, IDEA, SHA-1.

Insbesondere ist es bevorzugt, dass der Verschlüsselungsalgorithmus auf einer oder mehreren zufällig generierten Zahlen beruht. Entsprechend umfasst die Vorrichtung vorzugsweise einen (in Software implementierten) Zufallszahlengenerator. Alternativ der zusätzlich kann die Vorrichtung auf hardwarebasierte Komponenten zur Erzeugung von echtem Zufall oder Pseudo-Zufall zugreifen, um diese Komponenten zur Schlüsselgenerierung zu nutzen.In particular, it is preferred that the encryption algorithm is based on one or more randomly generated numbers. Accordingly, the device preferably comprises a random number generator (implemented in software). Alternatively, in addition, the device may access hardware-based components for generating true random or pseudo-random to use these components for key generation.

In einer weiteren bevorzugten Ausführungsform der Vorrichtung ist die virtuelle Schnittstelle nach Art der Interprozesskommunikation ausgebildet.In a further preferred embodiment of the device, the virtual interface is designed in the manner of inter-process communication.

Die Interprozesskommunikation ist insbesondere auch unter deren englischer Bezeichnung „inter-process communication“ (IPC) bekannt.Interprocess communication is also known in particular under its English name "inter-process communication" (IPC).

Die Vorrichtung weist vorzugsweise eine Vielzahl von Untervorrichtungen auf. Diese Untervorrichtungen sind bevorzugt jeweils ebenfalls als Computerprogramme (auch Unterprogramme genannt). Dabei kann es sich insbesondere um als ELF-Dateien (Excecutable and Linking Format) vorgegebene Prozesse handeln. Insbesondere kann ein Zufallszahlengenerator als eine solche Untervorrichtung vorgesehen sein. Zwischen diesen Untervorrichtungen untereinander und mit dem Verschlüsselungsprogramm kann ein Datenaustausch nach Art der Interprozesskommunikation erfolgen. Dieser kann insbesondere über das Echtzeitbetriebssystem erfolgen.The device preferably has a plurality of sub-devices. These subdevices are preferably also each as computer programs (also called subprograms). In particular, these may be processes predefined as ELF files (Excecutable and Linking Format). In particular, a random number generator may be provided as such a sub-device. Between these subdevices with each other and with the encryption program can be done a data exchange on the type of inter-process communication. This can be done in particular via the real-time operating system.

In einer weiteren bevorzugten Ausführungsform der Vorrichtung ist der mindestens eine Verschlüsselungsalgorithmus mit mindestens einer Befehlssatzerweiterung verarbeitbar. Alternativ oder zusätzlich kann der Verschlüsselungsalgorithmus auch direkt über Registerzugriffe abgebildet sein.In a further preferred embodiment of the device, the at least one encryption algorithm can be processed with at least one instruction set extension. Alternatively or In addition, the encryption algorithm can also be imaged directly via register accesses.

Die beschriebene Vorrichtung kann sich in der vorliegenden Ausführungsform insbesondere Befehlssatzerweiterungen moderner Mikroprozessoren in Zusammenhang mit dem Einsatz von Mikrokernel-Betriebssystemen zu Nutze machen, um ein HSM in Software zu emulieren. So bieten viele aktuelle Mikroprozessoren insbesondere zur beschleunigten Verarbeitung von Kryptographiealgorithmen spezielle Befehlssatzerweiterungen an, wie etwa AES-Nl bei Intel Prozessoren mit x64-Architektur. Auch kryptographisch sichere Zufallszahlengeneratoren sind mittlerweile über Befehlssatzerweiterungen zugänglich. Mit diesen Möglichkeiten kann ein Software-HSM den kompletten Funktionsumfang eines HSM nachstellen, ohne dass das geheime Schlüsselmaterial den geschützten Prozessadressraum verlassen muss.In particular, in the present embodiment, the device described may take advantage of instruction set extensions of modern microprocessors in conjunction with the use of microkernel operating systems to emulate an HSM in software. For example, many current microprocessors offer special instruction set extensions, particularly for accelerated processing of cryptographic algorithms, such as AES-Nl on Intel processors with x64 architecture. Even cryptographically secure random number generators are now accessible via instruction set extensions. With these capabilities, a software HSM can replicate the full functionality of an HSM without the secret key material having to leave the protected process address space.

In einer weiteren bevorzugten Ausführungsform der Vorrichtung weist das Echtzeitbetriebssystem einen Mikrokernel auf.In a further preferred embodiment of the device, the real-time operating system has a microkernel.

In dieser Ausführungsform weist die Vorrichtung selbst eine Mikrokernelarchitektur auf. Dies gilt insbesondere dann, wenn die Vorrichtung als Computerprogramm zum Betrieb neben einem Betriebssystem direkt auf einer Hardware eingerichtet ist. Durch diese kann insbesondere eine (räumliche) Separierung zu anderen Prozessen und/oder Anwendungen stattfinden. Dadurch kann die Angriffsfläche reduziert und im Wesentlichen auf den Mikrokernel selbst beschränkt werden. Die beschriebene Separierung kann insbesondere auch die funktionale Sicherheit erhöhen.In this embodiment, the device itself has a microkernel architecture. This applies in particular when the device is set up as a computer program for operation in addition to an operating system directly on a hardware. In particular, these can be used to (spatially) separate to other processes and / or applications. As a result, the attack surface can be reduced and essentially limited to the microkernel itself. The described separation can in particular also increase the functional safety.

Hier auch beschrieben werden soll ein Computerprogramm, welches eine beschriebene Vorrichtung nachbildet.Also to be described here is a computer program which simulates a described device.

Als noch ein weiterer Aspekt wird ein maschinenlesbares Speichermedium vorgestellt, auf dem die beschriebene Vorrichtung als Computerprogramm gespeichert ist. Die weiter vorne für das Computerprogramm beschriebenen besonderen Vorteile und Ausgestaltungsmerkmale sind auf das maschinenlesbare Speichermedium anwendbar und übertragbar.As yet another aspect, a machine-readable storage medium is presented on which the described device is stored as a computer program. The particular advantages and design features described above for the computer program are applicable and transferable to the machine-readable storage medium.

Als ein weiterer Aspekt wird ein Steuergerät für ein Kraftfahrzeug vorgestellt, wobei das Steuergerät mindestens einen Mikroprozessor aufweist, der als beschriebenene Vorrichtung eingerichtet ist. Die weiter vorne für das Computerprogramm beschriebenen besonderen Vorteile und Ausgestaltungsmerkmale sind auf das Steuergerät anwendbar und übertragbar, und umgekehrt.As a further aspect, a control device for a motor vehicle is presented, wherein the control device has at least one microprocessor, which is set up as a described device. The particular advantages and design features described further above for the computer program are applicable and transferable to the controller, and vice versa.

In einer bevorzugten Ausführungsform weist das Steuergerät weiterhin einen externen Speicher auf, an den der Mikroprozessor angebunden ist und auf dem mindestens ein Sicherheitsschlüssel für den mindestens einen Verschlüsselungsalgorithmus gespeichert ist.In a preferred embodiment, the control unit further comprises an external memory to which the microprocessor is connected and on which at least one security key for the at least one encryption algorithm is stored.

Im Falle des Software-HSM kann die persistente Ablage von geheimem Schlüsselmaterial auch in externen - und dadurch leicht auslesbaren und manipulierbaren - Speicherbausteinen, wie z.B. NOR/NAND-Flash, erfolgen, solange dabei eine effektive Verschlüsselung zum Einsatz kommt. Damit kann insbesondere der Nachteil eines herkömmlichen in Hardware implementierten HSMs umgangen werden, dass ein interner nicht-flüchtiger Speicher vorgesehen sein muss.In the case of the software HSM, the persistent storage of secret key material can also be stored in external - and thus easily readable and manipulatable - memory components, such as memory modules. NOR / NAND Flash, as long as effective encryption is used. Thus, in particular the disadvantage of a conventional hardware implemented HSMs can be circumvented that an internal non-volatile memory must be provided.

In einer weiteren bevorzugten Ausführungsform des Steuergeräts weist der Mikroprozessor eine Speicherverwaltungseinheit auf.In a further preferred embodiment of the control device, the microprocessor has a memory management unit.

Die Speicherverwaltungseinheit ist vorzugsweise nach Art einer sogenannten „memory management Unit“ (MMU) ausgebildet.The memory management unit is preferably designed in the manner of a so-called "memory management unit" (MMU).

Zum Schutz des geheimen Schlüsselmaterials vor Zugriff durch einen Angreifer kann sich die beschriebene Vorrichtung als Software-HSM insbesondere auch auf die Speicherschutzmechanismen des zu Grunde liegenden Mikrokernel-Betriebssystems abstützen. Mikrokernel-Betriebssysteme bedienen sich üblicherweise zur Umsetzung eines wirksamen Speicherschutzes wiederum bei den in Hardware verfügbaren Speicherschutzeinheiten, wie etwa der „memory management unit“ (MMU), die sie entsprechend den vorgegebenen Zugriffsrechten konfigurieren. Um dennoch an das geheime Schlüsselmaterial zu gelangen, müsste ein Angreifer nicht nur Kontrolle über einen beliebigen Prozess erlangen, sondern darüber hinaus auch noch die Speicherschutzmechanismen des Betriebssystems überwinden. Aufgrund der Mikrokernel-Architektur bieten solche Betriebssysteme in der Regel nur eine sehr geringe Angriffsfläche, sodass sich durchaus ein zum HSM vergleichbarer Schutz ergibt. Die Vorrichtung kann verschiedene Maßnahmen implementieren, um einen besonders guten Schutz gegen Angriffe zu gewährleisten. Insbesondere, wenn in dem Programm Funktionen zur Schlüsselerzeugung implementiert sind, sind diese Funktionen regelmäßig ein besonders kritisches Element. Diese Funktionen bilden eine Schwäche gegenüber Angriffe. Insbesondere durch Cachebeobachtung und/oder durch Beobachtung des Stromverbrauchs (Differential Power Analysis) können Erkenntnisse gewonnen werden, die Rückschlüsse auf die erzeugten Schlüssel ermöglichen. In dem Computerprogramm können daher beispielsweise Maßnahmen zum regelmäßigen Löschen des Caches und/oder Maßnahmen zur Überlagerung der Schlüsselberechnung mit weiteren Berechnungen hinterlegt sein, um einen verbesserten Schutz gegen Angriffe zu gewährleisten.In order to protect the secret key material against access by an attacker, the described device as a software HSM can also be based in particular on the memory protection mechanisms of the underlying microkernel operating system. Microkernel operating systems typically rely on the memory protection units (MMUs) available in hardware, such as the "memory management unit" (MMU), to configure effective memory protection, configuring them according to the given access rights. In order to access the secret key material, an attacker would not only have to gain control of any process, but would also have to overcome the memory protection mechanisms of the operating system. Due to the microkernel architecture, such operating systems usually only provide a very small attack surface, so that there is certainly comparable protection to the HSM. The device can implement various measures to ensure a particularly good protection against attacks. In particular, if functions for key generation are implemented in the program, these functions are regularly a particularly critical element. These functions are a weakness against attacks. In particular, by caching observation and / or by observing the power consumption (differential power analysis) findings can be obtained that allow conclusions about the keys generated. In the computer program, therefore, measures for regularly deleting the cache and / or measures for superimposing the key calculation can be stored with further calculations in order to ensure improved protection against attacks.

Weitere Einzelheiten der Erfindung und ein Ausführungsbeispiel, auf welches die Erfindung jedoch nicht beschränkt ist, werden anhand der Zeichnungen näher erläutert. Es zeigen schematisch:

  • 1: eine Darstellung eines Computersystems mit einem in Hardware implementierten HSM,
  • 2: eine erste Darstellung des beschriebenen Computerprogramms, und
  • 3: eine zweite Darstellung des Computerprogramms aus 2.
Further details of the invention and an embodiment to which the invention is not limited, however, are explained in more detail with reference to the drawings. They show schematically:
  • 1 FIG. 2 is an illustration of a computer system with an HSM implemented in hardware. FIG.
  • 2 : a first representation of the described computer program, and
  • 3 : a second presentation of the computer program 2 ,

1 zeigt ein Computersystem 31 mit einem in Hardware implementierten HSM 2. Das HSM 2 weist einen Mikroprozessor 5 mit einem Secure Core sowie einen Local Secure RAM als einen eigenen Speicher 4 auf. Weiterhin weist das HSM 2 eine spezielle Recheneinheit 6 zum beschleunigten Verarbeiten von Kryptographiealgorithmen (wie z. B. AES) sowie einen Zufallszahlengenerator 7 (wie z. B. TRNG, PRNG) auf. Auf Komponenten des HSMs 2 kann von einem damit verbundenen Mikrocontroller 15 des Computersystems 31 nicht direkt zugegriffen werden. Stattdessen erfolgt die Kommunikation mit dem HSM 2 über eine einzelne, klar definierte Hardwareschnittstelle 3 (die insbesondere nach Art eines On-Chip IF ausgebildet sein kann), um die Angriffsfläche möglichst klein zu halten. Weiterhin weist das HSM 2 einen Debugging-Element 8 auf. 1 shows a computer system 31 with a hardware-implemented HSM 2 , The HSM 2 has a microprocessor 5 with a Secure Core and a Local Secure RAM as its own storage 4 on. Furthermore, the HSM 2 a special arithmetic unit 6 for accelerated processing of cryptographic algorithms (such as AES) and a random number generator 7 (such as TRNG, PRNG). On components of the HSM 2 can be from an associated microcontroller 15 of the computer system 31 not directly accessible. Instead, the communication with the HSM takes place 2 via a single, well-defined hardware interface 3 (Which may be designed in particular in the manner of an on-chip IF) in order to keep the attack surface as small as possible. Furthermore, the HSM 2 a debugging element 8th on.

Ein so ausgestaltetes Computersystem 31 bietet verschiedene Vorteile gegenüber der Berechnung von Kryptographiealgorithmen auf einem Mikrocontroller selbst. Ein Aspekt hiervon ist der bessere Schutz des geheimen Schlüsselmaterials. Da das HSM 2 Kryptographiealgorithmen selbst implementiert, besteht keine Notwendigkeit, geheimes Schlüsselmaterial in einem Speicher des Mikrocontrollers 15 vorzuhalten. Im vorliegenden Beispiel weist das Computersystem 31 einen Code Flash 9, einen Data Flash 10 und einen Secured Falsh 11 sowie einen RAM 14 auf. Auf dem Secured Falsh 11 sind ein HSM-Code 12 und HSM-Daten 13 hinterlegt.Such a computer system 31 offers several advantages over the calculation of cryptographic algorithms on a microcontroller itself. One aspect of this is the better protection of the secret key material. Because the HSM 2 Cryptographic algorithms implemented by themselves, there is no need to secret key material in a memory of the microcontroller 15 reproach. In the present example, the computer system 31 a code flash 9 , a data flash 10 and a Secured Falsh 11 as well as a RAM 14 on. On the Secured Falsh 11 are an HSM code 12 and HSM data 13 deposited.

Selbst für den Fall, dass ein Angreifer Kontrolle über den Mikrocontroller 15 erlangt, ist das geheime Schlüsselmaterial weiterhin geschützt. Um in den Besitz des geheimen Schlüsselmaterials zu kommen, müsste der Angreifer zusätzlich noch die Schutzmechanismen des HSM 2 überwinden, was durch die Abschottung als besonders schwer eingeschätzt wird.Even in the event that an attacker has control of the microcontroller 15 The secret key material is still protected. In order to come into possession of the secret key material, the attacker would also need the protective mechanisms of the HSM 2 overcome, which is considered by the foreclosure as particularly difficult.

2 zeigt eine erste Darstellung einer Vorrichtung 1, die als Computerprogramm realisiert ist und die auf einem Steuergerät 26 eines Kraftfahrzeugs 27 eingerichtet ist. Die Vorrichtung 1 umfasst ein Echtzeitbetriebssystem 25 für einen Zugriff auf einen Mikroprozessor 17, ein Verschlüsselungsprogramm 18, welches auf dem Echtzeitbetriebssystem 25 betrieben wird und in welchem mindestens ein Verschlüsselungsalgorithmus 32 implementiert ist, sowie eine nach Art der Interprozesskommunikation ausgebildete virtuelle Schnittstelle 23, über die insbesondere durch ein erstes Unterprogramm 21 und/oder ein zweites Unterprogramm 22 auf das Verschlüsselungsprogramm 18 zugegriffen werden kann. Die Unterprogramme 21, 22 können insbesondere als ELF-Dateien vorgegeben sein. Der mindestens eine Verschlüsselungsalgorithmus 32 ist zum Generieren eines Sicherheitsschlüssels 24 eingerichtet. Der Sicherheitsschlüssel 24 kann in einem externen Speicher 19 hinterlegt werden. Der mindestens eine Verschlüsselungsalgorithmus 32 ist mit mindestens einer Befehlssatzerweiterung verarbeitbar. Das Echtzeitbetriebssystem 25 weist einen Mikrokernel 16 und Treiber 20 aufweist. Der Mikroprozessor 17 weist eine Speicherverwaltungseinheit 28 auf. 2 shows a first representation of a device 1 , which is realized as a computer program and stored on a control unit 26 of a motor vehicle 27 is set up. The device 1 includes a real-time operating system 25 for access to a microprocessor 17 , an encryption program 18 which is on the real-time operating system 25 is operated and in which at least one encryption algorithm 32 is implemented as well as a trained according to the type of inter-process communication virtual interface 23 , in particular through a first sub-program 21 and / or a second subroutine 22 to the encryption program 18 can be accessed. The subroutines 21 . 22 may be specified in particular as ELF files. The at least one encryption algorithm 32 is to generate a security key 24 set up. The security key 24 can in an external memory 19 be deposited. The at least one encryption algorithm 32 is processable with at least one instruction set extension. The real-time operating system 25 has a microkernel 16 and drivers 20 having. The microprocessor 17 has a memory management unit 28 on.

3 zeigt eine zweite Darstellung der Vorrichtung 1 aus 2. Die Unterprogramme 21, 22 sind hier zu einem Hauptbetriebssystem 33 zusammengefasst. Das Verschlüsselungsprogramm 18 mit dem Verschlüsselungsalgorithmus 32 ist lediglich über die virtuelle Schnittstelle 23 mit dem Hauptbetriebssystem 33 verbunden. Das Verschlüsselungsprogramm 18 bzw. der Verschlüsselungsalgorithmus 32 können auf einen Kryptographiebefehl 29 und auf einen in Software implementierten Zufallszahlengenerator 7 zugreifen. Das erfolgt über einen geschützten Zugriff, was durch gepunktete Linien angedeutet ist. Das Hauptbetriebssystem 33 bzw. die Unterprogramme 21, 22 können auf den externen Speicher 19, den Kryptobefehl 29, weitere Befehle 30 sowie den Zufallszahlengenerator 7 zugreifen. Das ist durch durchgezogene Linien dargestellt. Der Zufallszahlengenerator 7, der Kryptobefehl 29 und die weiteren Befehle 30 bilden einen Befehlssatz 34 innerhalb des Mikroprozessors 5 bzw. des Echtzeitbetriebssystems 25. 3 shows a second view of the device 1 out 2 , The subroutines 21 . 22 are here to a main operating system 33 summarized. The encryption program 18 with the encryption algorithm 32 is only via the virtual interface 23 with the main operating system 33 connected. The encryption program 18 or the encryption algorithm 32 can access a cryptography command 29 and a software-implemented random number generator 7 access. This is done via a protected access, which is indicated by dotted lines. The main operating system 33 or the subprograms 21 . 22 can on the external memory 19 , the crypto command 29 , more commands 30 as well as the random number generator 7 access. This is shown by solid lines. The random number generator 7 , the crypto command 29 and the other commands 30 form a command set 34 within the microprocessor 5 or the real-time operating system 25 ,

Claims (10)

Vorrichtung (1) umfassend zumindest - ein Echtzeitbetriebssystem (25) für einen Zugriff auf einen Mikroprozessor (17), - ein Verschlüsselungsprogramm (18), welches auf dem Echtzeitbetriebssystem (25) betrieben wird und in welchem mindestens ein Verschlüsselungsalgorithmus (32) implementiert ist, sowie - eine virtuelle Schnittstelle (23), über die auf das Verschlüsselungsprogramm (18) zugegriffen werden kann,Device (1) comprising at least a real-time operating system (25) for access to a microprocessor (17), an encryption program (18) which is operated on the real-time operating system (25) and in which at least one encryption algorithm (32) is implemented, as well as a virtual interface (23) via which the encryption program (18) can be accessed, Vorrichtung (1) nach Anspruch 1, wobei der mindestens eine Verschlüsselungsalgorithmus (32) zumindest zum Generieren eines Sicherheitsschlüssels (24) eingerichtet ist.Device (1) according to Claim 1 wherein the at least one encryption algorithm (32) at least configured to generate a security key (24). Vorrichtung (1) nach einem der vorhergehenden Ansprüche, wobei die virtuelle Schnittstelle (23) nach Art der Interprozesskommunikation ausgebildet ist.Device (1) according to one of the preceding claims, wherein the virtual interface (23) is designed in the manner of inter-process communication. Vorrichtung (1) nach einem der vorhergehenden Ansprüche, wobei der mindestens eine Verschlüsselungsalgorithmus (32) mit mindestens einer Befehlssatzerweiterung verarbeitbar ist.Device (1) according to one of the preceding claims, wherein the at least one encryption algorithm (32) is processable with at least one instruction set extension. Vorrichtung (1) nach einem der vorhergehenden Ansprüche, wobei das Echtzeitbetriebssystem (25) einen Mikrokernel (16) aufweist.Device (1) according to one of the preceding claims, wherein the real-time operating system (25) has a microkernel (16). Computerprogramm, welches eine Vorrichtung nach einem der Ansprüche 1 bis 5 nachbildet.Computer program, which is a device according to one of Claims 1 to 5 replicates. Maschinenlesbares Speichermedium, auf dem ein Computerprogramm (1) gespeichert ist, welches eine Vorrichtung nach einem der Ansprüche 1 bis 5 nachbildet ist.A machine-readable storage medium having stored thereon a computer program (1) comprising a device according to one of the Claims 1 to 5 is replicating. Steuergerät (26) für ein Kraftfahrzeug (27), wobei das Steuergerät (26) mindestens einen Mikroprozessor (17) aufweist, der als Vorrichtung nach einem der Ansprüche 1 bis 5 eingerichtet ist.Control unit (26) for a motor vehicle (27), wherein the control unit (26) has at least one microprocessor (17) which can be used as a device according to one of the Claims 1 to 5 is set up. Steuergerät (26) nach Anspruch 8, weiterhin aufweisend einen externen Speicher (19), an den der Mikroprozessor (17) angebunden ist und auf dem mindestens ein Sicherheitsschlüssel (24) für den mindestens einen Verschlüsselungsalgorithmus (32) gespeichert ist.Control unit (26) after Claim 8 , further comprising an external memory (19) to which the microprocessor (17) is attached and on which at least one security key (24) for the at least one encryption algorithm (32) is stored. Steuergerät (26) nach einem der Ansprüche 8 oder 9, wobei der Mikroprozessor (17) eine Speicherverwaltungseinheit (28) aufweist.Control unit (26) according to one of Claims 8 or 9 wherein the microprocessor (17) comprises a memory management unit (28).
DE102018202936.9A 2018-02-27 2018-02-27 Computer program, in particular for a control unit of a motor vehicle Pending DE102018202936A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
DE102018202936.9A DE102018202936A1 (en) 2018-02-27 2018-02-27 Computer program, in particular for a control unit of a motor vehicle
PCT/EP2019/054665 WO2019166398A1 (en) 2018-02-27 2019-02-26 Computer program, particularly for a control unit of a motor vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102018202936.9A DE102018202936A1 (en) 2018-02-27 2018-02-27 Computer program, in particular for a control unit of a motor vehicle

Publications (1)

Publication Number Publication Date
DE102018202936A1 true DE102018202936A1 (en) 2019-08-29

Family

ID=65576365

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102018202936.9A Pending DE102018202936A1 (en) 2018-02-27 2018-02-27 Computer program, in particular for a control unit of a motor vehicle

Country Status (2)

Country Link
DE (1) DE102018202936A1 (en)
WO (1) WO2019166398A1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1959606B1 (en) * 2007-02-13 2012-08-15 Secunet Security Networks Aktiengesellschaft Safety unit
US20140007087A1 (en) * 2012-06-29 2014-01-02 Mark Scott-Nash Virtual trusted platform module
DE102013207110A1 (en) * 2013-04-19 2014-10-23 Continental Automotive Gmbh Tachograph and on-board unit for a commercial vehicle

Also Published As

Publication number Publication date
WO2019166398A1 (en) 2019-09-06

Similar Documents

Publication Publication Date Title
EP2742643B1 (en) Device and method for decrypting data
DE102008006759B4 (en) Processor assembly and method of operating the processor assembly without reducing overall security
DE60302844T2 (en) Semiconductor device with encryption, semiconductor device with external interface, and content reproduction method
DE102009013384B4 (en) System and method for providing a secure application fragmentation environment
DE69815599T2 (en) Method and device for protecting application data in secure memory areas
DE102014208855A1 (en) Method for carrying out communication between control units
EP2899714A1 (en) Secure provision of a key
DE102012200613A1 (en) System and method for supporting JIT in a secure system and randomly allocated memory areas
DE102015209108A1 (en) Method and decision gateway for authorizing a function of an embedded controller
WO2011054639A1 (en) Cryptographic hardware module or method for updating a cryptographic key
DE102014208851A1 (en) Method for preventing unauthorized operation of a motor vehicle
DE102018132970A1 (en) Method and device for isolating sensitive, untrustworthy program code on mobile devices
DE102016210788B4 (en) Component for processing data worthy of protection and method for implementing a security function for protecting data worthy of protection in such a component
DE102014208838A1 (en) Method for operating a control device
DE102015201298A1 (en) Method for the cryptographic processing of data
DE102008050631A1 (en) Data processing system
EP3819804A1 (en) Integrity check of a register content
DE102018202936A1 (en) Computer program, in particular for a control unit of a motor vehicle
DE102014208848A1 (en) Method for monitoring an electronic security module
EP3509247A1 (en) Method and key generator for creating an overall key with the support of a computer
EP1839136A1 (en) Generation of a program code in a load format and provision of an executable program code
DE102014208853A1 (en) Method for operating a control device
DE102020206039A1 (en) Create a container instance
DE102014208840A1 (en) Method for handling software functions in a controller
DE102017202787A1 (en) Method and validation unit for controlling the loading of cryptographic keys that can be used in IT systems, in particular embedded systems, in particular "key blobs"