Data integrity protection method and related device
By deploying data integrity protection module in a trusted execution environment, the integrity verification of memory data is solved, and the problem of vulnerability of memory encryption technology is improved, data security is reduced, and hardware costs is reduced, and the memory data is achieved. Data protection.
Patent Information
- Application Number
- CN202410965124.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2024-11-26
AI Technical Summary
When the existing confidential computing architecture is isolated from the non-security domain, memory encryption technology is vulnerable to blind random corruption attacks and has data protection defects.
Deploy software-based data integrity protection module in a trusted execution environment. By performing integrity verification on data read from memory, calculate the integrity metric value matching the reference value, monitor data changes and update the reference value to prevent data tamper.
It effectively improves the security of data in a trusted execution environment, prevents attacks, reduces hardware costs, and improves data security protection capabilities without changing the hardware.
Smart Images

Figure CN119026179A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 2021115079232, and the original application date is December 10, 2021. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present invention relates to the field of information security technology, and in particular to a data integrity protection method and related devices. Background Art
[0003] Confidential computing technology is an emerging key technology for protecting data security during use. It can cover all computing scenarios such as end, edge, and cloud, and provide multiple security protection capabilities such as memory data protection, data security storage, sensitive data processing and monitoring. Confidential computing technology will gradually develop into a standardized security technology that is gradually popularized around the world. Different hardware manufacturers have also launched their own confidential computing hardware solutions based on different CPU architectures.
[0004] Currently, many mainstream confidential computing architectures in the industry solve the isolation of data in the secure domain and the non-secure domain and provide a trusted execution environment (TEE). At the same time, they usually combine memory encryption technology to encrypt the entire memory and provide confidentiality protection for the running memory data. However, memory encryption technology can be successfully attacked by blind random corruption attack (BRCA), and there are still data protection defects. Summary of the invention
[0005] The present application discloses a data integrity protection method and related devices, which can increase the security protection of data.
[0006] In a first aspect, the present application provides a data integrity protection method, which is applied to a processor, the processor including a trusted execution environment and a non-trusted execution environment, the trusted execution environment including a data integrity protection module implemented based on software; the aforementioned method includes: performing integrity verification on first data through the aforementioned data integrity protection module; the aforementioned first data is data read from the memory into the aforementioned trusted execution environment.
[0007] The present application implements data integrity protection in a trusted execution environment and improves data security by deploying a data integrity protection module in a trusted execution environment to perform integrity verification on data in a trusted execution environment, especially on data from memory in a trusted execution environment. The solution of the present application can be a data integrity verification solution added on the basis of full memory encryption technology, which can effectively prevent data from being attacked and further improve data security protection. In addition, compared with existing solutions, the present application does not require hardware changes, which reduces hardware costs.
[0008] In a possible implementation, the data integrity protection module is deployed in the virtualization management software of the trusted execution environment.
[0009] In this application, virtualization management software is deployed in the trusted execution environment, and the virtualization management software has the highest permission level in the software stack. Then, the data integrity protection module is deployed in the virtualization management software, and its permission level in the software stack is also the highest. Therefore, the data integrity protection module can perform integrity verification on the data of the operating system and application program in the trusted execution environment, and cannot be attacked and tampered by malware with low permission levels.
[0010] In a possible implementation, the data integrity protection module is deployed in the operating system software of the trusted execution environment.
[0011] In this application, the trusted operating system in the trusted execution environment has a higher permission level in the software stack, so the data integrity protection module is deployed in the trusted operating system, and its permission level in the software stack is also relatively high. Therefore, the data integrity protection module can perform integrity verification on the data of the application in the trusted execution environment, and cannot be attacked and tampered by malware with low permission levels.
[0012] In a possible implementation manner, the performing integrity check on the first data by the data integrity protection module includes:
[0013] The following operations are performed through the aforementioned data integrity protection module:
[0014] Calculating an integrity metric value of the aforementioned first data;
[0015] When the integrity metric value matches the integrity metric reference value of the first data, it is determined that the integrity check of the first data passes.
[0016] The present application determines whether the integrity check has passed by determining whether the calculated integrity measurement value matches the integrity measurement reference value, thereby effectively protecting data from being attacked and tampered with.
[0017] In a possible implementation manner, before the data integrity protection module performs integrity check on the first data, the method further includes:
[0018] Monitoring data changes in the aforementioned trusted execution environment through the aforementioned data integrity protection module;
[0019] When the first data is detected to appear in the trusted execution environment for the first time, the integrity metric reference value of the first data is calculated by the data integrity protection module, and the integrity metric reference value of the first data is stored.
[0020] This application calculates the integrity measurement baseline value for the data that appears for the first time for use in subsequent integrity verification.
[0021] In a possible implementation manner, the aforementioned method further includes:
[0022] Monitoring data changes in the aforementioned trusted execution environment through the aforementioned data integrity protection module;
[0023] When a legitimate change is detected in the value of the first data, the integrity metric reference value of the first data is recalculated by the data integrity protection module, and the stored integrity metric reference value of the first data is replaced with the recalculated integrity metric reference value.
[0024] In the present application, for legally changed data, the data integrity benchmark value is recalculated and the original benchmark value is replaced and saved for subsequent verification, thereby ensuring that the data integrity verification can be effectively completed.
[0025] In a possible implementation, the first data is data related to system security in the trusted execution environment.
[0026] This application extracts data related to system security to perform integrity verification. Compared with integrity verification of all monitored data, it can reduce computational complexity and save processing resources while ensuring data security.
[0027] In a second aspect, the present application provides a device comprising a processor, wherein the processor comprises a trusted execution environment and a non-trusted execution environment, wherein the trusted execution environment comprises a data integrity protection module implemented based on software; the data integrity protection module is used to: perform integrity verification on first data; the first data is data read from a memory into the trusted execution environment.
[0028] Optionally, the above device may be a system chip or the like.
[0029] In a possible implementation, the data integrity protection module is deployed in the virtualization management software of the trusted execution environment.
[0030] In a possible implementation, the data integrity protection module is deployed in the operating system software of the trusted execution environment.
[0031] In a possible implementation manner, the aforementioned data integrity protection module is specifically used to:
[0032] Calculating an integrity metric value of the aforementioned first data;
[0033] When the integrity metric value matches the integrity metric reference value of the first data, it is determined that the integrity check of the first data passes.
[0034] In a possible implementation manner, the aforementioned data integrity protection module is further used to:
[0035] Monitor data changes in the aforementioned trusted execution environment;
[0036] When the first data is detected to appear in the trusted execution environment for the first time, an integrity metric reference value of the first data is calculated and the integrity metric reference value of the first data is stored.
[0037] In a possible implementation manner, the aforementioned data integrity protection module is further used to:
[0038] Monitor data changes in the aforementioned trusted execution environment;
[0039] In the case where a legitimate change is detected in the value of the aforementioned first data, the integrity metric reference value of the aforementioned first data is recalculated, and the stored integrity metric reference value of the aforementioned first data is replaced with the aforementioned recalculated integrity metric reference value.
[0040] In a possible implementation, the first data is data related to system security in the trusted execution environment.
[0041] In a third aspect, the present application provides an electronic device, comprising: a device as described in any one of the second aspects above, and a discrete device coupled to the device.
[0042] The electronic device may be a computer terminal or a server device, etc.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in any one of the first aspects above.
[0044] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by a computer, the computer implements any one of the methods described in the first aspect.
[0045] It can be understood that the device described in the second aspect, the electronic device described in the third aspect, the computer storage medium described in the fourth aspect, and the computer program product described in the fifth aspect are all used to execute the method provided in any one of the first aspects. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The following is an introduction to the drawings required for use in the embodiments of the present application.
[0047] Figure 1 and Figure 2 The figure shows a schematic diagram of the structure of a computer system;
[0048] Figure 3 and Figure 4 The figure is a schematic diagram of the structure of a computer system provided by an embodiment of the present application;
[0049] Figure 5 The figure shows a schematic diagram of a data integrity protection module provided in an embodiment of the present application;
[0050] Figure 6 The figure is a flow chart of a data integrity protection method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0052] First, the technical terms involved in the embodiments of the present application are introduced.
[0053] 1. Trusted execution environment (TEE).
[0054] TEE is a secure area built on processor hardware. The secure area is an independent environment and a physical area that runs in parallel with the non-secure area where the main operating system of the processor is located. The non-secure area can also be called a non-trusted execution environment. TEE includes a trusted operating system and a trusted application. The trusted operating system is a trusted and secure operating system. The trusted application is a trusted and secure application. The processor can ensure that the confidentiality and integrity of computer programs and data in the TEE are protected. Trusted applications running in the TEE can access the processor and memory. The trusted execution environment and the non-trusted execution environment in the processor are isolated by hardware to protect components in the trusted execution environment from being affected by user-installed applications running in the non-trusted execution environment.
[0055] The processor may be a central processing unit (CPU) or a base-board management controller (BMC).
[0056] 2. Memory encryption engine (MEE).
[0057] MEE is a hardware encryption engine located between the processor and memory. It can encrypt data before writing it from the processor cache or registers to off-chip storage devices such as memory or hard disk.
[0058] 3. Message authentication code (MAC).
[0059] The message authentication code is information generated by a specific algorithm and can be used to check the integrity of data and as identity verification. Specifically, the message authentication code can be used to check whether the data has been changed during transmission, and can also be used as an identity verification of the source of the data.
[0060] 4. MAC algorithm.
[0061] The MAC algorithm can verify the integrity of the data and can verify that the data is indeed sent by the original sender. In the MAC algorithm, the MAC value is generally transmitted together with the original data, and the original data can be encrypted or not. The communicating parties will generate MAC values in the same way and then compare them. If the two MAC values are the same, it means that the MAC verification is correct, otherwise the verification fails.
[0062] See also Figure 1 , Figure 1 The figure shows a computer system 100. The computer system 100 includes a processor 110, a memory encryption module 120, a security isolation module 130 and a memory 140.
[0063] The processor 110 includes a trusted execution environment 111 and a non-trusted execution environment 112. The trusted execution environment 111 and the non-trusted execution environment 112 are isolated by hardware. The trusted execution environment 111 includes a trusted application 1111 and a trusted operating system 1112. The non-trusted execution environment 112 includes an application 1121 and a main operating system 1122. The trusted operating system 1112 is mainly used to manage hardware resources and software resources in the trusted execution environment 111. The main operating system 1122 is mainly used to manage hardware resources and software resources in the non-trusted execution environment 112.
[0064] The memory encryption module 120 may be an encryption module implemented in hardware, and is mainly used to encrypt data from the processor 110 before storing it in the memory 140. Exemplarily, the memory encryption module 120 may be the memory encryption engine MEE introduced above, which may be combined with the full memory encryption technology to encrypt the data in the memory as a whole, and provide confidentiality protection for the memory data in the running state.
[0065] The security isolation module 130 may be used to protect the trusted execution environment 111, so that the untrusted execution environment 112 cannot illegally access the trusted execution environment 111. Exemplarily, the security isolation module 130 may be hardware isolation implemented based on the TrustZone security isolation technology.
[0066] The memory 140 is the internal memory or main memory in the computer, which is used to temporarily store the calculation data in the processor and can exchange data with external memory such as a hard disk.
[0067] In a possible implementation, a virtualization environment is deployed in the trusted execution environment 111 of the computer system 100, and virtualization management software is deployed in the virtualization environment. Figure 2 The virtualization management software 1113 shown. The virtualization management software 1113 is software or firmware used to establish and execute virtual machines (VMs) in a virtualized environment. The virtualization management software 1113 can access physical devices such as disks and memory in the computer system 100, and can also coordinate access to these hardware resources while applying protection between each virtual machine. When the computer system 100 starts and executes the virtualization management software 1113, it will load the operating systems of all virtual machines, and at the same time allocate an appropriate amount of memory, CPU, network, disk and other resources to each virtual machine. Exemplarily, the virtualization management software 1113 can be a virtual machine monitor (virtual machine monitor, VMM) or can be a hypervisor, etc.
[0068] In existing computer systems, applications in a trusted execution environment need to temporarily store data in memory during operation. Although a memory encryption engine is used to encrypt and protect the data stored in the memory, the encryption technology of the memory encryption engine can be successfully attacked by a blind random corruption attack (BRCA). After the successfully attacked data is read back into the trusted execution environment, it will threaten the data security in the trusted execution environment. For example, in a BRCA attack, an attacker can select a process user identifier (UID) for brute force cracking. Because the UID of a process is usually a 32-bit integer, after 2^32 brute force cracking, the attacker has the opportunity to modify the UID of a user-privileged process to 0. A UID of 0 means that the process has changed from a user-privileged state to a kernel-privileged state, which means that malicious privilege escalation has been achieved. After the modified UID is read back into the trusted execution environment, data may be maliciously acquired or hijacked, etc.
[0069] In order to make the data in the trusted execution environment of the computer system more secure, the embodiment of the present application provides a data integrity protection method. In order to better understand the data integrity protection method provided by the embodiment of the present application, the computer system to which the embodiment of the present application is applicable is described exemplarily below.
[0070] See also Figure 3 , Figure 3 The computer system 200 to which the embodiment of the present application is applicable is exemplarily shown. Figure 1 The computer system 100 shown has a data integrity protection module 21121 deployed in the trusted operating system 2112, that is, the data integrity protection module 21121 is implemented based on software. The data integrity protection module 21121 is deployed in the trusted operating system 2112, and the permission level of the data integrity protection module 21121 is the same as the permission level of the trusted operating system 2112. In the trusted execution environment 211, the trusted operating system 2112 has the highest permission level in the software stack, so the permission level of the data integrity protection module 21121 in the software stack is also the highest. Therefore, the data integrity protection module 21121 can perform integrity verification on the data in the trusted execution environment 211, and cannot be attacked and tampered by malware with low permission levels. The data includes data read from the memory 240 to the trusted execution environment 211. Figure 3 For descriptions of other modules, see the above Figure 1 The corresponding description in will not be repeated here.
[0071] In another possible implementation, see Figure 4 , Figure 4 Another computer system 200 applicable to the embodiment of the present application is exemplarily shown. Compared with the above-mentioned computer system 200 Figure 2 The computer system 100 shown in the figure has a data integrity protection module 21131 deployed in the virtualization management software 2113, that is, the data integrity protection module 21131 is implemented based on software. The data integrity protection module 21131 is deployed in the virtualization management software 2113, and the permission level of the data integrity protection module 21131 is the same as the permission level of the virtualization management software 2113. In the trusted execution environment 211, the virtualization management software 2113 has the highest permission level in the software stack, so the permission level of the data integrity protection module 21131 in the software stack is also the highest. Therefore, the data integrity protection module 21131 can perform integrity verification on the data in the trusted execution environment 211, and cannot be attacked and tampered by malware with low permission levels. The data includes data read from the memory 240 to the trusted execution environment 211. Figure 4 For descriptions of other modules, see the above Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0072] In another possible implementation manner, for the above Figure 4 In the computer system 200 shown, the data integrity protection module may also be deployed in the trusted operating system 2112 .
[0073] See also Figure 5 , Figure 5 The schematic diagram of the framework of the above data integrity protection module is exemplified. Figure 5 The data integrity protection module 500 shown includes a monitoring module 501 , a data identification module 502 , a metric value calculation module 503 , a check trigger module 504 , a comparison module 505 and a handling module 506 .
[0074] The monitoring module 501 can be used to monitor whether new data is generated in the trusted execution environment. The new data includes data generated by the creation of a new process or initialized data, etc. The monitoring module 501 can also be used to monitor changes in data in the trusted execution environment, such as monitoring whether the value of the data has changed.
[0075] The data identification module 502 can be used to extract data related to system security from the data monitored by the monitoring module 501. The data related to system security can be, for example, the UID of the process, the identity identifier (group identifier, GID) of the group to which the process belongs, permission parameters (such as capability parameters) or page table data. In a specific implementation, the data identification module 502 can extract data related to system security from the monitored data based on pre-set keywords. Exemplarily, the data related to system security can be extracted from the monitored data by means of regular expressions and the like.
[0076] By extracting data related to system security through the data identification module 502 for integrity verification, compared with integrity verification of all monitored data, it can reduce computational complexity and save processing resources while ensuring data security. In a possible implementation, the data integrity protection module 500 may also not include the data identification module 502, that is, integrity verification is performed on all monitored data, which can also improve the security of data in the trusted execution environment.
[0077] The metric value calculation module 503 can be used to calculate the integrity metric value of the data. Exemplarily, the integrity metric value of the data can be calculated by a MAC algorithm. Specifically, the MAC value of the data calculated based on the MAC algorithm is the integrity metric value of the data. Alternatively, the integrity metric value of the data can be calculated by a hash algorithm. Specifically, the hash value of the data calculated based on the hash algorithm is the integrity metric value of the data.
[0078] The metric value calculation module 503 calculates the integrity metric value of the newly generated data in the trusted execution environment as the integrity metric reference value of the newly generated data, and saves the integrity metric reference value to the storage space in the trusted execution environment. The storage space can be an encrypted storage space in the trusted execution environment. The integrity metric reference value of a data is the standard for judging whether the data is complete. In the subsequent verification process, the metric value calculation module 503 will recalculate the integrity metric value of the data. Only when the integrity metric value recalculated is equal to the integrity metric reference value of the data, the integrity verification of the data passes.
[0079] The verification trigger module 504 may be used to periodically trigger verification of data in the trusted execution environment.
[0080] Exemplarily, the check trigger module 504 can be a timing module, and a specific timing period for triggering data check can be configured so that the integrity check of the data is triggered once every timing period. Exemplarily, the timing period can be 10 seconds, 30 seconds or one minute, etc., and the present application does not limit the specific timing period.
[0081] In another possible implementation, the verification trigger module 504 may be a trigger module with a preset trigger condition, for example, the preset trigger condition may be data read back from the memory to the trusted execution environment, etc. Then, as long as it is detected that data is read back from the memory to the trusted execution environment, the integrity check of the read-back data may be triggered.
[0082] The comparison module 505 is used to compare the integrity measurement value of the data with the integrity measurement reference value of the data.
[0083] The disposal module 506 is used to perform corresponding processing operations based on the results of the integrity check. For example, if the integrity check of the data passes, the disposal module 506 can record the result of the integrity check passing. If the integrity check of the data fails, that is, the integrity of the data is abnormal, the disposal module 506 can record the result of the abnormality and perform some abnormal processing operations. The abnormal processing operation can be, for example, discarding abnormal data or closing the process that uses abnormal data. The disposal module 506 will record the specific abnormal processing operations performed.
[0084] It is understandable that the data integrity protection module 500 includes software modules for executing the corresponding functions in order to realize the corresponding functions. It should be noted that the division of software modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0085] Based on the above introduction of the computer system applicable to the embodiment of the present application, the data integrity protection method provided by the embodiment of the present application includes: performing integrity verification on the data in the trusted execution environment through a data integrity protection module. Exemplarily, the data integrity protection module can be the above data integrity protection module 500.
[0086] For ease of description, the first data is taken as an example below. In a specific implementation, the first data first appears in the trusted execution environment of the computer system with the creation of a process or the initialization of an application. After the data integrity protection module detects the first data that appears for the first time, it calculates the integrity metric baseline value of the first data. Then, the integrity metric baseline value of the first data is saved. Exemplarily, the first data can be monitored by the monitoring module 501, and then the integrity metric baseline value of the first data is calculated by the metric value calculation module 503.
[0087] In a possible implementation, the first data may be the original data monitored by the data integrity protection module, or may be data related to system security extracted from the monitored original data. Exemplarily, the extraction of the first data may be implemented by the data identification module 502. Specifically, the data identification module 502 may extract the first data related to system security from the data monitored by the monitoring module 501 based on the keywords of the first data (such as UID or GID, etc.). Exemplarily, the first data may be extracted from the monitored data by means of regular expressions, etc.
[0088] The first data may be sent to the memory of the computer system for temporary storage as the process is running. Optionally, the first data may be encrypted by a memory encryption module (such as the above) in the computer system before being stored in the memory. Figure 1 The first data in the memory may be encrypted by the memory encryption module 120 introduced in the embodiment of the present invention, and then the encrypted first data may be stored in the memory. After the first data completes its task in the memory, it may be read back to the trusted execution environment. Optionally, the first data in the memory may be decrypted by the memory encryption module before being sent to the trusted execution environment. In order to ensure the security of the first data read back in the trusted execution environment, the data integrity protection module may perform integrity check on the first data read back.
[0089] Exemplarily, when the verification trigger module 504 detects that the first data is read back from the memory to the trusted execution environment, or the timing period of the data verification set in the verification trigger module expires, it can trigger the call of the metric value calculation module 503 to calculate the integrity metric value of the first data read back. Then, the comparison module 505 obtains the integrity metric reference value of the stored first data and compares it with the integrity metric value of the calculated first data. If the two values are the same, the integrity check of the first data passes, that is, it is determined that the integrity of the first data is intact and has not been attacked or tampered with. If the two values are different, it indicates that there is an abnormality in the first data read back, then the above-mentioned disposal module 506 can perform corresponding exception processing on the first data read back based on the verification result of the integrity abnormality. For specific exception processing, please refer to the corresponding description of the disposal module 506 mentioned above, which will not be repeated here.
[0090] In a possible implementation, since the value of the first data may be legally changed during the process of running the process, in order to effectively implement data integrity verification, the integrity metric reference value corresponding to the first data also needs to be updated. Therefore, illustratively, the changes in the first data can be monitored by the monitoring module 501. When the monitoring module 501 detects that the value of the first data has been legally changed, the metric calculation module 503 is called to calculate the integrity metric value of the first data after the change. The calculated integrity metric value is used as the new integrity metric reference value of the first data, and then the integrity metric reference value of the originally stored first data is replaced with the new integrity metric reference value. In the subsequent integrity verification of the first data, the new integrity metric reference value is used as the judgment criterion.
[0091] To facilitate understanding of the data integrity protection method provided in the embodiments of the present application, please refer to the following example: Figure 6 . Figure 6 The schematic diagram of the process of the method is exemplified. The method includes but is not limited to the following process:
[0092] ①The monitoring module detects new target data;
[0093] ② The data identification module extracts data related to system security from the above target data;
[0094] ③ The measurement value calculation module calculates and stores the integrity measurement benchmark value of the data related to system security;
[0095] ④ The monitoring module detects that the value of the above target data has changed legally;
[0096] ⑤ The verification trigger module calls the metric value calculation module to recalculate the integrity metric value of the data related to system security;
[0097] ⑥ The comparison module determines whether the calculated measurement value matches the measurement reference value;
[0098] ⑦The disposal module performs exception handling;
[0099] ⑧Integrity check passed.
[0100] Specifically, first, the monitoring module detects new target data, and the data identification module extracts data related to system security from the target data. Then, the metric value calculation module calculates and stores the integrity metric reference value of the data related to system security. The monitoring module will also monitor whether the target data book has legal changes. If legal changes occur, the data identification module will be called again to extract data related to data security from the changed target data, and the integrity metric reference value will be recalculated, and then the original integrity metric reference value will be replaced with the newly calculated integrity metric reference value for storage. In addition, after the integrity metric reference value of the aforementioned data related to system security is calculated, the verification trigger module will also be started at the same time. Once the trigger condition of the integrity check is met, the verification trigger module calls the metric value calculation module to recalculate the integrity metric value of the data related to system security. Then, the comparison module will determine whether the newly calculated integrity metric matches the corresponding integrity metric reference value. If not, the disposal module performs exception processing. If it matches, the integrity check of the data related to system security passes.
[0101] Regarding the above Figure 6 The specific implementation of the process shown can be found in the previous description and will not be repeated here.
[0102] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which is executed by a processor to implement the method described in any one of the above-mentioned data integrity protection method and possible method embodiments thereof.
[0103] The embodiment of the present application also provides a computer program product. When the computer program product is read and executed by a computer, the method described in any one of the above-mentioned data integrity protection method and possible method embodiments thereof will be implemented.
[0104] An embodiment of the present application further provides an electronic device, which includes the computer system provided by the above-mentioned embodiment of the present application, and a discrete device coupled to the computer system.
[0105] In summary, the present application implements integrity protection of data in a trusted execution environment and improves data security by deploying a data integrity protection module in a trusted execution environment to perform integrity verification on data in a trusted execution environment, especially on data from memory in a trusted execution environment. The solution of the present application can be a data integrity verification solution added on the basis of full memory encryption technology, which can effectively prevent data from being attacked and further improve data security protection. In addition, compared with existing solutions, the present application does not require hardware changes, which reduces hardware costs.
[0106] In addition, compared with the high performance overhead caused by triggering integrity verification for each read and write, the timed verification mechanism adopted in this application is more effective in improving performance while ensuring system security for attack scenarios such as BRCA, where brute force attacks take minutes to successfully attack.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data integrity protection method, characterized in that: The method is applied to a processor, the processor includes a trusted execution environment and a non-trusted execution environment, the trusted execution environment includes a data integrity protection module based on software implementation; the method includes: Reading first data from a memory in the non-trusted execution environment to the trusted execution environment; In the trusted execution environment, the data integrity protection module performs an integrity check on the first data.
2. The method according to claim 1, characterized in that The data integrity protection module is deployed in the virtualization management software of the trusted execution environment.
3. The method according to claim 1, characterized in that The data integrity protection module is deployed in the operating system software of the trusted execution environment.
4. The method according to any one of claims 1 to 3, characterized in that: The performing integrity check on the first data by the data integrity protection module includes: The following operations are performed by the data integrity protection module: Calculating an integrity metric value of the first data; In a case where the integrity metric value matches the integrity metric reference value of the first data, it is determined that the integrity check of the first data passes.
5. The method according to any one of claims 1 to 4, characterized in that: Before the data integrity check is performed on the first data by the data integrity protection module, the method further includes: Monitoring data changes in the trusted execution environment through the data integrity protection module; When it is monitored that the first data appears for the first time in the trusted execution environment, the integrity metric reference value of the first data is calculated by the data integrity protection module, and the integrity metric reference value of the first data is stored.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Monitoring data changes in the trusted execution environment through the data integrity protection module; When a legitimate change is detected in the value of the first data, the data integrity protection module recalculates the integrity metric reference value of the first data, and replaces the stored integrity metric reference value of the first data with the recalculated integrity metric reference value.
7. The method according to any one of claims 1 to 6, characterized in that: The first data is data related to system security in the trusted execution environment.
8. A device, characterized in that: The device includes a processor, the processor includes a trusted execution environment and a non-trusted execution environment, and the trusted execution environment includes a data integrity protection module implemented based on software; The data integrity protection module is used for: Reading first data from a memory in the non-trusted execution environment to the trusted execution environment; In the trusted execution environment, the data integrity protection module performs an integrity check on the first data.
9. The device according to claim 8, characterized in that The data integrity protection module is deployed in the virtualization management software of the trusted execution environment.
10. The device according to claim 8, characterized in that The data integrity protection module is deployed in the operating system software of the trusted execution environment.
11. The device according to any one of claims 8 to 10, characterized in that: The data integrity protection module is specifically used for: Calculating an integrity metric value of the first data; In a case where the integrity metric value matches the integrity metric reference value of the first data, it is determined that the integrity check of the first data passes.
12. The device according to any one of claims 8 to 11, characterized in that: The data integrity protection module is also used for: Monitoring data changes in the trusted execution environment; When it is monitored that the first data appears for the first time in the trusted execution environment, an integrity metric reference value of the first data is calculated, and the integrity metric reference value of the first data is stored.
13. The device according to any one of claims 8 to 12, characterized in that: The data integrity protection module is also used for: Monitoring data changes in the trusted execution environment; In the case where a legitimate change is detected in the value of the first data, the integrity metric reference value of the first data is recalculated, and the stored integrity metric reference value of the first data is replaced with the recalculated integrity metric reference value.
14. The device according to any one of claims 8 to 13, characterized in that: The first data is data related to system security in the trusted execution environment.
15. An electronic device, characterized in that: include: The device according to any one of claims 8 to 14, and a discrete device coupled to the device.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
17. A computer program product, characterized in that The method comprises a computer program, which, when executed by a computer, enables the computer to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Trusted measurement method, device and system, electronic equipment and storage medium
CN112434306A
