Verification method and device of trusted execution environment, computer equipment and storage medium

By generating agent identity credentials and application identity credentials in the trusted remote verification proxy system to verify the trusted execution environment of the target application, the problem of low verification efficiency in the existing technology is solved, and the effect of simplifying the verification process and improving efficiency is achieved.

CN118555073APending Publication Date: 2024-08-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310208920.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In the existing technology, verification of different types of trusted execution environments requires adaptation, resulting in low verification efficiency and high complexity.

Method used

By generating agent identity credentials and application identity credentials in the trusted remote verification proxy system, it verifies whether the target application is in a trusted execution environment, achieving interactive security verification of the target object and the target application, simplifying the verification process and reducing complexity. .

Benefits of technology

The verification efficiency is improved, so that the target object only needs to verify the legitimacy of a single trusted remote verification agent system, avoiding the need to care about the implementation details of different trusted execution environments, and significantly reducing the verification complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555073A
    Figure CN118555073A
Patent Text Reader

Abstract

The invention relates to a verification method and device of a trusted execution environment, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in response to a starting event triggered for a trusted remote verification proxy system, generating a proxy identity certificate integrated with first measurement information of the trusted remote verification proxy system; second measurement information sent by a target application is received, and when it is verified that the target application is in a trusted execution environment based on the second measurement information, an application identity certificate authorized by the proxy identity certificate endorsement is generated; and under the condition that the target object verifies that the trusted remote verification proxy system is in a trusted execution environment based on the first measurement information, verifying the interaction security of the target object and the target application based on the application identity credential and the proxy identity credential. By adopting the method, the verification complexity can be reduced, and the efficiency of the verification process can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, apparatus, computer device, storage medium and computer program product for verifying a trusted execution environment. Background Art

[0002] With the development of communication technology, trusted computing has been widely used in computing and communication systems. Trusted computing platforms supported by hardware security modules protect computing process security, data privacy, authentication data integrity, and source reliability. Trusted computing can prevent data and program logic within the trusted computing domain from being snooped by the external environment without active output, thereby improving system security.

[0003] In order to achieve trusted computing, the interactive application needs to prove the legitimacy of the software and hardware of the environment in which it runs to the third party participating in the interaction. For example, the identity can be authenticated by sending remote proof credentials to the third party. In related technologies, verifying different types of trusted execution environments requires the verifier to make corresponding adaptations, which is complicated and has the problem of low verification efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a verification method, apparatus, computer device, computer-readable storage medium and computer program product for a trusted execution environment that can improve verification efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for verifying a trusted execution environment. The method comprises:

[0006] In response to a start event triggered for a trusted remote authentication proxy system, generating a proxy identity credential integrated with first metric information of the trusted remote authentication proxy system;

[0007] receiving second measurement information sent by the target application, and generating an application identity credential endorsed and authorized by the proxy identity credential when verifying that the target application is in a trusted execution environment based on the second measurement information;

[0008] When the target object verifies that the trusted remote verification agent system is in a trusted execution environment based on the first measurement information, the interaction security between the target object and the target application is verified based on the application identity credential and the agent identity credential.

[0009] In a second aspect, the present application provides a method for verifying a trusted execution environment, the method comprising:

[0010] Obtaining, from a remote authentication proxy system running in a trusted execution environment, a proxy identity credential integrated with first measurement information of the remote authentication proxy system; the first measurement information is used to prove the legitimacy of the execution environment where the remote authentication proxy system is located;

[0011] When the proxy identity credential passes the legitimacy verification, determining that the remote authentication proxy system is a trusted remote authentication proxy system;

[0012] When the trusted remote verification agent system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application, the security of interaction with the target application is verified based on the application identity credentials issued by the trusted remote verification agent system for the target application and authorized by the agent identity credentials.

[0013] In a third aspect, the present application also provides a trusted execution environment verification device. The device includes:

[0014] In response to a start event triggered for a trusted remote authentication proxy system, generating a proxy identity credential integrated with first metric information of the trusted remote authentication proxy system;

[0015] receiving second measurement information sent by the target application, and generating an application identity credential endorsed and authorized by the proxy identity credential when verifying that the target application is in a trusted execution environment based on the second measurement information;

[0016] When the target object verifies that the trusted remote verification agent system is in a trusted execution environment based on the first measurement information, the interaction security between the target object and the target application is verified based on the application identity credential and the agent identity credential.

[0017] In a fourth aspect, the present application further provides a trusted execution environment verification device, the device comprising:

[0018] An agent identity credential acquisition module is used to acquire an agent identity credential integrated with first measurement information of the remote verification agent system from a remote verification agent system running in a trusted execution environment; the first measurement information is used to prove the legitimacy of the execution environment where the remote verification agent system is located;

[0019] A remote verification proxy system verification module, used to determine that the remote verification proxy system is a trusted remote verification proxy system when the proxy identity credential passes the legitimacy verification;

[0020] A trusted verification module triggering module is used to verify the security of interaction with the target application based on the application identity credentials issued by the trusted remote verification agent system for the target application and authorized by the agent identity credentials when the trusted remote verification agent system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application.

[0021] In a fifth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the trusted execution environment verification method described in each embodiment is implemented.

[0022] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the trusted execution environment verification method described in each embodiment is implemented.

[0023] In a seventh aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the trusted execution environment verification method described in each embodiment is implemented.

[0024] The above-mentioned verification method, device, computer equipment, storage medium and computer program product of the trusted execution environment can generate a proxy identity credential integrated with the first measurement information of the trusted remote verification proxy system when the trusted remote verification proxy system is started, and can prove to the target object that the trusted remote verification proxy system is in the trusted execution environment based on the proxy identity credential. By receiving the second measurement information sent by the target application, it is possible to verify whether the target application is in the trusted execution environment based on the second measurement information, so that under the premise that the target application is in the trusted execution environment, an application identity credential endorsed and authorized by the proxy identity credential is generated, and the legitimacy of the target application is remotely verified by the trusted remote verification proxy system, so that the target object only needs to verify the legitimacy of a single trusted remote verification proxy system, and the trusted remote verification proxy system verifies the legitimacy of the trusted execution environment where the target application is located for the target object, so that the target object no longer needs to care about the implementation details of different trusted execution environments, which greatly reduces the complexity of verification and can effectively improve the efficiency of the verification process. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 An application environment diagram of a method for verifying a trusted execution environment in one embodiment;

[0026] Figure 2 A flowchart of a method for verifying a trusted execution environment in an embodiment;

[0027] Figure 3 A schematic diagram of an initialization process of a trusted remote authentication agent system in one embodiment;

[0028] Figure 4 A schematic diagram of a process in which a secondary trusted remote authentication agent service issues a certificate for a TEE application in one embodiment;

[0029] Figure 5 A schematic diagram of the TEE application certificate legitimacy verification process in an embodiment;

[0030] Figure 6 A schematic diagram of a process of registering a secondary trusted remote authentication agent service to a gateway in one embodiment;

[0031] Figure 7 A schematic diagram of a process for registering an enhanced security script in one embodiment;

[0032] Figure 8 A flowchart of executing an enhanced security verification script to further check the legitimacy of a TEE application in one embodiment;

[0033] Fig. 9 is a flow chart of a method for verifying a trusted execution environment in another embodiment;

[0034] Fig.10 is an interactive schematic diagram of a verification process of a trusted execution environment in one embodiment;

[0035] Fig.11 is a structural block diagram of a verification device of a trusted execution environment in one embodiment;

[0036] Fig.12 is a structural block diagram of a verification device for a trusted execution environment in another embodiment;

[0037] Fig.13 is an internal structure diagram of a computer device in one embodiment;

[0038] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] The following is an introduction to some concepts involved in the embodiments of the present application.

[0041] Trusted computing: Based on hardware protection of computing process security, data privacy and authentication data integrity, source reliability, etc.; with external memory access control and memory encryption mechanism, that is, the outside world, including the operating system, has no access to the memory space of the trusted computing domain; with a remote proof mechanism to prove to the remote end that the logic of the trusted execution environment has not been tampered with; with a local proof mechanism to prove to other trusted execution environments that they are running in the same hardware environment. The effect achieved by using trusted computing is that the data and program logic in the trusted computing domain cannot be spied on by the external environment without active output.

[0042] Remote attestation: A method for a trusted execution environment to prove to a third party the legitimacy of the software and hardware in the environment in which it runs. The third party can be the target object in this application, specifically an ordinary user or TEE who wants to verify the legitimacy of other TEEs (Trusted Execution Environment). Generally, after a third party initiates a challenge, the trusted execution environment sends a set of information including a hash measurement of its own code logic, signs it, and returns it to the third party for identity verification. If the verification is successful, the remote attestation is completed. If the verification is successful, the remote attestation is completed. The process can also be designed to be non-interactive, that is, no challenge from a third party is required, and the trusted execution environment directly feeds back the remote attestation credentials to the third party.

[0043] Trusted Execution Environment (TEE): TEE is a secure area located in the main processor. The code and data loaded and run in the TEE will be protected in terms of privacy and integrity. TEE can run in parallel with the user-oriented operating system, but has better privacy and security than the latter. The trusted execution environment has the following characteristics: there is memory access control and memory encryption mechanism with the outside, that is, the outside, including the operating system, has no access to the memory space of the trusted computing domain; the remote attestation mechanism is used to prove to the remote end that the logic of the trusted execution environment has not been tampered with; the local attestation mechanism is used to prove to other trusted execution environments that they are running in the same hardware environment.

[0044] TEE application: refers to an application running in the TEE that can receive input data, perform calculations, and produce results, such as the target application in the embodiments of this application.

[0045] TEE measurement information: a credential that proves the correspondence between the TEE application and its code logic and runtime hardware environment. The credential is a collection of information such as the hash measurement of the application code logic, the hardware's signature on the code logic hash measurement (the signature private key is built into the hardware by the hardware manufacturer), and the hardware manufacturer's signature on the hardware public key. A third-party verification of the hardware manufacturer's signature on the hardware public key can prove that the hardware comes from a legitimate hardware manufacturer. Verifying the hardware's signature on the code logic can confirm that the TEE application with the expected logic runs in the expected hardware environment, thereby proving the integrity of the TEE application, and the security of the application is guaranteed by the TEE provided by the hardware. The measurement information supports the storage of application-dependent data, and can be used to store intermediate data of the key exchange protocol to negotiate session keys for encrypted communication between TEE applications and between TEE applications and non-TEE applications. The part corresponding to the proxy logic will be referred to as the "code hash measurement" later.

[0046] TLS handshake protocol: a protocol for establishing a secure channel based on x509 certificates. During the protocol execution, the communicating parties exchange certificates (or only the server provides the certificate), and use the challenge-response interaction method to prove that the other party holds the private key corresponding to the certificate. Subsequently, the key negotiation algorithm is used to negotiate the session password based on the certificate public key to encrypt the communication.

[0047] TEE is widely used in the fields of cloud computing, personal consumer electronics, blockchain, finance, the Internet of Things, artificial intelligence, etc. The demand for security and privacy in application scenarios such as personal privacy protection, cloud computing security, digital intellectual property protection, and financial payment is endless, and a large number of TEE applications based on trust zones or software protection extensions have emerged. However, generally, only the trustworthiness of the TEE application itself can be guaranteed. TEE applications with different architectures are not trustworthy, and these applications are prone to form trust islands.

[0048] The trusted execution environment verification method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. In the embodiment of the present application, a trusted remote verification agent system is deployed on the terminal 102 or 104, and the trusted remote verification agent system can be used to proxy the target object to realize remote certification of the trusted execution environment of the target application.

[0049] In a specific embodiment, a trusted remote verification proxy system is deployed in a server, and the server generates a proxy identity credential integrated with the first measurement information of the trusted remote verification proxy system in response to a startup event triggered for the trusted remote verification proxy system. The server receives the second measurement information sent by the target application, verifies whether the target application is in a trusted execution environment based on the second measurement information, and generates an application identity credential endorsed and authorized by the proxy identity credential when the verification result is that the target application is in a trusted execution environment. The target object can obtain the proxy identity credential integrated with the first measurement information from the server 104, and verify whether the trusted remote verification proxy system is in a trusted execution environment based on the first measurement information. In the case where the target object verifies that the trusted remote verification proxy system is in a trusted execution environment, the proxy verification of the trusted execution environment of the target application can be implemented through the trusted remote verification proxy system, that is, based on the application identity credential and the proxy identity credential generated by the trusted remote verification proxy system, the interaction security between the target object and the target application is verified. Through the above processing, the target object only needs to verify the legitimacy of a single trusted remote verification agent system. The trusted remote verification agent system verifies the legitimacy of the trusted execution environment where the target application is located on behalf of the target object. The target object no longer needs to care about the implementation details of different trusted execution environments, which greatly reduces the complexity of the verification process and can effectively improve the efficiency of the verification process.

[0050] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. A TEE application can be installed on the terminal. The TEE application can be software (such as a browser, payment software, etc.), or a web page, a small program, etc. The server 104 can be a background server corresponding to the software or web page, small program, etc., and the background server can be a server where a trusted remote verification agent system is located. The server 104 can also be a server specially deployed with a trusted remote verification agent system to implement agent remote certification, which is not specifically limited in this application. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0051] In practical applications, TEE is widely used in many fields, such as the personal consumer electronics field and artificial intelligence field listed above. For example, when an object uses a mobile device to access email, intranet and company documents, reliable end-to-end security is required to ensure that company data is protected on the device and network authentication data is not misused. In this case, applications such as email can be TEE applications. For example, in content protection, for high-quality content such as music, video, books and games, a content protection mechanism is required to prevent illegal copying and dissemination. In this case, video applications, game applications, audio applications, etc. can be TEE applications. For example, when making mobile payments, it is necessary to use the trusted user interface characteristics of TEE. TEE can provide protection in terms of object authentication, transaction confirmation and transaction processing. In this case, the payment application can be a TEE application; and so on. When the above process is implemented by the method in the embodiment of the present application, the verification efficiency can be effectively improved to ensure data security and reliability.

[0052] It should be noted that the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving and other scenarios.

[0053] In one embodiment, Figure 2 As shown, a method for verifying a trusted execution environment is provided. The method can be implemented by a computer device where a trusted remote verification agent system is located. The computer device can be a terminal or a server. For ease of description, the following example uses the method applied to Figure 1 The server in the example is used to illustrate the following steps:

[0054] Step 202: In response to a start event triggered for the trusted remote authentication proxy system, generate a proxy identity credential integrated with first measurement information of the trusted remote authentication proxy system.

[0055] Among them, the trusted remote verification agent system refers to a system used to act on behalf of the target object, i.e., a third party, to implement legitimacy verification on the trusted execution environment where the target application is located, so as to simplify the legitimacy verification process of the target object and the trusted execution environment where the target application is located.

[0056] The trusted remote verification agent system can provide a single or multiple trusted remote verification agent services to meet different trusted remote verification agent needs. For example, when the trusted remote verification agent system provides a single trusted remote verification agent service, the trusted execution environment where each target application is located can be verified for legitimacy through the trusted remote verification agent service. When the trusted remote verification agent system provides two or more trusted remote verification agent services, one of them is used as the root trusted remote verification agent service, and the others are used as intermediate trusted remote verification agent services. Based on the type of trusted execution environment where the target application is located, the corresponding intermediate trusted remote verification agent service of the same type can be selected for legitimacy verification, which can simplify the related processing of the technical details of different types of trusted remote verification agent services.

[0057] The startup event of the trusted remote verification proxy system can specifically be an event triggered when the trusted remote verification proxy system comes online. The trusted remote verification proxy system coming online can be automatically triggered or manually triggered. Accordingly, the startup event can be achieved by responding to an operation triggered by the operation and maintenance personnel of the trusted remote verification proxy system, or by monitoring the startup process of the trusted remote verification proxy system.

[0058] The first measurement information is measurement information used to describe the trusted remote verification agent system, and is a credential that proves the correspondence between the trusted remote verification agent system and its code logic and runtime hardware environment. The credential may include at least one of the following information: a hash measurement of the code logic, a signature of the hardware on the hash measurement of the code logic, and a signature of the hardware manufacturer on the hardware public key. The target object can verify that the hardware originates from a legitimate hardware manufacturer by verifying the hardware manufacturer's signature on the hardware public key. Verifying the hardware's signature on the code logic can verify that the trusted remote verification agent system with the expected logic runs in the expected hardware environment, thereby proving the integrity of the trusted remote verification agent system. The security of the trusted remote verification agent system is guaranteed by the trusted hardware.

[0059] The proxy identity credential is the identity credential of the trusted remote verification proxy system. The proxy identity credential is integrated with first measurement information, and the legitimacy of the remote proof report embedded in the proxy identity credential can be verified through the first measurement information. The proxy identity credential can be implemented in the form of a token, for example, it can be any data structure that can play the role of endorsement authorization. In some embodiments, the specific implementation form of the proxy identity credential can be a self-signed x509 certificate of the trusted remote verification proxy system, etc.

[0060] In some embodiments, the trusted remote verification agent system can monitor its own startup events. When the system startup is detected, in response to the startup event, it obtains the hash measurement of the code logic of the trusted remote verification agent system, the hardware's signature on the code logic hash measurement, the hardware manufacturer's signature on the hardware public key, and other credentials for proving itself as a trusted execution environment. Based on the obtained credentials, the first measurement information is constructed to generate a proxy identity credential that integrates the first measurement information.

[0061] Furthermore, the trusted remote verification proxy system can provide its own proxy identity credential to the target object so that the target object can verify the legitimacy of the trusted remote verification proxy system. Specifically, the target object can conduct a legitimacy audit on the code of the trusted remote verification proxy system. When the target object audits and approves the legitimacy of the code of the trusted remote verification proxy system, it can download the proxy identity credential token1 of the integrated measurement information from the trusted remote verification proxy system and verify the legitimacy of the remote proof report embedded in token1.

[0062] Step 204: Receive the second measurement information sent by the target application, and when it is verified based on the second measurement information that the target application is in a trusted execution environment, generate an application identity credential endorsed and authorized by the proxy identity credential.

[0063] The target application is a TEE application running in a trusted execution environment. When the target application is started, it can submit second measurement information to the trusted remote verification agent system to prove the legitimacy of its execution environment. In the specific implementation process, the target application can pre-establish an association with the trusted remote verification agent system so that the target application automatically submits the second measurement information to the trusted remote verification agent system after startup. It can also be that the trusted remote verification agent system determines the identifier of the target application that the target object requests to interact with, that is, the identifier of the target application, based on the interaction needs of the target object, and sends a request to the target application to obtain the second measurement information, thereby obtaining the second measurement information sent by the target application.

[0064] The second measurement information is generated by the target application and is used to prove the legitimacy of the execution environment of the target application. The data type contained in the second measurement information can be the same as the type of the first measurement information. For example, the second measurement information can include at least one of the following information: a hash measurement of the application code logic, a hardware signature on the code logic hash measurement, a hardware manufacturer's signature on the hardware public key, etc.

[0065] After obtaining the second measurement information sent by the target application, the trusted remote verification agent system can verify whether the target application is in a trusted execution environment based on the second measurement information. In some embodiments, the process of verifying whether the target application is in a trusted execution environment may include: based on the type of execution environment to which the target application belongs, obtaining the verification policy corresponding to the type, verifying the second measurement information based on the verification policy, and if the second measurement information satisfies the verification condition in the verification policy, it can be obtained that the execution environment to which the target application corresponding to the second measurement information belongs is a trusted execution environment. If the second measurement information does not meet the verification condition in the verification policy, it can be obtained that the execution environment to which the target application corresponding to the second measurement information belongs is an untrusted execution environment. In some embodiments, the verification policy may refer to a security parameter combination satisfied by the measurement information parsed in the verification logic, such as a hardware version, an SDK version, etc. Among them, each security parameter combination in the security parameter combination may not correspond one-to-one to the version of the hardware or SDK, but covers a certain range of hardware versions, SDK versions, etc.

[0066] The application identity credential is generated by the trusted remote verification agent system for the target application, and is used to characterize that the target application has passed the trusted execution environment verification of the trusted remote verification agent system. Specifically, when the target application passes the trusted execution environment verification of the trusted remote verification agent system, it can be characterized by being authorized by the proxy identity credential endorsement. In some embodiments, when the target object needs to verify the legitimacy of the execution environment of the target application, it only needs to obtain the application identity credential issued by the trusted remote verification agent system for the target application, and determine whether the application identity credential is authorized by the proxy identity credential endorsement of the trusted remote verification agent system, without considering the specific implementation details of the trusted execution environment of the target application.

[0067] In some embodiments, the trusted remote verification agent system receives second measurement information sent by the target application, and based on the second measurement information, verifies whether the target application is in a trusted execution environment. When the verification result is that the target application is in a trusted execution environment, an application identity credential endorsed and authorized by the proxy identity credential is generated, and the application identity credential is issued to the target application, so that the target application can perform convenient trusted verification with the target object based on the application identity credential, thereby simplifying the verification process.

[0068] Step 206 , when the target object verifies that the trusted remote verification agent system is in a trusted execution environment based on the first measurement information, the interaction security between the target object and the target application is verified based on the application identity credentials and the agent identity credentials.

[0069] The target object is a third party other than the target application and the trusted remote verification agent system that needs to interact with the target application in a trusted manner. The target object can be a terminal where an ordinary user who needs to interact with the target application is located, or a service in a different trusted execution environment that needs to interact with the target application.

[0070] The target object can obtain the first measurement information from the trusted remote verification agent system. The first measurement information is used to prove that the execution environment of the trusted remote verification agent system is a trusted execution environment. The target object determines whether the trusted remote verification agent system is in a trusted execution environment by verifying the first measurement information. If the verification result indicates that the trusted remote verification agent system is in a trusted execution environment, it indicates that the trusted remote verification agent system has legitimacy, and it can be further determined whether to approve the proxy verification result of the trusted remote verification agent system for the target application. If the verification result indicates that the trusted remote verification agent system is in an untrusted execution environment, it indicates that the trusted remote verification agent system does not have legitimacy, and legitimacy verification cannot be performed by proxy verification. At this time, the target object can report the verification result of the first measurement information to the trusted remote verification agent system, so that the trusted remote verification agent system updates the first measurement information or executes a preset self-test program, so that the target object can pass the legitimacy verification of the trusted remote verification agent system.

[0071] Verification of interactive security refers to confirming whether the execution environment of the objects participating in the interaction is a feasible execution environment. Among them, the application identity credentials and the proxy identity credentials are both identity credentials generated by the trusted remote verification proxy system. When the objects participating in the interaction are the target object and the target application, the target object and the target application can be controlled to handshake through the handshake protocol based on the application identity credentials obtained by the target object from the trusted remote verification proxy system and the proxy identity credentials obtained by the target application from the trusted remote verification proxy system, so that the interactive security of the connection channel between the target object and the target application can be determined after the handshake is successful.

[0072] The above-mentioned method for verifying the trusted execution environment can generate a proxy identity credential integrated with the first measurement information of the trusted remote verification proxy system when the trusted remote verification proxy system is started, and can prove to the target object that the trusted remote verification proxy system is in the trusted execution environment based on the proxy identity credential. By receiving the second measurement information sent by the target application, it is possible to verify whether the target application is in the trusted execution environment based on the second measurement information, so that under the premise that the target application is in the trusted execution environment, an application identity credential endorsed and authorized by the proxy identity credential is generated, and the legitimacy of the target application is remotely verified through the trusted remote verification proxy system, so that the target object only needs to verify the legitimacy of a single trusted remote verification proxy system, and the trusted remote verification proxy system verifies the legitimacy of the trusted execution environment in which the target application is located for the target object, so that the target object no longer needs to care about the implementation details of different trusted execution environments, which greatly reduces the complexity of verification and can effectively improve the efficiency of the verification process.

[0073] In some embodiments, the trusted remote verification agent system includes a root trusted remote verification agent and an intermediate trusted remote verification agent service; the agent identity credential includes a first agent identity credential and a second agent identity credential; in response to a startup event triggered for the trusted remote verification agent system, generating an agent identity credential integrated with first measurement information of the trusted remote verification agent system includes:

[0074] In response to a startup event of a root trusted remote authentication proxy service, generating a first proxy identity credential; the first proxy identity credential is used to self-authenticate the root trusted remote authentication proxy service;

[0075] In response to a startup event of an intermediate trusted remote authentication agent service, generating a valid initial second agent identity credential;

[0076] When a secure connection between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service is established based on the first proxy identity credential and the initial second proxy identity credential, the initial second proxy identity credential is converted into a second proxy identity credential endorsed and authorized by the first proxy identity credential.

[0077] Among them, the root trusted remote verification agent service refers to a service program that runs in a trusted execution environment and issues intermediate identity credentials to intermediate trusted remote agent services of the same or different types after verifying the legitimacy of their measurement information. Correspondingly, the intermediate trusted remote verification agent service refers to a service program that runs in a trusted execution environment and verifies the legitimacy of remote attestation reports of the same type of trusted execution environment. In addition, compared to the root trusted remote verification agent service, the intermediate trusted remote verification agent service can also download verification scripts from the enhanced security script library to implement additional customized verification requirements. The root trusted remote verification agent service and the intermediate trusted remote verification agent service can correspond to different types of trusted execution environments, respectively, to implement proxy authentication for target applications belonging to different types of trusted execution environments.

[0078] Specifically, the first proxy identity certificate is used to self-authenticate the legitimacy of the root trusted remote authentication proxy service, and the second proxy identity certificate is used to self-authenticate the intermediate trusted remote authentication proxy service. The second proxy identity certificate can be endorsed and authorized by the first proxy identity certificate to achieve a reliable association between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service.

[0079] When the root trusted remote verification proxy service is started, the trusted remote verification proxy system can directly obtain the credentials of the trusted execution environment where the root trusted remote verification proxy service is located to obtain the first proxy identity credential of the root trusted remote verification proxy service. When the intermediate trusted remote verification proxy service is started, the trusted remote verification proxy system can also directly obtain the credentials of the trusted execution environment where the intermediate trusted remote verification proxy service is located, but the result is the initial second proxy identity credential of the intermediate trusted remote verification proxy service, and it is also necessary to convert the initial second proxy identity credential to obtain the proxy identity credential of the intermediate trusted remote verification proxy service that can obtain the endorsement authorization of the root trusted remote verification proxy service.

[0080] Specifically, since the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service are two independent service programs, the trusted remote verification proxy system can only generate corresponding proxy identity credentials for the two respectively. Therefore, it is necessary to first establish a connection between the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service. When verifying that the connection between the two is a secure connection, the initial second proxy identity credential is converted into a second proxy identity credential endorsed and authorized by the first proxy identity credential.

[0081] In a specific implementation, the intermediate trusted remote verification proxy service can establish a secure connection by sending a connection request to the root trusted remote verification proxy service to perform a handshake protocol to exchange identity credentials with the root trusted remote verification proxy service. After the handshake is successful, the root trusted remote verification proxy service converts the initial second proxy identity credential rawToken2 into the second proxy identity credential token2 endorsed and authorized by the first proxy identity credential token1. For example, when the first proxy identity credential token1 is implemented as an x509 CA certificate, the second proxy identity credential token2 is a secondary x509 CA certificate issued by the first proxy identity credential token1. It should be noted that for identity credentials in the form of x509 certificates, the handshake protocol can be implemented as a standard TLS handshake protocol.

[0082] The above two-level proxy authentication architecture allows the target object to flexibly select the root of trust. For example, when the root trusted remote authentication proxy service is implemented as an SGX-type TEE, and the target object only wants to authenticate a CSV-type application, the target object can select the second proxy identity credential token2 of any CSV-type intermediate trusted remote authentication proxy service as its own root of trust to verify the legitimacy of the application identity credential appToken, without having to worry about any technical details related to the SGX-type TEE.

[0083] In this embodiment, remote proxy verification is performed through the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service, which can be compatible with multiple types of trusted execution environments. By adapting different types of trusted execution environments through the trusted remote verification proxy system, the verification logic of different types of trusted execution environments is integrated, so that users do not need to configure multiple environments locally to access different SDKs, which reduces the complexity of the trusted execution environment verification process, and can also avoid the problem that different types of trusted execution environments need to be configured with machines of different architectures, simplifying the implementation details of remote verification.

[0084] In some embodiments, the process of establishing a secure connection between a root trusted remote authentication proxy service and an intermediate trusted remote authentication proxy service includes:

[0085] performing a handshake protocol between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service to exchange the first proxy identity credential and the initial second proxy identity credential;

[0086] When the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service both authenticate the exchanged target proxy identity credentials, a secure connection between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service is established.

[0087] Among them, the handshake protocol is a protocol for establishing a secure channel between the communicating parties. During the execution of the handshake protocol, the communicating parties exchange certificates and use a challenge-response interaction method to prove that the private key corresponding to the certificate held by the other party is subsequently negotiated based on the certificate public key using a key negotiation algorithm for encrypted communication.

[0088] For the root trusted remote authentication proxy service, the target proxy identity credential obtained through the handshake protocol exchange is the initial second proxy identity credential. For the intermediate trusted remote authentication proxy service, the target proxy identity credential obtained through the handshake protocol exchange is the first proxy identity credential.

[0089] That is to say, through the handshake protocol, the root trusted remote verification proxy service can obtain the initial second proxy identity credentials of the intermediate trusted remote verification proxy service, and can perform security verification on the execution environment of the intermediate trusted remote verification proxy service based on the initial second proxy identity credentials. Similarly, the intermediate trusted remote verification proxy service can also obtain the first proxy identity credentials of the root trusted remote verification proxy service, and can perform security verification on the execution environment of the root trusted remote verification proxy service based on the first proxy identity credentials.

[0090] When the root trusted remote verification agent service successfully verifies the initial second agent identity credentials, and the intermediate trusted remote verification agent service successfully verifies the first agent identity credentials, it indicates that the root trusted remote verification agent service and the intermediate trusted remote verification agent service have verified the security of each other's execution environment, thereby establishing a secure connection between the root trusted remote verification agent service and the intermediate trusted remote verification agent service.

[0091] In this embodiment, by respectively verifying the identity credentials of the other party, on the premise that both parties have passed the verification, a secure connection between the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service is established, which can ensure that there is a reliable connection between the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service, and enable the root trusted remote verification proxy service to endorse and authorize the initial second proxy identity credential of the intermediate trusted remote verification proxy service to obtain the second proxy identity credential, thereby ensuring the security and reliability of the second proxy identity credential.

[0092] In some embodiments, the verification process of the target proxy identity credentials includes:

[0093] Obtain the code hash measurement indicated in the extended field of the target proxy identity credential; use the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service as verification parties respectively, and when the code hash measurement is in the hash measurement whitelist of the verification party and the target proxy identity credential is a legal proxy identity credential, obtain a verification result indicating that the target proxy identity credential has passed the verification.

[0094] The code hash measurement refers to the hash measurement information of the application code logic. For the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service, they are both application services in the trusted execution environment, with corresponding code and code logic. Therefore, whether it is the security verification of the initial second proxy identity credential by the root trusted remote verification proxy service, or the security verification of the first proxy identity credential by the intermediate trusted remote verification proxy service, the code logic needs to be verified for security.

[0095] The first proxy identity credential and the initial second proxy identity credential both carry an extension field, in which a code hash measurement is indicated. During the security verification process, the verifier can determine whether the first proxy identity credential and the initial second proxy identity credential have passed verification by verifying whether the code hash measurement is in the verifier's hash measurement whitelist and whether the first proxy identity credential and the initial second proxy identity credential are legal proxy identity credentials.

[0096] Specifically, the hash measurement whitelist list can be configured based on trusted objects during the generation process of the first proxy identity credential and the initial second proxy identity credential. For example, the result obtained in the generation process of the first proxy identity credential also includes: the runtime configuration item of the root trusted remote verification proxy service contains a code hash measurement whitelist list of the trusted secondary trusted remote verification proxy service; the root trusted remote verification proxy service integrates multiple TEE SDKs, which can verify the legitimacy of the measurement information of the same or different types of secondary trusted remote verification proxy services; the first proxy identity credential provides an extended field as an interface to support adding application-defined information; the first proxy identity credential meets the association requirements. The association requirements include the extended field embedding its own measurement information and code hash measurement, and the custom field of the measurement information stores the hash of the certificate public key. So that the constructed first proxy identity credential can ensure that only the TEE application of this measurement information can generate the credential, and the private part of the credential only exists in this application, and cannot be stolen by other applications unless it is deliberately leaked. For the convenience of description, the identity credential that meets this association requirement will be referred to as a legitimate TEE identity credential in the future.

[0097] In this embodiment, the security of the connection established between the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service can be further ensured by including the code hash measurement in the verifier's hash measurement whitelist and the target proxy identity credential being a legitimate proxy identity credential as the requirements that both parties need to meet to verify each other's identity credentials.

[0098] In a specific application, generating a proxy identity credential that integrates the first measurement information of the trusted remote verification proxy system can be achieved through the stage of initializing and deploying the trusted remote verification proxy system. This stage is responsible for orderly launching various services of the trusted remote verification proxy system so that it can provide services to the outside world as an organic whole, such as Figure 3 As shown, the details are as follows:

[0099] In response to the startup operation triggered by the operation and maintenance personnel for the root trusted remote verification proxy service, the trusted remote verification proxy system randomly generates a self-authenticated identity credential token1, and then starts the intermediate trusted remote verification proxy service, which can specifically be a secondary trusted remote verification proxy service. After the secondary trusted remote verification proxy service is started, it randomly generates a legal TEE identity credential, that is, the initial second proxy identity credential rawToken2. Among them, the trusted execution environment type where the secondary trusted remote verification proxy service is located can be different from the trusted execution environment type of the root trusted remote verification proxy service. The secondary trusted remote verification proxy service requests to execute the handshake protocol with the root trusted remote verification proxy service to exchange identity credentials and establish a secure connection. After the handshake is successful, the root trusted verification proxy service converts the initial second proxy identity credential rawToken2 into a secondary identity credential token2 endorsed and authorized by the first proxy identity credential token1, so that the secondary trusted remote verification proxy service provides services to the outside world with the second proxy identity credential token2.

[0100] In some embodiments, when there is only one trusted remote verification proxy service in the trusted remote verification proxy system, the proxy identity certificate of the trusted remote verification proxy service can be endorsed and authorized to obtain the application identity certificate of the target reference. When there are both a root trusted remote verification proxy service and an intermediate trusted remote verification proxy service in the trusted remote verification proxy system, the proxy identity certificate of the intermediate trusted remote verification proxy service can be endorsed and authorized to obtain the application identity certificate of the target reference, so as to realize the security and convenient verification of the target application for different trusted execution environments.

[0101] Specifically, in one embodiment, receiving second measurement information sent by a target application, and when verifying that the target application is in a trusted execution environment based on the second measurement information, generating an application identity credential endorsed and authorized by a proxy identity credential, includes:

[0102] In response to a connection request initiated by the target application to the intermediate trusted remote authentication proxy service, the initial application identity credential generated by the target application and carrying the second measurement information is sent to the intermediate trusted remote authentication proxy service;

[0103] When the intermediate trusted remote authentication proxy service verifies the initial application identity credential based on the initial application identity credential, the initial application identity credential is converted into an application identity credential endorsed and authorized by the intermediate proxy identity credential.

[0104] Among them, in the case where the trusted remote verification proxy system includes an intermediate trusted remote verification proxy service, the target application can initiate a connection request to the intermediate trusted remote verification proxy service with the same trusted execution environment type according to the type of the trusted execution environment in which it is located, so as to establish a secure connection with the intermediate trusted remote verification proxy service, and the intermediate trusted remote verification proxy service will endorse and authorize the application identity credentials of the target application.

[0105] Specifically, after the target application is started, it will randomly generate a legal TEE identity credential, namely the initial application identity credential. The initial application identity credential carries the second measurement information of the target application, so that the intermediate trusted remote verification agent service that receives the initial application identity credential can perform security verification on the execution environment of the target application based on the second measurement information of the target application.

[0106] In a specific application, such as Figure 4 As shown, the intermediate trusted remote verification proxy service is a secondary trusted remote verification proxy service, and the target application is a TEE application. After the TEE application is started, a legal TEE identity credential, namely the initial application identity credential rawAppToken, is randomly generated. The TEE application requests to execute a handshake protocol with the secondary trusted remote verification proxy service to exchange identity credentials to establish a secure connection. It should be noted that during the handshake process between the TEE application and the secondary trusted remote verification proxy service, the secondary trusted remote verification proxy service needs to verify that the initial application identity credential rawAppToken meets two conditions, namely, the trusted execution environment type indicated in the extended field of the initial application identity credential is the same as that of the secondary trusted remote verification proxy service, and the initial application identity credential is a legal TEE identity credential. When the TEE application and the secondary trusted remote verification proxy service successfully handshake, the secondary trusted remote verification proxy service converts the initial application identity credential rawAppToken into an application identity credential appToken authorized and endorsed by the second measurement information token2, and indicates the TEE type, original measurement information, code hash measurement, and the verification policy security level met in the extended field of the application identity credential appToken, and feeds the application identity credential appToken back to the TEE application.

[0107] In this embodiment, the security verification of the target application is implemented through an intermediate trusted remote verification proxy service. The application identity credentials of the target application can be endorsed and authorized directly based on the intermediate trusted remote verification proxy service. The trusted remote verification proxy system can implement convenient verification between target applications with the same type of trusted execution environment according to the intermediate trusted remote verification proxy service, effectively reducing the complexity of the security verification process.

[0108] In some embodiments, verifying the interaction security between the target object and the target application based on the application identity credential and the proxy identity credential includes:

[0109] When the target object initiates a connection request for the target application, the second proxy identity credential and the application identity credential are sent to the target object;

[0110] When the target object passes the authentication of the target application based on the second proxy identity credential and the application identity credential, it is determined that the connection channel between the target object and the target application is in a secure state.

[0111] Specifically, when the target object determines that the object with which it needs to interact is a target application, the target object can initiate a connection request for the target application, and the target application can respond to the connection request with the target object and perform a handshake process based on the handshake protocol. During the handshake process, the target application can send the second proxy identity credentials and the application identity credentials to the target object. The target object performs security verification on the execution environment of the target application based on the second proxy identity credentials and the application identity credentials sent by the target application. When the verification passes, it can be determined that the connection channel between the target object and the target application is in a secure state.

[0112] In this embodiment, the second proxy identity credential is a proxy identity credential that endorses and authorizes the application identity credential. Therefore, by sending the second proxy identity credential and the application identity credential to the target object, the second proxy identity credential that endorses and authorizes the application identity credential can be verified while the application identity credential is being verified, thereby achieving complete verification of the entire endorsement authorization link, thereby ensuring the reliability of security verification.

[0113] In one of the embodiments, the verification process of the target application includes: obtaining the information to be verified indicated by the extended field of the application identity credential, the information to be verified includes the trusted execution environment type and code hash measurement of the target application, when the information to be verified meets the expected conditions of the target object, and it is confirmed that the application identity credential is endorsed and authorized by the second proxy identity credential, and the second proxy identity credential is endorsed and authorized by the first proxy identity credential, a verification result that the target application has passed the verification is obtained.

[0114] In a specific application, such as Figure 5As shown, taking the target user as a third party and the target application as a TEE application as an example, the TEE application certificate legitimacy verification process includes: the third party requests to establish a secure connection with the TEE application by executing the handshake protocol. During the handshake process, the application identity credential appToken and the second proxy identity credential token2 fed back by the verification application meet the following two conditions. The first condition is that the TEE type and code hash measurement indicated in the extended field of the application identity credential appToken meet the expectations of the third party; the second condition is that the identity credential of the second proxy identity credential token2 is authorized and endorsed, and the second proxy identity credential token2 is the secondary identity credential of the first proxy identity credential token1. If both conditions are met, it indicates that the TEE application has been verified by the trusted remote verification agent system to be legitimate in the execution environment.

[0115] In this embodiment, the security of the execution environment of the target application is verified through the trusted execution environment type and the code hash measurement, and verification is performed through the second proxy identity credential that is the endorsement authorization object of the application identity credential of the target application. This ensures the reliability of the verified trusted execution environment type and the code hash measurement, and enables complete verification of the entire endorsement authorization chain, thereby ensuring the reliability of the security verification.

[0116] In some embodiments, the trusted remote authentication agent system further includes a gateway; and the method further includes:

[0117] Register the intermediate trusted remote authentication proxy service to the available list of the gateway, so that the gateway adds the network address of the intermediate trusted remote authentication proxy service to the authentication service list corresponding to the trusted execution environment type according to the trusted execution environment type to which the intermediate trusted remote authentication proxy service belongs.

[0118] Among them, the gateway is a component of the trusted remote verification agent system. The gateway runs outside the feasible execution environment TEE where the trusted remote verification agent system is located. The gateway can provide the target object with an interface for querying the network address of the specified type of intermediate trusted remote verification agent service.

[0119] The gateway can be started synchronously with the root trusted remote verification proxy service during the initialization process of the trusted remote verification proxy system. After the intermediate trusted remote verification proxy service obtains the second proxy identity certificate endorsed and authorized by the first proxy identity certificate, the intermediate trusted remote verification proxy service registers its own network address to the gateway's available list, and the gateway adds the network address of the intermediate trusted remote verification proxy service to the verification service list of the corresponding type of TEE application, so that the target application can obtain the network address of the intermediate trusted remote verification proxy service of the same trusted execution environment type from the corresponding verification service list in the gateway based on the type of trusted execution environment in which it is located, thereby achieving a secure connection with the intermediate trusted remote verification proxy service, so as to perform proxy verification on the target application through the intermediate trusted remote verification proxy service.

[0120] In a specific application, such as Figure 6 As shown, the trusted remote verification agent system responds to the startup operation triggered by the operation and maintenance personnel for the root trusted remote verification agent service, randomly generates a self-authenticated identity credential token1, and then starts the secondary trusted remote verification agent service to randomly generate a legal TEE identity credential rawToken2. The secondary trusted remote verification agent service requests to execute the handshake protocol with the root trusted remote verification agent service to exchange identity credentials and establish a secure connection. After the handshake is successful, the root trusted verification agent service converts the initial second agent identity credential rawToken2 into a secondary identity credential token2 endorsed and authorized by the first agent identity credential token1. The secondary trusted remote verification agent service registers its own network address to the available list of the gateway, and the gateway adds the network address to the verification service list of the corresponding type of TEE application, which can facilitate the operation and maintenance object to directly query the secondary trusted remote verification agent service of the specified trusted execution environment type from the gateway.

[0121] In this embodiment, by configuring the verification service list at the gateway and classifying the network addresses of the intermediate trusted remote verification proxy services according to the type of trusted execution environment, it is possible to provide a query on the network addresses of intermediate trusted remote verification proxy services of a specified type, thereby enabling fast and convenient search for intermediate trusted remote verification proxy services of different types of trusted execution environments, and enabling fast matching of intermediate trusted remote verification proxy services of the same trusted execution environment type with the target application, thereby improving the efficiency of verification of the trusted execution environment of the target application.

[0122] In some embodiments, the trusted remote authentication agent system includes an enhanced security script library; the method further includes:

[0123] Obtain the application identity credentials and enhanced security script index sent by the target object;

[0124] From the enhanced security script library, search for a target enhanced security script that matches the enhanced security script index;

[0125] Execute the target enhanced security script for the application identity credentials, obtain the execution result of the target enhanced security script, and feed back the execution result to the target object.

[0126] Among them, the enhanced security script index is the basis for searching the enhanced security script in the enhanced security script library. The enhanced security script library is used to store the enhanced security scripts registered by the third party to the trusted remote verification agent system. The enhanced security script is used to implement the third-party customized verification logic other than the existing verification logic of the trusted remote verification agent service. The execution result of the target enhanced security script can specifically be an assertion of whether the target enhanced security script is successfully executed.

[0127] The application identity credential sent by the target object is information sent to the target object by the target application that has established a secure connection with the target object during the handshake process with the target object. In a specific embodiment, the target object sends the application identity credential and the enhanced security script index to the trusted remote verification proxy service based on the trusted execution environment type of the target application after establishing a secure connection with the trusted remote verification proxy service of the same trusted execution environment type, so that the trusted remote verification proxy service can search the enhanced security script library for the target enhanced security script that matches the enhanced security script index. The number of target enhanced security scripts can be one or more, which can be determined specifically based on the enhanced security script index. The enhanced security script index can be a single index or a list of enhanced security script indexes consisting of multiple enhanced security script indexes.

[0128] After finding the target enhanced security script that matches the enhanced security script index, the trusted remote verification agent service executes the target enhanced security script against the application identity credentials, obtains an assertion on whether the target enhanced security script is executed successfully, and feeds the assertion back to the target object so that the target object knows whether the target application corresponding to the application identity credentials meets the security verification conditions of the target enhanced security script.

[0129] Furthermore, if the target application corresponding to the application identity credential meets the security verification conditions of the target enhanced security script, a secure connection between the target application and the target object can be established. If the target application corresponding to the application identity credential does not meet the security verification conditions of the target enhanced security script, the handshake connection between the target application and the target object is terminated, and a prompt message indicating the connection failure is fed back to the target object.

[0130] It should be noted that, in the process of searching and executing the target enhanced security script, when the trusted remote verification agent system has only one trusted remote verification agent service, the process can be implemented by the trusted remote verification agent service. When the trusted remote verification agent system includes both a root trusted remote verification agent and an intermediate trusted remote verification agent, the process is implemented by the intermediate trusted remote verification agent.

[0131] In this embodiment, the trusted remote verification proxy service obtains the application identity credentials and enhanced security script index sent by the target object, searches for and executes the target enhanced security script that matches the enhanced security script index, obtains and feeds back the execution result of the target enhanced security script, and can implement third-party customized verification logic other than the existing verification logic of the trusted remote verification proxy service, so that the trusted remote verification proxy system supports enhanced security verification scripts on the basis of the inherent verification logic, and exposes necessary interfaces to meet diverse verification requirements.

[0132] In some embodiments, the method further comprises:

[0133] In response to a script storage request initiated by the target object, obtaining an enhanced security script to be stored;

[0134] When the enhanced security script passes the validity check of the enhanced security script library, the hash value of the enhanced security script is used as the enhanced security script index, the enhanced security script is stored in the enhanced security script library, and the enhanced security script index is fed back to the target object.

[0135] The enhanced security script to be stored is the customized verification logic of the target object, which is a supplement to the inherent verification logic of the trusted remote verification agent system. The same target object can be configured with different enhanced security scripts for different target applications, and different target objects can also be configured with different enhanced security scripts for the same target application, which can greatly meet the diverse verification needs in different scenarios.

[0136] Specifically, the trusted remote verification proxy system obtains the enhanced security script to be stored provided by the target object by responding to the script storage request initiated by the target object. In order to ensure the security of the stored enhanced security script, the trusted remote verification proxy system needs to perform a legitimacy check on the enhanced security script library before storing the enhanced security script. When the enhanced security script passes the legitimacy check of the enhanced security script library, the hash value of the enhanced security script is obtained, and the hash value is used as the index of the enhanced security script. Then, the enhanced security script is stored in the enhanced security script library with the hash value as the enhanced security script index, and the enhanced security script index is fed back to the target object, so that the target object can find the required enhanced security script in the enhanced security script library based on the enhanced security script index.

[0137] In a specific embodiment, Figure 7 As shown in the figure, taking the target object as a third party as an example, the third party can develop verification logic locally according to the platform specifications and compile it into a script supported by the platform. The third party can then request to store the enhanced security script in the enhanced security script library, and the request content includes information such as the script source code, applicable TEE type, and version number. The script library verifies the legitimacy of the script, including that after the interface complies with the specifications, it stores the script in the database with the hash value of the script as the key scriptId, and feeds back scriptId to the third party as the index of the specified script.

[0138] In this embodiment, the trusted remote verification agent system performs security verification on the enhanced security script requested to be stored by the target object, and stores the verified enhanced security script in the enhanced security script library by using its hash value as an index. On the one hand, the target object can find the required enhanced security script in the enhanced security script library, and on the other hand, using the hash value as an index can improve the security of the stored enhanced security script.

[0139] In some embodiments, the trusted remote authentication proxy system includes a root trusted remote authentication proxy service and an intermediate trusted remote authentication proxy service. In this case, the receiving object of the application identity credential and the enhanced security script index sent by the target object is the intermediate trusted remote authentication proxy service. The trusted remote authentication proxy system includes a gateway storing a list of authentication services.

[0140] Accordingly, the application identity credentials and enhanced security script index sent by the target object are obtained, including:

[0141] In response to a network address query request of an intermediate trusted remote authentication proxy service triggered by a target object, determining a target trusted execution environment type to which the intermediate trusted remote authentication proxy service belongs;

[0142] Find the network address of the intermediate trusted remote authentication proxy service that matches the target object from the authentication service list corresponding to the trusted execution environment type in the gateway;

[0143] Get the application identity credentials and enhanced security script index sent by the target object to the intermediate trusted remote authentication proxy service based on the network address.

[0144] Specifically, the enhanced security script stored by the target object in the trusted remote verification proxy system can be stored according to different trusted execution environment types, and different trusted execution environment types also correspond to different verification service lists in the gateway. Therefore, the trusted remote verification proxy system can respond to the network address query request of the intermediate trusted remote verification proxy service triggered by the target object, determine the target trusted execution environment type to which the intermediate trusted remote verification proxy service belongs, and then determine the verification service list corresponding to the trusted execution environment type from the gateway of the trusted remote verification proxy system, and find the network address of the intermediate trusted remote verification proxy service that matches the target object from the verification service list, so that the target object can send the application identity credentials and enhanced security script index to the intermediate trusted remote verification proxy service based on the network address, thereby obtaining the application identity credentials and enhanced security script index sent by the target object, thereby realizing efficient search and connection of the adapted intermediate trusted remote verification proxy service.

[0145] In a specific embodiment, Figure 8 As shown, taking the target object as a third party and the intermediate trusted remote verification proxy service as a secondary trusted remote verification proxy service as an example, an implementation method for executing an enhanced security verification script to further check the legitimacy of the TEE application is provided, which specifically includes the following process: First, the third party queries the gateway service for the network address addr of the available secondary trusted remote verification proxy service; after obtaining the network address addr, the third party requests to execute a handshake protocol with the queried secondary trusted remote verification proxy service to establish a secure connection with the secondary trusted remote verification proxy service. Among them, the handshake process verifies that the second proxy identity credential token2 of the secondary trusted remote verification proxy service meets the following conditions: the TEE type and code hash measurement indicated in the extended field of the second proxy identity credential token2 are consistent with expectations; the second proxy identity credential token2 is the secondary identity credential authorized and endorsed by the first proxy identity credential token1. After the secure connection between the third party and the secondary trusted remote verification proxy service is established, the third party submits the application identity credential appToken of the TEE application and the enhanced security script index list {scriptId} to the queried secondary trusted remote verification proxy service in a secure channel to request execution. The secondary trusted remote verification agent service indexes the corresponding script from the enhanced security script library according to the request, and then executes the enhanced security script, collects the assertion of whether each script is executed successfully or not, and the secondary trusted remote verification agent service feeds back the assertion of all script execution results to the third party in the secure channel.

[0146] In one embodiment, if Fig. 9As shown, a method for verifying a trusted execution environment is also provided. The method can be implemented by a computer device of a target object that needs to interact with a target application. The computer device can be a terminal or a server. For ease of description, the following example uses the method applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:

[0147] Step 902, obtaining a proxy identity credential integrated with first measurement information of the remote verification proxy system from a remote verification proxy system running in a trusted execution environment; the first measurement information is used to prove the legitimacy of the execution environment where the remote verification proxy system is located.

[0148] Step 904: When the proxy identity credential passes the legitimacy verification, the remote authentication proxy system is determined to be a trusted remote authentication proxy system.

[0149] Step 906, when the trusted remote verification agent system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application, the interaction security with the target application is verified based on the application identity certificate issued by the trusted remote verification agent system for the target application and authorized by the agent identity certificate endorsement.

[0150] The above-mentioned method for verifying a trusted execution environment can verify to the target object that the remote verification proxy system is in a trusted execution environment based on the proxy identity credential by obtaining the proxy identity credential integrated with the first measurement information of the remote verification proxy system from the remote verification proxy system running in the trusted execution environment. The system is a trusted remote verification proxy system. When the trusted remote verification proxy system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application, the interactive security with the target application is verified based on the application identity credential issued by the trusted remote verification proxy system to the target application and authorized by the proxy identity credential, so that the target object only needs to verify the legitimacy of a single trusted remote verification proxy system. The trusted remote verification proxy system verifies the legitimacy of the trusted execution environment where the target application is located on behalf of the target object, so that the target object no longer needs to care about the implementation details of different trusted execution environments, which greatly reduces the complexity of verification and can effectively improve the efficiency of the verification process.

[0151] It can be understood that the interaction process between the target object and the trusted remote authentication agent system and the target application can refer to the above embodiments, which will not be described in detail here.

[0152] To further illustrate the solution of the present application, the design concept of the embodiment of the present application is introduced below:

[0153] Existing remote attestation scenarios can be divided into the following two forms: one is that a user running outside the TEE remotely verifies the legitimacy of the TEE, and the other is that TEEs of the same hardware type mutually verify their legitimacy.

[0154] For the first method, the user requests remote verification of the legitimacy of the TEE according to the remote attestation protocol, and the TEE responds with measurement information M. The user calls the SDK provided by the hardware manufacturer to verify the legitimacy of the measurement information and outputs a legitimacy assertion report. For TEEs implemented with different hardware technologies, users need to perform similar remote attestation processes, but call the SDKs provided by different hardware manufacturers to verify the legitimacy of the TEE and output assertion reports with different structures. It can be seen that in order to verify TEEs supported by different hardware technologies, users must complete the cumbersome configuration of the corresponding SDK locally, and the threshold for use is high. On the other hand, the extensibility of the user-side verification program is not strong. Every time a type of underlying hardware is added, a corresponding supporting SDK needs to be introduced.

[0155] For the second method, given TEE services A and B of the same hardware type. Before remote attestation begins, TEE service A hardcodes the measurement information Mb' of TEE service B, and the third party injects the measurement information Ma' of TEE service A into TEE service B at runtime. In the remote process, TEE service A verifies the legitimacy of TEE service B based on the SDK and hard-coded measurement information, and TEE service B verifies the legitimacy of TEE service A using the SDK and dynamically injected measurement information. After the above verifications are passed, both parties continue to interact with the service and transmit application data.

[0156] The common defect of the above solutions is that verifying different types of TEEs requires the verifier to make adaptation work such as mastering complex development guides and accessing corresponding SDKs. Moreover, these adaptations are often manifested as privatized code implementations that are not fully audited, which is not conducive to vulnerability discovery and security upgrades.

[0157] The present application also provides an application scenario, which applies the above-mentioned trusted execution environment verification method. Specifically, the application of the trusted execution environment verification method in the application scenario is as follows:

[0158] The interaction objects include the trusted remote authentication agent system running in the TEE, the TEE application that needs to be authenticated by the TEE, and the third party that needs to interact with the target application. Fig.10 As shown, the following process is included:

[0159] First, after the trusted remote verification agent system running in TEE is launched, the third party audits and approves the legitimacy of its code, downloads the proxy identity credential token1 of the integrated measurement information from the trusted remote verification agent system, and verifies the legitimacy of the remote proof report embedded in token1; then, the third party can register the enhanced security verification script with the system; after TEE application X is started, it submits the measurement information Mx to the system to prove the legitimacy of the environment configuration, and after the trusted remote verification agent system verifies the legitimacy of the measurement information Mx, it issues the appToken endorsed by token1; the third party (user or TEE application Y) and TEE application X execute the appToken endorsed by token1, and the measurement information, verification policy security level, etc. indicated in the appToken meet expectations. If the verification is successful, data can be exchanged securely in the established channel; in particular, when the third party has additional customized verification requirements, the appToken can be submitted to the trusted remote verification agent system, so that the trusted remote verification agent system can execute the enhanced security verification script registered to the trusted remote verification agent system to obtain an assertion of whether the verification is successful or not.

[0160] Specifically, the implementation of the above embodiment is divided into the following stages: initialization deployment of the trusted remote authentication proxy system, registration of enhanced security scripts, issuance of TEE application identity credentials, application legitimacy verification, and enhanced security verification, which are described as follows:

[0161] The first part is about the initial deployment of the trusted remote verification proxy system. This stage is responsible for the orderly launch of various services of the trusted remote verification proxy system, so that it can provide services to the outside world as an organic whole. The details are as follows:

[0162] 1. Start the root trusted remote authentication agent service, gateway and enhanced security script library;

[0163] 2. After the root trusted remote authentication agent service is started, a self-authenticated identity credential token1 is randomly generated (the specific implementation form can be a self-signed x509 certificate, etc.).

[0164] Among them, the runtime configuration items of the service include a whitelist of code hash measurements of trusted secondary trusted remote verification agent services; the service integrates multiple TEE SDKs, which can verify the legitimacy of measurement information of the same or different types of secondary trusted remote verification agent services; token1 provides extended fields as an interface to support adding application-defined information; token1 meets the association requirements: the extended fields embed their own measurement information and code hash measurements, and the custom fields of the measurement information store the hash of the certificate public key (the hash algorithm can be SM3, SHA256, etc.). The identity credentials constructed in this way can ensure that only the TEE application of this measurement information can generate the credentials, and the private part of the credentials only exists in this application and cannot be stolen by other applications unless they are deliberately leaked. Identity credentials that meet this requirement will be referred to as legitimate TEE identity credentials in the future.

[0165] 3. Start the secondary trusted remote authentication proxy service. After the service is started, a legal TEE identity credential rawToken2 is randomly generated. It should be noted that the TEE type of the secondary trusted remote authentication proxy service can be different from that of the root trusted remote authentication proxy service;

[0166] 4. Request to execute the handshake protocol with the root trusted remote authentication agent service to exchange identity credentials and establish a secure connection. During the handshake process, both parties verify that the identity credentials of each other meet the requirements, including that the code hash measurement indicated in the extended field of the identity credential is in the whitelist of hash measurements configured by itself, and that the identity credential is a legal TEE identity credential;

[0167] 5. After the handshake is successful, the root trusted verification proxy service converts rawToken2 into a secondary identity credential token2 endorsed and authorized by token1, and indicates the TEE type, original measurement information, code hash measurement, and the security level of the verification policy met in its extended field. For example, when token1 is implemented as an x509 CA certificate, token2 is a secondary x509CA certificate issued by token1. For identity credentials in the form of x509 certificates, the handshake protocol can be implemented as a standard TLS protocol.

[0168] Among them, the verification strategy refers to the combination of security parameters satisfied by the measurement information parsed in the verification logic, such as hardware version, SDK version, etc. Each security parameter combination does not correspond to the hardware and SDK version one by one, but covers a certain range of hardware versions, SDK versions, etc., and defines the security strength from new to old as "highest", "high", "medium" and "low". The specific implementation can provide more fine-grained classification, but it is recommended that the number of classifications should not be too large to avoid exposing too many parameters to users. The secondary trusted remote verification agent service provides services to the outside world with the identity credential token2.

[0169] 6. The secondary trusted remote authentication proxy service registers itself to the gateway's available list, and the gateway adds its network address to the authentication service list of the corresponding type of TEE application;

[0170] 7. The third party obtains token1 of the root trusted remote verification agent service from the platform, verifies its legitimacy, ensures that the measurement information corresponds to the source code, and that the implemented verification logic (including the legitimacy verification logic for the same or different types of secondary trusted remote verification agent services) meets expectations, and saves token1 locally.

[0171] The second part is about enhancing the security script registration. This stage provides third-party customized verification logic in addition to the existing verification logic of the interface storage proxy service, as follows:

[0172] 1. The third party develops verification logic locally according to the platform specifications and compiles it into a script supported by the platform (the script type can be WASM, JS, Python, etc.). The script is a piece of code that can receive the TEE certificate and other user-provided parameters and output an assertion on whether the certificate is legal or not;

[0173] 2. The third party will request the enhanced security script library to store the script. The request content includes the script source code, applicable TEE type, version number and other information. The script library verifies the legitimacy of the script, including that the interface complies with the specification, and then stores it in the script library with the script hash as the key scriptId, and feedbacks scriptId to the third party as the index of the specified script. Among them, all scripts stored in the script library are subject to public review and can be used by different third parties.

[0174] The third part is about issuing TEE application identity credentials. This stage implements the function of issuing certificates for TEE applications by the same type of secondary trusted remote authentication agent service, as follows:

[0175] 1. After the TEE application service is started, a legal TEE identity credential rawAppToken is randomly generated;

[0176] 2. Request to execute the handshake protocol with the secondary trusted remote verification proxy service to exchange identity credentials and establish a secure connection. During the handshake process, the secondary trusted remote verification proxy service verifies that the rawAppToken meets the following requirements: the TEE type indicated in the extension field of rawAppToken is the same as that of the secondary trusted remote verification proxy service; rawAppToken is a legal TEE identity credential;

[0177] 3. After the handshake is successful, the secondary trusted remote verification agent service converts the rawAppToken into an appToken endorsed by token2, and indicates the TEE type, original measurement information, code hash measurement, and the security level of the verification policy met in its extended field, and then feeds it back to the TEE application.

[0178] The fourth part is about TEE application legitimacy verification. This stage describes how a third party verifies the legitimacy of a TEE application with the help of a certificate chain, as follows:

[0179] 1. The third party requests to establish a secure connection with the TEE application through a handshake protocol. During the handshake process, the requirements for appToken and token2 fed back by the verification application include: the TEE type and code hash measurement indicated in the extension field of appToken are consistent with expectations; appToken is the identity credential of token2 authorization endorsement, and token2 is the secondary identity credential of token1 authorization endorsement.

[0180] 2. If there are customized requirements, you can continue to perform subsequent enhanced security verification.

[0181] It should be noted that the above two-level proxy authentication architecture allows third parties to flexibly select the root of trust. For example, if the root trusted remote authentication proxy service is implemented as an SGX-type TEE, and the third party only wants to authenticate a CSV-type application, the third party can select the identity credential token2 of any CSV-type secondary trusted remote authentication proxy service as its own root of trust to verify the legitimacy of the application identity credential appToken, without having to worry about any technical details related to SGX.

[0182] The fifth part is about enhanced security verification. This stage describes the process of enhancing the security verification of other attributes of TEE application by executing customized verification scripts by a third party, as follows:

[0183] 1. The third party queries the gateway service for the available secondary trusted remote authentication proxy service network address addr;

[0184] 2. The third party requests and executes the handshake protocol with the secondary trusted remote authentication proxy service obtained from the query to establish a secure connection. The handshake process verifies that the identity credential token2 of the secondary trusted remote authentication proxy service meets the following requirements: the TEE type and code hash measurement indicated in the token2 extension field meet expectations; token2 is the secondary identity credential authorized and endorsed by token1;

[0185] 3. After the connection is established, the third party submits the appToken and the enhanced security script index list {scriptId} to the secondary trusted remote authentication proxy service obtained through the query in the secure channel to request execution;

[0186] 4. The secondary trusted remote verification agent service indexes the corresponding script from the enhanced security script library according to the request and executes it, collecting assertions on whether each script is executed successfully or not;

[0187] 5. The secondary trusted remote verification agent service feeds back the assertions of all script execution results to the third party within the secure channel.

[0188] This method outsources remote verification to a trusted remote verification agent system, constructs a method that uses publicly auditable code logic to verify TEE application measurement information for third-party agents, generates corresponding endorsement certificates, simplifies the third-party verification logic, and achieves the following obvious effects: the core remote verification logic code is publicly auditable. The root trusted remote verification agent service and the secondary trusted remote verification agent service are both running in the TEE, and are put into operation after audit approval. The TEE ensures that they are executed as expected; the details of remote verification are greatly simplified. The platform provides basic security level assessment assertions, so that third parties can obtain the legitimacy and security reports of TEE applications without paying attention to the underlying hardware details; it is compatible with multiple types of TEEs. The platform side is responsible for adapting to different TEEs and integrating verification logic for different TEEs, so that users do not need to configure multiple environments locally to access different SDKs, avoiding the problem that different TEEs need to configure machines with different architectures (for example, SGX requires Intel machines, while CSV requires Hygon machines, etc.); it is particularly suitable for cloud-native scenarios. Cloud vendors provide physical machines that implement different types of TEEs as infrastructure, and can deploy the platform to clusters composed of these infrastructures to provide proxy verification services in the form of SaaS, so that users can purchase on demand and give full play to the advantages of cloud native; identity credentials with flexible implementation methods can be used to achieve secure communications, etc. In particular, if the identity credential is implemented as an x509 certificate, after the proxy verification is successful, the platform issues a sub-certificate to the application as an endorsement credential, which is compatible with the existing PKI system's mode of using the x509 certificate chain to transfer trust, without the need to introduce other non-standard data structures; the verification logic is extensible. Based on the inherent verification logic, the system supports third parties to provide pluggable enhanced security verification scripts, exposing necessary interfaces to meet the diverse verification needs of third parties; the two-level proxy architecture supports flexible selection of trust roots. Third parties can freely choose the root trusted remote verification proxy service or the second-level trusted remote verification proxy service as the trust root for their own verification requests, which is compatible with scenarios where they only want to verify one type of TEE.

[0189] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0190] Based on the same inventive concept, the embodiment of the present application also provides a trusted execution environment verification device for implementing the trusted execution environment verification method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the embodiments of the verification device for one or more trusted execution environments provided below can refer to the limitations of the trusted execution environment verification method above, and will not be repeated here.

[0191] In one embodiment, Fig.11 As shown, a trusted execution environment verification device is provided, including: an agent identity credential generation module 1102, an application identity credential generation module 1104 and a trusted verification module 1106, wherein:

[0192] The proxy identity credential generation module 1102 is used to generate a proxy identity credential integrated with first measurement information of the trusted remote authentication proxy system in response to a startup event triggered for the trusted remote authentication proxy system;

[0193] The application identity credential generation module 1104 is used to receive the second measurement information sent by the target application, and when verifying that the target application is in a trusted execution environment based on the second measurement information, generate the application identity credential endorsed and authorized by the proxy identity credential;

[0194] The trusted verification module 1106 is used to verify the interaction security between the target object and the target application based on the application identity credentials and the agent identity credentials when the target object verifies that the trusted remote verification agent system is in a trusted execution environment based on the first measurement information.

[0195] In some embodiments, the trusted remote authentication agent system includes a root trusted remote authentication agent and an intermediate trusted remote authentication agent service; the agent identity credential includes a first agent identity credential and a second agent identity credential;

[0196] The proxy identity credential generation module is also used to generate a first proxy identity credential in response to a startup event of the root trusted remote verification proxy service; the first proxy identity credential is used to perform self-authentication on the root trusted remote verification proxy service; in response to a startup event of the intermediate trusted remote verification proxy service, a legal initial second proxy identity credential is generated; and when a secure connection between the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service is established based on the first proxy identity credential and the initial second proxy identity credential, the initial second proxy identity credential is converted into a second proxy identity credential endorsed and authorized by the first proxy identity credential.

[0197] In some embodiments, the trusted remote verification agent system also includes a gateway; the verification device of the trusted execution environment also includes a gateway data processing module, which is used to register the intermediate trusted remote verification agent service to the available list of the gateway, so that the gateway adds the network address of the intermediate trusted remote verification agent service to the verification service list corresponding to the trusted execution environment type according to the trusted execution environment type to which the intermediate trusted remote verification agent service belongs.

[0198] In some embodiments, the verification device of the trusted execution environment also includes a first connection establishment module, which is used to execute a handshake protocol between the root trusted remote verification agent service and the intermediate trusted remote verification agent service to exchange the first agent identity credential and the initial second agent identity credential; when the root trusted remote verification agent service and the intermediate trusted remote verification agent service both verify the exchanged target agent identity credentials, a secure connection between the root trusted remote verification agent service and the intermediate trusted remote verification agent service is established.

[0199] In some embodiments, the verification device of the trusted execution environment also includes a target proxy identity credential verification module, which is used to obtain the code hash measurement indicated in the extended field in the target proxy identity credential; the root trusted remote verification proxy service and the intermediate trusted remote verification proxy service are used as verification parties respectively, and when the code hash measurement is in the hash measurement whitelist list of the verification party and the target proxy identity credential is a legal proxy identity credential, a verification result that the target proxy identity credential is verified is obtained.

[0200] In some embodiments, the application identity credential generation module is also used to respond to a connection request initiated by a target application to the intermediate trusted remote verification proxy service, and send the initial application identity credential generated by the target application and carrying the second measurement information to the intermediate trusted remote verification proxy service; when the intermediate trusted remote verification proxy service verifies the initial application identity credential based on the initial application identity credential, the initial application identity credential is converted into an application identity credential endorsed and authorized by the intermediate proxy identity credential.

[0201] In some embodiments, the trusted verification module is also used to send the second proxy identity credentials and the application identity credentials to the target object when the target object initiates a connection request for the target application; when the target object verifies the target application based on the second proxy identity credentials and the application identity credentials, it is determined that the connection channel between the target object and the target application is in a secure state.

[0202] In some embodiments, the target application verification module is used to obtain the information to be verified indicated in the extended field of the application identity credential, and the information to be verified includes the trusted execution environment type and code hash measurement of the target application; when the information to be verified meets the expected conditions of the target object, and it is confirmed that the application identity credential is endorsed and authorized by the second proxy identity credential, and the second proxy identity credential is endorsed and authorized by the first proxy identity credential, a verification result that the target application is verified is obtained.

[0203] In some embodiments, the trusted remote verification agent system includes an enhanced security script library; the verification device of the trusted execution environment also includes a security enhancement module, which is used to obtain application identity credentials and an enhanced security script index sent by the target object; from the enhanced security script library, a target enhanced security script matching the enhanced security script index is searched; for the application identity credentials, the target enhanced security script is executed to obtain the execution result of the target enhanced security script, and the execution result is fed back to the target object.

[0204] In some embodiments, the security enhancement module is further used to respond to a script storage request initiated by the target object to obtain an enhanced security script to be stored; when the enhanced security script passes the legitimacy check of the enhanced security script library, the hash value of the enhanced security script is used as the enhanced security script index, the enhanced security script is stored in the enhanced security script library, and the enhanced security script index is fed back to the target object.

[0205] In some embodiments, the trusted remote verification agent system includes a gateway that stores a verification service list; the security enhancement module is also used to respond to a network address query request of an intermediate trusted remote verification agent service triggered by a target object, determine the target trusted execution environment type to which the intermediate trusted remote verification agent service belongs; search for the network address of the intermediate trusted remote verification agent service that matches the target object from the verification service list corresponding to the trusted execution environment type in the gateway; and obtain the application identity credentials and enhanced security script index sent by the target object to the intermediate trusted remote verification agent service based on the network address.

[0206] The above-mentioned verification device for the trusted execution environment can prove to the target object that the trusted remote verification proxy system is in a trusted execution environment based on the proxy identity credential by generating a proxy identity credential integrated with the first measurement information of the trusted remote verification proxy system when the trusted remote verification proxy system is started. By receiving the second measurement information sent by the target application, it is possible to verify whether the target application is in a trusted execution environment based on the second measurement information, so that on the premise that the target application is in a trusted execution environment, an application identity credential endorsed and authorized by the proxy identity credential is generated, and the legitimacy of the target application is remotely verified through the trusted remote verification proxy system, so that the target object only needs to verify the legitimacy of a single trusted remote verification proxy system, and the trusted remote verification proxy system verifies the legitimacy of the trusted execution environment in which the target application is located on behalf of the target object, so that the target object no longer needs to care about the implementation details of different trusted execution environments, which greatly reduces the complexity of verification and can effectively improve the efficiency of the verification process.

[0207] In one embodiment, Fig.12 As shown, a trusted execution environment verification device is provided, including: an agent identity credential generation module 1202, an application identity credential generation module 1204 and a trusted verification module 1206, wherein:

[0208] The proxy identity credential acquisition module 1202 is used to acquire, from a remote verification proxy system running in a trusted execution environment, a proxy identity credential integrated with first measurement information of the remote verification proxy system; the first measurement information is used to prove the legitimacy of the execution environment where the remote verification proxy system is located;

[0209] A remote verification proxy system verification module 1204, configured to determine that the remote verification proxy system is a trusted remote verification proxy system when the proxy identity credential passes the legitimacy verification;

[0210] The trusted verification module triggering module 1206 is used to verify the security of interaction with the target application based on the application identity credentials issued by the trusted remote verification agent system for the target application and authorized by the agent identity credentials when the trusted remote verification agent system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application.

[0211] Each module in the above-mentioned trusted execution environment verification device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0212] The above-mentioned verification device for the trusted execution environment can prove to the target object that the remote verification proxy system is in a trusted execution environment based on the proxy identity credential by obtaining the proxy identity credential integrated with the first measurement information of the remote verification proxy system from the remote verification proxy system running in the trusted execution environment. The system is a trusted remote verification proxy system. When the trusted remote verification proxy system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application, the security of interaction with the target application is verified based on the application identity credential issued by the trusted remote verification proxy system for the target application and authorized by the proxy identity credential. The target object only needs to verify the legitimacy of a single trusted remote verification proxy system. The trusted remote verification proxy system verifies the legitimacy of the trusted execution environment where the target application is located on behalf of the target object. The target object no longer needs to care about the implementation details of different trusted execution environments, which greatly reduces the complexity of verification and can effectively improve the efficiency of the verification process.

[0213] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.13As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a verification method for a trusted execution environment is implemented.

[0214] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.14 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for verifying a trusted execution environment is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0215] Those skilled in the art will understand that Fig.13 and Fig.14The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0216] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0217] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0218] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0219] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0220] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0221] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0222] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for verifying a trusted execution environment, characterized in that: The method comprises: In response to a start event triggered for a trusted remote authentication proxy system, generating a proxy identity credential integrated with first metric information of the trusted remote authentication proxy system; receiving second measurement information sent by the target application, and generating an application identity credential endorsed and authorized by the proxy identity credential when verifying that the target application is in a trusted execution environment based on the second measurement information; When the target object verifies that the trusted remote verification agent system is in a trusted execution environment based on the first measurement information, the interaction security between the target object and the target application is verified based on the application identity credential and the agent identity credential.

2. The method according to claim 1, characterized in that The trusted remote authentication proxy system includes a root trusted remote authentication proxy and an intermediate trusted remote authentication proxy service; the proxy identity certificate includes a first proxy identity certificate and a second proxy identity certificate; The step of generating, in response to a start event triggered for a trusted remote authentication proxy system, a proxy identity credential integrated with first measurement information of the trusted remote authentication proxy system comprises: In response to a startup event of the root trusted remote authentication proxy service, generating a first proxy identity credential; the first proxy identity credential is used to self-authenticate the root trusted remote authentication proxy service; In response to a startup event of the intermediate trusted remote authentication agent service, generating a legal initial second agent identity credential; When a secure connection between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service is established based on the first proxy identity credential and the initial second proxy identity credential, the initial second proxy identity credential is converted into a second proxy identity credential endorsed and authorized by the first proxy identity credential.

3. The method according to claim 2, characterized in that The process of establishing a secure connection between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service includes: performing a handshake protocol between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service to exchange the first proxy identity credential and the initial second proxy identity credential; When the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service both authenticate the exchanged target proxy identity credentials, a secure connection between the root trusted remote authentication proxy service and the intermediate trusted remote authentication proxy service is established.

4. The method according to claim 3, characterized in that The verification process of the target proxy identity credential includes: Obtaining a code hash metric indicated in an extended field in the target proxy identity credential; The root trusted remote verification proxy service and the intermediate trusted remote verification proxy service are respectively used as verification parties. When the code hash measurement is in the hash measurement whitelist of the verification party and the target proxy identity credential is a legal proxy identity credential, a verification result indicating that the target proxy identity credential has passed the verification is obtained.

5. The method according to claim 2, characterized in that: The receiving second measurement information sent by the target application, and when verifying that the target application is in a trusted execution environment based on the second measurement information, generating the application identity credential endorsed and authorized by the proxy identity credential, includes: In response to a connection request initiated by a target application to the intermediate trusted remote authentication proxy service, an initial application identity credential generated by the target application and carrying the second measurement information is sent to the intermediate trusted remote authentication proxy service; When the intermediate trusted remote authentication proxy service verifies the initial application identity credential based on the initial application identity credential, the initial application identity credential is converted into an application identity credential endorsed and authorized by the intermediate proxy identity credential.

6. The method according to claim 2, characterized in that The verifying the interaction security between the target object and the target application based on the application identity credential and the proxy identity credential includes: When the target object initiates a connection request for the target application, sending the second proxy identity credential and the application identity credential to the target object; When the target object passes the authentication of the target application based on the second proxy identity credential and the application identity credential, it is determined that the connection channel between the target object and the target application is in a secure state.

7. The method according to claim 6, characterized in that The verification process of the target application includes: Obtaining information to be verified indicated in an extended field of the application identity credential, the information to be verified including a trusted execution environment type and a code hash measurement of the target application; When the information to be verified meets the expected conditions of the target object, and it is confirmed that the application identity credential is endorsed and authorized by the second proxy identity credential, and the second proxy identity credential is endorsed and authorized by the first proxy identity credential, a verification result that the target application is authenticated is obtained.

8. The method according to any one of claims 1 to 7, characterized in that The trusted remote authentication agent system includes an enhanced security script library; the method also includes: Obtain the application identity credentials and enhanced security script index sent by the target object; Searching for a target enhanced security script that matches the enhanced security script index from the enhanced security script library; The target enhanced security script is executed for the application identity credential to obtain an execution result of the target enhanced security script, and the execution result is fed back to the target object.

9. The method according to claim 8, characterized in that The method further comprises: In response to a script storage request initiated by the target object, obtaining an enhanced security script to be stored; When the enhanced security script passes the legality check of the enhanced security script library, the hash value of the enhanced security script is used as an enhanced security script index, the enhanced security script is stored in the enhanced security script library, and the enhanced security script index is fed back to the target object.

10. The method according to claim 8, characterized in that The trusted remote authentication proxy system includes a gateway storing an authentication service list; The step of obtaining the application identity credentials and the enhanced security script index sent by the target object includes: In response to a network address query request of an intermediate trusted remote authentication proxy service triggered by a target object, determining a target trusted execution environment type to which the intermediate trusted remote authentication proxy service belongs; Searching for a network address of an intermediate trusted remote authentication proxy service matching the target object from a list of authentication services corresponding to the trusted execution environment type in the gateway; The application identity credentials and the enhanced security script index sent by the target object to the intermediate trusted remote authentication proxy service based on the network address are obtained.

11. The method according to claim 10, characterized in that The method further comprises: The intermediate trusted remote authentication proxy service is registered to the available list of the gateway, so that the gateway adds the network address of the intermediate trusted remote authentication proxy service to the authentication service list corresponding to the trusted execution environment type according to the trusted execution environment type to which the intermediate trusted remote authentication proxy service belongs.

12. A method for verifying a trusted execution environment, characterized in that: The method comprises: Obtaining, from a remote authentication proxy system running in a trusted execution environment, a proxy identity credential integrated with first measurement information of the remote authentication proxy system; the first measurement information is used to prove the legitimacy of the execution environment where the remote authentication proxy system is located; When the proxy identity credential passes the legitimacy verification, determining that the remote authentication proxy system is a trusted remote authentication proxy system; When the trusted remote verification agent system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application, the security of interaction with the target application is verified based on the application identity credentials issued by the trusted remote verification agent system for the target application and authorized by the agent identity credentials.

13. A trusted execution environment verification device, characterized in that: The device comprises: An agent identity credential generation module, configured to generate an agent identity credential integrated with first measurement information of the trusted remote authentication agent system in response to a startup event triggered for the trusted remote authentication agent system; An application identity credential generation module, configured to receive second measurement information sent by a target application, and when verifying that the target application is in a trusted execution environment based on the second measurement information, generate an application identity credential endorsed and authorized by the proxy identity credential; A trusted verification module is used to verify the interaction security between the target object and the target application based on the application identity credentials and the agent identity credentials when the target object verifies that the trusted remote verification agent system is in a trusted execution environment based on the first measurement information.

14. A trusted execution environment verification device, characterized in that: The device comprises: An agent identity credential acquisition module is used to acquire an agent identity credential integrated with first measurement information of the remote verification agent system from a remote verification agent system running in a trusted execution environment; the first measurement information is used to prove the legitimacy of the execution environment where the remote verification agent system is located; A remote verification proxy system verification module, used to determine that the remote verification proxy system is a trusted remote verification proxy system when the proxy identity credential passes the legitimacy verification; A trusted verification module triggering module is used to verify the security of interaction with the target application based on the application identity credentials issued by the trusted remote verification agent system for the target application and authorized by the agent identity credentials when the trusted remote verification agent system verifies that the target application is running in a trusted execution environment based on the second measurement information sent by the target application.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Cited By

  • Data security fusion and verification method for trusted execution environment and block chain

    CN119358018A

  • User service demand processing method and device, equipment and medium

    CN121690863A

  • User service requirement processing method, apparatus, device, and medium

    CN121690863B