A method and system for secure cross-chain data sharing based on multi-key homomorphic encryption

CN117640077BActive Publication Date: 2026-08-14SOUTH CHINA UNIV OF TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

现有跨链数据安全共享技术不能很好的解决跨链数据的隐私性、可用性、安全性等多种问题

Benefits of technology

[0040]1.本发明提出在目标链上采用多密钥同态加密技术进行隐私计算的方法,在抵御外部恶意攻击的同时,也能抵抗个别好奇参与者的攻击,显著降低了通信和计算成本,避免了私有数据在跨链多次传输过程中泄露的风险;对于N个参与节点,该技术对于K<N-1个好奇参与者与计算网路之间的联合攻击也具有鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117640077B_ABST
    Figure CN117640077B_ABST
Patent Text Reader

Abstract

This invention discloses a cross-chain data security sharing method based on multi-key homomorphic encryption, comprising: application chain registration: the source chain and the target chain respectively initiate registration requests to the relay chain through the gateway node, and the relay chain returns their respective application chain IDs after completing the registration; data query: the source chain data requester initiates a cross-chain data query transaction to the relay chain, the relay chain verifies the transaction and performs chain information query, and returns the result; session key negotiation: the source chain data requester initiates a cross-chain data sharing request, and after the gateway node verifies it for the first time, it initiates a key negotiation transaction to the relay chain, and the source chain and the target chain negotiate the key to obtain a session key; privacy computation: the source chain sends a key-encrypted data computation transaction to the target chain through the relay chain, the target chain performs privacy computation using multi-key homomorphic encryption, and returns the computation result to the source chain; cross-chain verification: after receiving the privacy computation result, the source chain data requester verifies the correctness of the privacy computation result through homomorphic hashing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and more specifically, to a method and system for secure cross-chain data sharing based on multi-key homomorphic encryption. Background Technology

[0002] Blockchain is a decentralized distributed ledger technology with characteristics such as traceability, immutability, anonymity, and transparency. Based on these characteristics, various blockchain systems have been established in different industries, including finance, supply chain, transportation, and healthcare. However, with more and more data or data mappings stored on different blockchain systems, and the heterogeneity between different blockchains leading to data silos, data cannot flow securely and efficiently between different blockchains. The emergence of cross-chain technology aims to break down these information silos. In cross-chain data security sharing, how to promote data flow while protecting data privacy has become a major research hotspot and challenge.

[0003] Multi-key homomorphic encryption (MKH) allows multiple users to encrypt messages using their own keys, and the resulting ciphertext can be used together in homomorphic computations. Homomorphic hashing enables the computation and comparison of data without exposing the original data. Specifically, certain calculations can be performed on a hash value, yielding the same result as performing the same calculations on the original data.

[0004] Currently, mainstream cross-chain technologies include hash locking, notary mode, and sidechain / relay mode. Compared to hash locking and notary mode, sidechain / relay mode supports a wider range of cross-chain types and has a relatively simpler design. In cross-chain data sharing, ensuring data flow while protecting data privacy is crucial. Current cross-chain research focuses more on specific application scenarios, such as using cross-chain mechanisms to enhance federated learning. Research on cross-chain data sharing is mostly from the perspective of the consensus layer or network layer, with relatively little research on more efficient data sharing and utilization from a data perspective. Existing cross-chain data security sharing technologies cannot effectively address various issues related to privacy, availability, and security of cross-chain data. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a method and system for secure cross-chain data sharing based on multi-key homomorphic encryption, which effectively solves the problems of privacy, availability and security in cross-chain data sharing.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A method for secure cross-chain data sharing based on multi-key homomorphic encryption includes the following steps:

[0008] S1: Application Chain Registration: The source chain and the target chain respectively initiate registration requests to the relay chain through the gateway node. After the relay chain completes the relevant registration, it returns their respective application chain IDs.

[0009] S2: Data Query: The source chain data requester initiates a cross-chain data query transaction to the relay chain through the gateway node. The relay chain verifies the data query transaction, performs chain information query, and returns the query result to the data requester.

[0010] S3: Session Key Negotiation: The source chain data requester initiates a cross-chain data sharing request. After the gateway node performs the initial verification, it initiates a key negotiation transaction with the relay chain. The source chain and the target chain negotiate the key to obtain the session key.

[0011] S4: Privacy Computation: The source chain sends data encrypted with the session key to the target chain to perform transaction computation. The target chain uses multi-key homomorphic encryption to perform privacy computation and returns the privacy computation result to the source chain through the relay chain.

[0012] S5: Cross-chain verification: After receiving the privacy computation result, the source chain data requester verifies the correctness of the privacy computation result through homomorphic hashing.

[0013] Furthermore, the source chain, target chain, and relay chain can be any consortium chain.

[0014] Furthermore, the relay chain deploys a smart contract Cinfo for logging in and querying chain information, and a smart contract CCMsg for recording and querying cross-chain log messages.

[0015] Furthermore, data querying specifically includes:

[0016] The data requester initiates an intra-chain transaction to the gateway node within the source chain, requesting the construction of a cross-chain data query transaction. The gateway node initiates a cross-chain data query transaction TXque to the relay chain. After receiving the cross-chain data query transaction TXque, the relay chain first verifies the correctness of the transaction. If the verification is successful, it calls the smart contract Cinfo to query the chain information and returns the result.

[0017] Furthermore, session key negotiation specifically includes:

[0018] S31. The source chain gateway node initiates a session key negotiation transaction to the relay chain. The relay chain first verifies the correctness of the transaction, then calls the smart contract to record the transaction information, and finally sends a key negotiation message to the target chain and the source chain.

[0019] S32. The source chain gateway node randomly generates UUID1, performs asymmetric encryption using the target chain's public key to obtain Enc1, and sends Enc1 to the relay chain. At the same time, the target chain gateway node randomly generates UUID2, performs asymmetric encryption using the source chain's public key to obtain Enc2, and sends Enc2 to the relay chain.

[0020] S33. The relay chain then sends Enc2 to the source chain and Enc1 to the target chain. After receiving Enc2 and Enc1, the source chain and the target chain decrypt them with their own private keys to obtain UUID2 and UUID1, and verify their validity. Finally, the source chain and the target chain use UUID1 and UUID2 as inputs for key generation to obtain the session key.

[0021] Furthermore, privacy-preserving computation specifically includes:

[0022] S41. The source chain gateway node sends a data computation task transaction to the relay chain. The relay chain first verifies the correctness of the transaction and adds the transaction record to the smart contract. Then, it sends the transaction to the target chain gateway node. After decryption, the target chain gateway node calls the smart contract to start the computation task in the transaction.

[0023] S42. The smart contract on the target chain assigns a number to the data computation task and returns the number to the gateway node of the target chain. At the same time, it starts timing according to the value of TimeToWait. The gateway node will package the computation task according to the task number and broadcast it to all data providers and computing networks in the target chain.

[0024] S43. All data providers on the target chain choose whether to join the data sharing group based on the received data task request. If they join, the data provider initiates an in-chain transaction. When the countdown ends and the minimum number of nodes required to participate in the data sharing task is met, the smart contract will notify the computing network and all data providers to start multi-key homomorphic encryption computation.

[0025] S44. After the calculation is completed, the target chain gateway node verifies and records the result through the relay chain and transmits it to the source chain.

[0026] Furthermore, cross-chain verification specifically includes:

[0027] After receiving the privacy computation result, the source chain data requester matches the result obtained by homomorphically hashing the hash values ​​of the private data of all data providers in the target chain with the computation result value recorded in each round in the returned data packet. If they match, it means that the privacy computation result is correct.

[0028] A cross-chain data security sharing system based on multi-key homomorphic encryption, employing any one of the aforementioned methods for cross-chain data security sharing based on multi-key homomorphic encryption, includes:

[0029] A registration and verification module for providing application chain identity registration, cross-chain identity authentication, cross-chain resource location, and cross-chain message recording and verification;

[0030] A privacy encryption module for providing encryption services for cross-chain data and private data to ensure privacy security;

[0031] A calculation module for performing privacy calculations on multi-party data of the target chain according to the requests of data requesters and outputting and transmitting the calculation results to the source chain;

[0032] A verification module for verifying the privacy calculation results.

[0033] Furthermore, the registration and verification module includes:

[0034] A cross-chain verification unit for cross-chain information logging, querying, and verification;

[0035] A registration query unit for application chain information registration, login, and query.

[0036] Furthermore, the privacy encryption module includes:

[0037] A transmission encryption unit for encrypting the data transmitted between the source chain and the target chain;

[0038] A calculation encryption unit for the data provider to encrypt its own private data for privacy calculations.

[0039] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0040] 1. The present invention proposes a method for performing privacy calculations using multi-key homomorphic encryption technology on the target chain. While resisting external malicious attacks, it can also resist attacks by individual curious participants, significantly reducing communication and calculation costs, and avoiding the risk of private data leakage during multiple cross-chain transmissions; for N participating nodes, this technology is also robust against joint attacks between K < N - 1 curious participants and the computing network.

[0041] 2. The shared calculation results received by the data requester on the source chain of the present invention can be compared with the hash values of the private data provided by the participants on the target chain in the return message, and then the correctness of the cross-chain calculation results can be judged, ensuring the accuracy of the cross-chain data sharing calculation results.

[0042] 3. The complete records of data sharing transactions between application chains of the present invention are stored on the relay chain, ensuring the traceability of transactions. At the same time, application chains negotiate session keys through asymmetric encryption for data communication, ensuring the confidentiality of data, and providing a cross-chain communication protocol to achieve secure data sharing between consortium chains. Attached Figure Description

[0043] Figure 1 This is the overall topology diagram of a cross-chain data security sharing method based on multi-key homomorphic encryption.

[0044] Figure 2 This is a flowchart of the application chain registration phase.

[0045] Figure 3 This is a flowchart of the application chain data query phase.

[0046] Figure 4 This is a flowchart of the application chain inter-session key negotiation phase.

[0047] Figure 5 Flowchart for the data sharing privacy computation and cross-chain verification phases.

[0048] Figure 6 Flowchart of the algorithm for verifying the correctness of cross-chain data calculation results. Detailed Implementation

[0049] The following description, in conjunction with the accompanying drawings and specific embodiments, further illustrates the present invention's method and system for secure cross-chain data sharing based on multi-key homomorphic encryption.

[0050] Please see Figure 1 This invention discloses a method for secure cross-chain data sharing based on multi-key homomorphic encryption, comprising the following steps:

[0051] S1: Application Chain Registration: The source chain and the target chain respectively initiate registration requests to the relay chain through the gateway node. After the relay chain completes the relevant registration, it returns their respective application chain IDs.

[0052] S2: Data Query: The source chain data requester initiates a cross-chain data query transaction to the relay chain through the gateway node. The relay chain verifies the data query transaction, performs chain information query, and returns the query result to the data requester.

[0053] S3: Session Key Negotiation: The source chain data requester initiates a cross-chain data sharing request. After the gateway node performs the initial verification, it initiates a key negotiation transaction with the relay chain. The source chain and the target chain negotiate the key to obtain the session key.

[0054] S4: Privacy Computation: The source chain sends data encrypted with the session key to the target chain to perform transaction computation. The target chain uses multi-key homomorphic encryption to perform privacy computation and returns the privacy computation result to the source chain via the relay chain.

[0055] S5: Cross-chain verification: After receiving the privacy computation result, the source chain data requester verifies the correctness of the privacy computation result through homomorphic hashing.

[0056] In common blockchain implementations, the data requester (DR) and the data provider (DP) reside on different application chains. This invention refers to the application chain where the data provider resides as the target chain, the chain where the data requester resides as the source chain, and the computation network (CN) as composed of one or more computationally capable nodes on the target chain.

[0057] Please see Figure 1 This embodiment describes a cross-chain data sharing request whereby a source chain data request (DR) node publishes a request that requires data from multiple nodes on the target chain, performs a summation calculation on the target chain, and then returns the calculation result to the source chain data request (DR) node. This invention divides the cross-chain data sharing process into five steps: application chain registration, data query, session key negotiation, privacy computation, and cross-chain verification.

[0058] Application Chain Registration

[0059] Please see Figure 2 The source chain is a consortium blockchain. It selects a node with a high credit rating as the gateway node to send a source chain registration transaction request to the relay chain. The transaction information includes data fields such as source chain attributes, address, and public key (PubKey). The relay chain then replies to the source chain with the source chain ID and a registration success message, and stores the corresponding information in the relay chain's smart contract (Cinfo) used for logging in and querying chain information. The target chain is also a consortium blockchain. The chain registration steps are repeated to obtain the target chain ID.

[0060] Data Query

[0061] Please see Figure 3 Before the source chain gateway node initiates a cross-chain data sharing request, the data request (DR) node on the source chain needs to query the relay chain to determine whether the target chain has the data it needs and the available data types, or which chains meet its data requirements.

[0062] In this embodiment, the data request (DR) node initiates an intra-chain transaction to the gateway node within the source chain, requesting the construction of a cross-chain data query transaction. Then, the gateway node initiates a cross-chain data query transaction (TXque) to the relay chain. After receiving the data query transaction (TXque), the relay chain first verifies the correctness of the transaction. After successful verification, it calls the smart contract (Cinfo) to query the chain information and returns the result.

[0063] Session key negotiation

[0064] Please see Figure 4Before a Data Request (DR) node initiates a cross-chain data sharing transaction through the source chain's cross-chain gateway node, the gateway node checks whether it is sending a cross-chain request to the target chain for the first time. If so, the gateway node will initiate a session key negotiation transaction (TXsha(pre)). After obtaining the session key (SesKey), the source chain and the target chain will encrypt the transaction information using the session key (SesKey). The relay chain is responsible for forwarding the ciphertext but cannot access the transaction information, thus ensuring the security of the cross-chain transaction.

[0065] In this embodiment, the session key negotiation phase specifically includes:

[0066] S31. The source chain gateway node initiates a TXsha(pre) and sends it to the relay chain. The relay chain first verifies the correctness of the transaction, then calls the smart contract (CCMsg) used for cross-chain log message recording and querying to record the transaction information, and finally sends a key negotiation message to the target chain and the source chain. The message includes the public keys PubKey1 and PubKey2 of both chains.

[0067] S32. The source chain gateway node randomly generates UUID1 and performs asymmetric encryption using the target chain's public key to obtain Enc1, where Enc1 = EncPubKey2(UUID1|T1), and T1 is the timestamp. Enc1 is then sent to the relay chain. Simultaneously, the target chain gateway node randomly generates UUID2 and performs asymmetric encryption using the source chain's public key to obtain Enc2, where Enc2 = EncPubKey1(UUID1|T2), and T2 is the timestamp. Enc2 is then sent to the relay chain.

[0068] S33. The relay chain then sends Enc2 to the source chain and Enc1 to the target chain. After receiving Enc2 and Enc1, the source chain and the target chain decrypt them with their own private keys to obtain UUID2 and UUID1, and verify their validity. Finally, the source chain and the target chain use UUID1 and UUID2 as inputs for key generation to obtain SesKey respectively.

[0069] Privacy Computing

[0070] Please see Figure 5 The source chain gateway node sends a data computation task transaction (TXsha(to)) encrypted with a session key (SesKey) to the target chain via the relay chain, specifying a waiting time. All data providers (DPs) on the target chain perform privacy computations using multi-key homomorphic encryption, obtain the results, and return them to the source chain gateway node via the relay chain. By employing multi-key homomorphic encryption for privacy computations on the target chain, data becomes available but invisible, ensuring data availability and privacy, and avoiding the risk of leakage during cross-chain transmission of private data.

[0071] In this embodiment, the privacy computation phase specifically includes:

[0072] S41. The source chain gateway node sends a TXsha(to) to the relay chain. The relay chain first verifies the correctness of the transaction and adds the transaction record to the smart contract (CCMsg). Then, it sends the transaction to the target chain gateway node. After decryption, the target chain gateway node calls the smart contract (Calc) used for privacy-preserving computation of the data to start the computation task in the transaction.

[0073] The computation task includes the following parameters: {PKDR, Data, CalcContent, Members, TimeToWait}. PKDR represents the public key of the source chain's Data Request (DR) node; Data is the content of the data requested by the Data Request (DR) node; CalcContent is the operation on the private data of the Data Provider (DP), which can be any computational function; in this example, it refers to a summation function; Members represents the number of participants required, which can be a specific data owner or a group of data owners; in this example, it refers to a group of data owners; and TimeToWait is the maximum waiting time for computation.

[0074] S42. The smart contract (Calc) on the target chain assigns a number to the data computation task and returns the number to the gateway node of the target chain. At the same time, it starts timing according to the value of TimeToWait. The gateway node will package the computation task according to the task number and broadcast it to all data providers (DP) and computation networks (CN) in the target chain.

[0075] S43. The data provider (DP) node on the target chain chooses whether to join the data sharing computation group based on the received data task request. If it joins, the data provider (DP) initiates an in-chain transaction and calls the smart contract (Calc) to join the data sharing computation group. When the countdown ends and the minimum number of nodes required to participate in the data sharing task is met, the smart contract (Calc) will notify the computing network (CN) and all data providers (DP) to start the multi-key homomorphic cryptographic summation computation.

[0076] S44. After all calculations are completed, all data providers (DPs) participating in the summation calculation will calculate the correct proof of their private data using a homomorphic hash algorithm. Subsequently, the computation network (CN) submits the summation calculation result to the smart contract (Calc), and all data providers (DPs) also submit their correct proofs to the smart contract (Calc).

[0077] S45. The gateway node constructs a TXsha (back) transaction, verifies and records it through the relay chain, transmits it to the source chain, and returns the final calculation result to the data requester (DR).

[0078] Cross-chain verification

[0079] After receiving the computation result, the Data Request (DR) node verifies the correctness of the result using the returned data packet information and responds. This completes a full cross-chain data sharing request. Throughout the cross-chain process, none of the Data Requests (DRs) are aware of the correctness of the computation result, and the Computation Network (CN) may not perform the summation computation as required. Therefore, homomorphic hashing is proposed to verify the computation result, ensuring the accuracy of privacy-preserving cross-chain computations involving multiple parties.

[0080] In this embodiment, the cross-chain verification phase specifically includes: the data requester (DR) receives a returned data containing the hash values ​​(Correctproof-list) of the private data of all data providers (DPs). The data requester (DR) performs homomorphic hashing on this data, and matches the result with the calculation result (Re) value recorded in each round of the returned data packet. If they match, it indicates that the calculation result is correct. The specific verification algorithm is as follows: Figure 6 As shown.

[0081] Considering the differences in consensus algorithms and signature verification methods among heterogeneous application chains, this invention proposes a universal cross-chain messaging protocol to ensure compatibility between various heterogeneous application chains. This protocol is used for interaction between application chains and relay chains, as well as for interaction between multi-level relay chain clusters.

[0082] The cross-chain data format is shown in Table 1.

[0083] Table 1 Cross-chain data format

[0084]

[0085] The data information is described in Table 2.

[0086] Table 2 Data Information Description

[0087]

[0088] This invention also discloses a cross-chain data security sharing system based on multi-key homomorphic encryption, employing any of the aforementioned methods for cross-chain data security sharing based on multi-key homomorphic encryption, comprising: a registration and verification module for providing application chain identity registration, cross-chain identity authentication, cross-chain resource location, and cross-chain message recording and verification; a privacy encryption module for providing encryption services for cross-chain data and private data to ensure privacy and security; a calculation module for performing privacy calculations on multi-party data of the target chain according to the request of the data requester, and outputting the calculation results to the source chain; and a verification module for verifying the privacy calculation results.

[0089] The computation module consists of a group of nodes that provide computation services for cross-chain data; these can be any one or more nodes with computational capabilities. The registration and verification module includes: a cross-chain verification unit for recording, querying, and verifying cross-chain information logs; and a registration query unit for registering, logging in, and querying application chain information. The privacy encryption module includes: a transmission encryption unit for encrypting data transmitted between the source and target chains; and a computation encryption unit for data providers to encrypt their own private data for privacy-preserving computation.

[0090] The cross-chain data security sharing system based on multi-key homomorphic encryption of the present invention can execute the cross-chain data security sharing method based on multi-key homomorphic encryption of the present invention, and can execute any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method.

[0091] Although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the system disclosed herein, the actual implementation of the module will be understood within the scope of conventional art for an engineer. Therefore, those skilled in the art can implement the invention set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0092] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., all kinds of media that can store program codes.

[0093] More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts (electronic devices) with one or more wirings, portable computer disk cartridges (magnetic devices), random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). Additionally, the computer-readable media can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or processing it in other suitable ways when necessary, and then storing it in a computer memory.

[0094] Each part of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, any one or a combination of the following techniques well-known in the art can be used: discrete logic circuits with logic gate circuits for implementing logic functions on data signals, application-specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0095] In summary, the present invention has the following advantages and beneficial effects:

[0096] 1. The present invention proposes a method for privacy computing using multi-key homomorphic encryption technology on the target chain. While resisting external malicious attacks, it can also resist attacks by individual curious participants, significantly reducing communication and computing costs, and avoiding the risk of leakage of private data during multiple cross-chain transmissions; for N participating nodes, this technology is also robust against joint attacks between K < N - 1 curious participants and the computing network.

[0097] 2. The shared computation results received by the data requester on the source chain in this invention can be compared with the private data hash value provided by the participating computationer on the target chain in the returned message, thereby determining the correctness of the cross-chain computation results and ensuring the accuracy of the cross-chain data sharing computation results.

[0098] 3. This invention applies the complete recording of data sharing transactions between application chains on the relay chain, ensuring transaction traceability. At the same time, application chains negotiate session keys for data communication through asymmetric encryption, ensuring data confidentiality and providing a cross-chain communication protocol to achieve secure data sharing between consortium chains.

[0099] The above description is a detailed description of the preferred embodiments of the present invention. However, the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modifications made under the technical spirit disclosed in the present invention should fall within the patent scope covered by the present invention.

Claims

1. A method for secure cross-chain data sharing based on multi-key homomorphic encryption, characterized in that, Includes the following steps: S1: Application Chain Registration: The source chain and the target chain respectively initiate registration requests to the relay chain through the gateway node. After the relay chain completes the relevant registration, it returns their respective application chain IDs. S2: Data Query: The source chain data requester initiates a cross-chain data query transaction to the relay chain through the gateway node. The relay chain verifies the data query transaction, performs chain information query, and returns the query result to the data requester. S3: Session Key Negotiation: The source chain data requester initiates a cross-chain data sharing request. After the gateway node performs the initial verification, it initiates a key negotiation transaction with the relay chain. The source chain and the target chain negotiate the key to obtain the session key. S4: Privacy Computation: The source chain sends data encrypted with the session key to the target chain to perform transaction computation. The target chain uses multi-key homomorphic encryption to perform privacy computation and returns the privacy computation result to the source chain through the relay chain. S5: Cross-chain verification: After receiving the privacy computation result, the source chain data requester verifies the correctness of the privacy computation result through homomorphic hashing.

2. The method for secure cross-chain data sharing based on multi-key homomorphic encryption according to claim 1, characterized in that, The source chain, target chain, and relay chain can be any consortium chain.

3. The cross-chain data secure sharing method based on multi-key homomorphic encryption according to claim 1, characterized in that, The relay chain deploys a smart contract Cinfo for logging in and querying chain information, and a smart contract CCMsg for recording and querying cross-chain log messages.

4. The method for secure cross-chain data sharing based on multi-key homomorphic encryption according to claim 1, characterized in that, Data queries specifically include: The data requester initiates an intra-chain transaction to the gateway node within the source chain, requesting the construction of a cross-chain data query transaction. The gateway node initiates a cross-chain data query transaction TXque to the relay chain. After receiving the cross-chain data query transaction TXque, the relay chain first verifies the correctness of the transaction. If the verification is successful, it calls the smart contract Cinfo to query the chain information and returns the result.

5. The cross-chain data secure sharing method based on multi-key homomorphic encryption according to claim 1, characterized in that, Session key negotiation, specifically including: S31. The source chain gateway node initiates a session key negotiation transaction to the relay chain. The relay chain first verifies the correctness of the transaction, then calls the smart contract to record the transaction information, and finally sends a key negotiation message to the target chain and the source chain. S32. The source chain gateway node randomly generates UUID1, performs asymmetric encryption using the target chain's public key to obtain Enc1, and sends Enc1 to the relay chain. At the same time, the target chain gateway node randomly generates UUID2, performs asymmetric encryption using the source chain's public key to obtain Enc2, and sends Enc2 to the relay chain. S33. The relay chain then sends Enc2 to the source chain and Enc1 to the target chain. After receiving Enc2 and Enc1, the source chain and the target chain decrypt them with their own private keys to obtain UUID2 and UUID1, and verify their validity. Finally, the source chain and the target chain use UUID1 and UUID2 as inputs for key generation to obtain the session key.

6. The cross-chain data secure sharing method based on multi-key homomorphic encryption according to claim 1, characterized in that, Privacy-preserving computation specifically includes: S41. The source chain gateway node sends a data computation task transaction to the relay chain. The relay chain first verifies the correctness of the transaction and adds the transaction record to the smart contract. Then, it sends the transaction to the target chain gateway node. After decryption, the target chain gateway node calls the smart contract to start the computation task in the transaction. S42. The smart contract on the target chain assigns a number to the data computation task and returns the number to the gateway node of the target chain. At the same time, it starts timing according to the value of TimeToWait. The gateway node will package the computation task according to the task number and broadcast it to all data providers and computing networks in the target chain. S43. All data providers on the target chain choose whether to join the data sharing group based on the received data task request. If they join, the data provider initiates an in-chain transaction. When the countdown ends and the minimum number of nodes required to participate in the data sharing task is met, the smart contract will notify the computing network and all data providers to start multi-key homomorphic encryption computation. S44. After the calculation is completed, the target chain gateway node verifies and records the result through the relay chain and transmits it to the source chain.

7. The method for secure cross-chain data sharing based on multi-key homomorphic encryption according to claim 1, characterized in that, Cross-chain verification specifically includes: After receiving the privacy computation result, the source chain data requester matches the result obtained by homomorphically hashing the hash values ​​of the private data of all data providers in the target chain with the computation result value recorded in each round in the returned data packet. If they match, it means that the privacy computation result is correct.

8. A cross-chain data security sharing system based on multi-key homomorphic encryption, employing the cross-chain data security sharing method based on multi-key homomorphic encryption as described in any one of claims 1 to 7, characterized in that, include: The registration and verification module is used to provide application chain identity registration, cross-chain identity authentication, cross-chain resource location, and cross-chain message recording and verification. The privacy encryption module is used to provide encryption services for cross-chain data and private data to ensure privacy and security. The computation module is used to perform privacy-preserving computations on multi-party data of the target chain according to the request of the data requester, and output the computation results to the source chain. The verification module is used to verify the results of privacy-preserving computations.

9. The cross-chain data security sharing system based on multi-key homomorphic encryption according to claim 8, characterized in that, The registration verification module includes: Cross-chain verification unit is used for cross-chain information log recording, querying, and verification; The registration and query unit is used for application chain information registration, login, and query.

10. The cross-chain data security sharing system based on multi-key homomorphic encryption according to claim 8, characterized in that, The privacy encryption module includes: A transmission encryption unit is used to encrypt data transmitted between the source chain and the target chain; The computation encryption unit is used by data providers to encrypt their own private data for privacy computing.