[go: up one dir, main page]

DE102018000476A1 - SoC, which protects the intellectual property of a firmware while flashing through third parties - Google Patents

SoC, which protects the intellectual property of a firmware while flashing through third parties Download PDF

Info

Publication number
DE102018000476A1
DE102018000476A1 DE102018000476.8A DE102018000476A DE102018000476A1 DE 102018000476 A1 DE102018000476 A1 DE 102018000476A1 DE 102018000476 A DE102018000476 A DE 102018000476A DE 102018000476 A1 DE102018000476 A1 DE 102018000476A1
Authority
DE
Germany
Prior art keywords
firmware
soc
key
manufacturer
aes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
DE102018000476.8A
Other languages
German (de)
Inventor
Steffen Kühn
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to DE102018000476.8A priority Critical patent/DE102018000476A1/en
Publication of DE102018000476A1 publication Critical patent/DE102018000476A1/en
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/107License processing; Key processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/572Secure firmware programming, e.g. of basic input output system [BIOS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Storage Device Security (AREA)

Abstract

Es wird ein SoC (System-on-a-Chip) beschrieben, welches dem Firmwarehersteller die Möglichkeit bietet, die Firmware durch einen Systemintegrator oder beliebigen Dritten flashen zu lassen, ohne dass dabei für ihn die Gefahr besteht, dass seine Firmware analysiert oder öfter als von ihm gestattet verwendet wird. Die Erfindung verwendet dazu eine Flash-Schnittstelle, welche die Firmware in asymmetrisch verschlüsselter Form entgegennimmt. Ein SoC, welches die hier beschriebene Erfindung nutzt, besitzt einen erheblichen Mehrwert gegenüber herkömmlichen SoCs, da seine Verwendung die Zusammenarbeit zwischen Systemintegrator, Firmwarehersteller und weiteren beliebigen Dritten erheblich vereinfacht, unnötige Transportkosten vermeidet, sowie Geheimhaltungsvereinbarungen unnötig macht.

Figure DE102018000476A1_0000
A system-on-a-chip (SoC) is described which allows the firmware vendor to flash the firmware through a system integrator or any third party without the risk of having its firmware analyzed or more frequently than used by him. The invention uses a flash interface, which receives the firmware in asymmetric encrypted form. A SoC using the invention described herein has significant added value over conventional SoCs, as its use greatly simplifies collaboration between system integrator, firmware vendor, and any other third parties, eliminates unnecessary transportation costs, and makes secrecy agreements unnecessary.
Figure DE102018000476A1_0000

Description

Technisches Gebiet der ErfindungTechnical field of the invention

Es wird ein SoC (System-on-a-Chip) beschrieben, welches dem Firmwarehersteller die Möglichkeit bietet, die Firmware durch einen Systemintegrator oder beliebigen Dritten flashen zu lassen, ohne dass dabei für ihn die Gefahr besteht, dass seine Firmware analysiert oder öfter als von ihm gestattet verwendet wird.A system-on-a-chip (SoC) is described which allows the firmware vendor to flash the firmware through a system integrator or any third party without the risk of having its firmware analyzed or more frequently than used by him.

Die vorliegende Erfindung bezieht sich auf SoCs, also auf integrierte Schaltkreise, die neben einem Mikroprozessor auch die erforderlichen Speicher im gleichen Bauteil enthalten. Die Erfindung beschreibt, wie ein SoC zu erweitern ist, sodass dem Hersteller einer Firmware für das SoC die zuvor genannten Eigenschaften zur Verfügung stehen.The present invention relates to SoCs, that is to integrated circuits which contain not only a microprocessor but also the required memory in the same component. The invention describes how to extend a SoC such that the manufacturer of firmware for the SoC has the aforementioned characteristics.

Ein SoC, welches die hier beschriebene Erfindung nutzt, besitzt einen erheblichen Mehrwert gegenüber herkömmlichen SoCs, da es durch die Erfindung dem Firmwarehersteller ermöglicht wird, die Nutzung seines geistigen Eigentums deutlich besser als bisher zu kontrollieren. Diese Vorteile werden im Nachfolgenden detailliert erläutert.A SoC using the invention described herein has significant added value over conventional SoCs because the invention allows the firmware manufacturer to control the use of its intellectual property much better than before. These advantages will be explained in detail below.

Ausgangssituationinitial situation

Ein SoC ist ein programmierbares elektronisches System, bei dem sich alle für die Funktion wesentlichen Teile in einem einzigen Chip befinden. Das SoC selbst stellt in aller Regel nur den Teil eines komplexen Gesamtprodukts dar. Damit das SoC seine Funktion in diesem Gesamtprodukt erfüllen kann, muss es mit einer Firmware bespielt sein. Der Vorgang des Flashens (Bespielen) mit der Firmware ist ein Teilprozess bei der Produktion des Gesamtprodukts. Um diesen Prozess ausführen zu können, wird eine Datei benötigt, welche die Firmware enthält. Diese Datei kann mit dem Ziel des Diebstahls des geistigen Eigentums analysiert werden, da aus ihr das Maschinenprogramm in lesbarer Form abgeleitet werden kann. Weiterhin kann diese Datei beliebig oft kopiert werden. Der Firmwarehersteller hat daher keine Möglichkeit festzustellen, wie oft sein Produkt tatsächlich verwendet wird.A SoC is a programmable electronic system in which all parts essential to the function are contained in a single chip. The SoC itself usually represents only the part of a complex overall product. So that the SoC can fulfill its function in this entire product, it must be recorded with a firmware. The process of flashing (recording) with the firmware is a sub-process in the production of the entire product. In order to perform this process, a file containing the firmware is needed. This file can be analyzed for the purpose of theft of intellectual property, since it can be used to derive the machine program in a readable form. Furthermore, this file can be copied as often as you like. The firmware manufacturer therefore has no way to determine how often his product is actually used.

Es gibt mehrere Möglichkeiten ein SoC mit Firmware zu bespielen. Alle haben erhebliche Nachteile. Die erste besteht darin, die Datei mit der Firmware an den SoC-Hersteller zu geben. Dieser liefert dann bereits bespielte SoCs an den Hersteller des Gesamtproduktes (Systemintegrator) aus. Der Nachteil dieser Methode besteht darin, dass der Systemintegrator das SoC nur noch direkt beim SoC-Hersteller beziehen kann. Des Weiteren muss der Firmwarehersteller darauf vertrauen, dass der SoC-Hersteller alle notwendigen Maßnahmen trifft, um die Firmware vor unauthorisiertem Zugriff durch Mitarbeiter oder Dritte zu schützen. Darüber hinaus bieten nicht alle SoC-Hersteller diese Dienstleistung überhaupt an. Weiterhin ist bei dieser Methode unklar, wie mit bereits bespielten SoCs umzugehen ist, wenn die Firmware aktualisiert werden muss.There are several ways to record a SoC with firmware. All have significant disadvantages. The first is to give the file with the firmware to the SoC manufacturer. This then delivers pre-recorded SoCs to the manufacturer of the complete product (system integrator). The disadvantage of this method is that the system integrator can only obtain the SoC directly from the SoC manufacturer. Furthermore, the firmware manufacturer must be confident that the SoC manufacturer takes all necessary measures to protect the firmware from unauthorized access by employees or third parties. In addition, not all SoC manufacturers offer this service at all. Furthermore, it is unclear with this method how to deal with already recorded SoCs when the firmware has to be updated.

Die zweite Möglichkeit besteht darin, dass der Firmwarehersteller dem Systemintegrator eine Datei mit der Firmware zur Verfügung stellt. Dieser kann dann spätestens vor dem Verpacken des Gesamtproduktes das SoC mit der Firmware bespielen. Dies geschieht in der Regel über eine Programmierschnittstelle, die sich zusammen mit dem SoC auf der Elektronik befindet. Der Systemintegrator kann hierüber die Datei mit der Firmware an das SoC senden, welches das SoC dann in seinen Programmspeicher (üblicherweise Flash oder FRAM) kopiert. Bei dieser Methode muss der Firmwarehersteller dem Systemintegrator uneingeschränkt vertrauen. Insbesondere muss er darauf vertrauen, dass dieser die Datei mit der Firmware nicht analysiert oder weitergibt, sowie dass die Anzahl an genutzten Lizenzen nicht falsch angegeben wird.The second possibility is that the firmware manufacturer provides the system integrator with a file with the firmware. This can then at the latest before the packaging of the entire product the SoC with the firmware record. This is usually done via a programming interface, which is located on the electronics together with the SoC. The system integrator can then send the file with the firmware to the SoC, which then copies the SoC into its program memory (usually Flash or FRAM). With this method, the firmware vendor must fully trust the system integrator. In particular, he must trust that he will not analyze or share the file with the firmware, and that the number of licenses used will not be incorrect.

Die dritte Möglichkeit besteht darin, dass der Systemintegrator die Elektronik an den Firmware-Hersteller liefert. Dieser kann dann selbst über die Programmierschnittstelle das Bespielen mit der Firmware durchführen. Anschließend wird die Elektronik an den Produzenten des Gesamtprodukts für die Endmontage und zur Verpackung zurückgeliefert. Diese Methode stellt sicher, dass die Datei mit der Firmware unter alleiniger Kontrolle des Herstellers der Firmware verbleibt. Er kann somit selbst sicherstellen, dass die Firmware nicht an Dritte gelangt. Außerdem lässt sich so die Anzahl der Lizenzen ermitteln. Der Nachteil dieser Vorgehensweise ist, dass die Elektronik zweimal transportiert werden muss. In der Regel sind Systemintegrator und Firmwarehersteller oft räumlich weit voneinander entfernt, was diese Methode sehr zeit- und kostenaufwendig macht.The third possibility is that the system integrator supplies the electronics to the firmware manufacturer. This can then perform itself with the firmware via the programming interface. The electronics are then returned to the producer of the final product for final assembly and packaging. This method ensures that the file with the firmware remains under the sole control of the manufacturer of the firmware. He can thus ensure that the firmware does not reach third parties. In addition, the number of licenses can be determined. The disadvantage of this approach is that the electronics must be transported twice. As a rule, system integrators and firmware manufacturers are often far from each other, which makes this method very time-consuming and costly.

Nur die dritte Möglichkeit ist aus Sicht des Firmwareherstellers eine attraktive Lösung. Für den Systemintegrator ist sie hingegen sehr stark mit Nachteilen belastet. Was benötigt wird sind SoCs, die sich so flashen lassen, dass der Firmwarehersteller sicher sein kann, dass der Systemintegrator keine Möglichkeit besitzt, die Firmware zu analysieren oder mehrfach zu verwenden. Damit wären dann die Vorteile der dritten Möglichkeit gegeben, ohne dass dazu ein Verschicken der Hardware erforderlich wäre.Only the third option is an attractive solution from the point of view of the firmware manufacturer. For the system integrator, however, it is very heavily burdened with disadvantages. What is needed are SoCs that can be flashed so that the firmware vendor can be sure that the system integrator has no way to parse or reuse the firmware. This would then be the benefits of the third option, without the need to send the hardware would be required.

Grundprinzip der ErfindungBasic principle of the invention

Damit jedes individuelle SoC mit einer individuellen nicht analysierbaren Firmwaredatei bespielt werden kann, wird die Programmierschnittstelle des SoC mit einem asymmetrischen Verschlüsselungsverfahren ausgestattet. Bei einem asymmetrischen Verschlüsselungsverfahren wird für die Verschlüsselung ein anderer Schlüssel verwendet als für die Entschlüsselung. Die Erfindung setzt voraus, dass jedes individuelle SoC vom SoC-Hersteller ein solches Schlüsselpaar erhält. Nur einer der Schlüssel, öffentlicher Schlüssel genannt, kann über die Programmierschnittstelle ausgelesen werden. Der andere Schlüssel, privater Schlüssel genannt, bleibt im SoC eingeschlossen.So that each individual SoC can be recorded with an individual non-analyzable firmware file, the programming interface of the SoC equipped with an asymmetric encryption method. In an asymmetric encryption method, a different key is used for the encryption than for the decryption. The invention assumes that each individual SoC receives such a key pair from the SoC manufacturer. Only one of the keys, called a public key, can be read out via the programming interface. The other key, called a private key, remains locked in the SoC.

Möchte eine andere Person oder Institution als der Firmwarehersteller ein einzelnes SoC mit der Firmware bespielen, so liest er im ersten Schritt über die Programmierschnittstelle des SoC den öffentlichen Schlüssel aus und sendet diesen anschließend zum Firmwarehersteller. Der Firmwarehersteller verschlüsselt die Firmware dann mit dem erhaltenen öffentlichen Schlüssel. Anschließend wird die so verschlüsselte Datei der Person oder Institution zur Verfügung gestellt. Diese kann dann die Datei wiederum an die Programmierschnittstelle des SoC senden. Da nur dieses eine SoC den privaten Schlüssel besitzt, ist nur dieses individuelle SoC in der Lage, die gesendete Datei intern zu entschlüsseln.If a person or institution other than the firmware manufacturer wants to record a single SoC with the firmware, in the first step he reads out the public key via the SoC programming interface and then sends it to the firmware manufacturer. The firmware manufacturer then encrypts the firmware with the received public key. Subsequently, the so encrypted file of the person or institution is provided. This can then send the file again to the programming interface of the SoC. Since only this one SoC owns the private key, only this individual SoC is able to decrypt the sent file internally.

Beschreibung der AbbildungDescription of the picture

Die zeigt den prinzipiellen Ablauf des Flashens eines individuellen SoCs mit einer Firmware. In Schritt 1 liest der Systemintegrator den öffentlichen Schlüssel (public key) des SoC aus und liefert diesen im Schritt 2 an den Firmwarehersteller. Der Firmwarehersteller erstellt mit dem erhaltenen öffentlichen Schlüssel eine verschlüsselte Instanz seiner Firmware und liefert die so verschlüsselte Datei in Schritt 3 an den Systemintegrator. Der Systemintegrator leitet die verschlüsselte Datei in Schritt 4 an das SoC weiter. Das SoC ist aufgrund seines nur ihm bekannten privaten Schlüssels (private key) in der Lage, die empfangene Datei zu entschlüsseln und in unverschlüsselter Form in Schritt 5 in seinen Programmspeicher zu kopieren.The shows the basic procedure of flashing an individual SoC with a firmware. In step 1 The system integrator reads out the public key of the SoC and delivers it in step 2 to the firmware manufacturer. The firmware vendor creates an encrypted instance of its firmware with the received public key and delivers the encrypted file in step 3 to the system integrator. The system integrator directs the encrypted file in step 4 to the SoC on. The SoC is able to decrypt the received file and in unencrypted form in step by virtue of its private key known only to it 5 to copy into its program memory.

Im Nachfolgenden wird dieser abstrakte Ablauf anhand eines konkreten Beispiels ausführlich beschrieben. Gleichzeitig wird auch auf einige Aspekte von praktischer Relevanz eingegangen.In the following, this abstract process will be described in detail by means of a concrete example. At the same time, some aspects of practical relevance are also addressed.

Konkretes AusführungsbeispielSpecific embodiment

Im Weiteren wird die Erfindung anhand der SoC-Familie LPC17xx der Firma NXP (LPC176x/5x User manual Rev. 4.1, 2016-12-19, chapter 32, https://www.nxp.com/docs/en/user-guide/UM10360.pdf) detailliert beschrieben.Furthermore, the invention is based on the SoC family LPC17xx the company NXP (LPC176x / 5x User Manual Rev. 4.1, 2016-12-19, chapter 32, https://www.nxp.com/docs/en/user-guide / UM10360.pdf) described in detail.

Ein LPC17xx verfügt über einen Bootloader, welcher vom Hersteller fest vorgegeben ist und der nicht gelöscht oder verändert werden kann. Dieser Bootloader überprüft beim Startvorgang, ob ein bestimmter Pin (P2.10) logisch Null ist. Falls dieses der Fall ist und kein Watchdog-Reset vorlag, so initialisiert der Bootloader die serielle Schnittstelle 0 und wartet darauf, dass eine angeschlossene Gegenstelle (Host) das Startsymbol „?“ sendet. Wird dieses Symbol vom LPC17xx empfangen, so ermittelt er anhand des Startsymbols die Baudrate des Hosts und stellt seine eigene Baudrate entsprechend ein. Anschließend sendet das SoC an den Host die Zeichenfolge „Synchronized“. Kann der Host diese Zeichenfolge fehlerfrei erkennen, so sendet er im Gegenzug ein „Synchronized“ sowie eine Zeichenfolge mit der Quarzfrequenz, beispielsweise „10000“ für 10MHz, zurück. Nach erfolgreichem Empfang der Zeichenfolge sendet das SoC ein „OK“ und die SoC-Host-Verbindung ist erfolgreich hergestellt.An LPC17xx has a bootloader, which is fixed by the manufacturer and can not be deleted or changed. This boot loader checks during the startup process, if a certain pin (P2.10) is logically zero. If this is the case and there was no watchdog reset, the boot loader initializes the serial interface 0 and waits for a connected remote station (host) to send the start symbol "?". If this symbol is received by the LPC17xx, it uses the start symbol to determine the baud rate of the host and sets its own baud rate accordingly. The SoC then sends the string "Synchronized" to the host. If the host is able to recognize this string without errors, it will in turn send back a "Synchronized" and a string with the crystal frequency, for example "10000" for 10 MHz. After successfully receiving the string, the SoC sends an "OK" and the SoC host connection is successfully established.

Nachdem die Verbindung hergestellt worden ist, kann der Host verschiedene Kommandos ausführen, die ISP-Kommandos genannt werden. Beispielsweise kann der Host durch Senden der Zeichenfolge „E 0 26“ die Flash-Sektoren von 0 bis 26 löschen. Anschließend kann der Host das SoC sektorweise mit einer neuen Firmware beschreiben. Er sendet dazu jeweils das Kommando „P <SEKTORNUMMER> 1“ um den Flash-Sektor schreibbar zu machen. Anschließend sendet er die zu schreibenden Daten mit Hilfe des Kommandos „W <RAM-ADDRESSE> <BYTE-ANZAHL>“ gefolgt von den UU-encodierten Bytes und Prüfsummen in den RAM des SoC. Nachdem die Daten so für den Sektor in den RAM kopiert worden sind, werden diese mit Hilfe des Kommandos „C <FLASH-ADDRESSE> <RAM-ADDRESSE> <BYTE-ANZAHL>“ in den Flash übertragen. Diese Abfolge wird für alle weiteren zu schreibenden Flash-Sektoren wiederholt, bis die gesamte Firmware auf das SoC geschrieben worden ist.After the connection is established, the host can execute various commands called ISP commands. For example, by sending the string "E 0 26", the host can delete the flash sectors from 0 to 26. Subsequently, the host can describe the SoC sector by sector with a new firmware. It sends the command "P <SECTOR NUMBER> 1" to make the flash sector writable. Then it sends the data to be written to the RAM of the SoC with the help of the command "W <RAM-ADDRESS> <BYTE-NUMBER>" followed by the UU-encoded bytes and checksums. After the data have been copied to RAM for the sector, they are transferred to Flash using the command "C <FLASH-ADDRESS> <RAM-ADDRESS> <BYTE-NUMBER>". This sequence is repeated for all other flash sectors to be written until all firmware has been written to the SoC.

Mit der eben dargestellten Methode lassen sich flexibel beliebige Daten in den internen Flash des SoC kopieren. Gleichzeitig erfordert diese Vorgehensweise nur wenig Komplexität vom Bootloader. Der Nachteil besteht wie beschrieben darin, dass derjenige, der die Daten an das SoC sendet, diese ebenfalls lesen, interpretieren, kopieren und weitergeben kann. Um dieses zu verhindern, verwendet die Erfindung in diesem Ausführungsbeispiel zwei Verschlüsselungsverfahren, nämlich das asymmetrische RSA und das symmetrische AES (Advanced Encryption Standard). Des Weiteren fügt die Erfindung drei neue ISP-Kommandos hinzu. Dies ist nur durch den Hersteller des SoC möglich, da nur dieser Veränderungen am Bootloader des SoC vornehmen kann.With the method just described, you can flexibly copy any data into the internal Flash of the SoC. At the same time, this approach requires little complexity from the boot loader. The drawback, as described, is that the person sending the data to the SoC can also read, interpret, copy and pass it on. In order to prevent this, the invention in this embodiment uses two encryption methods, namely the asymmetric RSA and the symmetric AES (Advanced Encryption Standard). Furthermore, the invention adds three new ISP commands. This is only possible by the manufacturer of the SoC, as only this can make changes to the boot loader of the SoC.

Das erste ISP-Kommando „K“ sendet den öffentlichen RSA-Schlüssel <RSA-KEY-PUB> des im Chip gespeicherten Schlüsselpaars an den Host. Mit dem zweiten Kommando „S <AES-KEY-ENC>“ kann der Host einen mit dem öffentlichen RSA-Schlüssel <RSA-KEY-PUB> verschlüsselten AES-Key <AES-KEY-ENC> an das SoC liefern. Das dritte Kommando „Z <RAM-ADDRESSE> <BYTE-ANZAHL>“ ist das mit AES-Verschlüsselung arbeitende Gegenstück zum Kommando „W“, welches zuvor bereits erläutert wurde.The first ISP command "K" sends the public RSA key <RSA-KEY-PUB> of the key pair stored in the chip to the host. With the second command "S <AES-KEY-ENC>", the host can deliver an AES key <AES-KEY-ENC> encoded with the public RSA key <RSA-KEY-PUB> to the SoC. The third command "Z <RAM-ADDRESSE> <BYTE-NUMBER>" is the AES-encrypted counterpart to the "W" command, which was previously explained.

Im Beispiel des LPC17xx der Firma NXP wäre es erforderlich, dass jedes individuelle SoC einen einmaligen und individuellen RSA-Schlüssel <RSA-KEY> erhält. Diesen kann man mit OpenSSL (www.openssl.org) durch „openssl genrsa -out <RSA-KEY> 4096“ erzeugen. Aus diesem privaten Schlüssel lässt sich der öffentliche Schlüssel <RSA-KEY-PUB> durch „openssl rsa -in <RSA-KEY> -outform PEM -pubout -out <RSA-KEY-PUB>“ ableiten. Anschließend müssen beide Schlüssel durch den SoC-Hersteller fest in einen ROM des SoC geschrieben werden. Alternativ kann auch nur der private Schlüssel <RSA-KEY> abgelegt werden. In diesem Fall muss der Bootloader des SoC jedoch ein Programm zur Erzeugung des öffentlichen Schlüssels aus einem privaten Schlüssel enthalten.In the example of the LPC17xx of the company NXP it would be necessary that each individual SoC receives a unique and individual RSA key <RSA-KEY>. This can be created with OpenSSL (www.openssl.org) through "openssl genrsa -out <RSA-KEY> 4096". From this private key, the public key <RSA-KEY-PUB> can be derived by "openssl rsa -in <RSA-KEY> -out-form PEM -pubout -out <RSA-KEY-PUB>". Subsequently, both keys must be written firmly into a ROM of the SoC by the SoC manufacturer. Alternatively, only the private key <RSA-KEY> can be stored. In this case, however, the SoC bootloader must contain a public key generation program from a private key.

Der Arbeitsablauf zum Flashen einer verschlüsselten Firmware ist folgendermaßen: Zunächst verbindet sich der Systemintegrator mit dem SoC und liest mit dem ISP-Command „K“ den öffentlichen Schlüssel <RSA-KEY-PUB> aus. Dieser öffentliche Schlüssel wird dann an den Firmwarehersteller weitergeleitet. Der Firmwarehersteller erzeugt dann zunächst einen AES-Schlüssel, beispielsweise mit „openssl rand -base64 192 -out <AES-KEY>“. Anschließend verschlüsselt er diesen AES-Schlüssel mit dem öffentlichen RSA-Schlüssel, den er vom Systemintegrator erhalten hat. Der Befehl dazu lautet „openssl rsautl -encrypt -inkey <RSA-KEY-PUB> -pubin -in <AES-KEY> -out <AES-KEY-ENC>“. Im nächsten Schritt verschlüsselt er die Daten für jeden zu schreibenden Flash-Sektor separat mit dem AES-Schlüssel <AES-KEY>. Dieses geschieht mit „openssl enc -aes-256-cbc -salt -in <SEC-X> -out <SEC-X-ENC> -pass file:<AES-KEY>“. Nachdem dies geschehen ist, erhält der Systemintegrator den verschlüsselten AES-Key <AES-KEY-ENC>, sowie die verschlüsselten Flash-Sectoren <SEC-X-ENC> in Form einer einzelnen Datei. Der AES-Key <AES-KEY>, welcher vom Firmwarehersteller zum Verschlüsseln benutzt wurde, hält er vor dem Systemintegrator geheim.The workflow for flashing an encrypted firmware is as follows: First, the system integrator connects to the SoC and reads the public key <RSA-KEY-PUB> with the ISP command "K". This public key is then forwarded to the firmware vendor. The firmware manufacturer first generates an AES key, for example with "openssl rand -base64 192 -out <AES-KEY>". He then encrypts this AES key with the public RSA key he received from the system integrator. The command is "openssl rsautl -encrypt -inkey <RSA-KEY-PUB> -pubin -in <AES-KEY> -out <AES-KEY-ENC>". In the next step, he encrypts the data for each flash sector to be written separately with the AES key <AES-KEY>. This is done with "openssl enc -aes-256-cbc -salt -in <SEC-X> -out <SEC-X-ENC> -pass file: <AES-KEY>". After this has been done, the system integrator receives the encrypted AES key <AES-KEY-ENC> as well as the encrypted <SEC-X-ENC> flash sectors as a single file. The AES key <AES-KEY>, which was used by the firmware manufacturer for encryption, keeps it secret from the system integrator.

Der Systemintegrator sendet dann mit „S <AES-KEY-ENC>“ den verschlüsselten AES-Schlüssel an das SoC. Das SoC entschlüsselt intern den verschlüsselten AES-Schlüssel durch Anwendung des nur ihm bekannten privaten RSA-Schlüssels und speichert den entschlüsselten AES-Schlüssel an eine nicht auslesbare RAM-Speicherstelle. Anschließend sendet der Systemintegrator die verschlüsselten Sektordaten <SEC-X-ENC> mit dem ISP-Kommando „Z“ an das SoC. Das SoC kann diese mit dem AES-Schlüssel entschlüsseln und so die unverschlüsselten Daten in den Flash-Sektor schreiben, wenn das ISP-Kommando „C“ gesendet wird.The system integrator then sends the encrypted AES key to the SoC with "S <AES-KEY-ENC>". The SoC internally decrypts the encrypted AES key by using the private RSA key known only to it and stores the decrypted AES key to a non-readable RAM memory location. The system integrator then sends the encrypted sector data <SEC-X-ENC> to the SoC with the ISP command "Z". The SoC can decrypt them with the AES key and write the unencrypted data into the flash sector when the ISP command "C" is sent.

Damit der hier beschriebene Mechanismus unempfindlich gegen Seitenkanalangriffe ist, müssen weiterhin verschiedene Vorkehrungen durch den SoC-Hersteller getroffen werden. Beispielsweise muss der SoC-Hersteller hardwareseitig sicherstellen, dass der private Schlüssel <RSA-KEY> unter keinen Umständen durch eine Firmware ausgelesen werden kann. Andernfalls könnte der Systemintegrator eine spezielle Firmware schreiben, die nur den Zweck hat, den privaten Schlüssel auszugeben. Mit diesem könnte er dann die verschlüsselte Firmware des Firmwareherstellers außerhalb des SoCs entschlüsseln. Des Weiteren muss vom SoC-Hersteller sichergestellt werden, dass bei Benutzung der neuen ISP-Kommandos „S“ und „Z“ sofort alle Möglichkeiten unterbunden werden, mit denen die Inhalte des RAM's sowie des Flashes ausgelesen werden könnten. Erst nach einem Reset und einem kompletten Löschen des Flashes sollte dieses wieder möglich sein.For the mechanism described here to be insensitive to side channel attacks, various precautions must still be taken by the SoC manufacturer. For example, the SoC manufacturer must ensure on the hardware side that the private key <RSA-KEY> can under no circumstances be read out by a firmware. Otherwise, the system integrator could write a special firmware with the sole purpose of issuing the private key. With this he could then decrypt the encrypted firmware of the firmware manufacturer outside the SoCs. Furthermore, it must be ensured by the SoC manufacturer that when using the new ISP commands "S" and "Z" immediately all possibilities are eliminated, with which the contents of the RAM and the flash could be read. Only after a reset and a complete deletion of the Flashes should this be possible again.

Claims (1)

SoC, gekennzeichnet dadurch, dass beim Flashen eine Schnittstelle des SoCs verwendet wird, welche die Firmware in einer Codierung entgegen nimmt, die nur durch jeweils ein einzelnes individuelles SoC, jedoch nicht vom Ausführenden des Flashens noch von anderen SoCs gleicher Bauart, interpretiert werden kann.SoC, characterized in that during flashing an interface of the SoCs is used, which receives the firmware in a coding, which can only be interpreted by a single individual SoC, but not by the executor of the flash or other SoCs same design.
DE102018000476.8A 2018-01-23 2018-01-23 SoC, which protects the intellectual property of a firmware while flashing through third parties Ceased DE102018000476A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102018000476.8A DE102018000476A1 (en) 2018-01-23 2018-01-23 SoC, which protects the intellectual property of a firmware while flashing through third parties

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102018000476.8A DE102018000476A1 (en) 2018-01-23 2018-01-23 SoC, which protects the intellectual property of a firmware while flashing through third parties

Publications (1)

Publication Number Publication Date
DE102018000476A1 true DE102018000476A1 (en) 2019-07-25

Family

ID=67145098

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102018000476.8A Ceased DE102018000476A1 (en) 2018-01-23 2018-01-23 SoC, which protects the intellectual property of a firmware while flashing through third parties

Country Status (1)

Country Link
DE (1) DE102018000476A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070047735A1 (en) * 2005-08-23 2007-03-01 Massimiliano Celli Method, system and computer program for deploying software packages with increased security
US20070180276A1 (en) * 1997-02-21 2007-08-02 Everett David B Key transformation unit for a tamper resistant module
US20140344581A1 (en) * 2013-05-16 2014-11-20 Cisco Technology, Inc. Secure Upgrades for Field Programmable Devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070180276A1 (en) * 1997-02-21 2007-08-02 Everett David B Key transformation unit for a tamper resistant module
US20070047735A1 (en) * 2005-08-23 2007-03-01 Massimiliano Celli Method, system and computer program for deploying software packages with increased security
US20140344581A1 (en) * 2013-05-16 2014-11-20 Cisco Technology, Inc. Secure Upgrades for Field Programmable Devices

Similar Documents

Publication Publication Date Title
EP2899714B1 (en) Secure provision of a key
DE60204049T2 (en) SYSTEMS, METHODS AND DEVICES FOR SAFE DATA PROCESSING
DE69417268T4 (en) ELECTRONIC LICENSE DISTRIBUTION METHOD
DE69736350T2 (en) METHOD AND DEVICE FOR ENCRYPTION IN A CAMERA
DE102005051577B4 (en) Method for encrypting or decrypting data packets of a data stream and signal sequence and data processing system for carrying out the method
DE102018127126A1 (en) Re-registration of physically unclonable functions remotely
DE112008003931T5 (en) Systems and procedures for data security
DE102008033895B4 (en) Apparatus and method for authenticating a flash program
EP3698517A1 (en) Bidirectionally linked blockchain structure
EP2801928B1 (en) Method for the copy-protected storage of information on a data carrier
DE112020001061T5 (en) ENCRYPTED GEAR PROGRAMMING
DE112014000584T5 (en) Achieving storage efficiency with end-to-end encryption using downstream (downstream) decryptors
EP3811260B1 (en) Cryptography module and method for operating same
EP3159824B1 (en) Method for processing an encrypted print job
EP1636700A1 (en) Method for booting up a software in the boot sector of a programmable read-only memory
DE102018000476A1 (en) SoC, which protects the intellectual property of a firmware while flashing through third parties
DE102015212657A1 (en) Providing a device-specific cryptographic key from a cross-system key for a device
DE102015111715B4 (en) Secure electronic signing of information
WO2010089083A2 (en) Device and method for preventing unauthorized use and/or manipulation of software
WO2020221776A1 (en) Method and device for transferring a boot code with improved data security
DE102005046462A1 (en) Network component for a communication network, communication network and method for providing a data connection
DE102016207145A1 (en) Control system for processing image data
EP0135888B1 (en) Process for preventing the execution of a programme in a computer which is not allowed to execute said programme
DE60306815T2 (en) METHOD AND SYSTEM FOR ENSURING THE INTEGRITY OF A SOFTWARE SENT TO A DATA END / WRENCH MODULE; AND STORAGE MEDIUM TO REALIZE THE PROCEDURE
EP1482453A2 (en) Method of loading data in a memory device

Legal Events

Date Code Title Description
R012 Request for examination validly filed
R002 Refusal decision in examination/registration proceedings
R003 Refusal decision now final