Remote attestation method and system for trusted execution environment
By forwarding remote attestation requests layer by layer in a multi-layered nested trusted execution environment, a target report containing the remote attestation results of all levels of trusted execution environments is generated, which solves the problem that users cannot obtain the trusted status of the underlying physical machine and can't independently control the trustworthy execution environment. It solves the problem of letter verification frequency and improves the security and efficiency of remote certification.
Patent Information
- Application Number
- CN202411426782.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-14
Smart Images

Figure CN119316207A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of remote attestation technology, and in particular to a remote attestation method and system for a trusted execution environment. Background Art
[0002] In cloud scenarios, a layered remote attestation method is commonly used to verify the trusted computing environments of physical machines and virtual machines respectively. Specifically, at the infrastructure layer, the cloud management platform initiates remote attestation on the physical machine, obtains a remote attestation report, and checks whether the computing environment is trustworthy by verifying the remote attestation report; at the virtual machine layer, the user initiates remote attestation on the virtual machine, obtains and verifies the remote attestation report, and establishes an encrypted channel through the remote attestation process to transfer confidential data to the trusted computing environment of the virtual machine for calculation.
[0003] However, in the above process, users can only blindly believe that the underlying physical machine is trustworthy, but cannot obtain the trustworthy status of the underlying physical machine; in addition, users cannot independently control the trust verification frequency of the entire software stack, resulting in attackers being able to successfully launch attacks in the gap between two trust verifications. Summary of the invention
[0004] The embodiments of the present application provide a remote attestation method and system for a trusted execution environment, which can solve the problem that in remote attestation, users can only blindly believe that the underlying physical machine is trusted, but cannot obtain the trusted status of the underlying physical machine; in addition, users cannot independently control the trusted verification frequency of the entire software stack, resulting in attackers being able to successfully launch attacks in the gap between two trusted verifications, thereby reducing the technical problem of the security of remote attestation.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a remote attestation method for a trusted execution environment, the method being applied to a system including a multi-layer nested trusted execution environment, the method comprising:
[0007] The innermost trusted execution environment obtains the user's remote attestation request;
[0008] Starting from the innermost trusted execution environment, forwarding the remote attestation request layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment;
[0009] The innermost trusted execution environment obtains a target remote attestation report, wherein the target remote attestation report includes remote attestation results of all trusted execution environments from the outermost trusted execution environment to the innermost trusted execution environment, and the target remote attestation report is generated according to the remote attestation request.
[0010] Optionally, the innermost trusted execution environment obtains a target remote attestation report including:
[0011] The outermost trusted execution environment generates a remote attestation report including a remote attestation result of the outermost trusted execution environment based on the remote attestation request; and forwards the remote attestation report to a directly adjacent inner trusted execution environment;
[0012] The directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment according to the received remote attestation report and the remote attestation request; and forwards the new remote attestation report to the inner trusted execution environment directly adjacent to itself, and so on, generating new remote attestation reports layer by layer from the outside to the inside, and forwarding the new remote attestation report until the innermost trusted execution environment;
[0013] The innermost trusted execution environment generates the target remote attestation report based on the remote attestation request and the received remote attestation report.
[0014] Optionally, the remote attestation request carries a challenge value, and the directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment according to the received remote attestation report and the remote attestation request, including:
[0015] The directly adjacent inner trusted execution environment concatenates the received remote attestation report and the challenge value to obtain a new challenge value;
[0016] The directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment based on the new challenge value.
[0017] Optionally, when the system is a two-layer nested trusted execution environment system, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment,
[0018] Starting from the innermost trusted execution environment, forwarding the remote attestation request layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment includes:
[0019] The virtual machine user state trusted execution environment forwards the remote attestation request to the virtual machine kernel state trusted execution environment;
[0020] The virtual machine kernel state trusted execution environment forwards the remote attestation request to the physical machine kernel state trusted execution environment through a hypercall call or a syscall call.
[0021] Optionally, when the system is a two-layer nested trusted execution environment system, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment,
[0022] The outermost trusted execution environment generates a remote attestation report including a remote attestation result of the outermost trusted execution environment based on the remote attestation request; and forwarding the remote attestation report to a directly adjacent inner trusted execution environment comprises:
[0023] The physical machine kernel state trusted execution environment calls the physical trusted platform module based on the remote attestation request to generate a remote attestation report including the remote attestation result of the physical machine kernel state trusted execution environment; and forwards the remote attestation report to the virtual machine kernel state trusted execution environment;
[0024] The innermost trusted execution environment generates the target remote attestation report based on the remote attestation request and the received remote attestation report, including:
[0025] The virtual machine kernel state trusted execution environment calls the virtual trusted platform module according to the received remote attestation report and the remote attestation request, generates a new remote attestation report, and forwards the new remote attestation report to the virtual machine user state trusted execution environment;
[0026] The virtual machine user state trusted execution environment generates the target remote attestation report based on the remote attestation request and the received remote attestation report.
[0027] In a second aspect, an embodiment of the present application provides a remote attestation system for a trusted execution environment, the system comprising a multi-layer nested trusted execution environment, in which:
[0028] The innermost trusted execution environment is used to obtain remote attestation requests from users;
[0029] Starting from the innermost trusted execution environment, the remote attestation request is forwarded layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment;
[0030] The innermost trusted execution environment is used to obtain a target remote attestation report, wherein the target remote attestation report includes remote attestation results of all trusted execution environments from the outermost trusted execution environment to the innermost trusted execution environment, and the target remote attestation report is generated according to the remote attestation request.
[0031] Optionally, the outermost trusted execution environment is used to generate a remote attestation report including a remote attestation result of the outermost trusted execution environment based on the remote attestation request; and forward the remote attestation report to a directly adjacent inner trusted execution environment;
[0032] The directly adjacent inner trusted execution environment is used to generate a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment according to the received remote attestation report and the remote attestation request; and forward the new remote attestation report to the inner trusted execution environment directly adjacent to itself, and so on, generating new remote attestation reports layer by layer from the outside to the inside, and forwarding the new remote attestation report until the innermost trusted execution environment;
[0033] The innermost trusted execution environment is used to generate the target remote attestation report based on the remote attestation request and the received remote attestation report.
[0034] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of a remote attestation method for a trusted execution environment as described in the first aspect.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a remote attestation method for a trusted execution environment as described in the first aspect are implemented.
[0036] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of a remote attestation method for a trusted execution environment as described in the first aspect.
[0037] In the remote attestation method of the trusted execution environment shown in the embodiment of the present application, the user does not need to verify each trusted execution environment separately, but can obtain the trusted status of all levels through a single request. This centralized verification method reduces the complexity of operations and improves efficiency. The user can obtain the trusted status of the entire software stack (all trusted execution environments) in a single remote attestation process, thereby improving the security of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0039] Figure 1 A flowchart of a remote attestation method for a trusted execution environment provided in an embodiment of the present application;
[0040] Figure 2 A system structure block diagram including a multi-layer nested trusted execution environment provided in an embodiment of the present application;
[0041] Figure 3 A system architecture diagram of a two-layer nested trusted execution environment provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] Figure 1 A remote attestation method for a trusted execution environment provided in accordance with an embodiment of the present application is shown, and the method is applied to a system including a multi-layer nested trusted execution environment, such as Figure 1 As shown, the method includes:
[0045] Step S101: The innermost trusted execution environment obtains a user's remote attestation request;
[0046] Step S102: Starting from the innermost trusted execution environment, the remote attestation request is forwarded layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment;
[0047] Step S103: The innermost trusted execution environment obtains a target remote attestation report;
[0048] The target remote attestation report includes remote attestation results of all trusted execution environments from the outermost trusted execution environment to the innermost trusted execution environment, and the target remote attestation report is generated according to the remote attestation request.
[0049] In a possible implementation, step S103, the innermost trusted execution environment obtains the target remote attestation report, including: the outermost trusted execution environment generates a remote attestation report including the remote attestation result of the outermost trusted execution environment based on the remote attestation request; forwards the remote attestation report to the directly adjacent inner trusted execution environment; the directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment based on the received remote attestation report and the remote attestation request; and forwards the new remote attestation report to the innermost trusted execution environment directly adjacent to itself, and so on, generating new remote attestation reports layer by layer from the outside to the inside, and forwarding the new remote attestation report until the innermost trusted execution environment;
[0050] The innermost trusted execution environment generates a target remote attestation report based on the remote attestation request and the received remote attestation report.
[0051] In one possible implementation, a challenge value is carried in a remote attestation request, and a directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of an outermost trusted execution environment and the remote attestation result of an inner trusted execution environment based on the received remote attestation report and remote attestation request, including: the directly adjacent inner trusted execution environment concatenating the received remote attestation report and the challenge value to obtain a new challenge value; and the directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of an outermost trusted execution environment and the remote attestation result of an inner trusted execution environment based on the new challenge value.
[0052] It should be noted that Figure 2 A system structure diagram including a multi-layer nested trusted execution environment provided by an embodiment of the present application is shown. Figure 2 As shown in the figure, each layer of the trusted execution environment contains a remote attestation agent and a trusted module. The remote agent obtains the remote attestation report of its own level by calling the trusted module. Whether the i-th layer is trusted is determined by the trusted status of the i+1 to n-th layers, or in other words, the trust of the i+1 to n-th layers enhances the trust of the i-th layer. Therefore, in the process of verifying the remote attestation report, the trusted execution environments {n,n-1...2,1} should be verified from the outside to the inside, where n is the number of layers of all trusted execution environments, and n is a positive integer; and from the innermost layer, that is, Figure 2 The trusted execution environment-1 shown in the figure hosts the user's final application, so the user can only communicate with the remote attestation agent Agent-1 ( Figure 2As shown in the direct communication, the user initiates a remote attestation request to Agent-1, and the trusted execution environments {1, 2..., n-1, n} initiate remote attestation requests in sequence from the inside out.
[0053] The remote attestation process for the entire software stack in this system architecture is as follows:
[0054] 1) The user sends a request to the remote attestation agent in the trusted execution environment-1, carrying the challenge value nonce;
[0055] 2) Agent-1 initiates a remote proof request to Agent-2, carrying the challenge value nonce;
[0056] 3) Agent-i initiates remote attestation requests to Agent-(i+1) from the inside out, i=2...,n-1, n is a positive integer;
[0057] 4) Agent-n uses nonce as the challenge value, calls trusted module-n, obtains remote proof report report-n, and sends it to Agent-(n-1);
[0058] 5) Agent-2 uses nonce||report-3 as the challenge value, calls trusted module-2, obtains remote proof report report-2, and sends it to Agent-1;
[0059] 6) Agent-1 uses nonce||report-2 as the challenge value, calls trusted module-1, and obtains the remote proof report report-1;
[0060] 7)Agent-1 sends report-1 to the user.
[0061] Among them, "||" means:
[0062] After the above steps, the final remote attestation report includes all reports from trusted execution environment -1 to trusted execution environment -n. That is to say, all reports are finally superimposed into a final remote attestation report. The final remote attestation report carries the information of all reports and establishes a chain binding relationship between all trusted execution environments by taking the i+1 layer report as the challenge value of the i layer report.
[0063] It should be noted that the remote attestation agent provided in the embodiment of the present application is not limited to the user-state component used to communicate directly with the user, but is used to refer to the component that implements the request forwarding capability and can call the trusted module to obtain the trusted status report.
[0064] In a possible implementation, when the system is a system with two layers of nested trusted execution environments, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment, starting from the innermost trusted execution environment, the remote attestation request is forwarded layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment, including: the virtual machine user state trusted execution environment forwards the remote attestation request to the virtual machine kernel state trusted execution environment; the virtual machine kernel state trusted execution environment forwards the remote attestation request to the physical machine kernel state trusted execution environment through a hypercall call or a syscall call.
[0065] In a possible implementation, when the system is a two-layer nested trusted execution environment system, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment, the outermost trusted execution environment generates a remote attestation report including a remote attestation result of the outermost trusted execution environment based on a remote attestation request; forwarding the remote attestation report to a directly adjacent inner trusted execution environment includes: the physical machine kernel state trusted execution environment calls a physical trusted platform module based on the remote attestation request to generate a remote attestation report. Generate a remote attestation report containing the remote attestation result of the kernel-state trusted execution environment of the physical machine; forward the remote attestation report to the kernel-state trusted execution environment of the virtual machine; the innermost trusted execution environment generates a target remote attestation report based on the remote attestation request and the received remote attestation report, including: the kernel-state trusted execution environment of the virtual machine calls the virtual trusted platform module according to the received remote attestation report and the remote attestation request, generates a new remote attestation report, and forwards the new remote attestation report to the user-state trusted execution environment of the virtual machine; the user-state trusted execution environment of the virtual machine generates a target remote attestation report based on the remote attestation request and the received remote attestation report.
[0066] Figure 3 A system architecture diagram of a two-layer nested trusted execution environment based on a virtualized trusted platform module, namely, vTPM (Virtual Trusted Platform Module, virtualized physical trusted platform module) and TPM (Trusted Platform Module, physical trusted platform module) is shown according to an embodiment of the present application, such as Figure 3 shown.
[0067] Remote attestation agents are divided into user-mode agents and kernel-mode agents. User-mode agents are used to receive remote attestation requests directly sent by users, and generally receive remote attestation requests through the network connection established between the user-mode agent and the user end. Kernel-mode agents are generally called through system calls (syscall) or hypercalls (hypercalls), and obtain remote attestation reports by calling the TPM driver interface. The specific execution process is as follows:
[0068] 1) In the virtual machine, the user-state agent establishes a connection with the user through the network and receives the remote attestation request sent by the user;
[0069] 2) The virtual machine user state agent calls the virtual machine kernel state agent to obtain the status report of the external trusted execution environment and the status report of its own trusted execution environment;
[0070] 3) The kernel-state agent calls the kernel-state agent of the physical machine through hypercall and sends the challenge value nonce to initiate a remote attestation request to the external trusted execution environment;
[0071] 4) The kernel-state agent of the physical machine calls the TPM driver to obtain the status report report-2 of the physical machine's trusted execution environment
[0072] 5) The physical machine kernel state agent returns the status report of the physical machine trusted execution environment to the virtual machine kernel state agent;
[0073] 6) The virtual machine kernel state agent uses nonce||report-2 as the challenge value and calls the TPM driver interface to obtain the virtual machine trusted execution environment status report to establish a binding relationship between the virtual machine trusted execution environment status report and the physical machine trusted execution environment status report;
[0074] 7) The virtual machine kernel state agent sends the obtained report to the virtual machine user state agent, and the user state agent sends it to the user, completing the user's acquisition of the trusted status report of the entire software stack on the physical TPM.
[0075] In summary, the remote attestation method of the trusted execution environment provided by the embodiment of the present application has the following advantages:
[0076] 1. Comprehensive trusted status assessment: Users can obtain the trusted status of the entire software stack (all trusted execution environments from the outermost layer to the innermost layer) during a remote attestation process. Users can clearly understand whether the execution environment at each level is in a trusted state, thereby improving the transparency of the system.
[0077] 2. Enhanced system security: Through layer-by-layer verification, users can identify potential security risks. If the credibility of a certain layer is in doubt, users can take appropriate measures to protect the system and reduce the risk of system attacks.
[0078] 3. Simplify the verification process: Users do not need to verify each execution environment separately, but can obtain the trusted status of all levels through a single request. This centralized verification method reduces the complexity of operations and improves efficiency.
[0079] 4. A trust chain is established. By obtaining all remote proof results from the outermost layer to the innermost layer, users can establish a complete trust chain, which helps users understand and manage the trust relationship between various execution environments and further enhance the system's security strategy.
[0080] 5. Adapt to multi-layer architecture: In modern software architecture, applications usually run in multi-layer environments (such as virtual machines, containers, etc.). This mechanism can effectively adapt to complex multi-layer architectures and ensure the security of each layer.
[0081] The present application also provides a remote certification system for a trusted execution environment, such as Figure 2 As shown, the system includes a multi-layer nested trusted execution environment, in which:
[0082] The innermost trusted execution environment is used to obtain remote attestation requests from users;
[0083] Starting from the innermost trusted execution environment, the remote attestation request is forwarded layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment;
[0084] The innermost trusted execution environment is used to obtain a target remote attestation report, wherein the target remote attestation report includes remote attestation results of all trusted execution environments from the outermost trusted execution environment to the innermost trusted execution environment, and the target remote attestation report is generated according to a remote attestation request.
[0085] In a possible implementation, the outermost trusted execution environment is used to generate a remote attestation report including a remote attestation result of the outermost trusted execution environment based on the remote attestation request; forward the remote attestation report to a directly adjacent inner trusted execution environment;
[0086] The directly adjacent inner trusted execution environment is used to generate a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment according to the received remote attestation report and remote attestation request; and forward the new remote attestation report to the inner trusted execution environment directly adjacent to itself, and so on, generating new remote attestation reports layer by layer from the outside to the inside, and forwarding the new remote attestation report until the innermost trusted execution environment;
[0087] The innermost trusted execution environment is used to generate a target remote attestation report based on the remote attestation request and the received remote attestation report.
[0088] In a possible implementation, the remote attestation request carries a challenge value, and the directly adjacent inner trusted execution environment is used to concatenate the received remote attestation report and the challenge value to obtain a new challenge value;
[0089] The directly adjacent inner trusted execution environment is used to generate a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment based on the new challenge value.
[0090] In a possible implementation, when the system is a two-layer nested trusted execution environment system, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment,
[0091] The virtual machine user state trusted execution environment is used to forward the remote attestation request to the virtual machine kernel state trusted execution environment;
[0092] The virtual machine kernel state trusted execution environment is used to forward the remote attestation request to the physical machine kernel state trusted execution environment through a hypercall call or a syscall call.
[0093] In a possible implementation, when the system is a two-layer nested trusted execution environment system, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment,
[0094] The physical machine kernel state trusted execution environment is used to call the physical trusted platform module based on the remote attestation request to generate a remote attestation report including the remote attestation result of the physical machine kernel state trusted execution environment; and forward the remote attestation report to the virtual machine kernel state trusted execution environment;
[0095] The innermost trusted execution environment is used to generate a target remote attestation report based on the remote attestation request and the received remote attestation report, including:
[0096] The virtual machine kernel state trusted execution environment is used to call the virtual trusted platform module according to the received remote attestation report and remote attestation request, generate a new remote attestation report, and forward the new remote attestation report to the virtual machine user state trusted execution environment;
[0097] The virtual machine user state trusted execution environment is used to generate a target remote attestation report based on the remote attestation request and the received remote attestation report.
[0098] As a result, users can obtain a trusted status report of the entire software stack during a remote attestation process. Compared with the traditional layered approach of blindly trusting the trusted status of the physical machine, users are more likely to trust the trusted execution environment, which improves the user experience.
[0099] Users can independently control the frequency of trusted verification of the entire software stack to reduce the security threats caused by remote attestation of their own TOCTOU (Time of Check to Time of Use).
[0100] TOCTOU is the abbreviation of "Time of Check to Time of Use", which can be translated into Chinese as "the time difference between checking and using". It is a common security vulnerability that occurs in the time window between the system checking a certain condition (such as file permissions, status, etc.) and actually using the condition. If the condition changes during this period of time (for example, the file is replaced or the permissions are modified), the system may continue to perform operations when it is not in line with expectations, resulting in security issues.
[0101] Remote attestation is a core component of trusted computing and confidential computing technologies. Currently, many vendors have launched cloud hosts that support confidential computing technologies. The remote attestation method for a multi-layer nested trusted execution environment provided in the embodiment of the present application has extremely high practical value and broad application prospects.
[0102] Please refer to Figure 4 The embodiment of the present application also provides an electronic device 40, including a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor 41. When the computer program is executed by the processor 41, each process of the remote attestation method embodiment of the above-mentioned trusted execution environment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0103] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the remote attestation method embodiment of the above-mentioned trusted execution environment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is such as a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0104] The embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the various processes of the remote attestation method embodiment of the above-mentioned trusted execution environment and can achieve the same technical effect. To avoid repetition, they are not repeated here.
[0105] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0107] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A remote attestation method for a trusted execution environment, characterized in that: The method is applied to a system including a multi-layer nested trusted execution environment, and the method comprises: The innermost trusted execution environment obtains the user's remote attestation request; Starting from the innermost trusted execution environment, forwarding the remote attestation request layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment; The innermost trusted execution environment obtains a target remote attestation report, wherein the target remote attestation report includes remote attestation results of all trusted execution environments from the outermost trusted execution environment to the innermost trusted execution environment, and the target remote attestation report is generated according to the remote attestation request.
2. The method according to claim 1, characterized in that The innermost trusted execution environment obtains the target remote attestation report including: The outermost trusted execution environment generates a remote attestation report including a remote attestation result of the outermost trusted execution environment based on the remote attestation request; and forwards the remote attestation report to a directly adjacent inner trusted execution environment; The directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment according to the received remote attestation report and the remote attestation request; and forwards the new remote attestation report to the inner trusted execution environment directly adjacent to itself, and so on, generating new remote attestation reports layer by layer from the outside to the inside, and forwarding the new remote attestation report until the innermost trusted execution environment; The innermost trusted execution environment generates the target remote attestation report based on the remote attestation request and the received remote attestation report.
3. The method according to claim 2, characterized in that The remote attestation request carries a challenge value, and the directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment according to the received remote attestation report and the remote attestation request, including: The directly adjacent inner trusted execution environment concatenates the received remote attestation report and the challenge value to obtain a new challenge value; The directly adjacent inner trusted execution environment generates a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment based on the new challenge value.
4. The method according to claim 1, characterized in that: When the system is a two-layer nested trusted execution environment system, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment, Starting from the innermost trusted execution environment, forwarding the remote attestation request layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment includes: The virtual machine user state trusted execution environment forwards the remote attestation request to the virtual machine kernel state trusted execution environment; The virtual machine kernel state trusted execution environment forwards the remote attestation request to the physical machine kernel state trusted execution environment through a hypercall call or a syscall call.
5. The method according to claim 2, characterized in that: When the system is a two-layer nested trusted execution environment system, and the innermost trusted execution environment is a virtual machine trusted execution environment, the virtual machine trusted execution environment includes a virtual machine user state trusted execution environment and a virtual machine kernel state trusted execution environment, and the outermost trusted execution environment is a physical machine kernel state trusted execution environment, The outermost trusted execution environment generates a remote attestation report including a remote attestation result of the outermost trusted execution environment based on the remote attestation request; Forwarding the remote attestation report to a directly adjacent inner trusted execution environment includes: The physical machine kernel state trusted execution environment calls the physical trusted platform module based on the remote attestation request to generate a remote attestation report including the remote attestation result of the physical machine kernel state trusted execution environment; and forwards the remote attestation report to the virtual machine kernel state trusted execution environment; The innermost trusted execution environment generates the target remote attestation report based on the remote attestation request and the received remote attestation report, including: The virtual machine kernel state trusted execution environment calls the virtual trusted platform module according to the received remote attestation report and the remote attestation request, generates a new remote attestation report, and forwards the new remote attestation report to the virtual machine user state trusted execution environment; The virtual machine user state trusted execution environment generates the target remote attestation report based on the remote attestation request and the received remote attestation report.
6. A remote attestation system for a trusted execution environment, characterized in that: The system includes a multi-layer nested trusted execution environment, in which: The innermost trusted execution environment is used to obtain remote attestation requests from users; Starting from the innermost trusted execution environment, the remote attestation request is forwarded layer by layer from the inside to the outside until the remote attestation request reaches the outermost trusted execution environment; The innermost trusted execution environment is used to obtain a target remote attestation report, wherein the target remote attestation report includes remote attestation results of all trusted execution environments from the outermost trusted execution environment to the innermost trusted execution environment, and the target remote attestation report is generated according to the remote attestation request.
7. The system according to claim 6, characterized in that The outermost trusted execution environment is used to generate a remote attestation report including a remote attestation result of the outermost trusted execution environment based on the remote attestation request; and forward the remote attestation report to a directly adjacent inner trusted execution environment; The directly adjacent inner trusted execution environment is used to generate a new remote attestation report including the remote attestation result of the outermost trusted execution environment and the remote attestation result of the directly adjacent inner trusted execution environment according to the received remote attestation report and the remote attestation request; and forward the new remote attestation report to the inner trusted execution environment directly adjacent to itself, and so on, generating new remote attestation reports layer by layer from the outside to the inside, and forwarding the new remote attestation report until the innermost trusted execution environment; The innermost trusted execution environment is used to generate the target remote attestation report based on the remote attestation request and the received remote attestation report.
8. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of a remote attestation method for a trusted execution environment as described in any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a remote attestation method for a trusted execution environment as claimed in any one of claims 1 to 5.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of a remote attestation method for a trusted execution environment as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Software framework of Linux system security application and creation method
CN113703790A
Block chain trusted data transmission, verification and acquisition method and device
CN114338054A
Remote attestation method and device, electronic equipment and storage medium
CN117834627A
Method, apparatus, electronic device and storage medium of remote attestation
US20250217491A1
Virtualization implementation method and apparatus, electronic device, non-volatile readable storage medium, and arm platform
WO2023184920A1