Data migration method, device and equipment based on trusted execution environment, storage medium and product

By remotely proofing and authentication between trusted execution environments, obtaining and storing data ciphertext and encrypted data, the security and trustworthiness problems during data migration in trusted data space are solved, and the data is realized. Seamless access and use in old and new environments.

CN119416204AActive Publication Date: 2025-02-11LINGSHU TECH CO LTD

Patent Information

Application Number
CN202411564023.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-11
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

In the trusted data space, when the disk capacity or execution performance needs to be expanded as business needs change, or when the hardware environment is updated, the existing trusted application data is migrated to the new environment, and the data is faced with the data. The issue of seamless access and use in old and new environments, especially with challenges in the security and credibility of data encrypted storage.

Method used

By remotely proofing and authentication between the first trusted execution environment and the second trusted execution environment, the data key communication ciphertext and encrypted data are obtained, and associated storage is performed to ensure the security and ability of the data during the migration process. Trustworthiness.

Benefits of technology

It realizes the secure migration of trusted application data, ensures seamless access and use of data in old and new environments, and improves data migration efficiency and data storage security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416204A_ABST
    Figure CN119416204A_ABST
Patent Text Reader

Abstract

The invention discloses a data migration method, device and equipment based on a trusted execution environment, a storage medium and a product. The method comprises the following steps: sending a remote attestation request to a second trusted application program in a second trusted execution environment, so that the second trusted application program generates and feeds back a remote authentication report based on the remote attestation request; performing security and credibility verification on the remote authentication report, and after the verification is passed, sending a data key acquisition request to a second credible application program, so that the second credible application program generates and feeds back a data key communication ciphertext according to the data key acquisition request; sending an encrypted data acquisition request to a second trusted application, so that the second trusted application generates and feeds back encrypted data according to the encrypted data acquisition request; and storing the data key communication ciphertext and the encrypted data. According to the technical scheme, data security migration of trusted application program data is achieved, and seamless access and use of the data in new and old environments are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data migration, and in particular to a data migration method, device, equipment, storage medium and product based on a trusted execution environment. Background Art

[0002] During the use of the trusted data space, as business needs change, it may be necessary to expand various aspects such as disk capacity or execution performance, update the security of the trusted application version, or upgrade the hardware environment. At this time, it may involve migrating the data of the existing trusted application to another virtual machine environment based on a security chip.

[0003] In the trusted data space trusted application data persistent storage, considering the security and trust factors, all persistently stored data is encrypted and stored based on the virtual machine environment of the current hardware. The encrypted data cannot be decrypted in other host or virtual machine environments. Therefore, when data migration occurs, a secure and trusted data migration method is required to enable data to be seamlessly accessed and used in the new environment. Summary of the invention

[0004] The present invention provides a data migration method, device, equipment, storage medium and product based on a trusted execution environment to achieve data security migration of trusted application data and realize seamless access and use of data in new and old environments.

[0005] According to one aspect of the present invention, a data migration method based on a trusted execution environment is provided, which is applied to a first trusted application in a first trusted execution environment, and the method comprises:

[0006] Sending a remote attestation request to a second trusted application in a second trusted execution environment, so that the second trusted application generates and feeds back a remote authentication report based on the remote attestation request;

[0007] Performing security and trustworthy verification on the remote authentication report, and after passing the verification, sending a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request;

[0008] Sending an encrypted data acquisition request to the second trusted application, so that the second trusted application generates and feeds back encrypted data according to the encrypted data acquisition request;

[0009] The data key communication ciphertext and the encrypted data are stored in association.

[0010] According to one aspect of the present invention, a data migration method based on a trusted execution environment is provided, which is applied to a second trusted application in a second trusted execution environment, comprising:

[0011] Obtaining a remote attestation request sent by a first trusted application in a first trusted execution environment, and generating a remote authentication report according to the remote attestation request;

[0012] Feedback the remote authentication report to the first trusted application, so that the first trusted application can perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, generate and feedback a data key acquisition request;

[0013] Generate a data key communication ciphertext according to the data key acquisition request, and send the data key communication ciphertext to the first trusted application;

[0014] Obtaining an encrypted data acquisition request sent by the first trusted application, and generating encrypted data according to the encrypted data acquisition request;

[0015] The encrypted data is sent to the first trusted application so that the first trusted application can associate and store the data key communication ciphertext with the encrypted data.

[0016] According to another aspect of the present invention, a data migration device based on a trusted execution environment is provided, which is configured in a first trusted application in a first trusted execution environment, and the device comprises:

[0017] A certification request sending module, used to send a remote certification request to a second trusted application in a second trusted execution environment, so that the second trusted application generates and feeds back a remote authentication report based on the remote certification request;

[0018] A security verification module, used to perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, send a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request;

[0019] an acquisition request sending module, configured to send an encrypted data acquisition request to the second trusted application, so that the second trusted application generates and feeds back encrypted data according to the encrypted data acquisition request;

[0020] A data storage module is used to store the data key communication ciphertext and the encrypted data in association with each other.

[0021] According to another aspect of the present invention, a data migration device based on a trusted execution environment is provided, which is configured in a second trusted application in a second trusted execution environment, and the device comprises:

[0022] An attestation request acquisition module, configured to acquire a remote attestation request sent by a first trusted application in a first trusted execution environment, and generate a remote authentication report according to the remote attestation request;

[0023] An authentication report feedback module, used to feedback the remote authentication report to the first trusted application, so that the first trusted application can perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, generate and feedback a data key acquisition request;

[0024] A key generation module, configured to generate a data key communication ciphertext according to the data key acquisition request, and send the data key communication ciphertext to the first trusted application;

[0025] A data acquisition module, used to acquire the encrypted data acquisition request sent by the first trusted application, and generate encrypted data according to the encrypted data acquisition request;

[0026] The encrypted data feedback module is used to send the encrypted data to the first trusted application so that the first trusted application can associate and store the data key communication ciphertext with the encrypted data.

[0027] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0028] at least one processor; and

[0029] a memory communicatively connected to the at least one processor; wherein,

[0030] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data migration method based on a trusted execution environment described in any embodiment of the present invention.

[0031] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data migration method based on a trusted execution environment described in any embodiment of the present invention when executed.

[0032] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the data migration method based on a trusted execution environment described in any embodiment of the present invention.

[0033] The technical solution of the embodiment of the present invention realizes the secure data migration of trusted application data. The technical solution of this embodiment requires that the trusted application data is encrypted and stored using a random key, and then the data encryption key is encrypted and stored using a sealing key derived from a trusted execution environment. Therefore, when migrating data, it is only necessary to unseal and re-seal the trusted application data encryption key, thereby realizing seamless access and use of data in the new and old environments.

[0034] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 is a flow chart of a data migration method based on a trusted execution environment provided according to Embodiment 1 of the present invention;

[0037] Figure 2 is a flow chart of a data migration method based on a trusted execution environment provided according to Embodiment 2 of the present invention;

[0038] Figure 3 1 is a schematic diagram of a process interaction of a data migration method based on a trusted execution environment provided according to Embodiment 3 of the present invention;

[0039] Figure 4 is a structural schematic diagram of a data migration device based on a trusted execution environment provided according to a fourth embodiment of the present invention;

[0040] Figure 5 is a structural schematic diagram of a data migration device based on a trusted execution environment provided according to a fifth embodiment of the present invention;

[0041] Figure 6 It is a structural schematic diagram of an electronic device for implementing the data migration method based on a trusted execution environment according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0044] Embodiment 1

[0045] Figure 1 This is a flow chart of a data migration method based on a trusted execution environment provided in the first embodiment of the present invention. This embodiment can be applied to the case of data migration between trusted applications in the trusted data space under the old and new versions of the security chip, specifically, the case of migrating the trusted application data from the old environment to the new environment. The method can be executed by a data migration device based on a trusted execution environment, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device to which a first trusted application in a first trusted execution environment belongs.

[0046] like Figure 1 As shown, the method includes:

[0047] S110: Send a remote attestation request to a second trusted application in the second trusted execution environment, so that the second trusted application generates and feeds back a remote authentication report based on the remote attestation request.

[0048] S120. Perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, send a data key acquisition request to the second trusted application, so that the second trusted application can generate and feedback the data key communication ciphertext according to the data key acquisition request.

[0049] S130: Send an encrypted data acquisition request to the second trusted application, so that the second trusted application generates and feeds back encrypted data according to the encrypted data acquisition request.

[0050] S140. The data key communication ciphertext and the encrypted data are stored in association with each other.

[0051] Among them, the Trusted Execution Environment (TEE) is an independent, secure computing environment designed to protect sensitive data and code. TEE usually exists in the main processor of the device, isolated from the operating system and other applications, ensuring protection from malware or other attacks when processing sensitive operations. This technology is widely used in scenarios that require high security, such as data space, mobile payment, digital rights management, authentication, and password storage. By providing an isolated and secure execution space, TEE technology enhances the overall security and data privacy protection of the device.

[0052] The first trusted execution environment may be a new environment to receive the migrated data; the first trusted application may be an application deployed in the first trusted execution environment; the second trusted execution environment may be an old environment where the encrypted data is currently located and from which data is to be migrated to other trusted execution environments; the second trusted application may be an application deployed in the first trusted execution environment. It should be noted that the first trusted application and the second trusted application are the same or different versions of the same program deployed in different environments. For example, the first trusted application is application A of version V2.0, and the second trusted application is application A of version V1.0.

[0053] The first trusted application and the second trusted application establish an SSL (Secure Sockets Layer) network connection for data transmission.

[0054] To ensure data migration security, before data migration, a first trusted application in the first trusted execution environment and a second trusted application in the second trusted execution environment perform security verification of the trusted execution environment, which may specifically include application integrity verification and application name or type verification.

[0055] Exemplarily, the first trusted application sends a remote attestation request to the second trusted application, and after receiving the remote attestation request, the second trusted application generates a remote authentication report according to the remote attestation request.

[0056] In a specific embodiment, the specific operation method for the second trusted application to generate a remote authentication report based on the remote authentication request can be: determine a random number based on the remote authentication request; send an authentication report request and a random number to the application manager, so that the application manager can generate a remote authentication report based on the authentication report request and the random number, and feed back the remote authentication report to the second trusted application.

[0057] Specifically, the remote attestation request is parsed to obtain a random number; the random number is randomly generated by the first trusted application, and the remote attestation request is generated based on the random number, so the remote attestation request carries the random number randomly generated by the first trusted application. The second trusted application sends an authentication report request and a random number to the application manager; the application manager obtains the integrity information of the operating environment report and the second trusted application and carries the random number, adds the integrity information to the operating environment authentication report, and then uses the operating environment private key to sign the report information to obtain a remote authentication report, and returns the remote authentication report to the second trusted application; the second trusted application sends the remote authentication report to the first trusted application.

[0058] The first trusted application performs secure and reliable verification on the information in the remote authentication report. Specifically, the first trusted application obtains environmental authentication information from the environmental authentication service based on the measurement value in the remote authentication report; requests relevant certificates from the Haiguang chip CA (Certificate Authority) based on the chip ID (Identification) in the remote authentication report; and performs secure and reliable verification on the information in the remote authentication report based on the environmental authentication information and relevant certificates.

[0059] After the first trusted application passes the security and trustworthiness verification of the remote authentication report, the first trusted application sends a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back the data key communication ciphertext according to the data key acquisition request.

[0060] It should be noted that since the data encryption keys corresponding to different application data are not the same, for example, the data encryption key corresponding to data a is key A, and the data encryption key corresponding to data b is key B. Therefore, the first trusted application can obtain a data list from the second trusted application before obtaining the data key, and based on the data list and combined with its own actual data migration needs, obtain the data encryption key in a targeted manner.

[0061] In an optional embodiment, the first trusted application sends a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request, including:

[0062] Step a1: sending a data list acquisition request to a second trusted application, so that the second trusted application generates and feeds back a data list according to the data list acquisition request; the data list includes at least one migratable data identifier.

[0063] The first trusted application sends a data list acquisition request to the second trusted application. After receiving the data list acquisition request, the second trusted application performs a data search on the data stored in the database, obtains the stored data related to the second trusted application, and generates a data list. It should be noted that application data corresponding to at least one application can be stored in the database of each environment. The second trusted application can generate data identifiers corresponding to each data based on the retrieved data related to the second trusted application, and store them in the data list as migratable identifiers. Since the data is different, the migratable identifiers corresponding to different data are different, which can be used to characterize the uniqueness of the data.

[0064] Step a2: Generate a data key acquisition request based on the migratable data identifier in the data list.

[0065] The first trusted application generates data key acquisition requests for different data one by one based on the migratable data identifiers in the data list and its own actual data migration needs.

[0066] Step a3: Send a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request.

[0067] The first trusted application sends data key acquisition requests to the second trusted application one by one. After receiving the data key acquisition requests, the second trusted application queries the key from the key storage database, obtains the requested data key communication ciphertext, and feeds the data key communication ciphertext back to the first trusted application.

[0068] It should be noted that in a trusted execution environment, in order to ensure the security of key storage, keys are usually stored in encrypted form, and keys that can be decrypted are usually decrypted based on their own virtual machine derived keys, and cannot be decrypted in other environments, thereby ensuring the security of key storage. Therefore, before the second trusted application feeds the key back to the first trusted application, it needs to perform key decryption in its own virtual machine environment.

[0069] In a specific embodiment, the second trusted application generates the data key communication ciphertext in the following manner:

[0070] Step b1: The second trusted application obtains the data key seal ciphertext according to the data key acquisition request.

[0071] The second trusted application searches for the data key seal ciphertext corresponding to the data key acquisition request from the database storing the key according to the data key acquisition request, wherein the data key seal ciphertext may be an encryption key encrypted based on the virtual machine derived key.

[0072] Step b2: Decrypt the data key ciphertext based on the sealing key derived from the device to which it belongs, and obtain the data key plaintext.

[0073] The data key plaintext is the data key obtained by decrypting the data key seal ciphertext using the seal key derived by the second trusted application based on the device to which it belongs.

[0074] The second trusted application program decrypts the data key seal ciphertext based on the seal key derived from the device to which it belongs, and obtains the data key plaintext.

[0075] Step b3: Based on the communication key pre-negotiated with the first trusted execution environment, encrypt the data key plaintext to obtain the data key communication ciphertext.

[0076] It should be noted that, in order to ensure the security of the key transmission process, the first trusted execution environment and the second trusted execution environment pre-negotiate to obtain the communication key and store it in their own environments respectively.

[0077] The second trusted application encrypts the data key plaintext based on the communication key pre-negotiated with the first trusted execution environment to obtain the data key communication ciphertext, and feeds the data key communication ciphertext back to the first trusted application.

[0078] After receiving the data key communication ciphertext, the first trusted application decrypts the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext, and stores the decrypted data key plaintext.

[0079] To further improve the storage security of data key plaintext, after decrypting the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext, it also includes: the first trusted application encrypts the data key plaintext based on the sealing key derived from its own device to obtain the data key sealed ciphertext; and stores the data key sealed ciphertext.

[0080] The first trusted application sends an encrypted data acquisition request to the second trusted application. The second trusted application acquires the encrypted data from a database storing the encrypted data according to the encrypted data acquisition request and sends the acquired encrypted data to the first trusted application. The first trusted application associates and stores the data key seal ciphertext with the encrypted data.

[0081] After completing the data migration task from the second trusted execution environment to the first trusted execution environment, relevant personnel, platforms or systems that have acquisition requirements and acquisition rights for the migrated data can initiate a data acquisition request to the first trusted application in the first trusted execution environment.

[0082] In an optional embodiment, after completing the data migration task, the method further includes:

[0083] Step c1: In response to a data acquisition request, based on a communication key pre-negotiated with the second trusted execution environment, decrypt the data key communication ciphertext to obtain the data key plaintext.

[0084] After receiving the data acquisition request, the identity authority of the request initiator is verified to verify whether the request initiator has the data acquisition authority. If so, the data key communication ciphertext is decrypted based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext; if not, the relevant information of the lack of authority prompt is sent to the request initiator of the data acquisition request.

[0085] Step c2: Decrypt the encrypted data using the data key plaintext to obtain the plaintext data.

[0086] Step c3: Feedback plaintext data.

[0087] Sends plaintext data to the initiator of the data acquisition request.

[0088] The technical solution of the embodiment of the present invention realizes the function of data migration of trusted applications in trusted data space through trusted virtual machine technology based on security chip. Specifically, after the environment verification of the trusted execution environment of both parties is performed, a data key acquisition request is sent to the second trusted application to be migrated, so that the second trusted application can generate and feedback data key communication ciphertext according to the data key acquisition request; an encrypted data acquisition request is sent to the second trusted application, so that the second trusted application can generate and feedback encrypted data according to the encrypted data acquisition request, and the data key communication ciphertext and the encrypted data are stored in association, thereby improving the data migration efficiency and data storage security. The above technical solution requires that the trusted application data be encrypted and stored using a random key, and then the data encryption key is encrypted and stored using a sealing key derived from the trusted execution environment, so that when migrating data, only the trusted application data encryption key needs to be unsealed and re-sealed, thereby realizing seamless access and use of data in the new and old environments.

[0089] Embodiment 2

[0090] Figure 2 A flowchart of a data migration method based on a trusted execution environment is provided for the second embodiment of the present invention. This embodiment can be applied to the case of data migration between trusted applications in the trusted data space under the old and new versions of the security chip, specifically, the case of migrating the trusted application data from the old environment to the new environment. The method can be executed by a data migration device based on a trusted execution environment, which can be implemented in the form of hardware and / or software, and can be configured in the electronic device to which the second trusted application in the second trusted execution environment belongs.

[0091] like Figure 2 As shown, the method includes:

[0092] S210: Obtain a remote attestation request sent by a first trusted application in a first trusted execution environment, and generate a remote authentication report according to the remote attestation request.

[0093] S220. Feedback the remote authentication report to the first trusted application so that the first trusted application can perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, generate and feedback a data key acquisition request.

[0094] S230. Generate a data key communication ciphertext according to the data key acquisition request, and send the data key communication ciphertext to the first trusted application.

[0095] S240: Obtain an encrypted data acquisition request sent by the first trusted application, and generate encrypted data according to the encrypted data acquisition request.

[0096] S250. Send the encrypted data to the first trusted application so that the first trusted application can associate and store the data key communication ciphertext and the encrypted data.

[0097] The first trusted execution environment may be a new environment to receive the migrated data; the first trusted application may be an application deployed in the first trusted execution environment; the second trusted execution environment may be an old environment where the encrypted data is currently located and from which data is to be migrated to other trusted execution environments; the second trusted application may be an application deployed in the first trusted execution environment. It should be noted that the first trusted application and the second trusted application are the same or different versions of the same program deployed in different environments. For example, the first trusted application is application A of version V2.0, and the second trusted application is application A of version V1.0.

[0098] The first trusted application and the second trusted application establish an SSL network connection for data transmission.

[0099] Exemplarily, the first trusted application sends a remote attestation request to the second trusted application, and after receiving the remote attestation request, the second trusted application generates a remote authentication report according to the remote attestation request.

[0100] In an optional embodiment, generating a remote authentication report according to a remote certification request includes:

[0101] Step d1: Determine a random number based on the remote attestation request.

[0102] Step d2: Send an authentication report request and a random number to the application manager, so that the application manager generates a remote authentication report according to the authentication report request and the random number, and feeds the remote authentication report back to the second trusted application.

[0103] Specifically, the remote attestation request is parsed to obtain a random number; the random number is randomly generated by the first trusted application, and the remote attestation request is generated based on the random number, so the remote attestation request carries the random number randomly generated by the first trusted application. The second trusted application sends an authentication report request and a random number to the application manager; the application manager obtains the integrity information of the operating environment report and the second trusted application and carries the random number, adds the integrity information to the operating environment authentication report, and then uses the operating environment private key to sign the report information to obtain a remote authentication report, and returns the remote authentication report to the second trusted application; the second trusted application sends the remote authentication report to the first trusted application.

[0104] The first trusted application performs security and trustworthiness verification on the information in the remote authentication report. Specifically, the first trusted application obtains environmental authentication information from the environmental authentication service based on the measurement value in the remote authentication report; requests relevant certificates from the Haiguang Chip CA Center based on the chip ID in the remote authentication report; and performs security and trustworthiness verification on the information in the remote authentication report based on the environmental authentication information and relevant certificates.

[0105] After the first trusted application passes the security and trustworthiness verification of the remote authentication report, the first trusted application sends a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back the data key communication ciphertext according to the data key acquisition request.

[0106] It should be noted that since the data encryption keys corresponding to different application data are not the same, for example, the data encryption key corresponding to data a is key A, and the data encryption key corresponding to data b is key B. Therefore, the first trusted application can obtain a data list from the second trusted application before obtaining the data key, and based on the data list and combined with its own actual data migration needs, obtain the data encryption key in a targeted manner.

[0107] In an optional embodiment, generating a data key communication ciphertext according to a data key acquisition request, and sending the data key communication ciphertext to the first trusted application program includes:

[0108] Step e1: obtaining a data list acquisition request sent by a first trusted application, and generating a data list according to the data list acquisition request; the data list includes at least one migratable data identifier.

[0109] The first trusted application sends a data list acquisition request to the second trusted application. After receiving the data list acquisition request, the second trusted application performs a data search on the data stored in the database, obtains the stored data related to the second trusted application, and generates a data list. It should be noted that application data corresponding to at least one application can be stored in the database of each environment. The second trusted application can generate data identifiers corresponding to each data based on the retrieved data related to the second trusted application, and store them in the data list as migratable identifiers. Since the data is different, the migratable identifiers corresponding to different data are different, which can be used to characterize the uniqueness of the data.

[0110] Step e2: Send the data list to the first trusted application, so that the first trusted application can generate and feedback a data key acquisition request according to the migratable data identifier in the data list.

[0111] The second trusted application sends a data list to the first trusted application. The first trusted application generates data key acquisition requests for different data one by one according to the identifiers of the migrateable data in the data list and in combination with its own actual data migration needs.

[0112] Step e3: Obtain the data key seal ciphertext according to the data key acquisition request.

[0113] The second trusted application searches for the data key seal ciphertext corresponding to the data key acquisition request from the database storing the key according to the data key acquisition request, wherein the data key seal ciphertext may be an encryption key encrypted based on the virtual machine derived key.

[0114] Step e4: Decrypt the data key ciphertext based on the sealing key derived from the device to which it belongs, and obtain the data key plaintext.

[0115] The second trusted application program decrypts the data key seal ciphertext based on the seal key derived from the device to which it belongs, and obtains the data key plaintext.

[0116] Step e5: Based on the communication key pre-negotiated with the first trusted execution environment, encrypt the data key plaintext to obtain the data key communication ciphertext, and send the data key communication ciphertext to the first trusted application.

[0117] It should be noted that, in order to ensure the security of the key transmission process, the first trusted execution environment and the second trusted execution environment pre-negotiate to obtain the communication key and store it in their own environments respectively.

[0118] The second trusted application encrypts the data key plaintext based on the communication key pre-negotiated with the first trusted execution environment to obtain the data key communication ciphertext, and feeds the data key communication ciphertext back to the first trusted application.

[0119] After receiving the data key communication ciphertext, the first trusted application decrypts the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext, and stores the decrypted data key plaintext.

[0120] To further improve the storage security of data key plaintext, after decrypting the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext, it also includes: the first trusted application encrypts the data key plaintext based on the sealing key derived from its own device to obtain the data key sealed ciphertext; and stores the data key sealed ciphertext.

[0121] The first trusted application sends an encrypted data acquisition request to the second trusted application. The second trusted application acquires the encrypted data from a database storing the encrypted data according to the encrypted data acquisition request and sends the acquired encrypted data to the first trusted application. The first trusted application associates and stores the data key seal ciphertext with the encrypted data.

[0122] After completing the data migration task from the second trusted execution environment to the first trusted execution environment, relevant personnel, platforms or systems that have acquisition requirements and acquisition rights for the migrated data can initiate a data acquisition request to the first trusted application in the first trusted execution environment.

[0123] In an optional embodiment, after completing the data migration task, the method further includes:

[0124] Step f1: In response to a data acquisition request, based on the communication key pre-negotiated with the second trusted execution environment, decrypt the data key communication ciphertext to obtain the data key plaintext.

[0125] After receiving the data acquisition request, the identity authority of the request initiator is verified to verify whether the request initiator has the data acquisition authority. If so, the data key communication ciphertext is decrypted based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext; if not, the relevant information of the lack of authority prompt is sent to the request initiator of the data acquisition request.

[0126] Step f2: Decrypt the encrypted data using the data key plaintext to obtain the plaintext data.

[0127] Step f3: Feedback plaintext data.

[0128] Sends plaintext data to the initiator of the data acquisition request.

[0129] The technical solution of the embodiment of the present invention realizes the function of data migration of trusted applications in trusted data space through trusted virtual machine technology based on security chip. Specifically, after the environment verification of the trusted execution environment of both parties is performed, a data key acquisition request is sent to the second trusted application to be migrated, so that the second trusted application can generate and feedback data key communication ciphertext according to the data key acquisition request; an encrypted data acquisition request is sent to the second trusted application, so that the second trusted application can generate and feedback encrypted data according to the encrypted data acquisition request, and the data key communication ciphertext and the encrypted data are stored in association, thereby improving the data migration efficiency and data storage security. The above technical solution requires that the trusted application data be encrypted and stored using a random key, and then the data encryption key is encrypted and stored using a sealing key derived from the trusted execution environment, so that when migrating data, only the trusted application data encryption key needs to be unsealed and re-sealed, thereby realizing seamless access and use of data in the new and old environments.

[0130] Embodiment 3

[0131] Figure 3 A schematic diagram of the process interaction of a data migration method based on a trusted execution environment provided in the second embodiment of the present invention. This embodiment provides a preferred example based on the above embodiment. The first trusted execution environment is a new environment, and the second trusted execution environment is an old environment. The purpose is to migrate the data of the second trusted application in the old environment to the new environment. The specific interaction subjects are the first trusted application in the new environment and the second trusted application in the old environment. Figure 3 As shown, the specific implementation steps are as follows:

[0132] S31. The first trusted application (new environment) sends a remote certification request to the second trusted application (old environment).

[0133] S32. The second trusted application generates a remote authentication report according to the remote certification request.

[0134] Specifically, the second trusted application parses the remote attestation request to obtain a random number; the random number is randomly generated by the first trusted application, and the remote attestation request is generated based on the random number. Therefore, the remote attestation request carries the random number randomly generated by the first trusted application. The second trusted application sends an authentication report request and a random number to the application manager; the application manager obtains the integrity information of the operating environment report and the second trusted application and carries the random number, adds the integrity information to the operating environment authentication report, and then uses the operating environment private key to sign the report information to obtain a remote authentication report, and returns the remote authentication report to the second trusted application.

[0135] S33. The second trusted application sends the remote authentication report to the first trusted application.

[0136] S34. The first trusted application performs security and trustworthiness verification on the remote authentication report. If the verification passes, a data list acquisition request is generated.

[0137] The first trusted application performs secure and reliable verification on the information in the remote authentication report. Specifically, the first trusted application obtains environmental authentication information from the environmental authentication service based on the measurement value in the remote authentication report; requests relevant certificates from the Haiguang chip CA (Certificate Authority) based on the chip ID (Identification) in the remote authentication report; and performs secure and reliable verification on the information in the remote authentication report based on the environmental authentication information and relevant certificates.

[0138] S35. The first trusted application sends a data list acquisition request to the second trusted application.

[0139] S36. The second trusted application generates a data list according to the data list acquisition request.

[0140] S37. The second trusted application sends the data list to the first trusted application.

[0141] S38. The first trusted application traverses the data list and generates a data key acquisition request according to the migratable data identifier in the data list.

[0142] S39. The first trusted application sends a data key acquisition request to the second trusted application.

[0143] S310. The second trusted application queries the data key according to the data key acquisition request and obtains the data key seal ciphertext.

[0144] S311. The second trusted application program decrypts the data key sealed ciphertext based on the sealing key derived from the device to which it belongs, and obtains the data key plaintext.

[0145] S312. The second trusted application uses the communication key to encrypt the data key plaintext to obtain the data key communication ciphertext.

[0146] The communication key is generated by pre-negotiation between the first trusted execution environment and the second trusted execution environment, and is periodically stored in each environment.

[0147] S313. The second trusted application sends the data key communication ciphertext to the first trusted application.

[0148] S314: The first trusted application sends an encrypted data acquisition request to the second trusted application.

[0149] S315. The second trusted application obtains the encrypted data according to the encrypted data acquisition request.

[0150] S316. The second trusted application sends the encrypted data to the first trusted application.

[0151] S317. The first trusted application stores the data key communication ciphertext and the encrypted data in association with each other.

[0152] Optionally, the first trusted application may also store the data key communication ciphertext and the encrypted data separately, which is not limited in this embodiment.

[0153] Embodiment 4

[0154] Figure 4 A structural diagram of a data migration device based on a trusted execution environment provided in Embodiment 4 of the present invention. A data migration device based on a trusted execution environment provided in an embodiment of the present invention can be applicable to the case of data migration between trusted applications in a trusted data space under old and new versions of a security chip, specifically, the case of migrating trusted application data from an old environment to a new environment. The data migration device based on a trusted execution environment can be implemented in the form of hardware and / or software. The data migration device based on a trusted execution environment can be configured in a first trusted application in a first trusted execution environment, such as Figure 4 As shown, the device specifically includes: a certification request sending module 401, a security verification module 402, an acquisition request sending module 403 and a data storage module 404. Among them,

[0155] The attestation request sending module 401 is used to send a remote attestation request to a second trusted application in a second trusted execution environment, so that the second trusted application generates and feeds back a remote authentication report based on the remote attestation request;

[0156] The security verification module 402 is used to perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, send a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request;

[0157] The acquisition request sending module 403 is used to send an encrypted data acquisition request to the second trusted application, so that the second trusted application generates and feeds back encrypted data according to the encrypted data acquisition request;

[0158] The data storage module 404 is used to store the data key communication ciphertext and the encrypted data in association with each other.

[0159] The technical solution of the embodiment of the present invention realizes the function of data migration of trusted applications in trusted data space through trusted virtual machine technology based on security chip. Specifically, after the environment verification of the trusted execution environment of both parties is performed, a data key acquisition request is sent to the second trusted application to be migrated, so that the second trusted application can generate and feedback data key communication ciphertext according to the data key acquisition request; an encrypted data acquisition request is sent to the second trusted application, so that the second trusted application can generate and feedback encrypted data according to the encrypted data acquisition request, and the data key communication ciphertext and the encrypted data are stored in association, thereby improving the data migration efficiency and data storage security. The above technical solution requires that the trusted application data be encrypted and stored using a random key, and then the data encryption key is encrypted and stored using a sealing key derived from the trusted execution environment, so that when migrating data, only the trusted application data encryption key needs to be unsealed and re-sealed, thereby realizing seamless access and use of data in the new and old environments.

[0160] Optionally, the security verification module 402 includes:

[0161] A list acquisition unit, used to send a data list acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data list according to the data list acquisition request; the data list includes at least one migratable data identifier;

[0162] A key request generating unit, used to generate a data key acquisition request according to the migratable data identifier in the data list;

[0163] an acquisition request sending unit, configured to send the data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request;

[0164] The data key communication ciphertext is generated as follows:

[0165] The second trusted application obtains the data key seal ciphertext according to the data key acquisition request;

[0166] Decrypting the data key ciphertext based on the sealing key derived from the device to which it belongs, to obtain the data key plaintext;

[0167] Based on the communication key pre-negotiated with the first trusted execution environment, the data key plaintext is encrypted to obtain the data key communication ciphertext.

[0168] Optionally, the device further comprises:

[0169] a decryption processing module, configured to, in response to a data acquisition request, decrypt the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext;

[0170] A data decryption module, used to decrypt the encrypted data using the data key plaintext to obtain plaintext data;

[0171] The plaintext feedback module is used to feedback plaintext data.

[0172] Optionally, the device further comprises:

[0173] The sealing ciphertext generation module is used to decrypt the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext, and then encrypt the data key plaintext based on the sealing key derived from the device to which it belongs to obtain the data key sealing ciphertext;

[0174] The sealed ciphertext storage module is used to store the sealed ciphertext of the data key.

[0175] The data migration device based on a trusted execution environment provided in the embodiment of the present invention can execute the data migration method based on a trusted execution environment provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0176] Embodiment 5

[0177] Figure 5 A structural diagram of a data migration device based on a trusted execution environment provided in Embodiment 5 of the present invention. A data migration device based on a trusted execution environment provided in an embodiment of the present invention can be applicable to the case of data migration between trusted applications in a trusted data space under old and new versions of a security chip, specifically, the case of migrating trusted application data from an old environment to a new environment. The data migration device based on a trusted execution environment can be implemented in the form of hardware and / or software, and can be configured in a second trusted application in a second trusted execution environment, such as Figure 5 As shown, the device specifically includes: a certification request acquisition module 501, an authentication report feedback module 502, a key generation module 503, a data acquisition module 504 and an encrypted data feedback module 505. Among them,

[0178] The attestation request acquisition module 501 is used to acquire a remote attestation request sent by a first trusted application in a first trusted execution environment, and generate a remote authentication report according to the remote attestation request;

[0179] The authentication report feedback module 502 is used to feedback the remote authentication report to the first trusted application so that the first trusted application can perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, generate and feedback a data key acquisition request;

[0180] A key generation module 503, configured to generate a data key communication ciphertext according to the data key acquisition request, and send the data key communication ciphertext to the first trusted application;

[0181] The data acquisition module 504 is used to acquire the encrypted data acquisition request sent by the first trusted application, and generate encrypted data according to the encrypted data acquisition request;

[0182] The encrypted data feedback module 505 is used to send the encrypted data to the first trusted application so that the first trusted application can associate and store the data key communication ciphertext with the encrypted data.

[0183] The technical solution of the embodiment of the present invention realizes the function of data migration of trusted applications in trusted data space through trusted virtual machine technology based on security chip. Specifically, after the environment verification of the trusted execution environment of both parties is performed, a data key acquisition request is sent to the second trusted application to be migrated, so that the second trusted application can generate and feedback data key communication ciphertext according to the data key acquisition request; an encrypted data acquisition request is sent to the second trusted application, so that the second trusted application can generate and feedback encrypted data according to the encrypted data acquisition request, and the data key communication ciphertext and the encrypted data are stored in association, thereby improving the data migration efficiency and data storage security. The above technical solution requires that the trusted application data be encrypted and stored using a random key, and then the data encryption key is encrypted and stored using a sealing key derived from the trusted execution environment, so that when migrating data, only the trusted application data encryption key needs to be unsealed and re-sealed, thereby realizing seamless access and use of data in the new and old environments.

[0184] Optionally, the key generation module 503 includes:

[0185] A list request acquisition unit, configured to acquire a data list acquisition request sent by the first trusted application, and generate a data list according to the data list acquisition request; the data list includes at least one migratable data identifier;

[0186] A list sending unit, configured to send the data list to the first trusted application, so that the first trusted application generates and feeds back a data key acquisition request according to the migratable data identifier in the data list;

[0187] A seal key acquisition unit, used to acquire the data key seal ciphertext according to the data key acquisition request;

[0188] A key decryption unit is used to decrypt the data key seal ciphertext based on the seal key derived from the device to which it belongs, to obtain the data key plaintext;

[0189] The communication ciphertext sending unit is used to encrypt the data key plaintext based on the communication key pre-negotiated with the first trusted execution environment to obtain the data key communication ciphertext, and send the data key communication ciphertext to the first trusted application.

[0190] Optionally, the certification request acquisition module 501 includes:

[0191] A random number generation unit, configured to determine a random number according to the remote attestation request;

[0192] The random number sending unit is used to send an authentication report request and the random number to the application manager, so that the application manager generates a remote authentication report according to the authentication report request and the random number, and feeds back the remote authentication report to the second trusted application.

[0193] The data migration device based on a trusted execution environment provided in the embodiment of the present invention can execute the data migration method based on a trusted execution environment provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0194] Embodiment 6

[0195] Figure 6 A schematic diagram of the structure of an electronic device 60 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0196] like Figure 6As shown, the electronic device 60 includes at least one processor 61, and a memory connected to the at least one processor 61, such as a read-only memory (ROM) 62, a random access memory (RAM) 63, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 61 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 62 or the computer program loaded from the storage unit 68 to the random access memory (RAM) 63. In the RAM 63, various programs and data required for the operation of the electronic device 60 can also be stored. The processor 61, the ROM 62, and the RAM 63 are connected to each other via a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64.

[0197] A number of components in the electronic device 60 are connected to the I / O interface 65, including: an input unit 66, such as a keyboard, a mouse, etc.; an output unit 67, such as various types of displays, speakers, etc.; a storage unit 68, such as a disk, an optical disk, etc.; and a communication unit 69, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 69 allows the electronic device 60 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0198] The processor 61 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 61 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 61 executes the various methods and processes described above, such as a data migration method based on a trusted execution environment.

[0199] In some embodiments, the data migration method based on the trusted execution environment can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 68. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 60 via the ROM 62 and / or the communication unit 69. When the computer program is loaded into the RAM 63 and executed by the processor 61, one or more steps of the data migration method based on the trusted execution environment described above can be performed. Alternatively, in other embodiments, the processor 61 can be configured to execute the data migration method based on the trusted execution environment in any other appropriate manner (for example, by means of firmware).

[0200] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0201] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0202] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0203] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0204] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0205] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0206] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0207] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data migration method based on a trusted execution environment, characterized in that: A first trusted application program applied in a first trusted execution environment includes: Sending a remote attestation request to a second trusted application in a second trusted execution environment, so that the second trusted application generates and feeds back a remote authentication report based on the remote attestation request; Performing security and trustworthy verification on the remote authentication report, and after passing the verification, sending a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request; Sending an encrypted data acquisition request to the second trusted application, so that the second trusted application generates and feeds back encrypted data according to the encrypted data acquisition request; The data key communication ciphertext and the encrypted data are stored in association.

2. The method according to claim 1, characterized in that The sending of the data key acquisition request to the second trusted application so that the second trusted application generates and feeds back the data key communication ciphertext according to the data key acquisition request includes: Sending a data list acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data list according to the data list acquisition request; the data list includes at least one migratable data identifier; Generate a data key acquisition request according to the migratable data identifier in the data list; Sending the data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request; The data key communication ciphertext is generated as follows: The second trusted application obtains the data key seal ciphertext according to the data key acquisition request; Decrypting the data key ciphertext based on the sealing key derived from the device to which it belongs, to obtain the data key plaintext; Based on the communication key pre-negotiated with the first trusted execution environment, the data key plaintext is encrypted to obtain the data key communication ciphertext.

3. The method according to claim 2, characterized in that The method further comprises: In response to the data acquisition request, decrypt the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext; Decrypting the encrypted data using the data key plaintext to obtain plaintext data; The plaintext data is fed back.

4. The method according to claim 3, characterized in that: After decrypting the data key communication ciphertext based on the communication key pre-negotiated with the second trusted execution environment to obtain the data key plaintext, the method further includes: Encrypting the data key plaintext based on the sealing key derived from the device to which it belongs, to obtain the data key sealing ciphertext; The data key seal ciphertext is stored.

5. A data migration method based on a trusted execution environment, characterized in that: The second trusted application program applied in the second trusted execution environment includes: Obtaining a remote attestation request sent by a first trusted application in a first trusted execution environment, and generating a remote authentication report according to the remote attestation request; Feedback the remote authentication report to the first trusted application, so that the first trusted application can perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, generate and feedback a data key acquisition request; Generate a data key communication ciphertext according to the data key acquisition request, and send the data key communication ciphertext to the first trusted application; Obtaining an encrypted data acquisition request sent by the first trusted application, and generating encrypted data according to the encrypted data acquisition request; The encrypted data is sent to the first trusted application so that the first trusted application can associate and store the data key communication ciphertext with the encrypted data.

6. The method according to claim 5, characterized in that The step of generating a data key communication ciphertext according to the data key acquisition request, and sending the data key communication ciphertext to the first trusted application comprises: Obtaining a data list acquisition request sent by the first trusted application, and generating a data list according to the data list acquisition request; the data list includes at least one migratable data identifier; Sending the data list to the first trusted application, so that the first trusted application generates and feeds back a data key acquisition request according to the migratable data identifier in the data list; Obtaining the data key seal ciphertext according to the data key acquisition request; Decrypting the data key ciphertext based on the sealing key derived from the device to which it belongs, to obtain the data key plaintext; Based on the communication key pre-negotiated with the first trusted execution environment, the data key plaintext is encrypted to obtain the data key communication ciphertext, and the data key communication ciphertext is sent to the first trusted application.

7. The method according to claim 5, characterized in that Generating a remote authentication report according to the remote certification request includes: Determining a random number according to the remote attestation request; An authentication report request and the random number are sent to the application manager, so that the application manager generates a remote authentication report according to the authentication report request and the random number, and feeds the remote authentication report back to the second trusted application.

8. A data migration device based on a trusted execution environment, characterized in that: A first trusted application configured in a first trusted execution environment includes: A certification request sending module, used to send a remote certification request to a second trusted application in a second trusted execution environment, so that the second trusted application generates and feeds back a remote authentication report based on the remote certification request; A security verification module, used to perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, send a data key acquisition request to the second trusted application, so that the second trusted application generates and feeds back a data key communication ciphertext according to the data key acquisition request; an acquisition request sending module, configured to send an encrypted data acquisition request to the second trusted application, so that the second trusted application generates and feeds back encrypted data according to the encrypted data acquisition request; A data storage module is used to store the data key communication ciphertext and the encrypted data in association with each other.

9. A data migration device based on a trusted execution environment, characterized in that: The second trusted application configured in the second trusted execution environment includes: An attestation request acquisition module, configured to acquire a remote attestation request sent by a first trusted application in a first trusted execution environment, and generate a remote authentication report according to the remote attestation request; An authentication report feedback module, used to feedback the remote authentication report to the first trusted application, so that the first trusted application can perform security and trustworthiness verification on the remote authentication report, and after the verification is passed, generate and feedback a data key acquisition request; A key generation module, configured to generate a data key communication ciphertext according to the data key acquisition request, and send the data key communication ciphertext to the first trusted application; A data acquisition module, used to acquire the encrypted data acquisition request sent by the first trusted application, and generate encrypted data according to the encrypted data acquisition request; The encrypted data feedback module is used to send the encrypted data to the first trusted application so that the first trusted application can associate and store the data key communication ciphertext with the encrypted data.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data migration method based on a trusted execution environment as described in any one of claims 1-4 and / or 5-7.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data migration method based on a trusted execution environment as described in any one of claims 1-4 and / or 5-7 when executed.

12. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the data migration method based on a trusted execution environment according to any one of claims 1-4 and / or 5-7.

Citation Information

Patent Citations

  • Data processing method, system and device and readable storage medium

    CN117056943A

  • Key distribution method and device, computer equipment and storage medium

    CN117155549A

  • Remote authentication system and method based on distributed trusted execution environment application

    CN118233218A

  • System, method and device for realizing trusted transmission and reverse authorization processing for multi-party interaction data, processor and storage medium thereof

    CN118337430A

  • Remote proving method and system for trusted application in data space

    CN118784359A

Cited By

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

    CN120811673A