Secure cross-chain method and device for user privacy data, equipment and medium

By using the technical means of notary nodes and hash time lock contracts in the blockchain cross-chain scenario, the problem of how to ensure the confidentiality, integrity and atomicity of user privacy data during cross-chain transmission is solved, and effective protection of user privacy data and data transmission is improved.

CN119691811APending Publication Date: 2025-03-25ZHENGZHOU NORMAL UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411867378.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the blockchain cross-chain scenario, there are challenges in how to ensure the confidentiality, integrity and atomicity of user privacy data during transmission.

Method used

By implementing a secure cross-chain method on the notary node, the public key information of the data receiver is used for encryption processing, and the integrity and atomicity of the data transmission are ensured through a hash time lock contract. The specific steps include: sending the public key information of the data receiver to the first secure area of ​​the data sender based on the data transmission request, performing encryption processing and hash digest verification, and ensuring the security of the data transmission process.

Benefits of technology

It realizes effective protection of user privacy data during the cross-chain process of blockchain, ensures confidentiality, integrity and atomicity during data transmission, and enhances the security and credibility of cross-chain data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691811A_ABST
    Figure CN119691811A_ABST
Patent Text Reader

Abstract

The invention discloses a secure cross-chain method, device and equipment for user privacy data, and a medium, and relates to the technical field of block chains, and the method comprises the steps: sending the public key information of a data receiver to a first secure region of a data sender based on a data transmission request, so that the first secure region encrypts an encryption key based on the public key information, and sends the encrypted key to a second secure region; sending the encrypted key information to a second security area of the data receiver through the first security area; according to the Hash time lock contract, sending the encrypted cross-chain data encrypted by the first security area to a data receiver, performing Hash abstract verification, and verifying the integrity of the current data transmission process; and when the integrity verification is passed, private key information corresponding to the public key information is sent to the data receiver, so that the data receiver decrypts the encrypted key information according to the private key information, decrypts the encrypted cross-chain data through the second security area based on the decrypted encryption key, and obtains user privacy data. And the cross-chain security of the privacy data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a secure cross-chain method, device, equipment and medium for user privacy data. Background Art

[0002] With the rapid development of blockchain technology, cross-chain technology has gradually become the key to achieving interoperability between different blockchain systems. However, in cross-chain scenarios, the transmitted data will involve multiple independent blockchain networks and need to be transferred between different security domains, which will face challenges in data privacy and security. Although blockchain has excellent characteristics such as decentralization and immutability, when data is interacted between multiple blockchain systems, how to ensure confidentiality, integrity and atomicity during data transmission is still a key issue that needs to be solved. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a secure cross-chain method, device, equipment and medium for user privacy data, which can ensure the security of privacy data in the cross-chain process of blockchain. The specific scheme is as follows:

[0004] In the first aspect, the present application discloses a secure cross-chain method for user privacy data, which is applied to a notary node, including:

[0005] Sending the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone;

[0006] Send the encrypted cross-chain data encrypted by the first security zone to the data recipient according to the hash time lock contract, and perform hash summary verification to verify the integrity of the current data transmission process;

[0007] When the integrity verification passes, the private key information corresponding to the public key information is sent to the data recipient, so that the data recipient can decrypt the encrypted key information according to the private key information, and then decrypt the encrypted cross-chain data through the second security zone based on the decrypted encryption key to obtain the user's privacy data.

[0008] Optionally, before sending the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, the method further includes:

[0009] Determining corresponding user privacy data from the first non-security zone of the data sender based on the data transmission request;

[0010] Performing data detection on the user privacy data through the first security zone;

[0011] If the data detection passes, an encryption key of the symmetric encryption algorithm is generated, and the encryption key and the symmetric encryption algorithm are used to encrypt the user privacy data to obtain encrypted cross-chain data and a hash summary of the encrypted cross-chain data, and then the encrypted cross-chain data is returned to the first non-secure area.

[0012] Optionally, after returning the encrypted cross-chain data to the first non-secure zone, the method further includes:

[0013] A public key application instruction is sent to the notary node through the first security zone, so that the notary node generates public key information and private key information of an asymmetric encryption algorithm based on the public key application instruction.

[0014] Optionally, the performing hash digest verification includes:

[0015] The data recipient performs summary calculation on the received encrypted cross-chain data to obtain a hash summary to be verified, and compares the hash summary to be verified with the hash summary located in the first security zone. If they are consistent, the hash summary verification is passed.

[0016] Optionally, the secure cross-chain method for user privacy data further includes:

[0017] Initialize the cross-chain system based on the notary node, data sender, and data generator, and generate a time lock and a random number;

[0018] Performing hash processing on the random number to obtain a corresponding hash result;

[0019] Correspondingly, the encrypted cross-chain data encrypted by the first security zone is sent to the data recipient according to the hash time lock contract, including:

[0020] The hash result and the hash time lock contract representing the data transmission time limit built based on the time lock are sent to the first non-secure zone, so that the first non-secure zone can encapsulate the hash result and the encrypted cross-chain data into the hash time lock contract, and upload the encapsulated hash time lock contract to the data recipient; the random number is sent to the second non-secure zone of the data recipient.

[0021] Optionally, sending private key information corresponding to the public key information to the data recipient so that the data recipient decrypts the encrypted key information according to the private key information includes:

[0022] Obtain a private key application request sent by the second security zone of the data recipient, and return private key information to the second security zone according to the private key application request, so that the data recipient can use the private key information to decrypt the encrypted key information located in the second security zone to obtain the encryption key.

[0023] Optionally, after obtaining the encryption key, the method further includes:

[0024] Unlock the encrypted cross-chain data locked in the encapsulated hash time lock contract using the random number in the second non-secure zone to obtain the unlocked encrypted cross-chain data;

[0025] Accordingly, the encrypted cross-chain data is decrypted through the second security zone based on the decrypted encryption key to obtain the user privacy data, including:

[0026] An application is made to the second security zone through the second non-security zone to decrypt the encrypted cross-chain data, so that the second security zone uses the encryption key to decrypt the encrypted cross-chain data and obtain user privacy data.

[0027] In the second aspect, the present application discloses a secure cross-chain device for user privacy data, which is applied to a notary node, including:

[0028] A key processing module, configured to send the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone;

[0029] An integrity verification module, used to send the encrypted cross-chain data encrypted by the first security zone to the data recipient according to the hash time lock contract, and perform hash summary verification to verify the integrity of the current data transmission process;

[0030] A decryption module is used to send the private key information corresponding to the public key information to the data recipient when the integrity verification passes, so that the data recipient can decrypt the encrypted key information according to the private key information, and then decrypt the encrypted cross-chain data through the second security zone based on the decrypted encryption key to obtain the user's privacy data.

[0031] In a third aspect, the present application discloses an electronic device, comprising:

[0032] Memory, used to store computer programs;

[0033] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed method for secure cross-chain of user privacy data.

[0034] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for secure cross-chain of user privacy data are implemented.

[0035] It can be seen that the present application discloses a secure cross-chain method for user privacy data, which is applied to a notary node, including: sending the public key information of the data receiver to the first security zone of the data sender based on a data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone; sending the encrypted cross-chain data encrypted by the first security zone to the data receiver according to the hash time lock contract, and performing hash summary verification to verify the integrity of the current data transmission process; when the integrity verification passes, sending the private key information corresponding to the public key information to the data receiver, so that the data receiver decrypts the encrypted key information according to the private key information, and then decrypts the encrypted cross-chain data through the second security zone and based on the decrypted encryption key to obtain user privacy data. It can be seen that the data transmission process between the data sender and the data receiver is completed through steps such as data encryption and decryption operations, key management operations, and data security verification, which verifies the consistency of the data transmission process and ensures the integrity of cross-chain data. By utilizing the time lock contract, it is ensured that the data can be transmitted within the predetermined time, ensuring the atomicity of the data process. In addition, the cross-chain method of the present invention can provide effective privacy protection for cross-chain data through hardware encryption and security zone isolation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0037] Figure 1 A flow chart of a secure cross-chain method for user privacy data disclosed in this application;

[0038] Figure 2 A timing diagram of a data cross-chain privacy protection and security solution based on a trusted execution environment and a notary mechanism disclosed in this application;

[0039] Figure 3A schematic diagram of the structure of a secure cross-chain device for user privacy data disclosed in this application;

[0040] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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 making creative work are within the scope of protection of the present invention.

[0042] With the rapid development of blockchain technology, cross-chain technology has gradually become the key to achieving interoperability between different blockchain systems. However, in cross-chain scenarios, the transmitted data will involve multiple independent blockchain networks and need to be transferred between different security domains, which will face challenges in data privacy and security. Although blockchain has excellent characteristics such as decentralization and immutability, when data is interacted between multiple blockchain systems, how to ensure confidentiality, integrity and atomicity during data transmission is still a key issue that needs to be solved.

[0043] To this end, the present invention provides a secure cross-chain solution for user privacy data, which can ensure the security of privacy data in the cross-chain process of blockchain.

[0044] Reference Figure 1 As shown, an embodiment of the present invention discloses a secure cross-chain method for user privacy data, which is applied to a notary node and includes:

[0045] Step S11: Based on the data transmission request, the public key information of the data recipient is sent to the first security zone of the data sender, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data recipient through the first security zone.

[0046] In this embodiment, before sending the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, it also includes: determining the corresponding user privacy data from the first non-security zone of the data sender based on the data transmission request; performing data detection on the user privacy data through the first security zone; if the data detection is passed, an encryption key of a symmetric encryption algorithm is generated, and the encryption key and the symmetric encryption algorithm are used to encrypt the user privacy data to obtain encrypted cross-chain data and a hash summary of the encrypted cross-chain data, and then the encrypted cross-chain data is returned to the first non-security zone. It can be understood that when there is a data transmission request for user privacy data to be transmitted from one blockchain node to another blockchain node, the user privacy data corresponding to the request is first determined in the first non-security zone from the data sender, and then the user privacy data is sent to its own first security zone for the detection of privacy data. Among them, the first security zone is the Enclave under the TEE (Trusted Execution Environment) of the data sender. Enclave is a secure and isolated execution area. Enclave provides CPU hardware-level isolation and memory encryption on the server, isolates application code and data from anyone with privileges, and encrypts its memory. The first non-security zone is the Non-Enclave under the TEE of the data sender. Non-Enclave refers to code and data that runs in a normal operating system or application space and is not in the Enclave. These areas do not have the isolation and protection characteristics of the Enclave, and therefore cannot enjoy hardware-level encryption and security guarantees. Therefore, after performing security detection on the user privacy data through the first security zone, the security of the user privacy data itself can be ensured. After passing the data detection, the first Enclave generates an encryption key for the symmetric encryption algorithm, and uses the encryption key and the symmetric encryption algorithm to perform symmetric encryption processing on the user privacy data to obtain encrypted cross-chain data, and then returns the encrypted cross-chain data to the first Non-Enclave. At the same time, the encrypted cross-chain data is hashed to obtain a hash summary of the encrypted cross-chain data. This hash summary is equivalent to a "label" for the integrity of the encrypted cross-chain data, which is generated and saved by the first Enclave of the data sender.

[0047] In this embodiment, after returning the encrypted cross-chain data to the first non-secure zone, it also includes: sending a public key application instruction to the notary node through the first secure zone, so that the notary node generates the public key information and private key information of the asymmetric encryption algorithm based on the public key application instruction. It can be understood that the public key application instruction is sent to the notary node through the first Enclave, wherein the public key application instruction contains the application information of the data recipient to which the user privacy data is to be sent, so that the notary node generates the public key information of the data recipient based on the public key application instruction, and then sends the public key information to the first Enclave, so that the first Enclave uses the public key encryption algorithm and the public key information to encrypt the encryption key, obtain the encrypted key information, and send the encrypted key information to the second Enclave of the data sender, wherein the definition of the second secure zone and the second non-secure zone of the data recipient is the same as that of the data sender, therefore, the second secure zone is the second Enclave, and the second non-secure zone is the second Non-Enclave, which will not be repeated.

[0048] In this embodiment, the cross-chain system constructed based on the notary node, the data sender, and the data generator is initialized, and a time lock and a random number are generated; the random number is hashed to obtain a corresponding hash result. It can be understood that before the cross-chain system works, the cross-chain system is initialized in advance, and then the notary node generates a random number and a time lock to ensure the security and credibility of the cross-chain user privacy data transmission. Then, the random number is hashed to obtain a corresponding hash result.

[0049] Step S12: Send the encrypted cross-chain data encrypted by the first security zone to the data recipient in accordance with the hash time lock contract, and perform hash summary verification to verify the integrity of the current data transmission process.

[0050] In this embodiment, the hash result and the hash time lock contract representing the data transmission time limit constructed based on the time lock are sent to the first non-secure zone, so that the first non-secure zone encapsulates the hash result and the encrypted cross-chain data into the hash time lock contract, and uploads the encapsulated hash time lock contract to the data recipient; the random number is sent to the second non-secure zone of the data recipient. It can be understood that the notary node sends the hash result and the hash time lock contract constructed based on the time lock to the first Non-Enclave, and then the first Non-Enclave uploads the encrypted cross-chain data to the second Non-Enclave of the data recipient through the hash time lock contract. In this way, by using the time lock contract, it is ensured that the user's privacy data can be transmitted within the predetermined time specified by the time lock contract. If the user's privacy data fails to be transmitted on time, the cross-chain system will automatically cancel the relevant operations to ensure the atomicity of the cross-chain process of the user's privacy data.

[0051] In this embodiment, the data recipient performs a summary calculation on the received encrypted cross-chain data to obtain a hash summary to be verified, and compares the hash summary to be verified with the hash summary located in the first security zone. If they are consistent, the hash summary verification is passed. It can be understood that after the encrypted data cross-chain process is completed, before the data recipient decrypts the encrypted data, the data recipient first performs a summary calculation on the received encrypted cross-chain data to obtain the hash summary to be verified, and then compares the hash summary previously recorded by the first Enclave with the hash summary to be verified. If the two are consistent, the signature verification is passed. If the two are inconsistent, the data transaction is terminated. In this way, it can be highly confident that the encrypted cross-chain data has not been tampered with during the transmission process, and the integrity of the encrypted cross-chain data and the reliability of the source are verified, thereby ensuring the successful upload of the encrypted cross-chain data.

[0052] Step S13: When the integrity verification passes, the private key information corresponding to the public key information is sent to the data recipient, so that the data recipient can decrypt the encrypted key information according to the private key information, and then decrypt the encrypted cross-chain data through the second security zone based on the decrypted encryption key to obtain the user's privacy data.

[0053] In this embodiment, when the integrity verification is passed, the private key application request sent by the second security zone of the data recipient is obtained, and the private key information is returned to the second security zone according to the private key application request, so that the data recipient can use the private key information to decrypt the encrypted key information in the second security zone to obtain the encryption key. It can be understood that when the integrity check is passed, the notary node will receive the private key application request sent by the second Enclave of the data recipient, and then the notary node will send the previously generated private key information paired with the public key information to the second Enclave according to the application request, and then the second Enclave will unlock the encrypted key information in itself and obtain the encryption key.

[0054] In this embodiment, after obtaining the encryption key, it also includes: unlocking the encrypted cross-chain data locked in the encapsulated hash time lock contract through the random number of the second non-secure zone to obtain the unlocked encrypted cross-chain data; correspondingly, decrypting the encrypted cross-chain data through the second secure zone and based on the decrypted encryption key to obtain user privacy data, including: applying to the second secure zone through the second non-secure zone to decrypt the encrypted cross-chain data, so that the second secure zone uses the encryption key to decrypt the encrypted cross-chain data to obtain user privacy data. It can be understood that after the encryption key is unlocked, the second Non-Enclave further unlocks the encrypted cross-chain data locked in the hash time lock contract using the random number sent by the notary node, and then applies to the second Enclave for decryption. After receiving the decryption application, the second Enclave uses the encryption key to decrypt the encrypted cross-chain data, and returns the decrypted user privacy data to the second Non-Enclave. Among them, user privacy data includes user data such as graphics, images, and videos.

[0055] like Figure 3 The following is a timing diagram of a data cross-chain privacy protection and security solution based on a trusted execution environment and notary mechanism. The specific process is as follows:

[0056] 1. Data transmission: The Non-Enclave (first Non-Enclave) of blockchain node A sends data a (user privacy data) to the Enclave (first Enclave) of blockchain node A.

[0057] 2. Data detection: The Enclave of blockchain node A performs privacy detection on data a. If the detection fails, the information transmission is terminated. Otherwise, it proceeds to the next step. In this way, privacy detection is performed through TEE to ensure its privacy security.

[0058] 3. Key generation: The Enclave of blockchain node A generates the key Sk (encryption key) for the symmetric encryption algorithm, encrypts data a with the key Sk, generates the hash summary of the encrypted data E (encrypted cross-chain data), and returns the encrypted data E to the Non-Enclave of blockchain node A. Then, the Enclave of blockchain node A sends a public key application request to the notary node, which generates a public-private key pair (Pu, Pr) for the asymmetric encryption algorithm after receiving the request, and returns the public key information Pu. After obtaining the public key information Pu, the Enclave of blockchain node A uses its encryption key Sk and sends the encrypted key Sk to the Enclave of blockchain node B (the second Enclave). In this way, the encryption processing is performed using the symmetric encryption algorithm to ensure the security of data when it crosses the chain, and then the encryption key used for the symmetric encryption algorithm is encrypted using the public key encryption algorithm to ensure that the encryption key can be safely transmitted to the target chain and the encryption key negotiation process is secure.

[0059] 4. Initialize the cross-chain system: The notary node generates a random number S, a time lock, and hash (S). Then the hash summary hash (S) to be verified and the time lock are sent to the Non-Enclave of blockchain node A, and the random number S is sent to the Non-Enclave of blockchain node B (the second Non-Enclave). In this way, by using mechanisms such as hash time locks and notaries, the credibility, timeliness, and atomicity of data during cross-chain transmission are ensured.

[0060] 5. Encrypted data E is uploaded to the chain: The Non-Enclave of blockchain node A encapsulates the encrypted data E in a hash time lock contract and uploads the contract to blockchain B. If the hash summary recorded in the Enclave of blockchain node A is consistent with the hash summary of the uploaded data in blockchain B, the encrypted data is successfully uploaded through signature verification, otherwise the data transaction is terminated.

[0061] 6. Apply for private key: The Enclave of blockchain node B sends a private key application request to the notary node, and after obtaining the private key Pr, it is used to unlock the key Sk received in step 3.

[0062] 7. Decrypted data: The Non-Enclave of blockchain node B uses the random number S to unlock the encrypted data E locked in the contract, and then applies for decryption to the Enclave of blockchain node B. After receiving the application, the Enclave of blockchain node B uses the key Sk to decrypt the encrypted data E and returns the decrypted data a to the Non-Enclave.

[0063] In this way, the above scheme provides a cross-chain solution that can protect cross-chain data privacy and data security at the same time. Most of the existing cross-chain solutions are only for cross-chain intercommunication of assets and transactions, but lack cross-chain sharing of user data including graphics, images, videos, etc. In addition, the existing cross-chain solutions mainly focus on the transfer and verification of assets, while cross-chain data such as videos often involve issues such as user privacy and copyright protection. Existing cross-chain solutions pay less attention to data privacy protection. This solution uses TEE's hardware encryption and isolation processing, combined with cryptographic technology, to provide effective privacy protection and data security protection solutions for cross-chain data, and through the notary mechanism and hash time lock mechanism, it ensures the timeliness and atomicity of data when crossing chains, enhancing the security and credibility of the cross-chain data transmission process.

[0064] It can be seen that the present application discloses a secure cross-chain method for user privacy data, which is applied to a notary node, including: sending the public key information of the data receiver to the first security zone of the data sender based on a data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone; sending the encrypted cross-chain data encrypted by the first security zone to the data receiver according to the hash time lock contract, and performing hash summary verification to verify the integrity of the current data transmission process; when the integrity verification passes, sending the private key information corresponding to the public key information to the data receiver, so that the data receiver decrypts the encrypted key information according to the private key information, and then decrypts the encrypted cross-chain data through the second security zone and based on the decrypted encryption key to obtain user privacy data. It can be seen that the data transmission process between the data sender and the data receiver is completed through steps such as data encryption and decryption operations, key management operations, and data security verification, which verifies the consistency of the data transmission process and ensures the integrity of cross-chain data. By utilizing the time lock contract, it is ensured that the data can be transmitted within the predetermined time, ensuring the atomicity of the data process. In addition, the cross-chain method of the present invention can provide effective privacy protection for cross-chain data through hardware encryption and security zone isolation.

[0065] Reference Figure 3 As shown, the embodiment of the present invention discloses a specific secure cross-chain device for user privacy data, which is applied to a notary node and includes:

[0066] The key processing module 11 is used to send the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone;

[0067] The integrity verification module 12 is used to send the encrypted cross-chain data encrypted by the first security zone to the data recipient according to the hash time lock contract, and perform hash summary verification to verify the integrity of the current data transmission process;

[0068] The decryption module 13 is used to send the private key information corresponding to the public key information to the data recipient when the integrity verification passes, so that the data recipient can decrypt the encrypted key information according to the private key information, and then decrypt the encrypted cross-chain data through the second security zone based on the decrypted encryption key to obtain the user's privacy data.

[0069] It can be seen that the present application discloses sending the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone; the encrypted cross-chain data encrypted by the first security zone is sent to the data receiver according to the hash time lock contract, and hash summary verification is performed to verify the integrity of the current data transmission process; when the integrity verification passes, the private key information corresponding to the public key information is sent to the data receiver, so that the data receiver decrypts the encrypted key information according to the private key information, and then decrypts the encrypted cross-chain data through the second security zone and based on the decrypted encryption key to obtain user privacy data. It can be seen that the data transmission process between the data sender and the data receiver is completed through steps such as data encryption and decryption operations, key management operations, and data security verification, which verifies the consistency of the data transmission process and ensures the integrity of cross-chain data. By utilizing the time lock contract, it is ensured that the data can be transmitted within the predetermined time, ensuring the atomicity of the data process. In addition, the cross-chain method of the present invention can provide effective privacy protection for cross-chain data through hardware encryption and security zone isolation.

[0070] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0071] Figure 4A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the secure cross-chain method for user privacy data disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0072] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0073] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0074] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0075] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20 to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the secure cross-chain method of user privacy data executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data transmitted from an external device received by the electronic device, the data 223 can also include data collected by its own input and output interface 25.

[0076] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the secure cross-chain method for user privacy data disclosed above is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the above embodiments, and will not be repeated here.

[0077] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0078] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly with hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory RAM (Random Access Memory), memory, read-only memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (ElectricErasable Programmable Read Only Memory), register, hard disk, removable disk, CD-ROM (CompactDisc-Read Only Memory), or any other form of storage medium known in the technical field.

[0079] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0080] The scheme provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A secure cross-chain method for user privacy data, characterized in that: Applied to notary nodes, including: Sending the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone; Send the encrypted cross-chain data encrypted by the first security zone to the data recipient according to the hash time lock contract, and perform hash summary verification to verify the integrity of the current data transmission process; When the integrity verification passes, the private key information corresponding to the public key information is sent to the data recipient, so that the data recipient can decrypt the encrypted key information according to the private key information, and then decrypt the encrypted cross-chain data through the second security zone based on the decrypted encryption key to obtain the user's privacy data.

2. The secure cross-chain method for user privacy data according to claim 1 is characterized in that: Before sending the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, the method further includes: Determining corresponding user privacy data from the first non-security zone of the data sender based on the data transmission request; Performing data detection on the user privacy data through the first security zone; If the data detection passes, an encryption key of the symmetric encryption algorithm is generated, and the encryption key and the symmetric encryption algorithm are used to encrypt the user privacy data to obtain encrypted cross-chain data and a hash summary of the encrypted cross-chain data, and then the encrypted cross-chain data is returned to the first non-secure area.

3. The secure cross-chain method for user privacy data according to claim 2 is characterized in that: After returning the encrypted cross-chain data to the first non-secure zone, the method further includes: A public key application instruction is sent to the notary node through the first security zone, so that the notary node generates public key information and private key information of an asymmetric encryption algorithm based on the public key application instruction.

4. The secure cross-chain method for user privacy data according to claim 2 is characterized in that: The hash digest verification includes: The data recipient performs summary calculation on the received encrypted cross-chain data to obtain a hash summary to be verified, and compares the hash summary to be verified with the hash summary located in the first security zone. If they are consistent, the hash summary verification is passed.

5. The secure cross-chain method for user privacy data according to any one of claims 1 to 4, characterized in that: Also includes: Initialize the cross-chain system based on the notary node, data sender, and data generator, and generate a time lock and a random number; Performing hash processing on the random number to obtain a corresponding hash result; Correspondingly, the encrypted cross-chain data encrypted by the first security zone is sent to the data recipient according to the hash time lock contract, including: The hash result and the hash time lock contract representing the data transmission time limit built based on the time lock are sent to the first non-secure zone, so that the first non-secure zone can encapsulate the hash result and the encrypted cross-chain data into the hash time lock contract, and upload the encapsulated hash time lock contract to the data recipient; the random number is sent to the second non-secure zone of the data recipient.

6. The secure cross-chain method for user privacy data according to claim 5 is characterized in that: The sending of private key information corresponding to the public key information to the data receiving party so that the data receiving party decrypts the encrypted key information according to the private key information includes: Obtain a private key application request sent by the second security zone of the data recipient, and return private key information to the second security zone according to the private key application request, so that the data recipient can use the private key information to decrypt the encrypted key information located in the second security zone to obtain the encryption key.

7. The secure cross-chain method for user privacy data according to claim 6 is characterized in that: After obtaining the encryption key, the method further includes: Unlock the encrypted cross-chain data locked in the encapsulated hash time lock contract using the random number in the second non-secure zone to obtain the unlocked encrypted cross-chain data; Accordingly, the encrypted cross-chain data is decrypted through the second security zone based on the decrypted encryption key to obtain the user privacy data, including: An application is made to the second security zone through the second non-security zone to decrypt the encrypted cross-chain data, so that the second security zone uses the encryption key to decrypt the encrypted cross-chain data and obtain user privacy data.

8. A secure cross-chain device for user privacy data, characterized in that: Applied to notary nodes, including: A key processing module, configured to send the public key information of the data receiver to the first security zone of the data sender based on the data transmission request, so that the first security zone encrypts the encryption key based on the public key information, and sends the encrypted key information to the second security zone of the data receiver through the first security zone; An integrity verification module, used to send the encrypted cross-chain data encrypted by the first security zone to the data recipient according to the hash time lock contract, and perform hash summary verification to verify the integrity of the current data transmission process; A decryption module is used to send the private key information corresponding to the public key information to the data recipient when the integrity verification passes, so that the data recipient can decrypt the encrypted key information according to the private key information, and then decrypt the encrypted cross-chain data through the second security zone based on the decrypted encryption key to obtain the user's privacy data.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the secure cross-chain method for user privacy data as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the secure cross-chain method for user privacy data as described in any one of claims 1 to 7 are implemented.