Method for starting a computing unit in a secure manner

By working together with the hardware security module and the cryptographic module, the system directly checks the boot storage area and indirectly checks other program areas, thus solving the security and efficiency issues during the device startup process and ensuring the authenticity and security of the program.

CN114637996BActive Publication Date: 2026-11-10ROBERT BOSCH GMBH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111539771.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-12-16
Filing Date
2021-12-16
Publication Date
2026-11-10
Estimated Expiration
2041-12-16

Smart Images

  • Figure CN114637996B_ABST
    Figure CN114637996B_ABST
Patent Text Reader

Abstract

A method for starting a computing unit in a secure manner, wherein a boot storage area is read by a HSM, an actual boot MAC is determined and compared with a reference boot MAC. If the actual boot MAC is identical to the reference boot MAC, a boot program stored in the boot storage area is executed by a host, wherein keys are loaded into a crypto module by the HSM, wherein a program storage area is read by the host and transferred to the crypto module. Actual program MACs for the program storage area are determined by the crypto module using the keys, respectively, wherein the actual program MACs are compared with corresponding reference program MACs by the HSM, respectively. An application program stored in the program storage area is executed by the host, and if it is determined in the comparison that the actual program MAC differs from the reference program MAC for the program storage area in which the application program is stored, the HSM inhibits execution of the application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for starting a computing unit in a secure manner, and a computing unit and computer program for performing the method. Background Technology

[0002] Programmable control devices are used in machines and vehicles to control the machines and vehicles or their components. For example, a motor vehicle may include control devices for engine control, braking systems, etc. These control devices include a processor (also referred to simply as a host or host system) having one or typically multiple processor cores, which executes programs stored in memory to perform the functions of the control devices.

[0003] For security reasons, it may be stipulated that the authenticity of the program be checked by the control device to prevent the execution of a manipulated program. This check can be performed by a so-called Hardware Security Module (HSM), which provides functionality to ensure that communication and programs executed by the control device are protected from manipulation. For this purpose, the HSM uses a signature calculated using cryptographic functions and a (secret) key. After the control device is connected, the authenticity of the host's loader must first be checked, wherein the loader specifically loads at least one application. This check of the authenticity of the loader and application by the HSM prolongs the startup phase of the control device. Additionally, the duration of the startup phase may also be negatively affected by the HSM connecting only to the memory where the loader and application are stored with lower bandwidth, and the control device must first be initialized by the loader and operate at a reduced clock frequency for an initial period, wherein the clock frequency is only increased within the scope of this initialization. Summary of the Invention

[0004] According to the present invention, a method for starting a computing unit in a secure manner, having the features of the independent patent claims, is provided, along with a computing unit and a computer program for performing said method. Advantageous designs are the subject matter of the dependent claims and the following description.

[0005] This invention utilizes the following method: only the authenticity of the host's boot store should be directly checked using a Hardware Security Module (HSM). After the bootloader is executed, other program stores of the host are indirectly checked using multiple cipher modules, which are loaded into these cipher modules by the host. This is advantageous because the host typically connects to the host memory with high bandwidth, while the HSM can only access the host memory with relatively low bandwidth.

[0006] More specifically, the method for secure initiation involves a computing unit having a host, a host memory, a hardware security module (HSM), an HSM memory, and at least one cryptographic module, wherein the HSM and the at least one cryptographic module are configured to determine a message authentication code (MAC).

[0007] The host has a processor with one or more host kernels, and the host is configured to execute programs (bootloaders, applications, checkers) stored in the host memory.

[0008] The HSM has at least one HSM kernel (HSM-Kern) in which programs stored in the HSM memory (HSM programs) can be executed, and the host cannot access the HSM just as it cannot access the HSM memory. The HSM acts as a trust anchor for the computing unit and, in particular, manages the secret keys and Reference Message Authentication Codes (MACs) stored in the HSM memory. Furthermore, the HSM or HSM programs are configured to provide cryptographic functions, particularly for calculating MACs, but also, for example, for encrypting and decrypting data.

[0009] The cryptographic module, or cryptographic module, is a hardware accelerator module for cryptographic functions. That is, the cryptographic module is configured to apply cryptographic functions to data transmitted to it, whereby the cryptographic functions are particularly the calculation of message authentication codes (MACs) (but may also include, for example, encryption and decryption). According to the invention, the calculation or determination of the actual program MAC is performed by the cryptographic module. Because the cryptographic module is implemented in hardware, it has high speed and predictable time requirements for executing cryptographic functions. The key is loaded from the HSM into the cryptographic module, which uses the key when applying cryptographic functions to data transmitted from the host to the cryptographic module. The (secret) key remains unknown to the host.

[0010] Both the host memory and the HSM memory are non-volatile memory, SSDs (Solid State Drives), or hard disks that can be connected to an external device, such as flash memory. The non-volatile memory can be integrated into a single chip, for example, with the host, the cryptographic module, and the HSM. The host memory and the HSM memory can be separate areas within a single memory element, or they can be located in separate memory elements.

[0011] Both the host memory and the HSM memory can include multiple memory elements. Preferably, the host cannot access the HSM memory.

[0012] A Message Authentication Code (MAC) allows verification of the authenticity of a message or data stored in a memory area of ​​the host machine. The MAC algorithm uses the data to be checked and a secret key as inputs, and calculates a checksum from this pair, called the MAC. If the data has been altered, this can be determined by comparing it with a previously calculated reference MAC. Therefore, in this application, the MAC determines whether the contents of the memory area being checked are unchanged (authentic) or altered (damaged). If the latter, it must be assumed that the program or data stored in the memory area has been manipulated. The MAC algorithm itself is known to those skilled in the art. Preferably, the Keyed-Hash-Message Authentication Code (HMAC; see NIST standard FIPS 198 or RFC 2104 for possible implementations) and / or cipher-based message authentication code (CMAC; see NIST Special Publication 800-38B for possible implementations) are used.

[0013] First, the HSM reads the boot memory from the host memory, determines the actual boot MAC for that boot memory, and compares the actual boot MAC with a reference boot MAC stored in the HSM memory. Then, if the actual boot MAC is the same as the reference boot MAC, the host executes the boot program stored in the boot memory. This can be seen as a verification check of the boot program's authenticity. The boot program or loader performs basic initialization of the computing unit; in particular, the boot program or loader can, for example, set the operating frequency of the computing unit. Further, the boot program calls application programs, which undergo subsequent authenticity checks according to the present invention.

[0014] The HSM loads one or more keys stored in the HSM memory into the at least one cryptographic module. The host reads one or more program stores in the host memory and transmits them to the at least one cryptographic module. The at least one cryptographic module determines the actual program MAC for each of the one or more program stores using the one or more keys. The HSM compares the actual program MAC with a corresponding reference program MAC stored in the HSM memory. The host executes one or more applications stored in the one or more program stores, wherein if the comparison determines that the actual program MAC differs from the reference program MAC for a program store containing at least one of the one or more applications, the HSM prevents the execution of the at least one application.

[0015] Program stores can be disjunctive and / or at least partially overlapping. Similarly, one program store can be a subset of another. Preferably, a program store comprises the entire host memory, preferably including the boot store and any possible check stores. Preferably, the sum of the sizes of all the host memory (occupied plus unoccupied) minus the sum of the sizes of all stores (program store + boot store + check store, where possible overlaps are counted only once) is less than the smallest program store. It can be thus determined that a manipulated application stores a copy of an unmanipulated application in another store, and this copy is always checked.

[0016] The determination of the MAC (which is both in the HSM and the cryptographic module) preferably takes into account the address information of the corresponding storage area.

[0017] In a secure method, a reference MAC (reference boot MAC, reference program MAC, reference check MAC) is determined and transmitted to the computing unit. For example, during flash programming of the host memory, the integrity of the programmed software can be ensured by means of asymmetric methods (e.g., RSA, ECC). The reference MAC can be determined or calculated simultaneously here. Therefore, the reference MAC corresponds to the MAC of the unmanipulated state of the software (boot program, application program, check program). The calculated reference MAC is then transmitted to the computing unit, more precisely, to the HSM or HSM memory, via a secure communication connection.

[0018] Preferably, the program execution begins only after the actual program MAC of the program storage area containing the application is determined and compared with the corresponding reference program MAC, and the HSM determines in this process that the actual program MAC is the same as the corresponding reference program MAC. In this way, no application can be launched without prior authenticity checks, thus providing a high level of security.

[0019] Preferably, if a comparison determines that the actual program MAC differs from the corresponding reference program MAC for a program memory area storing at least one of the one or more applications, then the execution of the at least one application is interrupted by the HSM. That is, an application already running can be interrupted.

[0020] Preferably, the HSM reads at least one check memory region from the host memory, determines at least one actual check MAC for the at least one check memory region, and compares the at least one actual check MAC with at least one corresponding reference check MAC stored in the HSM memory. If the at least one actual check MAC is the same as the at least one reference check MAC, the host executes at least one check program stored in the at least one check memory region. The at least one check program is configured to, when executed in the host, perform the step of reading one or more program memory regions from the host memory and transferring them to the at least one cryptographic module, wherein preferably, different check programs are executed in different host kernels of the host, and the host kernel is further preferably different from the host kernel in which the bootloader is executed. The check program implements the loading of program memory regions into the cryptographic module. Here, different program memory regions can be assigned to different check programs, thereby allowing the execution of the method to be parallelized and thus accelerated.

[0021] Preferably, the HSM sends at least one check request to the host: at the latest up to the determined check time point, at least one program memory area to be checked in the host memory is read and transmitted to the cryptographic module. More preferably, if the HSM determines that no actual program MAC has been determined for the at least one program memory area to be checked within a specific time period after the check time point determined in the at least one check request, or if the actual program MAC is different from the reference program MAC, then execution of the program stored in the at least one program memory area to be checked is prevented. The time period specifically takes into account the processing duration of the cryptographic module. This embodiment implements a monitoring function, wherein the host must prove to the HSM within a certain period that the corresponding memory area has been checked.

[0022] Preferably, the inspection time point includes a time point located within a predetermined time interval after the start time point of executing the bootloader and / or, if necessary, after the start time point of executing the at least one inspection program and / or after the start time point of executing the application; wherein, when using the application start time point, the at least one program storage area to be inspected is the program storage area in which the application is stored. An advantage of this implementation is that a program that has already been executed and has been modified in an unauthorized manner during runtime can be identified as manipulated and can be interrupted.

[0023] The computing unit according to the invention (e.g., a control device for a motor vehicle) is specifically configured using programming techniques to execute the method according to the invention. The computing unit includes a host, a host memory, a hardware security module (HSM), an HSM memory, and at least one cryptographic module, wherein the HSM and the at least one cryptographic module are configured to determine a message authentication code (MAC).

[0024] Preferably, the computing unit includes multiple cryptographic modules. Also preferably, the host includes multiple host kernels, wherein the number of host kernels is greater than or more preferably equal to the number of cryptographic modules. These measures enable the parallel execution of authenticity checks on multiple program storage areas, thereby further accelerating the startup of the method and the computing unit or the application.

[0025] It is also advantageous to implement the method according to the invention in the form of a computer program or computer program product having program code for performing all method steps, as this results in particularly low cost, especially where the control device performing the execution is also used for other tasks and therefore always exists. Suitable data carriers for providing the computer program are, in particular, magnetic, optical, and electrical memories, such as hard disks, flash memory, EEPROM, DVDs, etc. The program can also be downloaded via computer networks (Internet, intranet, etc.).

[0026] Other advantages and design solutions of the present invention will become apparent from the specification and drawings. Attached Figure Description

[0027] The invention is illustrated schematically with reference to embodiments in the accompanying drawings, and the invention is described below with reference to the accompanying drawings.

[0028] Figure 1 The structure of the computing unit according to the embodiment is schematically shown; Figure 2 A flowchart is shown of a method for starting a computing unit in a safe manner according to a preferred embodiment. Detailed Implementation

[0029] Figure 1 The structure of a computing unit 1, which can be used to implement the present invention, is schematically shown. This computing unit is, for example, a control device in a motor vehicle or a control device in a machine in an industrial facility. The computing unit 1 includes a host 2, a hardware security module (HSM) 4, and at least one cryptographic module 6 as computing elements. A non-volatile HSM memory 8 and a non-volatile host memory 10 are also included in the computing unit 1.

[0030] Furthermore, the computing unit 1 may have at least one external interface 12 connected to the host. The at least one optional external interface 12 may be a serial or parallel interface, such as an Ethernet interface, a CAN bus interface, a USB interface, etc., and is used for communication between the computing unit and external devices; for example, an engine control device may be connected to sensors or other control devices via a CAN bus. Some or all of these components may be integrated into a single chip, for example, in the form of a microcontroller.

[0031] The host 2 has one or more computing kernels 20 (referred to as host kernels), in which computer programs (also simply programs) can be executed. The program that implements the actual function of the computing unit, for example, a program that controls the engine in the case of an engine control device, is hereinafter referred to as an application program or application software. Similarly, at least one bootloader or startup program is provided, which, upon execution, specifically initializes the computing unit or its components and then invokes the application program. Furthermore, at least one memory checker or check program can be provided for execution, which, upon execution, enables a memory verification check. Such a checker program can also be part of the bootloader.

[0032] These programs are stored in host memory 10, which has multiple storage areas. Exemplary references include storage areas 22a, 22b, and 22c. The bootloader may be stored, for example, in boot storage area 22a. The at least one checker may be stored in check storage area 22b. Applications may be stored in other application storage areas 22c. Even though host memory is referred to herein as a single memory element, it may typically comprise multiple memory elements or host memory elements.

[0033] The host memory 10 is connected to the host 2 via a data connection 24, such as a serial or parallel connection, for exchanging data, wherein the host (or its computing core) is able to both read data from the host memory and write data to the host memory. Alternatively, the host memory or at least one of a plurality of host memory elements may be implemented as an external host memory or external host memory element connected via an external interface 12.

[0034] The HSM 4, which provides security-related functions, includes at least one computing core (not shown) (referred to as the HSM core) in which at least one program (referred to as the HSM program) stored in the HSM memory 8 can be executed, wherein the at least one program implements these functions. These functions may include cryptographic functions, particularly data encryption and / or decryption, or the determination and / or verification of message authentication codes. The HSM 4 is connected to the host via connection 26, for example, a serial or parallel connection, for exchanging data. Thus, data can be transferred from the host to the HSM, which, for example, encrypts or decrypts the data or checks the message authentication code. In particular, the HSM 4 or the HSM program executed by the HSM 4 is configured to prevent the execution of the program in the host 2, i.e., to wait for permission from the HSM to be granted, or to terminate the execution of a program that is already running.

[0035] HSM 4 is also connected to host memory 10 via connection 28, such as a serial or parallel connection, for exchanging data, where HSM can perform read access to host memory. Write access can be implemented, but is not required. Connection 28 between HSM and host memory typically has significantly lower bandwidth than connection 24 between host and host memory, for example, only one-tenth.

[0036] The connection between HSM 4 and external interface 12 (not shown) can also be configured to, for example, enable HSM programs, keys and / or message authentication codes to be updated directly through HSM, i.e., without the need to indirectly transmit data to HSM via the host.

[0037] HSM memory 8 is (preferably only) connected to HSM 4 via connection 28, such as a serial or parallel connection, for exchanging data, wherein HSM is capable of both reading data from and writing data to HSM memory. Preferably, there is no connection from HSM memory 8 to host 2; therefore, security-related data (keys, message authentication codes, etc.) stored in HSM memory cannot be read or modified by the host.

[0038] In addition to the HSM program, the HSM memory 8 also stores the secret key 32 and the reference message authentication code (reference MAC) 34a and 34b.

[0039] Cryptographic module 6, or cryptographic module, is a hardware accelerator module for cryptographic functions (e.g., encryption, decryption, and calculation of message authentication codes). That is, cryptographic module 6, or cryptographic module, is configured to apply cryptographic functions to data transmitted to it. The secret key used in this process can be stored in key register 36. Multiple cryptographic modules can be configured; only one is shown here, while other cryptographic modules are indicated by dots. The descriptions of the shown cryptographic module also apply to the other cryptographic modules.

[0040] The cryptographic module 6 is specifically configured to calculate or determine a Message Authentication Code (MAC) for the transmitted data using a key stored in the key register 36. The result, i.e., the calculated MAC, is stored by the cryptographic module 6 in the result register 38.

[0041] The (at least one) cryptographic module 6 is connected to the host 2 via connection 40 and to the HSM 4 via connection 42. These two connections can be independent of each other and can be serial or parallel connections.

[0042] The connection 40 between host 2 and cryptographic module 6 is advantageously designed such that the host can only transmit data for which the MAC should be calculated to cryptographic module 6, but cannot read from or write to the key register 36, nor can it write to the result register 38 (additionally, read access to the result register can also be prevented). If encryption and / or decryption are also performed by the cryptographic module as cryptographic functions, then cryptographic module 6 can be specified to transmit encrypted or decrypted data to the host. However, here the host also does not have read or write access to the key register, and at least does not have write access to the result register.

[0043] On the other hand, the connection 42 between HSM 4 and cryptographic module 6 is designed so that HSM 4 can write to key register 40, that is, write the key to key register 40, and can read result register 42, that is, read the calculated MAC.

[0044] This design of the connection 40, 42 between the cryptographic module 6 and the host 2 or HSM 4 ensures that the host or any potentially compromised program running on the host cannot possess the secret key or manipulate the key register.

[0045] Figure 2 A flowchart illustrating a method for securely starting a computing unit according to a preferred embodiment of the present invention is shown. Immediately after starting or resetting the computing unit in step 100, the authenticity of the bootloader is checked in step 102. For this purpose, the HSM, more precisely, the HSM program executed within the HSM kernel, reads the boot memory containing the bootloader from host memory and calculates or determines the actual boot MAC (Ist-Programm-MAC) of the read boot memory, i.e., applies a MAC algorithm to the data contained in and read from the boot memory. A secret key stored in the HSM memory is used here. The HSM compares the calculated actual boot MAC with a reference boot MAC stored in the HSM memory.

[0046] If the actual boot MAC differs from the reference boot MAC, meaning the boot memory has changed relative to an earlier reference state, and therefore the authenticity of the bootloader cannot be confirmed, proceed to step 103, where appropriate measures are taken to prevent the execution of a manipulated bootloader as much as possible. One possible measure is to output or send an error message (preferably, the HSM is connected to an external interface for this purpose) and preferably stop the computing unit. The error can then be analyzed, and the host memory, or at least the boot memory, can be reprogrammed, or if the reference boot MAC is determined to be incorrect during error analysis, the reference boot MAC can be modified in the HSM memory. Another possible measure is to start a backup bootprogramm stored in immutable memory. Other possible measures are also conceivable.

[0047] On the other hand, if the actual boot MAC is the same as the reference boot MAC, meaning the boot memory has not changed relative to the earlier reference state and thus the authenticity of the bootloader is confirmed, then the HSM allows the execution of the bootloader. Correspondingly, proceeding to step 104, in which the bootloader is executed. The bootloader typically initializes the computing unit and then prompts the application to start. The initialization may in particular include setting the operating frequency of the computing unit; for this purpose, a phase-locked loop (PLL) is mostly started. Prior to this setting, the computing unit, for example, operates only at a relatively low backup frequency.

[0048] In step 106, which can also be executed in parallel with step 104 (execute the bootstrap), the HSM loads the secret key into the key register of the cryptographic module. Specifically, the HSM reads the key stored in the HSM memory and transfers or writes the key to or into the key register of the cryptographic module. If multiple cryptographic modules exist, keys are also loaded into those modules accordingly. Here, the allocation of a specific key to a specific cryptographic module can be pre-defined.

[0049] In optional step 108, the HSM checks the authenticity of at least one checking procedure. To do this, the HSM reads at least one check memory containing at least one checking procedure from host memory and calculates or determines at least one actual check MAC for the read check memory, i.e., applying a MAC algorithm to data contained in and read from the at least one check memory. The HSM compares the calculated at least one actual check MAC with at least one reference check MAC stored in the HSM memory. It is possible that a check memory contains multiple checking procedures, or a checking procedure extends across multiple check memories; therefore, the number of checking procedures need not be the same as the number of check memories.

[0050] When executed on the host machine, the program that implements step 110 is called the checker. Step 108 is optional because such a checker can already be included in the bootloader whose authenticity has been checked in step 102.

[0051] If the comparison determines that the actual check MAC differs from the corresponding reference check MAC—that is, the corresponding check memory has changed relative to an earlier reference state and therefore the authenticity of the check program stored in the check memory is not confirmed—then proceed to step 109, in which appropriate measures are taken to prevent the execution of the manipulated check program as much as possible. Specifically, the execution of the check program can be prevented in step 109, i.e., the check program is not started. Similarly, error messages can be output or sent to, for example, prompt the user of the computing unit about possible manipulation, who can then analyze the error and, for example, reprogram the check memory.

[0052] On the other hand, if it is determined in the comparison that the actual check MAC is the same as the corresponding reference check MAC, that is, the corresponding check memory area has not changed relative to the earlier reference state, then proceed to step 110.

[0053] In step 110, the host, more precisely, the checker or bootloader executing in the host (if the bootloader includes a checker), loads a program store in the host memory into the cryptographic module; that is, the host reads the program store from the host memory and transfers it to the cryptographic module. More precisely, it reads data stored in the program store and transfers it to the cryptographic module. A store in the host memory that at least partially stores one or more applications is called a program store. An application may also extend across multiple program stores. Therefore, a one-to-one allocation between program stores and applications is not necessarily required, although this is certainly possible and advantageous because it allows for explicit allocation of manipulation attempts.

[0054] In step 112, the cryptographic module calculates or determines the actual program MAC of the program store transmitted from the host. The cryptographic module then applies the MAC algorithm to the data transmitted from the host, using a key stored in the key memory, which was transferred from the HSM to the cryptographic module or the key memory in step 106. If multiple keys exist, they must be clearly assigned to the program store, for example, by a suitable identifier, which may also be pre-given by the HSM. The determined actual program MAC is stored in the cryptographic module's result register.

[0055] Steps 110 (loading the program storage area into the cryptographic module) and 112 (determining the actual program MAC) are not necessarily executed sequentially, but are typically executed in parallel. This is especially true for MAC algorithms that process data block by block, such as the mentioned HMAC and CMAC, which apply block ciphers or hash functions to data blocks and chain these blocks together. Thus, the data (block) stream is transmitted through the host to the cryptographic module and processed in parallel as blocks.

[0056] In step 114, the HSM compares the actual program MAC with the corresponding reference program MAC stored in the HSM memory. To do this, the HSM reads the actual program MAC from the result register of the cryptographic module and reads the corresponding reference program MAC from the HSM memory.

[0057] If the comparison determines that the actual program MAC differs from the corresponding reference program MAC—that is, the corresponding program memory has changed relative to an earlier reference state, and therefore the authenticity of the application stored in the program memory cannot be confirmed—then proceed to step 115, in which appropriate measures are taken to prevent the execution of the manipulated application as much as possible. Specifically, the execution of the application can be prevented in step 115, i.e., the application is not started, or if it has already been executed, the application is interrupted. Similarly, error messages can be output or sent to, for example, to alert the user of the computing unit to possible manipulation, who can then analyze the error and, for example, reprogram the program memory.

[0058] On the other hand, if the comparison determines that the actual program MAC is the same as the corresponding reference program MAC, that is, the corresponding program storage area has not changed relative to the earlier reference state, then proceed to step 116, in which the host executes one or more applications stored in the program storage area.

[0059] In principle, it is possible that, unlike the order shown, the application can be started immediately by the host or bootloader without waiting for prior checks, and that the application is interrupted during execution if, later in step 114, it is determined that the program memory containing the corresponding application has an actual program MAC different from the corresponding reference program MAC. The advantage of this is that the application can be started as quickly as possible. Manipulation is then identified, for example, as described in step 114.

[0060] However, it is preferable that the application is only allowed to start after the program storage area where the application is stored has been checked, that is, after the actual program MAC has been determined and compared by the HSM with the corresponding reference program MAC. Therefore, step 116 is preferably executed only after the program storage area where the corresponding application is stored has been checked according to steps 110, 112, and 114. This implementation provides greater security because it prevents the launch of manipulated applications from the outset.

[0061] In optional step 118, according to a preferred embodiment, the HSM may send a check request (arrow 118a) to the host, requesting the host to load the program store into the cryptographic module. Here, the check request specifies the program store to be loaded and the determined check time. The host (or checker or bootloader) should then, according to step 110, load the program store into the cryptographic module up to the stated check time, or at least have already begun doing so at that check time. According to step 112, the cryptographic module determines the corresponding actual program MAC for the transmitted program store.

[0062] During a specific time period following the inspection time point specified in the inspection request, the HSM jumps (arrow 118b) to step 114, that is, comparing the actual program MAC calculated based on the inspection request with the corresponding reference program MAC and blocking (step 115) or allowing (step 116) execution of the program stored in the program memory area specified in the inspection request. The time period takes into account, in particular, the processing duration of the cryptographic module and can therefore preferably be given by, the processing duration of the cryptographic module (which is known in itself, especially if the cryptographic module is implemented as a hardware module), wherein the size of the program memory area to be inspected may also be taken into account.

[0063] Of course, this behavior (Vorgehensweise) can be performed on multiple or all program stores, or on the boot store or the check store, where different check times can be given in advance and a program store can be checked multiple times.

[0064] For example, the check time point can be determined such that it falls within a specific time interval after the computer unit starts up, after the checker or bootloader begins execution, or after the application stored in the program store to be checked begins execution. Multiple check time points can also be pre-defined independently of each other. For example, the program store and corresponding check time points can be randomly selected. Alternatively, the program store can be checked at multiple check time points, such as evenly or randomly spaced. This behavior enables the identification of manipulation attempts that did not exist at the time of computer unit startup but were performed during runtime, even after a long period of computer unit operation.

Claims

1. A method for starting a computing unit in a secure manner, the computing unit having a host, a host memory, a hardware security module (HSM), an HSM memory, and at least one cryptographic module, wherein the HSM and the at least one cryptographic module are configured to determine a message authentication code (MAC). The HSM reads the boot memory area from the host memory, determines the actual boot MAC for the boot memory area, and compares the actual boot MAC with the reference boot MAC stored in the HSM memory. If the actual boot MAC is the same as the reference boot MAC, then the host executes the boot program stored in the boot storage area; The HSM loads one or more keys stored in the HSM memory into the at least one cryptographic module; The host reads one or more program storage areas from the host memory and transmits them to the at least one cryptographic module; The at least one cryptographic module determines the actual program MAC for the one or more program storage areas when using the one or more keys; The HSM compares the actual program MAC with the corresponding reference program MAC stored in the HSM memory. The host executes one or more applications stored in the one or more program stores; and If, during the comparison, it is determined that the actual program MAC is different from the reference program MAC for a program storage area where at least one of the one or more applications is stored, then the HSM prevents the execution of the at least one application.

2. The method according to claim 1, wherein, After determining the actual program MAC of the program storage area where the application is stored and comparing it with the corresponding reference program MAC, the program is executed only if the HSM determines in this process that the actual program MAC is the same as the corresponding reference program MAC.

3. The method according to claim 1, wherein, If, during comparison, it is determined that the actual program MAC differs from the corresponding reference program MAC for a program storage area containing at least one of the one or more applications, then the HSM prevents the execution of the at least one application.

4. The method according to claim 1, in, The HSM reads at least one check memory area from the host memory, determines at least one actual check MAC for the at least one check memory area, and compares the at least one actual check MAC with at least one corresponding reference check MAC stored in the HSM memory. If the at least one actual check MAC is the same as the at least one reference check MAC, then the host executes at least one check program stored in the at least one check storage area. The at least one checking procedure is configured such that, when executed in the host, the host performs the step of reading one or more program storage areas in the host memory and transmitting them to the at least one cryptographic module. Preferably, different inspection procedures are executed in different host kernels of the host, wherein the host kernel is further preferably different from the host kernel in which the bootloader is executed.

5. The method according to any one of the preceding claims, wherein the HSM sends at least one inspection request to the host: at the latest up to a determined inspection time point, reading at least one program storage area to be inspected from the host memory and transmitting it to the cryptographic module.

6. The method according to claim 5, wherein, If the HSM determines that no actual program MAC is determined for the at least one program storage area to be inspected within a specific time period after the inspection time point determined in the at least one inspection request, or if the actual program MAC is different from the reference program MAC, then execution of the program stored in the at least one program storage area to be inspected is prevented.

7. The method according to claim 5, wherein, The inspection time points include: a time point located within a predetermined time interval after the start time point of executing the bootstrap and / or, if claim 4 is invoked, a time point within a predetermined time interval after the start time point of executing the at least one inspection procedure and / or after the start time point of executing the application; wherein, when using the start time point of the application, the at least one program storage area to be inspected is a program storage area in which the application is stored.

8. A computing unit comprising a host, a host memory, a hardware security module (HSM), an HSM memory, and at least one cryptographic module, wherein the HSM and the at least one cryptographic module are configured to determine a message authentication code (MAC); wherein the computing unit is configured to perform all method steps of the method according to any one of the preceding claims.

9. The computing unit according to claim 8, wherein the computing unit comprises a plurality of cryptographic modules.

10. The computing unit according to claim 8 or 9, wherein, The host has multiple host kernels, and the number of host kernels is greater than the number of cryptographic modules, or more preferably equal to the number of cryptographic modules.

11. A computer program product comprising machine-readable instructions that, when executed on a computing unit, cause the computing unit according to any one of claims 8 to 10 to perform all method steps of the method according to any one of claims 1 to 7.

12. A machine-readable storage medium having a computer program product according to claim 11 stored thereon.

Citation Information

Patent Citations

  • Key transmission method and POS terminal

    CN108496336A

  • Derivation of a token using a transaction-specific unique key

    EP3699851A1