Method for checking data in a computing unit

By setting a storage protection unit in the computing unit, the storage area is protected according to preset access restrictions, the TOCTOU problem is solved, unauthorized data tampering is prevented, and the authenticity and integrity of the data are ensured.

CN119895420APending Publication Date: 2025-04-25ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380065929.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-14
Filing Date
2023-09-05
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When verifying the data in the calculation unit, a TOCTOU problem may occur, resulting in the data may be tampered with unauthorized between the time when the data is checked and the time when the data is used, and the security unit cannot recognize it.

Method used

By setting a storage protection unit in the computing unit, the storage area is protected according to preset access restrictions, and only the secure unit is allowed to perform read and write access, preventing unauthorized access and tampering.

Benefits of technology

It effectively prevents unauthorized tampering during or after data inspection, ensures the authenticity and integrity of the data, and solves the TOCTOU problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119895420A_ABST
    Figure CN119895420A_ABST
Patent Text Reader

Abstract

The invention relates to a method for checking data in a computing unit (100), the computing unit (100) having a memory unit (140, 150), a security unit (120) and a memory protection unit (130), the method comprising the following steps: storing the data to be checked in a predetermined memory region in the memory unit (140, 150); configuring the storage protection unit (130) by means of the security unit (120) in order to protect the predetermined storage area according to a predetermined access restriction; performing storage protection on the preset storage area according to the preset access restriction by the storage protection unit (130); and checking the data stored in the predefined storage area by means of the security unit (120).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for checking data in a computing unit, as well as to a computing unit and a computer program for carrying out the method. Background of the Invention

[0003] When checking and subsequently using data in a computing unit, the so-called TOCTOU problem (English: “Time-of-Check-to-Time-of-Use-Problem”) may occur, according to which the data at the time of checking the data (“Time-of-Check”) may differ from the data at the time of using the data (“Time-of-Use”). For example, data can be read from a storage unit by a security unit that is set up to check the data and checked with the aid of cryptographic methods. However, if an attacker who has compromised the computing unit (e.g. malware) makes unauthorized changes to the data in the storage unit during or after the data check, these changes are usually no longer recognizable by the security unit. The security unit may then incorrectly verify the authenticity and integrity of the data, even though the data was subsequently tampered with by the attacker. This may result in the tampered data being further processed in the computing unit. Such security units usually have no way of recognizing whether the verified data is also correctly processed or further processed and whether it has been tampered with without authorization after the check. Summary of the invention

[0004] According to the invention, a method for checking data in a computing unit as well as a computing unit and a computer program for carrying out the method are proposed having the features of the independent claims. Advantageous embodiments are the subject matter of the dependent claims and the following description.

[0005] The computing unit includes a storage unit (such as RAM, ROM or flash memory), a security unit or security module and a storage protection unit. The security unit is particularly configured as a secure or protected unit for performing cryptographic operations. The storage protection unit (English: "Memory Protection Unit", MPU) is particularly configured to receive and manage access requests to the storage unit. It is understood that the computing unit may also include other hardware and software units, such as a processor unit, input and output interfaces, etc.

[0006] In the scope of this method, the data to be checked are stored in a preset storage area or a preset address range in the storage unit. For example, these data can be stored in a preset storage area by a processor unit or a process or application executed by the processor unit.

[0007] The security unit configures the storage protection unit or instructs the storage protection unit to protect the preset storage area according to the preset access restriction. Through this access restriction, it is particularly preset which units in the computing unit are allowed to access the preset storage area and the data stored therein, and which units are prohibited from accessing. In particular, the storage protection unit itself presets this access restriction.

[0008] After the configuration, the storage protection unit performs storage protection on the preset storage area according to the preset access restriction, or the storage protection unit establishes storage protection accordingly. When the storage protection unit receives an access request to the storage area thereafter, the storage protection unit can purposefully allow or block the corresponding requested access according to the preset access restriction during the storage protection process.

[0009] The data stored in the predefined storage area are checked by the security unit, in particular by means of cryptographic operations, for example by means of keys and / or other cryptographic methods, which can be stored in special storage units of the security unit. For example, the security unit can calculate a cryptographic signature for this purpose. By means of this check, in particular the authenticity, correctness or integrity of the data can be checked. However, the specific method of checking is not important.

[0010] The result of the check can be stored by the security unit in the computing unit, in particular in a further predefined storage area of ​​the storage unit itself. If the data stored during the check are verified or if the authenticity of the stored data is verified, these data can be used or released for further processing in the computing unit. If, on the other hand, the authenticity cannot be verified, the data can be discarded, for example, and no longer released for further processing.

[0011] The invention particularly advantageously solves the so-called TOCTOU problem (English: "Time-of-Check-to-Time-of-Use-Problem"). The invention provides a cost-effective, efficient and safe possibility to prevent unrecognized, unauthorized manipulation of data during or after the data are checked. By defining and implementing access restrictions, in particular, only trusted, secure units can be allowed to access the data. In this way, manipulation of the data during or after the data are checked by the security unit can be advantageously prevented. By means of the preset access restrictions and the implemented storage protection, the storage area in which the data to be checked is stored can be protected from unauthorized access, for example at least until the data are further processed after their verification. If an attacker wants to try to access and change the data to be checked or checked by the security unit, such an attempted access is advantageously blocked by the storage protection unit by the established storage protection. In this way, a potential attacker (who has taken over a computing unit or a software system (not including the security unit)) can be prevented from transmitting manipulated information to the security unit and / or from making unauthorized changes to the contents of the storage area during the check by the security unit. In particular, the security unit can dynamically configure the storage protection unit to individually protect individual storage areas or address areas in the storage unit. Through this cooperation between the security unit and the storage protection unit, in particular, a dynamic storage protection unit can be provided, which can be dynamically configured by the security unit online and on demand during the operation of the computing unit.

[0012] The invention provides, in particular, a cost-effective possibility for dynamically protecting individual memory areas before data verification. The remaining memory areas of the memory unit can continue to be used normally during the operation of the computing unit. For example, in this way, costs and resources can be saved compared to dedicated memory units or dedicated memory areas which are specifically assigned to the security unit and which only the security unit can access during the operation of the computing unit. In addition, the method allows the trust boundary (English: "Trust Boundary") and / or the security zone (English: "Secure Zone") of the security unit to be efficiently and dynamically increased by further memory areas.

[0013] In addition, the security unit can directly access the storage unit that is also used during the normal operation of the computing unit for the purpose of verifying the data, so that, for example, the verification of a large amount of data can be realized in a simple manner. In a traditional manner, it is usually not easy to copy a large amount of storage area or a large amount of data to a security unit, for example, to verify a long certificate chain or in a software update environment. Since a long certificate chain occupies a large storage area, it is mostly not stored in a safe storage area. Then, in order to transmit such a certificate chain, parsing or segmentation is usually performed, and it may be necessary to execute an untrusted application for this purpose. In contrast, within the scope of this method, a large amount of storage area can also be transferred to the security unit in a complete, safe and tamper-proof manner. Therefore, for example, it is also possible to safely verify a long cryptographic certificate chain, such as an X.509 certificate.

[0014] Furthermore, the method can realize secure storage or secure storage of data in a memory (English: "Secure Flash" or "Secure Flashing") by programming data or software into a storage unit via a host (e.g., via a processor unit of a computing unit or via an application program executed in the computing unit) and by signature verification of the programmed software via a secure unit. Since the integrity of the software can be maintained by the method, it is possible to prevent a tampered host from tampering with the programmed software after verification but before execution of the programmed software.

[0015] The method is suitable, for example, for computing units that cannot be started securely (English: "Secure Boot") and also for systems that have to check large data volumes. Even if a computing unit uses and implements a secure boot method, the data verification according to the method can, for example, limit and reduce the impact of runtime attacks.

[0016] The security unit can be, for example, a hardware-based unit or a unit implemented in hardware, such as a so-called hardware security module (English: "Hardware Security Module", HSM), in particular an internal or external peripheral device for performing cryptographic operations. In addition, the security unit can also be implemented in software or based on software, for example as a secure or trusted runtime environment (English: "Trusted Execution Environment", TEE), which represents a secure area of ​​the processor unit in which only applications that have been released specifically for this purpose are allowed to be executed. For example, such a TEE environment can be set up as a so-called "Trustzone", in which a virtual processor is provided as a secure runtime environment.

[0017] In order to manage access to the storage unit by the storage protection unit, for example, which units of the computing unit, in particular which processor units and / or which processes or applications are allowed to access which address areas or storage areas of the storage unit can be saved in a table. If the storage protection unit receives an access request to a specific storage area, the storage protection unit checks according to the table: whether the unit with the corresponding request is allowed to access the storage area. Accordingly, the storage protection unit allows or blocks the requested access. For example, the security unit can create or change entries in the table involving the corresponding storage area to configure the storage protection unit. The storage protection unit will then implement these entries and only allow authorized access, thereby executing or establishing corresponding storage protection through the storage protection unit.

[0018] Advantageously, the computing unit is configured in such a way that only the security unit can or is allowed to configure the storage protection unit. Thus, in particular, only the security unit is allowed to define which storage areas are to be dynamically protected. Thus, it is expediently not allowed for other hardware and software units of the computing unit, which for security reasons can be considered untrustworthy or potentially compromised, to configure the storage protection unit in order to define, change or cancel storage protection. In this way, in particular, it is prevented that an attacker (for example, an attacker who has taken over the computing unit but not the security unit) can change the storage protection and tamper with data without being noticed.

[0019] Particularly advantageously, the preset access restriction includes that only the security unit can or is allowed to have read and write access to the preset storage area. Other units in the computing unit (e.g., processes, applications, processor units, processor cores, etc.) are in particular only allowed to read or not have access to the preset storage area at all. Thus, changes to the storage area can be made exclusively by the security unit and only by the security unit, and the remaining hardware and software units of the computing unit are at least prohibited from having write access. It is therefore particularly expedient to prevent unauthorized changes to the data during or after the check by the security unit.

[0020] Particularly expediently, the computing unit is configured as a security unit and can specify in the access restrictions for each unit of the computing unit (e.g., each processor core) whether the corresponding unit is allowed to have read and write access, only read access, or no access to a preset storage area. For example, a specific processor core that is scheduled to process data can be allowed to have read access to a storage area, while the other processor cores are not allowed to have access. For example, according to the access restrictions, if the data to be protected specifically should only be readable after being checked and released by the security unit (e.g., a protected algorithm), then read and write access to the storage area can be prohibited.

[0021] Preferably, when receiving an access request to a preset storage area, for access, especially write access, which is not allowed according to the preset access restriction or violates the preset access restriction, it is judged, evaluated or assessed whether the security unit prompts to cancel or change the storage protection of the preset storage area, and / or whether to redirect the access to other storage areas (for example, redirect to other storage areas in another storage unit of the storage unit or the computing unit) according to the access request. For example, when receiving such an access request, a notification (especially an interrupt message, and in addition, especially an exception message) can be sent to, for example, a processor unit of the security unit and / or the computing unit. Then, after receiving the notification, the security unit or the processor unit can decide how to handle the access request, especially by a unit that specifically handles such notifications (for example, "ExceptionHandler").

[0022] Preferably, after the stored data have been checked by the security unit, in particular when the stored data have been verified during the check or when the authenticity of the data has been verified, the security unit reconfigures the storage protection unit to cancel the storage protection for the preset storage area. For example, the security unit can change or delete the corresponding entries in the corresponding table of the storage protection unit for this purpose, which define the allowed or prohibited access to the storage area by different units of the computing unit. After this configuration, the storage protection unit cancels or no longer performs the storage protection for the preset storage area. For example, after the data have been successfully verified, the storage protection can be canceled so that other units can access and further process the data. In particular, the storage protection can be canceled in time or directly before the planned authorized access to minimize the possibility of unauthorized tampering of the data as much as possible.

[0023] Alternatively, after the stored data is checked by the security unit, in particular when the stored data is verified during the checking process or when the authenticity of the data has been verified, the security unit preferably reconfigures the storage protection unit to protect the preset storage area according to the preset second access restriction. Subsequently, the storage protection unit performs the second storage protection of the preset storage area according to the preset second access restriction. For example, a specific unit that is scheduled to access the verified data may be allowed to perform corresponding read and / or write access according to the second access restriction.

[0024] Preferably, the storage protection unit is reconfigured after the startup cycle to cancel the storage protection or to perform a second storage protection. In such a startup cycle (especially initially when starting the computing unit or the system), the storage protection is still valid as intended. Therefore, the corresponding data can still be protected after the reset. For example, the security unit is first released to the host after the startup cycle to cancel the storage protection. This can be achieved, for example, by a reset value of the storage protection unit or by a non-volatile configuration of the storage protection unit, which is set by the system after the reset, either by the security unit when the host starts the security unit before, or by a hardware feature in the controller during the reset. In this way, it can be ensured in particular that the data cannot be tampered with due to a restart.

[0025] Advantageously, after verifying the stored data, the security unit stores the result of the verification in another storage area of ​​the storage unit or in another storage unit of the computing unit. Furthermore, the security unit cancels or changes the storage protection so that at least read access to the storage area is allowed to the processing unit, which can be a host, such as a process, an application, a processor unit, a processor core, etc. If the stored data has been verified according to the stored result or if the authenticity of the data has been confirmed, the processing unit reads and processes the stored and verified data.

[0026] Advantageously, after the data to be checked are stored in the preset storage area, the security unit is instructed to check the data stored in the preset storage area. For example, the instruction can be made by a processing unit that should access the data and should further process the data. For example, the processing unit can output or transmit corresponding instructions, messages or requests to the security unit for this purpose. Expediently, the security unit thus configures the storage protection unit in response to a corresponding request of the software application of the computing unit.

[0027] Preferably, in order to issue such an indication to the security unit, the corresponding instruction is stored in another storage area of ​​the storage unit or in another storage unit of the computing unit. In particular, the instruction can store at which specific storage address the data to be checked is stored. A notification, in particular an interrupt, is sent to the security unit. In particular, the notification can store the storage address at which the instruction is stored. After receiving the notification, the security unit reads the stored instruction and performs a check of the data.

[0028] According to an advantageous embodiment, the data to be checked are part of an update and may include, for example, new firmware for the computing unit or new parts of the firmware or new data for the firmware. For example, the update may be an OTA update ("over-the-air"), in particular a FOTA ("Flashen over the air") or SOTA ("Software over the air") update, in which the update data are transmitted via a radio connection, for example via the Internet.

[0029] Before the data or update data are stored in a predefined storage area, the data are first received via an interface of the computing unit (e.g. via a radio interface and / or a diagnostic interface). After the data have been received, the storage area is protected by means of access restrictions and storage protection by means of a security unit and a storage protection unit. Subsequently, the security unit checks the data, in particular whether the data have been received completely and correctly and whether no harmful software has been transmitted. After checking and verifying the stored data, the data in the predefined storage area are activated or the data are installed in another storage area (e.g. another storage area of ​​the storage unit or another storage unit of the computing unit). After such activation or installation, the update data can be used in future program flows.

[0030] By this method, it can be ensured that unauthorized tampering of the update data does not occur between the verification of the update data and its activation or installation. In this way, the TOCTOU problem in OTA updates can be particularly purposefully solved.

[0031] In order to download and check the update data in a traditional way, for example, a specially reserved memory can be used, which can only be changed by a hardware security module (HSM), which then checks these data. However, this special memory may bring high costs, especially in the case of normal applications, the memory remains unused. Alternatively, temporary registers are usually used outside the HSM, but temporary registers can also be accessed by the (unsafe) host CPU and can therefore be tampered with. Although, for example, when the update data or firmware is installed in the HSM, it can be checked again whether tampering has occurred, but this may cause availability problems, because the old data or old firmware may have been at least partially overwritten and can no longer be rolled back.

[0032] In contrast, the present method makes it possible to use any memory in the system for updating, thereby eliminating the need for specially reserved memory and providing the availability of the system at any time. Since the transmission of data may be disturbed or interrupted (e.g. due to an attack or radio interference), a storage area for holding update data can be preset, which can fully accommodate the new storage content, especially for denial-of-service and availability reasons. Thus, the full functionality of the system can be ensured during the download. In parallel, the reserved, preset storage area is filled with the downloaded data. The preset storage area can be, in particular, any storage area in the system. After the data transfer to the storage area is completed, the system triggers the security unit expediently. Subsequently, the security unit expediently specifies exclusive access to the storage area according to the preset access restrictions, so that at least other units are prohibited from writing access. After that, the security unit starts to check the new storage content. In the case where the storage area is used as a temporary buffer, in which the update data is copied to other target locations after its verification, the exclusive access can be canceled again after the verification, and the buffer can be released again for other units.

[0033] The method is particularly suitable for the field of (motor) vehicles. The computing unit can be, for example, a microcontroller or control device of a (motor) vehicle, such as an engine control device, a domain control device, an airbag control device, a brake control device, etc. The data to be checked can be, for example, vehicle data, which is detected by sensors of the vehicle, for example. For example, the processing of these data can be carried out in the process of safety-critical functions, which are performed to enable the vehicle to operate safely and to control the vehicle, such as in the process of engine control, domain control, airbag control and / or brake control, in the process of driver assistance functions, in the process of assisted autonomous driving (IAD) or general automation or partial automation driving, etc. In addition, the data to be checked can also be an update of the control device software or vehicle software. Through this method, in particular, high operational safety or functional safety ("safety") can be achieved, and in particular, high information technology security or information security ("security") can be achieved. In particular, the safety, fault tolerance and integrity of the control device can be improved. Furthermore, the method makes it possible to particularly effectively meet safety requirements in the (motor) vehicle sector, as provided for, for example, in the ISO 26262 standard or in particular in the so-called “Automotive Safety Integrity Level” (ASIL) (the safety requirement levels specified by ISO 26262 for safety-related systems in a vehicle).

[0034] A computing unit according to the invention, for example a control unit of a (motor) vehicle, is configured, in particular in terms of programming, to carry out the method according to the invention.

[0035] It is also advantageous to implement the method according to the invention in the form of a computer program or computer program product with a program code for executing all method steps, because this results in particularly low costs, especially when the execution control device is also used for other tasks and therefore exists anyway. Finally, a machine-readable storage medium is provided, which has a computer program as described above stored thereon. Storage media or data carriers suitable for providing the computer program are especially magnetic, optical and electrical memories, such as hard disks, flash memories, EEPROMs, DVDs, etc. It is also possible to download programs via computer networks (Internet, intranets, etc.). This download can be performed wired or wirelessly here (e.g., via a WLAN network, a 3G connection, a 4G connection, a 5G connection or a 6G connection, etc.).

[0036] Further advantages and embodiments of the invention are apparent from the description and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The present invention is schematically illustrated by way of embodiments in the drawings and will be described below in conjunction with the drawings.

[0038] Figure 1 A configuration of a computing unit according to the invention is schematically shown, which is configured to carry out an embodiment of the method according to the invention.

[0039] Figure 2 An embodiment of the method according to the invention is schematically shown as a block diagram. DETAILED DESCRIPTION

[0040] exist Figure 1 Schematically shown in FIG. 1 is a computing unit in the form of a system on a chip (SoC) and denoted by 100 , which is used in a (motor) vehicle, for example, in a microcontroller of a control unit.

[0041] The SoC 100 has a host 110, which in turn includes a processor unit 111 (e.g., a multi-core processor with a large number of processor cores) and a local internal storage unit 112, such as a RAM memory. The SoC 100 also has a global shared storage unit, such as a flash memory 140 and a global RAM memory 150. The host 110 and the storage units 140, 150 and other components of the SoC 100 communicate with each other via an on-chip interconnect (OCI) 101.

[0042] In addition, the SoC 100 has a security unit 120, such as a hardware security module (HSM), which is configured to verify the authenticity, correctness or integrity of data stored in the storage units 140, 150, for example, by means of cryptographic methods. The HSM 120 has, for example, a debugger controller 121 and a secure processor core 122, a random number generator 123 (which has a physical random number generator (true random number generator, TRNG) and a pseudo random number generator (pseudo random number generator, PRNG)), a secure local RAM memory 124, a hash function unit 125, an on-chip connection interface 126, an elliptic curve cryptography method (Elliptic Curve Cryptography, ECC) unit 127, an encryption and signing unit 128 according to the cryptographic RSA (Rivest-Shamir-Adleman) method, and an Advanced Encryption Standard (Advanced Encryption Standard, AES) unit 129.

[0043] The HSM 120 is connected to a memory protection unit (MPU) 130 via a secure bus connection 102. The MPU 130 is configured to monitor access requests to the memory units 140 and 150 and to allow or block the corresponding requested access. For this purpose, the MPU 130 can be configured with the aid of a configuration file 131, which includes a table in which it is saved which units of the SoC 100 are allowed to access which memory areas or address areas of the memory units 140, 150, and which units are prohibited from accessing. In particular, only the HSM 120 can be allowed to change the configuration of the MPU 130.

[0044] Debugger 170 for identifying errors in SoC 100 may be connected as an external peripheral not implemented on SoC 100 via connection 103 (eg a so-called debug access port (DAP)) to debug interface 160 of SoC 100 , which may have registers 161 , for example.

[0045] When host 110 (e.g. processor unit 111 or an application executed in processor unit 111) is to access data stored in storage units 140, 150 and process these data, it may be important to first check the correctness and integrity of these data by HSM 120, for example when these data are to be processed in the course of safety-critical functions of the vehicle.

[0046] In such verification and subsequent use of data, the so-called TOCTOU problem (Time-of-Check-to-Time-of-Use-Problem) may traditionally often occur, for example, when an attacker who has compromised SoC 100 makes unauthorized changes to the data during or after the data is verified by HSM 120, so that HSM 120 can no longer recognize these changes.

[0047] In order to prevent such unauthorized data manipulation that is not recognized and is consistent with the TOCTOU problem, the SoC 100 is configured in particular in a programming technique to execute an embodiment of the method according to the present invention, which is Figure 2 is schematically shown as a block diagram and should be combined with the following Figure 1 and Figure 2 Be elaborated.

[0048] In step 201, the data to be processed are stored in a predefined address area or storage area, for example in an address area or storage area of ​​the flash memory 140. For example, these data may be sensor values ​​of the vehicle, which should be further processed by the host 110 to execute a vehicle function, such as engine control.

[0049] In step 202, the host 110 instructs the HSM 130 to check the data stored in the preset storage area. For this purpose, the host 110 saves the corresponding instructions in another second storage area of ​​the flash memory 140, in which, for example, the storage address of the data to be checked is saved. In addition, the host 110 sends a notification, in particular an interrupt, to the HSM 120, which then reads the saved instructions.

[0050] In step 203, the HSM 120 configures the MPU 130 to protect a preset storage area in the flash memory 140 according to a preset access restriction. For example, according to the access restriction, only the HSM 120 can read and write access to the preset storage area. Other units of the SoC 100 may not allow read or write access. In order to configure the MPU 130, the HSM 120 may, for example, create or change an entry in a table of the configuration file 131.

[0051] In step 203, the MPU 130 performs storage protection of the flash memory 140 according to the preset access restriction. If a unit other than the HSM 120 now wants to access the preset storage area, the MPU 130 blocks the access.

[0052] In step 205, the HSM 120 reads the data stored in the preset storage area and verifies the read data. To this end, the HSM 120 verifies the correctness and integrity of the read data by means of a cryptographic method.

[0053] In step 206 , the HSM 120 stores the verification result in another third storage area of ​​the flash memory 140 .

[0054] In step 207, the HSM 120 releases the storage protection of the preset storage area, or at least changes the storage protection so that the host 110 can at least read access to the preset storage area. To this end, the HSM 120 reconfigures the MPU 130 and changes the corresponding entry in the table of the configuration file 131, for example, so that the storage protection is released and all units of the SoC 100 are allowed to access the preset storage area, or for example, so that a second storage protection is established, according to which, in addition to the HSM 120, the host 110 can at least read access to the preset storage area.

[0055] In step 208, the MPU 130 executes the corresponding new configuration. If the storage protection should be released according to the new configuration, the MPU 130 allows all access to the preset storage area thereafter. If the second storage protection should be implemented, the MPU 130 only allows the HSM 110 to read and write access and allows the host to read access.

[0056] In step 209, the host 110 reads the result of the verification from the third storage area. If the data has been verified according to the result, the host 110 reads the data in step 210 and processes the data.

[0057] By defining and implementing access restrictions and storage protection, tampering can be prevented between checking data by the HSM 120 and processing data by the host 110. Through the cooperation of the HSM 120 and the MPU 130 in the scope of the method, a dynamic storage protection unit is defined, which can dynamically protect the address areas of the storage units 140 and 150. The dynamic storage protection unit 130 can be configured on demand by the hardware security module 120 according to the request of the software application of the host 110, and the address area is protected accordingly. After the preset storage area is protected accordingly by the MPU 130, only the hardware security module 120 can make changes to the storage area.

[0058] The data to be checked may also be update data, which is received via the Internet and stored in a preset storage area, for example, during an OTA update process. After checking and verifying the stored data, the data in the preset storage area can then be activated, or the data can be installed in other storage areas, so that the update data can be applied to future program flows. Thus, by means of the present method, it can be ensured that no unauthorized tampering occurs between the checking and activation (or installation) of the update data.

Claims

1. A method for checking data in a computing unit (100), wherein the computing unit (100) has a storage unit (140, 150), a security unit (120) and a storage protection unit (130), the method comprising the following steps: storing (201) the data to be checked in a preset storage area in the storage unit (140, 150); Configuring (203) the storage protection unit (130) through the security unit (120) to protect the preset storage area according to preset access restrictions; Executing (204) storage protection of the preset storage area according to the preset access restriction by the storage protection unit (130); The data stored in the predefined storage area are checked (205) by the security unit (120).

2. The method according to claim 1, wherein the computing unit is configured so that only the security unit (120) can configure the storage protection unit (130).

3. The method according to claim 1 or 2, wherein the preset access restriction includes that only the security unit (120) can read and write access to the preset storage area.

4. The method according to any one of the preceding claims, further comprising: When receiving an access request to the preset storage area, for access that is not permitted according to the preset access restriction: It is determined whether the security unit (120) causes the storage protection of the preset storage area to be released or changed, and / or whether the access is redirected to another storage area according to the access request.

5. The method according to any one of the preceding claims, further comprising: After the stored data have been verified (205) by the security unit (120), Configuring (207) the storage protection unit (130) through the security unit (120) to release storage protection for the preset storage area, and releasing (208) storage protection for the preset storage area through the storage protection unit (130); or The storage protection unit (130) is configured (207) by the security unit (120) to protect the preset storage area according to a second preset access restriction, and the second storage protection of the preset storage area is performed (208) by the storage protection unit (130) according to the second preset access restriction.

6. The method of claim 5, wherein configuring (207) the memory protection unit (130) to release the memory protection or to perform the second memory protection is performed after a boot cycle.

7. The method according to any one of the preceding claims, further comprising: After the stored data have been verified (205) by the security unit (120), The result of the check is stored (206) by the safety unit (120) in another storage area of ​​the storage unit (140, 150) or in another storage unit (140, 150) of the computing unit (100); Removing (207) the storage protection or changing (207) the storage protection by the security unit (120) so as to allow the processing unit (110) to at least read the preset storage area; Reading (209) the stored test results by the processing unit (110); The data is processed (210) by the processing unit (110).

8. The method according to any one of the preceding claims, further comprising: After the data to be checked is stored (201) in the preset storage area, The security unit (120) is instructed (202) to check the data stored in the predetermined storage area.

9. The method of claim 8, wherein instructing (202) the security unit (120) comprises: storing the corresponding instruction in another storage area of ​​the storage unit (140, 150) or in another storage unit (140, 150) of the computing unit (100); sending a notification, in particular an interruption, to the security unit (120); The stored instructions are read through the security unit (120) according to the notification.

10. The method according to any one of the preceding claims, wherein the data to be verified is part of an update, further comprising: Before storing (201) the data in the preset storage area, receiving the data via an interface of the computing unit (100); After the stored data have been checked (205) by the security unit (120), the data in the predefined storage area are activated or installed in another storage area.

11. A computing unit (100) configured to execute all the steps of the method according to any one of the preceding claims.

12. A computer program which, when executed on a computing unit (100), causes the computing unit (100) to execute all the steps of the method according to any one of claims 1 to 10.

13. A machine-readable storage medium having stored thereon the computer program according to claim 12.