Connector security protection method, system and terminal based on trusted execution environment

By introducing a trusted execution environment into the connector, the problem of weak trust roots in software-level security measures is solved, and hardware-level data protection and trusted connections are achieved, ensuring that data is not tampered with or leaked in the operating system's memory.

CN121000520BActive Publication Date: 2026-02-06SHENZHEN CONFIDENTIAL COMPUTING TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511509772.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-02-06
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

Existing connector security implementations rely on software-level security measures, which are vulnerable to attacks, lack trusted environment verification and self-proving capabilities, and pose risks due to plaintext data processing in the operating system's memory.

Method used

A security protection method based on a trusted execution environment is adopted. The trusted execution environment is used to measure target data, generate signed identity reports for remote authentication, authenticate external users and assign dynamic permission tokens, and encrypt and decrypt data to ensure that trust originates from hardware rather than software.

Benefits of technology

It achieves comprehensive and reliable security, preventing the security system from failing after the operating system is compromised, ensuring data isolation and integrity at the hardware level, and providing trusted connections and data leakage protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121000520B_ABST
    Figure CN121000520B_ABST
Patent Text Reader

Abstract

The application discloses a connector security protection method and system based on a trusted execution environment and a terminal, and relates to the technical field of data circulation. The method comprises the following steps: in response to a code and / or resource data measurement instruction of a first connector, performing data measurement through a trusted execution environment; in response to a connection request corresponding to the first connector, generating a signed identity report through the trusted execution environment, and establishing a trusted connection in combination with remote authentication; in response to a session request of a user, performing identity authentication and dynamic permission token allocation on the user through the trusted execution environment; and in response to a data processing instruction of the first connector, performing encryption and decryption on the data flowing through the trusted execution environment. The application deploys the security logic of the connector in the trusted execution environment, so that the trust originates from hardware rather than software, and the risk of failure of the security system after the operating system is broken is avoided. And the trusted and secure protection is realized in all aspects through the trusted execution environment in the aspects of starting, interconnection, running and data processing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data flow, in particular to a connector security protection method and system based on a trusted execution environment and a terminal. BACKGROUND

[0002] The goal of data space is to provide a trusted technical framework for cross-organizational data sharing, exchange and collaborative computing. As the core component of data space, the security performance of the connector directly determines the overall trust level of the data space and the security of data flow.

[0003] The current security implementation scheme of the connector relies on software-level security measures to build a protection system, such as transmission security protection technology: using a security protocol to encrypt the transmission link of the connector, and ensuring the identity of the transmission parties through a certificate verification mechanism; data encryption storage technology: calling a software encryption library at the operating system level, encrypting the data to be stored by the connector, and then writing it to the disk, while managing the encryption key through software.

[0004] These software-level security technologies can meet the basic security needs of the connector to some extent, but still have the following shortcomings, which make it impossible to adapt to the high-trust security protection requirements of the data space: the trust root is based on software and is vulnerable to attacks; lack of trusted environment verification and self-proving capabilities, making it difficult for the two parties to be connected to establish trust; when processing data, the connector needs to restore the data to plaintext in the operating system memory before performing operations, which exposes the risk of plaintext exposure.

[0005] Therefore, the prior art still needs to be improved and developed. SUMMARY

[0006] The technical problem to be solved by the present application is to provide a connector security protection method and system based on a trusted execution environment, aiming to solve the problem that the existing security implementation scheme of the connector relies on software-level security measures to build a protection system, and the trust root is based on software and is vulnerable to attacks, and lacks trusted environment verification and self-proving capabilities.

[0007] The technical solution adopted by the present application to solve the problem is as follows:

[0008] In a first aspect, the present application provides a connector security protection method based on a trusted execution environment, which comprises:

[0009] In response to a measurement instruction of target data of the first connector, the target data is measured by the trusted execution environment; the target data includes code and / or resource data of the first connector; the trigger mode of the measurement instruction includes at least one of loading the code, calling the resource data, and calling the resource data;

[0010] In response to a connection request received or initiated by the first connector, identity reports signed by the trusted execution environments of the two parties to be connected are generated, and remote authentication is performed; a trusted connection is established by remote authentication information of the two parties to be connected;

[0011] In response to a session request initiated by an external user to the first connector, the trusted execution environment performs identity verification on the external user, and assigns a dynamic permission token for a session of the external user after the identity verification is passed;

[0012] In response to a data processing instruction of the first connector, the trusted execution environment encrypts or decrypts data flowing through the first connector; the data processing instruction includes read / write instructions and / or persistent storage instructions of the data.

[0013] In an embodiment, the step of measuring the target data by the trusted execution environment includes:

[0014] The trusted execution environment calculates a hash value of the target data;

[0015] An expected value corresponding to the target data is obtained, and a measurement result is generated according to the hash value and the expected value.

[0016] In an embodiment, the step of generating identity reports signed by the trusted execution environments of the two parties to be connected and performing remote authentication includes:

[0017] Each of the two parties to be connected generates an identity report of itself by the corresponding trusted execution environment, the identity report includes hardware identity information of a connector, product public key information, and a hash value of measured code; the identity report is signed by a hardware root of trust to obtain a signed identity report;

[0018] When the two parties to be connected receive the signed identity report of the other party, the received signed identity report is sent to a remote identity authentication server, and the signed identity report is remotely authenticated by the remote identity authentication server.

[0019] In an embodiment, the step of establishing a trusted connection by remote authentication information of the two parties to be connected includes:

[0020] determining a communication key through remote authentication information of the two parties to be connected;

[0021] establishing a trusted connection according to the communication key.

[0022] In an embodiment, the method further comprises:

[0023] performing, by the trusted execution environment, an overwrite operation on a memory data region corresponding to the secure erase instruction in response to a secure erase instruction; the triggering mode of the secure erase instruction comprises at least one of data being identified for deletion after use, data expiring, and data being identified for destruction.

[0024] In an embodiment, the overwrite operation comprises:

[0025] successively using a full zero value overwrite mode, a full full value overwrite mode, and a random bit overwrite mode to overwrite all data bits of the memory data region, and performing a verification read operation after each overwrite.

[0026] In an embodiment, after the step of performing, by the trusted execution environment, an overwrite operation on a memory data region corresponding to the secure erase instruction, the method further comprises:

[0027] generating, by the trusted execution environment, a structured destruction declaration; the destruction declaration comprises a unique identifier of the data to be destroyed, an identity of a policy triggering the destruction, a destruction timestamp, and an identity of the trusted execution environment.

[0028] In a second aspect, the embodiments of the present application also provide a connector security protection system based on a trusted execution environment, the system comprising:

[0029] a data measurement module configured to measure, by the trusted execution environment, target data of a first connector in response to a measurement instruction of the target data; the target data comprises code and / or resource data of the first connector; the triggering mode of the measurement instruction comprises at least one of loading the code, calling the resource data, and calling the resource data completely;

[0030] a connection authentication module configured to generate, by the trusted execution environments of the two parties to be connected, respective signed identity reports in response to a connection request received or initiated by the first connector, and to perform remote authentication; and to establish a trusted connection through remote authentication information of the two parties to be connected;

[0031] a permission allocation module configured to perform, by the trusted execution environment, identity authentication on an external user in response to a session request initiated by the external user to the first connector, and to allocate a dynamic permission token for a session of the external user after the identity authentication is passed;

[0032] a data protection module, configured to encrypt or decrypt data flowing through the first connector by the trusted execution environment in response to a data processing instruction of the first connector; the data processing instruction comprises a read-write instruction and / or a persistent storage instruction of the data.

[0033] In a third aspect, an embodiment of the present application further provides a terminal, comprising a memory and one or more processors; the memory stores one or more programs; the programs contain instructions for executing the method for protecting a connector based on a trusted execution environment as described above; and the processors are configured to execute the programs.

[0034] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a plurality of instructions, the instructions being adapted to be loaded and executed by a processor to implement the steps of the method for protecting a connector based on a trusted execution environment as described above.

[0035] The present application has the following beneficial effects: the present application measures data by the trusted execution environment in response to a code and / or resource data measurement instruction of the first connector; generates an identity report signed by both parties by the trusted execution environment in response to a connection request accepted or initiated by the first connector, and establishes a trusted connection in combination with remote authentication; authenticates an external user by the trusted execution environment and assigns a dynamic permission token to the external user in response to a session request of the external user; and encrypts or decrypts data flowing through the first connector by the trusted execution environment in response to a data processing instruction of the first connector. The present application deploys the security logic of the connector in the trusted execution environment, so that the trust is rooted in hardware rather than software, avoiding the risk of invalidation of the security system after the operating system is broken. And the trusted execution environment realizes all-round trusted security protection in multiple links such as starting, interconnection, running and data processing. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, hereinafter, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0037] Figure 1 is a flowchart of the method for protecting a connector based on a trusted execution environment provided by an embodiment of the present application.

[0038] Figure 2 is an interaction diagram of establishing a trusted connection between connectors provided by an embodiment of the present application.

[0039] Figure 3is a schematic diagram of an architecture of a connector in a trusted execution environment provided by an embodiment of the present application.

[0040] Figure 4 is a schematic diagram of a module of a connector security protection system based on a trusted execution environment provided by an embodiment of the present application.

[0041] Figure 5 is a schematic diagram of a principle block diagram of a terminal provided by an embodiment of the present application. DETAILED DESCRIPTION

[0042] The present application discloses a connector security protection method and system based on a trusted execution environment and a terminal. In order to make the purpose, technical scheme and effect of the present application more clear and explicit, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0043] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an" and "the" as used herein include plural forms. It should be further understood that the use of the term "including" in the specification of the present application means that the stated features, integers, steps, operations, elements, and / or components are present, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that "connected" or "coupled" as used herein can include wireless connection or wireless coupling. The term "and / or" as used herein includes all or any one of the associated listed items and all combinations thereof.

[0044] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and unless specifically defined as such, should not be interpreted in an idealized or overly formal sense.

[0045] In view of the above defects of the prior art, the application provides a connector security protection method based on a trusted execution environment, which comprises the following steps: in response to a measurement instruction of target data of a first connector, measuring the target data by the trusted execution environment; the target data comprises code and / or resource data of the first connector; the trigger mode of the measurement instruction comprises at least one of loading the code, calling the resource data and calling the resource data completely; in response to a connection request received or initiated by the first connector, generating an identity report signed by each of the trusted execution environments of the two parties to be connected, and performing remote authentication; establishing a trusted connection by using the remote authentication information of the two parties to be connected; in response to a session request initiated by an external user to the first connector, performing identity authentication on the external user by the trusted execution environment, and assigning a dynamic permission token to the session of the external user after the identity authentication is passed; in response to a data processing instruction of the first connector, encrypting or decrypting the data flowing through the first connector by the trusted execution environment; the data processing instruction comprises a read-write instruction and / or a persistent storage instruction of data. The security logic of the connector is deployed in the trusted execution environment, the trusted execution environment is a hardware-level isolated environment, has independent computing resources and storage space, and is completely isolated from the operating system and is not affected by operating system vulnerabilities or malicious attacks. The trust root of the trusted execution environment is derived from hardware rather than software, and the risk of failure of the security system after the operating system is broken is solved. The trusted execution environment realizes all-round trusted security protection for the initialization, interconnection, running and data processing of the first connector.

[0046] As shown in Figure 1 , the connector security protection method based on the trusted execution environment specifically comprises:

[0047] Step S100, in response to a measurement instruction of target data of a first connector, measuring the target data by the trusted execution environment; the target data comprises code and / or resource data of the first connector; the trigger mode of the measurement instruction comprises at least one of loading the code, calling the resource data and calling the resource data completely.

[0048] Specifically, a Trusted Execution Environment (TEE) refers to a hardware-level isolated environment, which is a physically isolated secure area in a system. Even if other parts of the system are compromised, operations and data in the TEE cannot be tampered with or stolen. The first connector refers to any data connector that deploys and runs core security functions in the TEE. The target data refers to the code and / or resource data of the first connector. The measurement refers to integrity verification of the target data to determine whether the target data has been tampered with. The triggering mode of the measurement instruction includes one or more of loading code, calling resource data, and calling completed resource data, covering various key nodes in the life cycle of the first connector to ensure full-process verification. The execution subject of the measurement operation is the TEE, and the isolation of the TEE can ensure that the measurement process is not disturbed by external interference, and the final measurement result is accurate and reliable.

[0049] By way of example, the core security functions of the first connector are isolated from the business logic in the traditional Rich Execution Environment (REE) to build a secure TEE, thereby ensuring that the operation of the first connector is not interfered with or destroyed by any user in the REE. In actual application scenarios, the core service program of the first connector is initially measured to ensure that the code of the first connector is not tampered with. Specifically, when the first connector requests to start, the TEE is initialized, and then the code (also referred to as service code) of the first connector is loaded into the TEE. The TEE measures the loaded code, uses the hardware security features of the TEE as a trusted root, and establishes a hardware-level trust chain from the system startup phase. Secondly, the resource data loaded by the first connector is measured at runtime to implement a runtime integrity protection mechanism for the first connector. Specifically, the measurement instruction is triggered when or after the resource data is called. The resource data includes but is not limited to key data sets, configuration files, and policy files. Further, the TEE continuously or periodically verifies the integrity of the code and / or resource data in the same way as the measurement. Any unauthorized code or data tampering will be detected in real time, and an alarm or service stop will be triggered, thereby ensuring the double tamper-proof nature of data and data processing logic.

[0050] In an implementation manner, the step of measuring the target data by the TEE includes:

[0051] calculating a hash value of the target data by the TEE;

[0052] An expected value corresponding to the target data is obtained, and a measurement result is generated according to the hash value and the expected value.

[0053] Specifically, the measurement manner is to calculate a hash value (also referred to as a measurement value) of the target data, and compare the hash value with an expected value (also referred to as a reference hash value) to determine whether the target data is tampered with. Once it is found that the hash value is inconsistent with the expected value, it indicates that the measurement of the target data fails, and the integrity of the target data is immediately determined to be destroyed, triggering a security response mechanism. The execution manner of the security response mechanism includes at least one of terminating a session, clearing a key, and reporting an audit log. Further, the measurement value can be extended to a register of a Trusted Platform Module (TPM), and any tampering with the code or data will be detected by causing the measurement to fail, so as to ensure the consistency and non-tamperability of the service logic and data of the first connector, thereby establishing a hardware trust chain.

[0054] Step S200, in response to a connection request received or initiated by the first connector, generating a signed identity report of each through the trusted execution environment of the two parties to be connected, and performing remote authentication; and establishing a trusted connection through remote authentication information of the two parties to be connected.

[0055] Specifically, initiating a connection request refers to the behavior of the first connector actively initiating a connection to other nodes, and receiving a connection request refers to the behavior of the first connector passively receiving a connection request initiated by other nodes. The identity report (also referred to as the identity proof report) refers to data generated by the trusted execution environment to prove the legitimacy of itself, and will be prevented from being forged by signing. Remote authentication refers to bidirectional verification of the legitimacy of the identity report. If the remote authentication is passed, it indicates that the two parties to be connected are both trusted subjects, and a trusted connection can be established to ensure the confidentiality and integrity of subsequent communication data.

[0056] For example, before establishing a connection with other nodes, the first connector needs to use the remote proof function of the trusted execution environment to provide a hardware trust root signed and verifiable identity report to the other party to prove the integrity and authenticity of the trusted execution environment and the secure service (such as the connector code) running inside. The two parties to be connected exchange their signed identity reports, establish a connection after remote authentication (also referred to as remote trusted verification), and ensure the security and trustworthiness of the starting point of subsequent data interaction between the two parties to be connected.

[0057] In an implementation manner, the step of generating a signed identity report of each through the trusted execution environment of the two parties to be connected and performing remote authentication includes:

[0058] Each of the two parties to be connected generates its own identity report through the corresponding trusted execution environment, and the identity report includes hardware identity information of the connector, product public key information, and hash value of the measured code; the identity report is signed by a hardware root of trust to obtain a signed identity report;

[0059] When the two parties to be connected receive the signed identity report of the other party, the received signed identity report is sent to a remote identity authentication server, and the signed identity report is remotely authenticated by the remote identity authentication server.

[0060] Specifically, the identity report includes but is not limited to: hardware identity information of the connector, product public key information, and hash value of the measured code. The hardware identity information refers to the unique physical identification of the hardware where the connector is located; the product public key information refers to the product-level public key of the connector or the device; the hash value of the measured code refers to the hash value of the code of the connector after being measured by the trusted execution environment, proving that the currently running code is complete and has not been tampered with. The hardware root of trust signature refers to a secure core in the chip or hardware that cannot be tampered with, and the data cannot be tampered with after being signed by the hardware root of trust of the trusted execution environment and can be verified by the remote identity authentication server. The remote identity authentication server refers to a third-party server, which is used to solve the possible trust blind area of direct verification of the two parties to be connected and ensure the credibility of the identity report. In actual application scenarios, after the two parties to be connected exchange the signed identity reports, the two parties will send the signed identity report received by themselves to the remote identity authentication server, or the party receiving the connection request will send the signed identity report received by itself to the remote identity authentication server. The remote identity authentication server authenticates whether the connector hardware identity is trustworthy, and feeds back the remote authentication information.

[0061] Figure 2 The process of establishing a trusted connection between two connectors is shown. The object set to be connected with the first connector (i.e., connector 1 in Figure 2 ) is the second connector (i.e., connector 2 in Figure 2 ). First, the first connector initiates a connection request to the second connector, and the two parties exchange identity reports signed by the root of trust, and then send the identity report received by themselves to the remote identity authentication server to request identity authentication, and the remote identity authentication server returns the identity authentication result of each party to obtain the remote authentication information. The two connectors establish a trusted connection through the identity authentication result received by each party.

[0062] In an implementation manner, the step of establishing a trusted connection through the remote authentication information of the two parties to be connected includes:

[0063] determining a communication key through the remote authentication information of the two parties to be connected;

[0064] A trusted connection is established according to the communication key.

[0065] Specifically, the remote authentication has confirmed that the product public key of the two parties to be connected is legal and has not been tampered with, and the product public key is the key carrier of key negotiation. Therefore, the two parties to be connected can safely negotiate the corresponding communication key based on the remote authentication information whose legality has been verified. Finally, the trusted connection of the two connectors is established through the communication key, thereby constructing a trusted chain from the hardware root to the software layer, and ensuring the security and trustworthiness of the starting point of data space interaction.

[0066] For example, after the two parties to be connected exchange product public keys, a symmetric encryption communication key can be negotiated based on the elliptic curve public key cryptography algorithm (SM2 algorithm). Specifically, the remote authentication has confirmed that the product public key of the two parties to be connected is legal and has not been tampered with, and the product public key is the key carrier of key negotiation. Therefore, the two parties to be connected can obtain the product public key of the other party based on the remote authentication information whose legality has been verified. And a communication key K is safely negotiated based on the SM2 algorithm. Finally, the trusted connection of the two connectors is established through the communication key K, thereby constructing a trusted chain from the hardware root to the software layer, and ensuring the security and trustworthiness of the starting point of data space interaction.

[0067] Figure 3 It is shown how the two connectors achieve the security of interaction between the connectors under the protection of the trusted execution environment. It is assumed that the object for data connection with the first connector (i.e. connector 1 in Figure 3 ) is the second connector (i.e. connector 2 in Figure 3 ). After the two connectors establish a trusted connection through remote authentication, they interact through ciphertext to achieve data transmission. The ciphertext can only be decrypted by the trusted execution environment of the opposite connector, ensuring that the data is not stolen or tampered with when transmitted across the connectors.

[0068] Step S300, in response to a session request initiated by an external user to the first connector, identity verification of the external user is performed through the trusted execution environment, and a dynamic permission token is assigned for the session of the external user after the identity verification is passed.

[0069] Specifically, the external user (also referred to as an external system) refers to other devices, applications or third-party services. The session request is a more specific interaction request than the connection request, and refers to a continuous process initiated on the basis of a communication link and containing a series of interaction operations. The identity authentication refers to verifying the identity credential (for example, an identity report) provided by the external user when initiating the session request. The dynamic permission token (also referred to as a security token) refers to a data credential generated by the trusted execution environment of the first connector, having a specific permission range and a valid period, and used for temporarily authorizing access. The premise of implementing the dynamic permission matching process is to integrate the identity authentication logic, including but not limited to token verification and certificate verification, into the internal part of the trusted execution environment, and to also store the identity credentials of all users and the access control policy of the system in the internal part of the trusted execution environment. The dynamic permission matching process is that the trusted execution environment dynamically allocates precise data access and operation permission tokens, i.e., dynamic permission tokens, for the session of the external user according to the permission policy sealed therein after identity authentication of the external user. Alternatively, an identity authentication and permission management module is pre-set in the connector, and the module performs the identity authentication and permission allocation of the external user. In this embodiment, the identity authentication and authorization decision of the external user is completed in the trusted execution environment, and the result is output to the outside in the form of a dynamic permission token. The external system only performs data operations according to the dynamic permission token and cannot know the internal policy details. All subsequent data operations must carry the dynamic permission token and be verified in the trusted execution environment to ensure that the permission verification process is not interfered by external malicious software, and to realize the secure binding of the user and the permission.

[0070] Figure 3 It is also shown how the connector implements secure interaction with the outside under the protection of the trusted execution environment. Figure 3 The external operation instruction in the trusted execution environment can be regarded as a session request initiated by the external user to the connector. The trusted execution environment can generate a dynamic permission token by the result of identity authentication and permission management, to limit the operation range that can be performed by the external user.

[0071] Step S400, in response to the data processing instruction of the first connector, the data flowing through the first connector is encrypted or decrypted by the trusted execution environment; the data processing instruction includes read-write instruction and / or persistent storage instruction of the data.

[0072] The first connector also has a corresponding security protection mechanism in the data processing process. The data processing instruction can trigger the encryption or decryption operation of the data, so as to ensure that the data is not leaked or tampered with in the whole process of transmission, processing and persistent storage through the encryption and decryption operation in the data reading and writing, storage and other operations. Specifically, in order to protect the data, for the data flowing through the first connector, the transparent encryption and decryption process is completed inside the trusted execution environment, that is, all data entering and exiting the first connector is encrypted and decrypted in the encrypted memory of the trusted execution environment, and the plaintext is never exposed to the rich execution environment. The key used for encryption is derived and / or managed by the hardware protection mechanism inside the trusted execution environment, so as to realize the end-to-end secure state of the data, that is, the secure state from the trusted execution environment of the sender to the trusted execution environment of the receiver, thereby effectively preventing the data from being leaked in the connector processing process. Taking the outflow data of the first connector as an example, it needs to be encapsulated and encrypted according to the policy inside the trusted execution environment, and the key managed by the trusted execution environment is used for signature, so as to ensure the confidentiality, integrity and non-repudiation of the outflow data. Taking the inflow data of the first connector as an example, it needs to be decrypted inside the trusted execution environment and verified.

[0073] For data that needs to be persistently stored, that is, data that the policy allows to be stored, the encryption operation (also referred to as the encryption storage operation), the generation and management of the encryption key are also completed inside the trusted execution environment. The encryption operation is implemented by using an asymmetric encryption algorithm, and strict access control is performed by the trusted execution environment to ensure the security of the stored data. The encrypted data can be output to an external storage medium, but its access must pass through the permission verification and decryption process of the trusted execution environment, so as to ensure the confidentiality and integrity of the data during storage, and prevent unauthorized access, tampering or leakage.

[0074] In an implementation manner, the method further includes:

[0075] In response to the secure erasing instruction, performing an overwrite operation on the memory data region corresponding to the secure erasing instruction by the trusted execution environment; the trigger mode of the secure erasing instruction includes at least one of data being identified for deletion after use, data being expired, and data being identified for destruction.

[0076] The embodiment establishes a data destruction mechanism based on a trusted execution environment to realize automatic destruction of data. The data destruction mechanism is realized by using a secure erase instruction. The secure erase instruction refers to secure erasing of relevant memory data by the trusted execution environment in the form of an overwrite operation when the data is no longer needed, so as to ensure that the original data cannot be recovered. The overwrite operation refers to covering old data with new data, and the original data is completely covered and cannot be recovered, which is suitable for secure destruction of sensitive data. Application scenarios triggering the secure erase include but are not limited to data being marked for deletion after use, data expiration, and data being marked for destruction.

[0077] For example, if the policy declares that a data product is deleted after use, the trusted execution environment automatically triggers the secure erase instruction when the data expires or use is completed, so as to ensure that the data product and all intermediate data are completely cleared from the memory and cache and cannot be recovered.

[0078] In an implementation manner, the overwrite operation includes:

[0079] The all-zero value overwrite mode, the all-full value overwrite mode, and the random bit overwrite mode are used to overwrite all data bits of the memory data region in turn, and a verification read operation is performed after each overwrite.

[0080] Specifically, the data destruction mechanism is for all memory data regions identified for the data to be destroyed, and an overwrite operation is performed on the memory data regions. The specific process of the overwrite operation includes: in the first pass, all data bits are overwritten using the all-zero value overwrite mode (i.e., the all-0x00 mode); in the second pass, all data bits are overwritten using the all-full value overwrite mode (i.e., the all-0xFF mode); and in the third pass, the final overwrite is performed using the random bit mode. After each overwrite, a verification read operation is performed at the same time to confirm that the overwrite mode has been correctly written, so as to ensure that the data cannot be recovered due to magnetic residual effects. Further, the verification operation is also recorded by the evidence audit module for subsequent tracing.

[0081] In an implementation manner, the step of performing, by the trusted execution environment, the overwrite operation on the memory data region corresponding to the secure erase instruction further includes:

[0082] A structured destruction declaration is generated by the trusted execution environment. The destruction declaration includes: a unique identifier of the data to be destroyed, an identity of a policy triggering the destruction, a destruction timestamp, and an identity of the trusted execution environment.

[0083] Specifically, completion of the overwrite operation indicates that the secure erase instruction is executed. After the data is securely erased, a verifiable and structured destruction proof is generated based on a chip-level digital signature of the trusted execution environment. The destruction declaration specifically includes:

[0084] data_id: unique identifier of the destroyed data;

[0085] policy_trigger: identity (id) of the policy triggering the destruction;

[0086] erasure_timestamp: precise destruction timestamp;

[0087] tee_identity: identity of the trusted execution environment.

[0088] and using the hardware root of trust of the trusted execution environment, digitally sign the destruction declaration based on the protected signing key, thereby generating a verifiable destruction proof.

[0089] In an implementation manner, the method further comprises:

[0090] When the configuration of the first connector is changed and / or the data lifecycle of the first connector is changed, a corresponding evidence log information is generated by an evidence audit module of the trusted execution environment; the evidence log information comprises operation resource, operation behavior, operation subject and timestamp, and is signed by a hardware root-derived key.

[0091] Specifically, the present embodiment internally presets an evidence audit module in the trusted execution environment, which is used to realize the evidence recording and corresponding digital signature of the configuration change and / or data lifecycle change of the first connector. The configuration change refers to the change of the system configuration of the first connector; the data lifecycle change refers to the data uploading, data flow, data use and the like. When the configuration of the first connector is changed and / or the data lifecycle of the first connector is changed, the evidence audit module records the operation resource, operation behavior, operation subject and timestamp to generate the evidence log information, and the evidence log information is signed by the hardware root-derived key, so as to guarantee the authenticity, integrity and non-tamperability of the evidence recording. Thus, the trusted monitoring of the full lifecycle of the data behavior is realized, and the audit security of the first connector and its data in the trusted execution environment is maintained.

[0092] Figure 3The connector how to realize self-security under the protection of the trusted execution environment is fully shown. The trusted execution environment is an isolated secure running space, which is physically isolated from the common operating system, and can ensure that the code, data and operation of the internal module are not tampered with or eavesdropped. Each connector has its own corresponding trusted execution environment, and is equipped with a security pipe and a measurement module, which is responsible for initializing and measuring the connector at runtime to ensure the integrity of the connector, and is responsible for signing the measurement report through the key derived from the hardware trust root to generate a trusted integrity proof. Each connector includes five modules: evidence audit, key management, data destruction engine, encryption and decryption engine, identity authentication and permission management, covering multiple security dimensions such as data, key, identity and audit.

[0093] The beneficial effects of the present application include:

[0094] Security level is improved: the core security function of the connector is protected by the hardware isolated trusted execution environment, which provides an isolated, trusted and measurable execution environment for the connector, establishes a hardware-based trusted root and trust chain, and solves the fundamental problem of weak trust root of the software security solution.

[0095] Trust is verifiable: through remote proof technology, the connector can provide a trusted proof endorsed by the hardware chip to the other party, realize remote verification of the connector running environment, provide verifiable trust for the data space participants, and solve the initial trust problem of data circulation.

[0096] Data leakage prevention: data can be processed in a way that is invisible in the connector, ensuring that data is decrypted only in the secure area of the trusted execution environment and is encrypted throughout the process, effectively preventing memory data leakage at the processing stage. Data strictly follows the control strategy and can be destroyed after use to prevent data misuse.

[0097] More reliable control: all access and control strategies are enforced in the trusted execution environment and cannot be bypassed, ensuring that data usage strategies must be strictly followed. Identity verification capabilities are provided to ensure that users and permissions match.

[0098] Strong tamper resistance: it can continuously detect whether the code and data have been tampered with, and immediately alarm if any abnormalities are found, turning passive auditing into active protection, ensuring the trust and non-tamperability of the connector service code and data set, and protecting the integrity of the connector and data. A trusted evidence audit capability is provided to ensure the authenticity, integrity and non-tamperability of log information.

[0099] Based on the above embodiment, the present application also provides a connector security protection system based on a trusted execution environment, as shown in Figure 4 The system comprises:

[0100] A data measurement module 01 is configured to measure target data of the first connector by the trusted execution environment in response to a measurement instruction of the target data of the first connector; the target data comprises code and / or resource data of the first connector; and the measurement instruction is triggered in at least one of the following manners: loading the code, calling the resource data, and calling the resource data.

[0101] A connection authentication module 02 is configured to generate a signed identity report of each of the two parties to be connected by the trusted execution environment of the two parties in response to a connection request received or initiated by the first connector, and to perform remote authentication; and to establish a trusted connection by remote authentication information of the two parties to be connected.

[0102] A permission allocation module 03 is configured to perform identity authentication on an external user by the trusted execution environment in response to a session request initiated by the external user to the first connector, and to allocate a dynamic permission token for a session of the external user after the identity authentication is passed.

[0103] A data protection module 04 is configured to encrypt or decrypt data flowing through the first connector by the trusted execution environment in response to a data processing instruction of the first connector; the data processing instruction comprises a read-write instruction and / or a persistent storage instruction of the data.

[0104] Based on the above embodiment, the application further provides a terminal, and a principle block diagram of the terminal can be shown in FIG. Figure 5 The terminal comprises a processor, a memory, a network interface, and a display screen connected by a system bus. The processor of the terminal is configured to provide computing and control capabilities. The memory of the terminal comprises 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 running the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the connector security protection method based on the trusted execution environment. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.

[0105] Those skilled in the art can understand that, Figure 5 The principle block diagram shown in FIG.

[0106] In one implementation, the memory of the terminal stores one or more programs configured to be executed by one or more processors to perform the trusted execution environment based connector security protection method.

[0107] 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. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the computer program can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments of the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0108] The application discloses a connector security protection method and system based on a trusted execution environment and a terminal, and relates to the technical field of data flow. The method comprises the following steps: in response to a measurement instruction of target data of a first connector, the target data is measured by the trusted execution environment; the target data comprises code and / or resource data of the first connector; the trigger mode of the measurement instruction comprises at least one of the following modes: loading the code, calling the resource data, and calling the resource data; in response to a connection request received or initiated by the first connector, identity reports signed by the trusted execution environment of both parties to be connected are generated, and remote authentication is performed; a trusted connection is established by using remote authentication information of both parties to be connected; in response to a session request initiated by an external user to the first connector, the external user is authenticated by the trusted execution environment, and a dynamic permission token is allocated to the session of the external user after the authentication; in response to a data processing instruction of the first connector, the data processed by the first connector is encrypted or decrypted by the trusted execution environment; the data processing instruction comprises read-write instructions and / or persistent storage instructions of data. The security logic of the connector is deployed in the trusted execution environment, the trusted execution environment is a hardware-level isolated environment, has independent computing resources and storage space, is completely isolated from the operating system, and is not affected by operating system vulnerabilities or malicious attacks. The trusted execution environment is rooted in hardware rather than software, and the risk of invalidation of the security system after the operating system is attacked is solved. The trusted execution environment realizes all-round trusted security protection for the initialization, interconnection, running and data processing of the first connector.

[0109] It should be understood that the application of the present application is not limited to the above examples, and can be improved or changed according to the above description for those skilled in the art, and all these improvements and changes should belong to the protection scope of the appended claims of the present application.

Claims

1. A method for securing a connector based on a trusted execution environment, characterized in that, The method comprises: in response to a measurement instruction of target data of the first connector, measuring the target data by the trusted execution environment; the target data comprises code and / or resource data of the first connector; the trigger mode of the measurement instruction comprises at least one of loading the code, calling the resource data and calling the resource data; in response to a connection request received or initiated by the first connector, generating a signed identity report by the trusted execution environment of each of the two parties to be connected, and performing remote authentication, specifically comprising: each of the two parties to be connected generates its own identity report by the corresponding trusted execution environment, the identity report comprising hardware identity information, product public key information and hash value of the measured code of the connector; the identity report is signed by the hardware trust root to obtain a signed identity report; when the two parties to be connected receive the signed identity report of the other party, the received signed identity report is sent to a remote identity authentication server, and the remote identity authentication server performs remote authentication on the signed identity report; and a trusted connection is established by the remote authentication information of the two parties to be connected; in response to a session request initiated by an external user to the first connector, performing identity verification on the external user by the trusted execution environment, and assigning a dynamic permission token to the session of the external user after the identity verification is passed; in response to a data processing instruction of the first connector, encrypting or decrypting the data flowing through the first connector by the trusted execution environment; the data processing instruction comprises a read-write instruction and / or a persistent storage instruction of data; The method further comprises: in response to a secure erase instruction, performing an overwrite operation on a memory data region corresponding to the secure erase instruction by the trusted execution environment; the trigger mode of the secure erase instruction comprises at least one of data being identified for use, data expiration and data being identified for destruction; the overwrite operation comprises sequentially using a full zero value overwrite mode, a full value overwrite mode and a random bit overwrite mode to overwrite all data bits of the memory data region, and performing a verification read operation after each overwrite.

2. The connector guard method based on a trusted execution environment according to claim 1, characterized in that, The step of measuring the target data by the trusted execution environment comprises: calculating a hash value of the target data by the trusted execution environment; obtaining an expected value corresponding to the target data, and generating a measurement result according to the hash value and the expected value.

3. The connector guard method based on a trusted execution environment according to claim 1, characterized in that, The step of establishing a trusted connection by the remote authentication information of the two parties to be connected comprises: determining a communication key by the remote authentication information of the two parties to be connected; establishing a trusted connection according to the communication key.

4. The connector guard method based on a trusted execution environment according to claim 1, characterized in that, After the step of performing an overwrite operation on a memory data region corresponding to the secure erase instruction by the trusted execution environment, the method further comprises: generating a structured destruction declaration by the trusted execution environment; the destruction declaration comprises a unique identifier of the destroyed data, an identity of a policy triggering the destruction, a destruction timestamp and an identity of the trusted execution environment.

5. A connector security system based on a trusted execution environment, characterized in that The system comprises: The data measurement module is configured to measure target data of the first connector by the trusted execution environment in response to a measurement instruction of the target data; the target data includes code and / or resource data of the first connector; the measurement instruction is triggered in at least one of the following manners: loading the code, calling the resource data, and calling the resource data. The connection authentication module is configured to generate signed identity reports of both parties to be connected by the trusted execution environments of the both parties and perform remote authentication in response to a connection request received or initiated by the first connector, and specifically includes: each of the both parties to be connected generates an identity report of itself by the corresponding trusted execution environment, the identity report includes hardware identity information of the connector, product public key information, and a hash value of the measured code; the identity report is signed by a hardware root of trust to obtain a signed identity report; when the both parties to be connected receive the signed identity report of the other party, the received signed identity report is sent to a remote identity authentication server, and the remote identity authentication server performs remote authentication on the signed identity report; and a trusted connection is established by remote authentication information of the both parties to be connected. The permission allocation module is configured to perform identity authentication on an external user by the trusted execution environment in response to a session request initiated by the external user to the first connector, and allocate a dynamic permission token for a session of the external user after the identity authentication is passed. The data protection module is configured to encrypt or decrypt data flowing through the first connector by the trusted execution environment in response to a data processing instruction of the first connector; the data processing instruction includes a read-write instruction and / or a persistent storage instruction of the data. The system is further configured to perform an overwrite operation on a memory data region corresponding to a secure erase instruction by the trusted execution environment in response to the secure erase instruction; the secure erase instruction is triggered in at least one of the following manners: data is deleted after being identified to be used, data expires, and data is identified to be destroyed; and the overwrite operation includes sequentially using a full zero value overwrite mode, a full value overwrite mode, and a random bit overwrite mode to overwrite all data bits of the memory data region, and performing a verification read operation after each overwrite.

6. A terminal, characterized by comprising: The terminal includes a memory and one or more processors; the memory stores one or more programs; the programs include instructions for executing the trusted execution environment-based connector security protection method according to any one of claims 1 to 4; and the processors are configured to execute the programs.

7. A computer-readable storage medium storing a plurality of instructions thereon, characterized in that, The instructions are adapted to be loaded and executed by the processors to implement the steps of the trusted execution environment-based connector security protection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Safe and trusted data processing system based on trusted execution environment and Spark

    CN115378703A

  • Data processing method and device based on trusted execution environment, equipment and medium

    CN116980163A

  • Trusted data space connector layer data flow method and system

    CN120567574A