Data migration method and device, equipment, storage medium and program product

By performing trust authentication and data encryption signing between the source and target devices, the issues of identity authentication and data transmission security during data migration in the cloud environment are resolved, thereby improving the security and speed of data migration.

CN121543098AActive Publication Date: 2026-02-17BEIJING INFOSEC TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202610049992.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-02-17
Estimated Expiration
2046-01-14

AI Technical Summary

Technical Problem

In cloud environments, existing technologies lack methods to ensure the trustworthiness of the identities of both parties involved in data migration and the security of data transmission, especially when data migration is performed in a trusted execution environment, where there are issues with identity authentication and data transmission security.

Method used

By performing trusted authentication between the source and target devices, encrypting and signing the data to be migrated using a set encryption algorithm, generating the ciphertext to be migrated and the signature, and verifying and decrypting the signature using the public key of the target device, the security of data transmission is ensured.

Benefits of technology

While ensuring the trustworthiness of the source and target devices, the system achieves secure data migration and data transmission integrity, improves data migration speed, and avoids frequent key negotiation interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543098A_ABST
    Figure CN121543098A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data migration method and device, equipment, a storage medium and a program product, and relates to the technical field of information security technologies. The method comprises the following steps: performing credibility authentication with target equipment in response to an authentication trigger instruction; under the condition of determining that the credibility authentication is passed, performing encryption operation on the to-be-migrated data based on a set encryption algorithm to obtain a to-be-migrated ciphertext, and performing signature operation on the to-be-migrated data based on a set signature algorithm to obtain a to-be-migrated data signature; and sending the to-be-migrated ciphertext and the to-be-migrated data signature to the target device, so that the target device verifies the to-be-migrated data signature based on a pre-acquired public key, and decrypts the to-be-migrated ciphertext by using a pre-acquired secret key under the condition that the verification is passed, thereby obtaining the to-be-migrated data. According to the scheme, the data transmission security of the migration data is ensured on the premise of ensuring the credibility of the source equipment and the target equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a data migration method, apparatus, device, storage medium, and program product. Background Technology

[0002] A Trusted Execution Environment (TEE) is an isolated area within a computing system that consists of a collection of hardware, firmware, and software designed to protect the confidentiality and integrity of critical user data in a cloud environment. Because cloud environments often involve load balancing and response latency, it is frequently necessary to migrate critical user data (such as keys and authentication data from trusted cryptographic modules) within the TEE.

[0003] Therefore, it is essential to provide a data migration method that can guarantee the credibility of the identities of both parties involved in the data migration and the security of data transmission, but there is currently no relevant technology. Summary of the Invention

[0004] This application provides a data migration method, apparatus, device, storage medium, and program product that ensures the secure transmission of migrated data while ensuring the trustworthiness of the source and target devices.

[0005] In a first aspect, embodiments of this application provide a data migration method, the method being applied to a source device, both the source device and the target device carrying a trusted execution environment, wherein a trusted application and a data migration application run in the trusted execution environment, the method comprising: In response to the authentication trigger command, perform trust authentication with the target device; If the trust authentication is successful, in response to the data migration instruction, the data to be migrated in the trusted application is obtained through the data migration application, and the data to be migrated is encrypted based on the set encryption algorithm to obtain the ciphertext to be migrated, and the data to be migrated is signed based on the set signature algorithm to obtain the signature of the data to be migrated. The ciphertext to be migrated and the signature of the data to be migrated are sent to the target device, so that the target device can verify the signature of the data to be migrated based on the pre-obtained public key, and if the verification is successful, use the pre-obtained key to decrypt the ciphertext to be migrated to obtain the data to be migrated.

[0006] Secondly, embodiments of this application provide a data migration apparatus. The apparatus is applied to a source device, and both the source device and the target device carry a trusted execution environment. A trusted application and a data migration application run within the trusted execution environment. The apparatus includes: The authentication module is used to perform trust authentication with the target device in response to the authentication trigger command; An encryption module is configured to, upon determining that the trust authentication has passed, respond to a data migration instruction by obtaining the data to be migrated from the trusted application through the data migration application, encrypting the data to be migrated based on a set encryption algorithm to obtain the ciphertext to be migrated, and signing the data to be migrated based on a set signature algorithm to obtain the signature of the data to be migrated. The migration module is used to send the ciphertext to be migrated and the signature of the data to be migrated to the target device, so that the target device can verify the signature of the data to be migrated based on a pre-obtained public key, and if the verification is successful, decrypt the ciphertext to be migrated using a pre-obtained key to obtain the data to be migrated.

[0007] Thirdly, embodiments of this application provide a data migration method, which is applied to a target device. Both the target device and the source device carry a trusted execution environment, in which a trusted application and a data migration application run. The method includes: In response to the authentication trigger command, perform trust authentication with the source device; The system receives ciphertext to be migrated and a signature of data to be migrated sent by the source device after determining that the trust authentication has passed. The ciphertext to be migrated is obtained by the source device encrypting the data to be migrated based on a set encryption algorithm. The signature of data to be migrated is obtained by the source device signing the data to be migrated based on a set signature algorithm. The data to be migrated is obtained by the source device from the trusted application through the data migration application in response to the data migration instruction. The signature of the data to be migrated is verified using a pre-obtained public key, and if the verification is successful, the ciphertext to be migrated is decrypted using a pre-obtained key to obtain the data to be migrated.

[0008] Fourthly, embodiments of this application provide a data migration apparatus. The apparatus is applied to a target device, and both the target device and the source device carry a trusted execution environment. A trusted application and a data migration application run within the trusted execution environment. The apparatus includes: The authentication module is used to perform trust authentication with the source device in response to the authentication trigger command; A receiving module is configured to receive the ciphertext to be migrated and the signature of the data to be migrated sent by the source device after determining that the trust authentication has passed. The ciphertext to be migrated is obtained by the source device encrypting the data to be migrated based on a set encryption algorithm. The signature of the data to be migrated is obtained by the source device signing the data to be migrated based on a set signature algorithm. The data to be migrated is obtained by the source device from the trusted application through the data migration application in response to the data migration instruction. The verification module is used to verify the signature of the data to be migrated based on a pre-obtained public key, and if the verification is successful, to decrypt the ciphertext to be migrated using a pre-obtained key to obtain the data to be migrated.

[0009] Fifthly, embodiments of this application also provide an electronic device, the electronic device including: a memory, a processor, and a communication interface; wherein, the memory stores executable code, and when the executable code is executed by the processor, the processor performs the method described in the first or third aspect above.

[0010] In a sixth aspect, embodiments of this application also provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, causes the processor to perform the method described in the first or third aspect above.

[0011] In a seventh aspect, embodiments of this application also provide a computer program product, the computer program product comprising: a computer program, which, when executed by a processor of an electronic device, causes the processor to perform the method described in the first or third aspect above.

[0012] In this embodiment, in response to an authentication trigger command, a trust authentication is performed with the target device. If the trust authentication is successful, the data to be migrated is encrypted using a predefined encryption algorithm to obtain ciphertext to be migrated, and signed using a predefined signature algorithm to obtain a signature of the data to be migrated. While ensuring the trustworthiness of both the source and target devices, the data to be migrated is encrypted and signed, and the ciphertext and signature are sent to the target device. Subsequently, only when the target device performs the corresponding verification and decryption operations can it obtain the data to be migrated, completing the data migration and ensuring the secure transmission of the migrated data. Attached Figure Description

[0013] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart of a data migration method provided as an exemplary embodiment of this application; Figure 2 An application diagram illustrating a data migration method provided in an exemplary embodiment of this application; Figure 3 Another flowchart of a data migration method provided for an exemplary embodiment of this application; Figure 4 A flowchart of yet another data migration method provided as an exemplary embodiment of this application; Figure 5 A schematic diagram of the structure of a data migration apparatus provided for an exemplary embodiment of this application; Figure 6 A schematic diagram of the structure of yet another data migration apparatus provided as an exemplary embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0015] The following is a description of the terms used in the embodiments of this application: Trusted Execution Environment (TEE): This is an area in a computing system that runs in an isolated environment. It is a collection of hardware and software used to protect the confidentiality and integrity of users' critical data in the cloud environment.

[0016] Rich Execution Environment (REE): refers to the regular execution environment in a device that runs a general-purpose system, such as Android, iOS, openEuler, or Windows.

[0017] Currently, due to the frequent involvement of load balancing and response latency issues in cloud environments, it is often necessary to migrate critical user data (such as keys and authentication data of trusted cryptographic modules) within a trusted execution environment. Therefore, it is essential to provide a data migration method that can guarantee the trustworthiness of both parties involved in the data migration, the data transmission speed during the migration process, and the security of data transmission. In view of this, embodiments of this application provide a data migration method.

[0018] Figure 1 This is a flowchart illustrating a data migration method provided in an embodiment of this application. The method is applied to a source device, where the source and target devices can be terminal devices (mobile phones, computers, etc.), servers, etc. Both the source and target devices host a trusted execution environment, in which a trusted application and a data migration application run. Figure 1 As shown, the method includes the following steps: Step 101: In response to the authentication trigger command, perform trust authentication with the target device.

[0019] Step 102: If the trustworthiness authentication is successful, in response to the data migration instruction, obtain the data to be migrated from the trusted application through the data migration application, encrypt the data to be migrated based on the set encryption algorithm to obtain the ciphertext to be migrated, and sign the data to be migrated based on the set signature algorithm to obtain the signature of the data to be migrated.

[0020] Step 103: Send the ciphertext to be migrated and the signature of the data to be migrated to the target device so that the target device can verify the signature of the data to be migrated based on the pre-obtained public key, and if the verification is successful, use the pre-obtained key to decrypt the ciphertext to be migrated to obtain the data to be migrated.

[0021] In practical applications, users can issue data migration commands to cloud management systems (such as OpenStack Nova, Kubernetes Operator, etc.) or dedicated migration consoles. Upon receiving the data migration command, the cloud management system (such as OpenStack Nova, Kubernetes Operator, etc.) or dedicated migration console sends authentication trigger commands to both the source and target devices.

[0022] To facilitate understanding, the following will be combined with... Figure 2 The subsequent data migration process is described in detail: exist Figure 2In this context, the data migration application comprises a trusted migration application and a user migration application. The trusted migration application runs in a trusted execution environment and is responsible for all operations (such as key generation, encryption, and signing). The user migration application runs in a rich execution environment and is responsible for network communication.

[0023] In practice, after receiving the authentication trigger command, the source device and the target device perform local trust authentication and remote trust authentication, respectively. Local trust authentication ensures the trustworthiness of the data migration applications on both the source and target devices, while remote trust authentication allows them to verify the trustworthiness of each other's data migration applications, laying the foundation for secure data migration in the future.

[0024] The local trust authentication process for the source device may include the following steps: In response to the authentication trigger command, the source device migrates the user application and sends a request to the trusted application to obtain the data to be migrated through the trusted application. The trusted application is configured with a whitelist for recording multiple service identifiers, and the request to obtain the data to be migrated carries the target service identifier corresponding to the trusted application. If the trusted application determines that the whitelist contains the target service identifier, it determines that the local trust authentication is successful.

[0025] Specifically, the source device receives the authentication trigger instruction through the migration user application MCAs and sends a request to acquire the data to be migrated to multiple trusted applications TAs through the migration trusted application MTAs. Based on the configuration request identifier (such as configuration fields, characters, etc.) carried in the request to acquire the data to be migrated, the target trusted application TAs is determined from among the multiple trusted application TAs. The target trusted application TAs is configured with a whitelist for recording multiple service identifiers.

[0026] After receiving a request to acquire data to be migrated, the target trusted application (TAs) can determine whether its local trustworthiness authentication is successful based on whether the service identifier corresponding to the migration trusted application (MTAs) that sent the request is in the whitelist. If it is, the authentication is successful (that is, it is determined that the migration user application (MCAs), the migration trusted application (MTAs), and the trusted application (TAs) are deployed on the same device, are trusted, and can communicate). Otherwise, the authentication fails.

[0027] Similarly, the local trust authentication process for the target device can include the following steps: In response to the authentication trigger command, the target device migrates the user application and sends a request to the trusted application to obtain the data to be migrated through the trusted application. The trusted application is configured with a whitelist for recording multiple service identifiers, and the request to obtain the data to be migrated carries the target service identifier corresponding to the trusted application. If the trusted application determines that the whitelist contains the target service identifier, it determines that the local trust authentication is successful.

[0028] Specifically, the target device migrates the user application MCA. D Receive authentication trigger instruction and migrate trusted application MCA D To multiple trusted applications TA D Send a request to retrieve the data to be migrated, and based on the specified request identifier (such as specified fields, characters, etc.) carried in the request, in multiple trusted applications (TAs)... D In determining the target trusted application TA D Among them, the target trusted application TA D It is configured with a whitelist for recording multiple service identifiers.

[0029] Target Trusted Application (TA) D Upon receiving a request to retrieve data to be migrated, the migration trusted application (MCA) that sent the request can be used to determine the appropriate migration method. D Check if the corresponding service identifier is on the whitelist and verify if its local trust authentication is successful. If it is, the authentication is successful (i.e., the migration user application MCA is confirmed). D Migrate Trusted Applications (MTA) D and trusted application TA D (If the devices are deployed on the same device, are trusted, and can communicate), otherwise, authentication will fail.

[0030] By using a whitelist approach to perform local trustworthiness authentication on both the source and target devices, the process is convenient, fast, and efficient.

[0031] The remote trust authentication process for source and target devices may include the following steps: A key pair is created based on a specified signature algorithm, containing a public key and a private key. The private key is sealed to obtain a private key ciphertext. The private key ciphertext is stored locally and contains at least the private key and the device identifier of the source device. A remote authentication report is generated based on the key pair, and the remote authentication report containing the public key is sent to the target device so that the target device can perform remote trust authentication based on the public key, thus completing the establishment of a secure channel.

[0032] In specific implementation, the source device generates a key pair (public key Pubs, private key Pris) based on a set signature algorithm (such as SM2, ECDSA, EdDSA, etc., with SM2 being preferred in this embodiment). D Private key Pri D ).

[0033] The source device sends a remote authentication report to the target device. This report includes at least the public key Pubs and the TEE kernel signature. Upon receiving the remote authentication report, the target device determines the legitimacy of the source device's TEE environment based on the public key Pubs and the TEE kernel signature. If valid, the remote authentication is successful, the public key Pubs is stored locally, and its public key Pubs is... D The embedded remote authentication report is returned to the source device, which then performs the same verification process as described above and locally stores the target device's public key (Pub). D .

[0034] During this process, the source device and the target device respectively set their private keys Pris and Pri. D The process involves sealing the private key (also known as sealing) to obtain the ciphertext, which is then stored locally as the private key Pris and Pri. D Bind each device to its corresponding device identifier (i.e., device ID) and software metric (such as the hash value of a data migration application).

[0035] Based on the above, by generating a remote authentication report and incorporating the public key into the TEE-signed remote authentication report, the signature becomes invalid if the remote authentication report is tampered with, ensuring the accuracy of the remote trust authentication result. Furthermore, by sealing the private key in the key pair to obtain the ciphertext, and storing the ciphertext locally, the security of the private key can be ensured. Even if an attacker obtains the ciphertext, they cannot use it on other devices. In summary, to decrypt the ciphertext, the following conditions must be met simultaneously: 1. Same physical device; 2. Same software environment (i.e., the hash value of the data migration application is the same); 3. Same TEE version.

[0036] After confirming that the trustworthiness certification has passed, such as Figure 3 As shown, the method also includes the following steps: Step 301: Generate session key encryption key and session key.

[0037] Step 302: Using the session key encryption key as the key, encrypt the session key using the set encryption algorithm to obtain the key ciphertext.

[0038] Step 303: Perform white-box conversion processing on the session key encryption key using a white-box key processing algorithm to obtain white-box information.

[0039] Step 304: Send the key ciphertext and white-box information to the target device so that the target device can use the white-box information as the key and the set decryption algorithm to decrypt the key ciphertext to obtain the session key.

[0040] In practical applications, after confirming successful trust authentication, the source device generates a session key encryption key KEK (which can be a 128-bit random number, such as 0x7A3F9C1E05D82B46, used to encrypt the session key) and a session key Km (which can be a 128-bit random number, such as 0x2E8A4D70B91F6C53, used to encrypt the data to be migrated) through the migration trusted application MTAs. Then, using KEK as the key, Km is encrypted using the SM4 algorithm-ECB mode to obtain the key ciphertext Cipher, where Cipher = SM4_ECB_encrypt(Km, KEK).

[0041] The session key encryption key is subjected to white-box transformation using a white-box key processing algorithm to obtain white-box information, namely the white-box table WB_KEK. Specifically: WB_KEK= WhiteBox_SM4_Transform(KEK).

[0042] In summary, it involves integrating KEK into the SM4 algorithm logic to generate an irreversible lookup table structure.

[0043] Subsequently, the source device transmits the key ciphertext Cipher and white-box information WB_KEK via the migration user application MCA and the migration user application MCA. D Send Migration Trusted Application (MTA) D Migrate Trusted Applications (MTA) D Using the white-box information WB_KEK as the key, the Cipher is decrypted using the white-box SM4 decryption algorithm to obtain Km. Then, the source and destination devices can use Km as the key to encrypt and decrypt the data to be migrated using the SM4 algorithm.

[0044] In practical applications, the data M to be migrated in the trusted application TAs of the source device data The data is sent to the migration trusted applications (MTAs) via a secure channel (established by the source device during local authentication). The migration trusted applications (MTAs) then receive the data to be migrated, M. data Then, using Km as the key, the SM4 encryption algorithm is used to encrypt the ciphertext E to be migrated. data Simultaneously, the private key Pris generated based on the SM2 algorithm is used to transfer the data M.data Perform the signing to obtain the signature S of the data to be migrated. data Afterwards, the source device will transfer the ciphertext E to be migrated. data and the signature of the data to be migrated S data Migration User Application (MCA) sent to the target device via Migration User Application (MCA) D .

[0045] Migration User Application (MCA) for Target Devices D Upon receiving the ciphertext E to be migrated from the source device data and the signature of the data to be migrated S data Then, the migration data S is signed using the public key Pubs of the migration trusted application MTAs. data Verification is performed; if the verification passes, it proves that the data originated from the source device and has not been tampered with. Afterwards, the trusted application MTA is migrated. D Using Km as the key, the original data M to be migrated is obtained by decrypting it using the SM4 decryption algorithm. data And the data to be migrated M data Send to the trusted application TA via the secure channel established by the target device during local authentication. D Trusted Application (TA) D Upon receiving the data M to be migrated data Then, the data is encrypted and stored using its own key, thus completing the entire data migration process.

[0046] By employing a dual-key protection mechanism—using both session key encryption and session key—the security of the data to be migrated is enhanced. In this process, the use of white-box transmission not only prevents key theft but also improves data transmission speed (it should be understood that traditional data transmission schemes typically require multiple interactions and negotiations between the sender and receiver to complete a single data transmission, while white-box transmission only requires a single interaction).

[0047] Based on the above, the data migration method provided in this application, in response to an authentication trigger command, performs trust authentication with the target device. If the trust authentication is successful, it encrypts the data to be migrated using a predefined encryption algorithm to obtain ciphertext to be migrated, and signs the data to be migrated using a predefined signature algorithm to obtain a signature of the data to be migrated. While ensuring the trustworthiness of both the source and target devices, the encryption and signing operations on the data to be migrated are performed, and the ciphertext and signature are sent to the target device. Subsequently, only when the target device performs the corresponding verification and decryption operations can it obtain the data to be migrated, completing the data migration and ensuring the secure transmission of the migrated data.

[0048] In summary, this application fully utilizes the local and remote authentication capabilities of the Trusted Execution Environment (TEE), combined with the SM2 and SM4 cryptographic algorithms, to ensure the confidentiality and integrity of data during migration. Simultaneously, by leveraging the SM4 white-box cryptographic algorithm mechanism, it eliminates the frequent key negotiation interactions, securely sending the channel encryption key to the peer, thereby improving the migration speed of critical data under the TEE. Furthermore, both the SM2 and SM4 algorithms are implemented within the migration trusted application (MTA), protected by the TEE, preventing the leakage of migration keys and data during encryption / decryption.

[0049] Figure 4 This is a flowchart illustrating a data migration method provided in an embodiment of this application. The method is applied to a target device, where both the target device and the source device host a trusted execution environment. Within this trusted execution environment, a trusted application and a data migration application run. Figure 4 As shown, the method includes the following steps: Step 401: In response to the authentication trigger command, perform trust authentication with the source device.

[0050] Step 402: Receive the ciphertext to be migrated and the signature of the data to be migrated sent by the source device after confirming that the trust authentication is passed. The ciphertext to be migrated is obtained by the source device encrypting the data to be migrated based on the set encryption algorithm. The signature of the data to be migrated is obtained by the source device signing the data to be migrated based on the set signature algorithm. The data to be migrated is obtained by the source device from the trusted application through the data migration application in response to the data migration instruction.

[0051] Step 403: Verify the signature of the data to be migrated based on the pre-obtained public key, and if the verification is successful, decrypt the ciphertext to be migrated using the pre-obtained key to obtain the data to be migrated.

[0052] Figure 4 The method shown can perform the steps in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.

[0053] Figure 5 This is a schematic diagram of a data migration apparatus provided in an embodiment of this application. The apparatus is applied to a source device, and both the source device and the target device carry a trusted execution environment. A trusted application and a data migration application run in the trusted execution environment. The apparatus includes: The authentication module 51 is used to perform trust authentication with the target device in response to the authentication trigger command.

[0054] The encryption module 52 is configured to, upon determining that the trust authentication has passed, respond to a data migration instruction by obtaining the data to be migrated from the trusted application through the data migration application, encrypting the data to be migrated based on a set encryption algorithm to obtain the ciphertext to be migrated, and signing the data to be migrated based on a set signature algorithm to obtain the signature of the data to be migrated.

[0055] The migration module 53 is used to send the ciphertext to be migrated and the signature of the data to be migrated to the target device, so that the target device can verify the signature of the data to be migrated based on the pre-obtained public key, and if the verification is successful, use the pre-obtained key to decrypt the ciphertext to be migrated to obtain the data to be migrated.

[0056] Optionally, the authentication module 51 is specifically configured to: perform local trust authentication in response to an authentication trigger command, wherein the local trust authentication is used to authenticate the trustworthiness of the source device's own data migration application; and perform remote trust authentication, wherein the remote trust authentication is used to enable the source device and the target device to verify the trustworthiness of each other's data migration application.

[0057] Optionally, the data migration application includes a migration trusted application and a migration user application; the authentication module 51 is further configured to: in response to an authentication trigger instruction, the migration user application sends a request to acquire data to be migrated to the trusted application through the migration trusted application, wherein the trusted application is configured with a whitelist for recording multiple service identifiers, and the request to acquire data to be migrated carries the target service identifier corresponding to the migration trusted application; if the trusted application determines that the whitelist contains the target service identifier, it determines that the local trust authentication is successful; and, based on the set signature algorithm, a key pair is created, the key pair containing a public key and a private key; a remote authentication report is generated based on the key pair, and the remote authentication report containing the public key is sent to the target device so that the target device performs remote trust authentication based on the public key.

[0058] Optionally, the device further includes: a sealing module for sealing the private key in the key pair to obtain private key ciphertext; and for locally storing the private key ciphertext, wherein the private key ciphertext includes at least: the private key and the device identifier of the source device.

[0059] Optionally, the device further includes: an encryption / decryption module, configured to generate a session key encryption key and a session key; encrypt the session key using the session key encryption key as the key and the set encryption algorithm to obtain key ciphertext; perform white-box conversion processing on the session key encryption key using a white-box key processing algorithm to obtain white-box information; and send the key ciphertext and the white-box information to the target device, so that the target device uses the white-box information as the key and the set decryption algorithm to decrypt the key ciphertext to obtain the session key.

[0060] Figure 5 The device shown can perform the steps in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.

[0061] Figure 6 This is a schematic diagram of a data migration apparatus provided in an embodiment of this application. The apparatus is applied to a target device, and both the target device and the source device carry a trusted execution environment. A trusted application and a data migration application run in the trusted execution environment. The apparatus includes: Authentication module 61 is used to perform trust authentication with the source device in response to authentication trigger command; The receiving module 62 is configured to receive the ciphertext to be migrated and the signature of the data to be migrated sent by the source device after determining that the trust authentication has passed. The ciphertext to be migrated is obtained by the source device encrypting the data to be migrated based on a set encryption algorithm. The signature of the data to be migrated is obtained by the source device signing the data to be migrated based on a set signature algorithm. The data to be migrated is obtained by the source device from the trusted application through the data migration application in response to the data migration instruction. The verification module 63 is used to verify the signature of the data to be migrated based on the pre-acquired public key, and if the verification is successful, to decrypt the ciphertext to be migrated using the pre-acquired key to obtain the data to be migrated.

[0062] Figure 6 The device shown can perform the steps in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.

[0063] This application also provides an electronic device, such as... Figure 7 As shown, the electronic device may include: a processor 71, a memory 72, and a communication interface 73. The memory 72 stores executable code, which, when executed by the processor 71, enables the processor 71 to implement the data migration method as described in the preceding embodiments.

[0064] In addition, embodiments of this application provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, enables the processor to at least implement the data migration method provided in the foregoing embodiments.

[0065] This application provides a computer program product, which includes a computer program that, when executed by a processor of an electronic device, causes the processor to perform the data migration method provided in the foregoing embodiments.

[0066] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0067] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0068] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0069] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0070] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0071] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0072] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0073] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0074] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A data migration method, characterized by, Applied to a source device, the source device and a target device each carrying a trusted execution environment, the trusted execution environment running a trusted application and a data migration application, the method comprises: In response to an authentication trigger instruction, authenticating the target device for trustworthiness; In a case where it is determined that the trustworthiness authentication is passed, in response to a data migration instruction, obtaining, by the data migration application, to-be-migrated data in the trusted application, performing an encryption operation on the to-be-migrated data based on a set encryption algorithm to obtain to-be-migrated ciphertext, and performing a signature operation on the to-be-migrated data based on a set signature algorithm to obtain to-be-migrated data signature; Sending the to-be-migrated ciphertext and the to-be-migrated data signature to the target device, so that the target device verifies the to-be-migrated data signature based on a pre-acquired public key, and in a case where the verification is passed, decrypts the to-be-migrated ciphertext using a pre-acquired key to obtain the to-be-migrated data.

2. The method of claim 1, wherein, The response to the authentication trigger instruction includes: In response to the authentication trigger instruction, performing local trustworthiness authentication, the local trustworthiness authentication being used to authenticate the trustworthiness of the data migration application of the source device itself; Performing remote trustworthiness authentication, the remote trustworthiness authentication being used to make the source device and the target device verify the trustworthiness of the data migration application of the other party.

3. The method of claim 2, wherein, The data migration application comprises a migration trusted application and a migration user application; the response to the authentication trigger instruction includes: In response to the authentication trigger instruction, the migration user application sends a to-be-migrated data acquisition request to the trusted application through the migration trusted application, wherein the trusted application is configured with a white list used to record a plurality of service identifiers, and the to-be-migrated data acquisition request carries a target service identifier corresponding to the migration trusted application; If the trusted application determines that the target service identifier is included in the white list, it is determined that the local trustworthiness authentication is passed.

4. The method of claim 2, wherein, The remote trustworthiness authentication includes: Creating a key pair based on the set signature algorithm, the key pair comprising a public key and a private key; Generating a remote authentication report based on the key pair, and sending the remote authentication report containing the public key to the target device, so that the target device performs remote trustworthiness authentication based on the public key.

5. The method of claim 4, wherein, After the key pair is created based on the set signature algorithm, the method further comprises: Sealing the private key in the key pair to obtain private key ciphertext; Locally storing the private key ciphertext, the private key ciphertext at least comprising the private key and a device identifier of the source device.

6. The method of claim 1, wherein, After it is determined that the trustworthiness authentication is passed, the method further comprises: Generating a session key encryption key and a session key; Encrypting the session key using the set encryption algorithm with the session key encryption key as a key to obtain key ciphertext; The session key encryption key is white-box converted by a white-box key processing algorithm to obtain white-box information; The key ciphertext and the white-box information are sent to the target device, so that the target device uses the white-box information as a key to decrypt the key ciphertext by using a set decryption algorithm to obtain the session key.

7. A data migration method, characterized by, The method is applied to a target device, and the target device and a source device both carry a trusted execution environment, and the trusted execution environment runs a trusted application and a data migration application, and the method comprises: In response to an authentication trigger instruction, the source device is authenticated for trustworthiness; The source device sends a to-be-migrated ciphertext and a to-be-migrated data signature in a case where it is determined that the authentication for trustworthiness is passed, wherein the to-be-migrated ciphertext is obtained by the source device by performing encryption on to-be-migrated data based on a set encryption algorithm, the to-be-migrated data signature is obtained by the source device by performing signature on the to-be-migrated data based on a set signature algorithm, and the to-be-migrated data is obtained by the source device from the trusted application through the data migration application in response to a data migration instruction; The to-be-migrated data signature is verified based on a pre-acquired public key, and in a case where the verification is passed, the to-be-migrated ciphertext is decrypted using a pre-acquired key to obtain the to-be-migrated data.

8. An electronic device, comprising: Comprise: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the data migration method according to any one of claims 1 to 6 or claim 7.

9. A non-transitory machine-readable storage medium, comprising: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by the processor of the electronic device, the processor executes the data migration method according to any one of claims 1 to 6 or claim 7.

10. A computer program product, characterised in that, Comprise: a computer program, and when the computer program is executed by the processor of the electronic device, the processor executes the data migration method according to any one of claims 1 to 6 or claim 7.

Citation Information

Patent Citations

  • Migration method, migration system, immigration end and emigration end of virtual machine

    CN106341228A

  • Security verification method, device and equipment for application program

    CN113282951A

  • Off-line migration method and device for trusted execution environment data

    CN114765544A

  • Blind signature device, system and method

    CN117201033A

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

    CN120811673A