Cross-chain data interaction privacy protection method based on homomorphic encryption

By using Paillier homomorphic encryption technology to encrypt data in blockchain cross-chain transactions, the problem of privacy data leakage in cross-chain transactions is solved, the privacy protection of cross-chain data interaction is realized, and the blockchain system is improved Security.

CN119026170APending Publication Date: 2024-11-26JIANGSU AUTOMATION RESEARCH INSTITUTE +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411175287.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

There is a risk of privacy data leakage in blockchain cross-chain transactions. The existing privacy protection solutions are mainly aimed at single-chain transactions and are not suitable for cross-chain scenarios, resulting in transaction privacy that may be acquired by other users during the relay chain transmission process.

Method used

Using a cross-chain data interaction method based on homomorphic encryption, data is encrypted by generating a Paillier homomorphic encryption key, and encrypted and decrypted using homomorphic public and private keys during cross-chain transmission to ensure that data is transmitted Safety in the process.

Benefits of technology

有效保护了跨链交易中的隐私数据,防止未经授权的用户获取明文数据,提高了区块链系统的安全性和隐私保护能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026170A_ABST
    Figure CN119026170A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-chain data interaction privacy protection method based on homomorphic encryption, and the main design idea of the method is as follows: a data sender firstly performs homomorphic encryption processing on data to be transmitted by the data sender, and then initiates cross-chain data interaction by using ciphertext data; the relay link receives a cross-chain transaction request from the transaction initiating chain, verifies the validity of the cross-chain transaction request and transfers the cross-chain transaction request to the transaction receiving chain, and a data receiver receives ciphertext data and then performs homomorphic decryption processing on the ciphertext data to obtain plaintext data before encryption so as to complete cross-chain data acquisition. According to the method, the data transmitted by the data sender is encrypted by adopting the Paillier homomorphic encryption algorithm, cross-chain data interaction is realized under the condition of not exposing original data, privacy protection in the cross-chain data interaction is realized, privacy data collection for the cross-chain data interaction can be effectively prevented, and privacy data of a user in the cross-chain data interaction can be successfully protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of blockchain security technology, and in particular relates to a cross-chain data interaction privacy protection method based on homomorphic encryption. Background Art

[0002] The blockchain supply chain system is an innovative model that uses blockchain technology to achieve supply chain management. It can improve the transparency, efficiency and trust of the supply chain and reduce costs and risks. The emergence of cross-chain technology breaks the information isolation between blockchains and realizes information exchange and data circulation between different chains. However, due to the openness and transparency of blockchains, there is inevitably a problem of transaction privacy leakage when blockchains are running. There are more different risks of transaction privacy leakage in the cross-chain process. This problem limits the further research and development of blockchain and cross-chain technology. In the current blockchain privacy protection scheme, most of them only protect the transaction privacy on a single chain, which is not suitable for cross-chain transaction scenarios.

[0003] Some domestic units have developed blockchain cross-chain collaboration platforms, such as BitXHub, which can support the interoperation between applications and multiple chains, and the interoperation between homogeneous / heterogeneous chains, overcome the difficulties of obtaining transactions, information transmission and identity authentication in the cross-chain process of heterogeneous chains, and allow data intercommunication between heterogeneous blockchains. However, in the cross-chain scenario, the relay chain of the existing blockchain cross-chain collaboration platform needs to record the cross-chain requests initiated by different application chains. These cross-chain requests are encapsulated in the form of IBTP and transmitted between the application chain and the relay chain. During the transmission process, when these transaction information passes through the relay chain, they will be recorded and saved by the relay chain and sent to all other nodes for consensus. Therefore, these cross-chain transactions are visible to all application chains connected to the relay chain. In this case, if the cross-chain transaction initiated by the application chain user contains private data, these data will not only be leaked on the chain where they are located, but also may be obtained by users on other application chains connected to the cross-chain system, which may cause greater harm. Therefore, it is necessary to design a cross-chain data interaction privacy protection method based on homomorphic encryption to protect the user's cross-chain transaction privacy from being obtained by other users. Summary of the invention

[0004] The purpose of the present invention is to solve the problems raised in the above-mentioned background technology and provide a cross-chain data interaction privacy protection method based on homomorphic encryption.

[0005] In order to achieve the purpose of the present invention, the present invention discloses a cross-chain data interaction privacy protection method based on homomorphic encryption, comprising the following steps:

[0006] Step 1: Generate homomorphic encryption key;

[0007] Step 2: Encryption and sending cross-chain transactions: The data sender performs homomorphic encryption on the data to be transmitted, and then uses the encrypted data to initiate cross-chain data interaction;

[0008] Step 3: The relay chain transfers cross-chain transactions: The relay chain receives the cross-chain data interaction request from the transaction initiation chain, and transfers it to the transaction receiving chain after verification;

[0009] Step 4: Receive cross-chain transactions and decrypt: The data recipient performs homomorphic decryption on the data it receives, obtains the plaintext data before encryption, and completes the transaction.

[0010] Furthermore, in steps 1 and 2, the data sender encrypts the data to be transmitted using the homomorphic public key, and then uses the encrypted data as a contract parameter to call the method of initiating a cross-chain transaction on the cross-chain business contract on the source chain; after the cross-chain business contract is called, the cross-chain management contract is called through the cross-contract to formally throw out a cross-chain request; after the cross-chain request is thrown out, the cross-chain request will be captured by the regular retrieval of the plug-in connecting the source chain and the cross-chain gateway, and then the plug-in will submit the cross-chain request to the gateway.

[0011] Furthermore, in steps 3 and 4, after the gateway of the destination chain receives the cross-chain transaction from the source chain, it is first passed to the cross-chain management contract on the destination chain through the plug-in connecting the destination chain and the cross-chain gateway; the cross-chain management contract then calls the cross-chain business contract through the cross-contract and passes the request to the data recipient; at this time, the data recipient receives the encrypted ciphertext data sent by the data sender; the received ciphertext is calculated using the homomorphic private key.

[0012] Furthermore, the specific steps of step 1 are as follows:

[0013] Using the key of Paillier homomorphic encryption, randomly select two large prime numbers p and q, calculate n = pq, λ = lcm(p-1,q-1), where lcm(a,b) represents the least common multiple of a and b; then select a random parameter g, So that g satisfies

[0014] gcd(L(g λ mod n 2 ),n)=1,

[0015] in, Thus, the generated homomorphic public key pk is (n, g), and the homomorphic private key sk is λ; after the homomorphic key pair is generated, the encryption module in the Paillier method module is used to encrypt the data to be encrypted, and then the decryption module is used to decrypt the encrypted data.

[0016] Furthermore, the specific steps of step 2 are as follows:

[0017] Randomly select an integer r, use the homomorphic public key (n, g) to encrypt the data s that the data sender needs to transmit, and the corresponding ciphertext h is:

[0018] h=g s ·r n mod n 2

[0019] The Paillier algorithm satisfies the properties of additive homomorphism, and the relationship it satisfies is as follows:

[0020]

[0021] When the same plaintext s is encrypted using the same homomorphic encryption public key pk, the calculated ciphertext h may be different due to the randomness of the selection of r; this does not affect subsequent related operations on the ciphertext, nor does it affect direct decryption. After decryption and restoration, it is still the same plaintext s. This property can ensure the security of the ciphertext and prevent it from being cracked.

[0022] The data sender uses its own ciphertext data as a contract parameter on application chain A, and calls the method of initiating a cross-chain transaction on the cross-chain business contract on application chain A. This step is the trigger point for cross-chain communication, causing the data to leave application chain A and enter the cross-chain communication process. After the cross-chain business contract is called, the cross-chain management contract is called through a cross-contract to formally throw out a cross-chain request. After the cross-chain request is thrown out, the cross-chain request will be captured by the regular retrieval of the plug-in connecting application chain A and the cross-chain gateway. The plug-in acts as a bridge for data, capturing and forwarding the cross-chain request to the cross-chain gateway.

[0023] Furthermore, the specific steps of step 3 are as follows:

[0024] After the plug-in of application chain A submits the cross-chain request on the chain to the gateway, the gateway encapsulates the received cross-chain request into a cross-chain transmission protocol, which helps to transfer data and operations between different chains; the cross-chain transmission protocol contains detailed information of the request, such as the source chain ID, the destination chain ID, the cross-chain call content encoding and other necessary parameters; the cross-chain transmission protocol data structure is designed to facilitate the verification and routing of cross-chain messages, so a unified format is required. Its specific data structure is shown in Table 1;

[0025] Table 1 Data structure of cross-chain transmission protocol

[0026]

[0027]

[0028] The Payload field is where the key information is stored. Users usually store the core transaction data that needs to be transferred across chains in this field. At this point, the transaction data is already in encrypted form. Since the transactions recorded on the relay chain are visible to all blockchains connected to the relay chain, users on other blockchains can see the transaction, but they can only see the encrypted data.

[0029] The encapsulated cross-chain request is submitted to the relay chain, which is responsible for connecting the intermediary of different chains. It receives and processes cross-chain requests from various application chains and is a chain that plays a bridge role in cross-chain communication. After receiving the request, the relay chain needs to verify the validity of the transaction and judge whether the transaction is credible through the cross-chain transaction proof of the cross-chain transmission protocol to ensure the legitimacy of the request. In addition, the relay chain will also determine whether the destination chain in the cross-chain transmission protocol has been registered. This is to ensure the security of cross-chain communication and prevent unauthorized chains from accessing the target chain. After verifying the validity of the transaction, the relay chain records the transaction and submits it to the gateway connected to the destination chain of the transaction. The destination chain gateway will further process the request and pass the data to the application chain B to achieve the ultimate goal of cross-chain data transmission and operation.

[0030] Furthermore, the specific steps of step 4 are as follows:

[0031] After the gateway of application chain B receives the cross-chain transaction from application chain A, it first passes it to the cross-chain management contract on application chain B through the plug-in connecting application chain B and the cross-chain gateway; the cross-chain management contract passes the cross-chain request to the cross-chain business contract on application chain B through cross-contract calls; after the cross-chain business contract receives the cross-chain request, it passes the data to the data recipient according to the content of the request; the data recipient receives the encrypted ciphertext data sent by the data sender; for the received ciphertext h, the homomorphic private key λ is used to calculate the plaintext s as:

[0032]

[0033] At this point, the transaction receiver successfully receives the data sent by the transaction sender, and the data is encrypted when it is transmitted on the relay chain;

[0034] For any given and L(ω λ mod n 2 ) is reversible modulo n, so we can calculate:

[0035]

[0036] According to the decomposition factors p and q of n, we can calculate λ=lcm(p-1,q-1); according to λ and the given g and ω, we can calculate [ω] g ; However, it is difficult to calculate when only n is known, because the difficulty of cracking the ciphertext is equivalent to the difficulty of factoring a large integer. When the number of digits in n is very large, it is very difficult to find the prime factors through calculation, which is a difficult problem.

[0037] Therefore, from the above analysis, it can be seen that during the data interaction process, other users cannot obtain the original data transmitted by the data sender through the homomorphic public key and encrypted data, while the data receiver can decrypt and obtain the correct initial data using the homomorphic private key.

[0038] Compared with the prior art, the significant progress of the present invention is: 1) a cross-chain data interaction privacy protection method based on homomorphic encryption is constructed. By using homomorphic encryption in the process of cross-chain data interaction, the data originally displayed openly and transparently on the relay chain is encrypted and hidden, while the correct implementation of data interaction can be ensured, thereby realizing privacy protection in cross-chain data interaction; 2) by simulating the process of cross-chain data interaction between two chains, it is found that the transmitted transaction data is already in an encrypted form, that is, a third-party user who does not participate in the transaction cannot observe the specific plaintext data from the relay chain while the transaction recipient can receive the plaintext data, and cannot know the specific data content transmitted between the two users. This method can effectively prevent the collection of privacy data for cross-chain data interaction and successfully protect the private data of users in cross-chain data interaction.

[0039] In order to more clearly illustrate the functional characteristics and structural parameters of the present invention, further description is given below in conjunction with the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0041] Figure 1 This is a method flow chart of a cross-chain data interaction privacy protection method based on homomorphic encryption;

[0042] Figure 2 This is a flow chart of initiating a cross-chain transaction of the present invention;

[0043] Figure 3 This is a flow chart of receiving cross-chain transactions according to the present invention. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all 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.

[0045] The present invention proposes a cross-chain data interaction privacy protection method based on homomorphic encryption. The Paillier algorithm adopted in the method is a typical cryptographic encryption algorithm based on the problem of determining the n-order residue class, and its ciphertext is difficult to crack; therefore, the execution process of the method is safe, and there is no private data transmitted via the relay chain known to other users; in addition, the method can still successfully perform cross-chain data interaction on different blockchains under the condition of data encryption; cross-chain technology can be effectively applied to multiple fields, such as finance, medical care, etc.; the present invention can help users protect their privacy data in the cross-chain process, prevent malicious users from collecting and analyzing sensitive information, and improve the security of the blockchain system.

[0046] Reference Figure 1 , a cross-chain data interaction privacy protection method based on homomorphic encryption mainly includes the following steps:

[0047] S100, generating a key for Paillier homomorphic encryption;

[0048] In both methods of verifying the legality of transactions, the amount needs to be added. A semi-homomorphic encryption algorithm with additive homomorphism is selected to protect the cross-chain privacy of blockchain. The principle of additive homomorphism is: when the initial values ​​x and y are unknown, the value of Enc(x+y) can be obtained by calculating Enc(x) and Enc(y). Applying this semi-homomorphic encryption algorithm that satisfies additive homomorphism to the transaction privacy protection of blockchain can not only protect the data from being obtained by others, but also verify the legality of transactions through other nodes.

[0049] The Paillier homomorphic encryption algorithm is a relatively mature solution, and it also has the best efficiency in the encryption and decryption processes. Therefore, the Paillier homomorphic encryption algorithm is selected to be applied to the cross-chain transaction privacy protection scheme of blockchain. While successfully protecting the privacy of cross-chain transactions without affecting the verification of the legitimacy of transactions, it can also ensure the high efficiency of cross-chain transactions.

[0050] First, randomly select two large prime numbers p and q, and calculate n = pq, λ = lcm(p-1,q-1), where lcm(a,b) represents the least common multiple of a and b. Then, select a random parameter g, So that g satisfies

[0051] gcd(L(g λ mod n 2 ),n)=1,

[0052] in, Thus, the generated homomorphic public key pk is (n,g), and the homomorphic private key sk is λ. After the homomorphic key pair is generated, the encryption module in the Paillier method module can be used to encrypt the data to be encrypted, and the decryption module can be used to decrypt the encrypted data.

[0053] S200, refer to Figure 2 , the data sender homomorphically encrypts the data it needs to transmit, and then uses the encrypted data to initiate cross-chain data interaction;

[0054] Specifically, the encryption process is as follows: randomly select an integer r, use the homomorphic public key (n, g) to encrypt the data s that the data sender needs to transmit, and obtain the corresponding ciphertext h:

[0055] h=g s ·r n mod n 2

[0056] The Paillier algorithm satisfies the properties of additive homomorphism, and the relationship it satisfies is as follows:

[0057]

[0058] In addition, when the same plaintext s is encrypted using the same homomorphic encryption public key pk, the calculated ciphertext h may be different due to the randomness of r. This does not affect the subsequent related operations of the ciphertext, nor does it affect direct decryption. After decryption and restoration, it is still the same plaintext s. This property can ensure the security of the ciphertext and make it difficult to be cracked.

[0059] The data sender uses its ciphertext data as a contract parameter on application chain A and calls the method of initiating a cross-chain transaction on the cross-chain business contract on application chain A. This step is the trigger point for cross-chain communication, which causes the data to leave application chain A and enter the cross-chain communication process. After the cross-chain business contract is called, the cross-chain management contract is called through the cross-contract to formally throw out the cross-chain request. After the cross-chain request is thrown, the request will be captured by the regular retrieval of the plug-in connecting application chain A and the cross-chain gateway. These plug-ins act as a bridge for data, capturing cross-chain requests and forwarding them to the cross-chain gateway for further processing. The entire process ensures that the data interaction between chain A and other blockchains is secure, reliable, and properly authorized.

[0060] S300, relay chain transmits cross-chain transactions;

[0061] Specifically, after the plug-in of application chain A submits the cross-chain request on the chain to the gateway, the gateway encapsulates the received cross-chain request into a cross-chain transmission protocol, which helps to transfer data and operations between different chains. The cross-chain transmission protocol contains detailed information of the request, such as the source chain ID, the destination chain ID, the cross-chain call content encoding, and other necessary parameters. The design of the cross-chain transmission protocol data structure is to facilitate the verification and routing of cross-chain messages, so a unified format is required. Its specific data structure is shown in Table 1. The Payload field stores key information. Users usually store the core transaction data that needs to be transferred across chains in this field. At this point, these transaction data are already in encrypted form. Since the transactions recorded on the relay chain are visible to all blockchains connected to the relay chain, users on other blockchains can see the transaction, but they can only see the encrypted data.

[0062] Table 1 Data structure of cross-chain transmission protocol

[0063] From Source chain ID To Destination chain ID Index Cross-chain transaction index Type IBTP Type Payload Cross-chain call content encoding Proof Cross-chain transaction proof Timestamp Cross-chain event timestamp Extra Custom fields

[0064] The encapsulated cross-chain request will be submitted to the relay chain. The relay chain is the intermediary responsible for connecting different chains. It receives and processes cross-chain requests from various application chains and is the chain that plays a bridge role in cross-chain communication. After the relay chain receives the request, it needs to verify the validity of the transaction. The cross-chain transaction proof of the cross-chain transmission protocol is used to determine whether the transaction is credible to ensure the legitimacy of the request. In addition, the relay chain will also determine whether the destination chain in the cross-chain transmission protocol has been registered. This is to ensure the security of cross-chain communication and prevent unauthorized chains from accessing the target chain. After verifying the validity of the transaction, the relay chain records the transaction and submits it to the gateway connected to the destination chain of the transaction. The destination chain gateway will further process the request and pass the data to the application chain B to achieve the ultimate goal of cross-chain data transmission and operation.

[0065] S400, refer to Figure 3 , the data recipient performs homomorphic decryption on the data it receives, obtains the plaintext data before encryption, and completes the transaction.

[0066] Specifically, after the gateway of application chain B receives the cross-chain transaction from application chain A, it first passes it to the cross-chain management contract on application chain B through the plug-in connecting application chain B and the cross-chain gateway. The cross-chain management contract will pass the cross-chain request to the cross-chain business contract on application chain B through a cross-contract call. After receiving the cross-chain request, the cross-chain business contract will pass the data to the data recipient according to the content of the request. At this time, the data recipient receives the encrypted ciphertext data sent by the data sender. For the received ciphertext h, using the homomorphic private key λ, the plaintext s can be calculated as:

[0067]

[0068] At this point, the transaction recipient successfully receives the data sent by the transaction sender, and the data is encrypted when transmitted on the relay chain.

[0069] For any given and L(ω λ mod n 2 ) is reversible modulo n, so we can calculate:

[0070]

[0071] As long as we know the decomposition factors p and q of n, we can calculate λ=lcm(p-1,q-1). Based on λ and the given g and ω, we can calculate [ω] g However, it is difficult to calculate when only n is known, because the difficulty of cracking the ciphertext is equivalent to the difficulty of factoring a large integer. When the number of digits in n is very large, it is very difficult to find the prime factors through calculation, which is a difficult problem.

[0072] Therefore, from the above analysis, it can be seen that during the data interaction process, other users cannot obtain the original data transmitted by the data sender through the homomorphic public key and encrypted data, while the data receiver can use the homomorphic private key to decrypt and obtain the correct initial data.

[0073] 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.

[0074] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A cross-chain data interaction privacy protection method based on homomorphic encryption, characterized in that: The following steps are involved: Step 1: Generate homomorphic encryption key; Step 2: Encryption and cross-chain transaction: The data sender performs homomorphic encryption on the data to be transmitted, and then uses the encrypted data to initiate cross-chain data interaction; Step 3. The relay chain transmits the cross-chain transaction: The relay chain receives the cross-chain data interaction request from the transaction initiation chain, verifies it, and transfers it to the transaction receiving chain; Step 4: Receive cross-chain transactions and decrypt them: The data recipient performs homomorphic decryption on the data they receive, obtains the plaintext data before encryption, and completes the transaction.

2. A cross-chain data interaction privacy protection method based on homomorphic encryption according to claim 1, characterized in that: In steps 1 and 2, the data sender encrypts the data to be transmitted using the homomorphic public key, and then uses the encrypted data as a contract parameter to call the method of initiating a cross-chain transaction on the cross-chain business contract on the source chain; After the cross-chain business contract is called, the cross-chain management contract is called through the cross-contract to formally send out a cross-chain request. After the cross-chain request is sent out, the cross-chain request will be captured by the regular search of the plug-in connecting the source chain and the cross-chain gateway, and then the plug-in will submit the cross-chain request to the gateway.

3. A cross-chain data interaction privacy protection method based on homomorphic encryption according to claim 2, characterized in that: In steps 3 and 4, after the destination chain’s gateway receives the cross-chain transaction from the source chain, it is first passed to the cross-chain management contract on the destination chain through the plug-in connecting the destination chain and the cross-chain gateway; The cross-chain management contract then calls the cross-chain business contract through a cross-contract and passes the request to the data recipient. At this point, the data recipient receives the encrypted ciphertext data sent by the data sender. For the received ciphertext, the plaintext is calculated using the homomorphic private key.

4. A cross-chain data interaction privacy protection method based on homomorphic encryption according to claim 1, characterized in that: Step 1 The specific steps are as follows: Using the Paillier homomorphic encryption key, randomly select two large prime numbers p and q, calculate n = pq, λ = lcm(p-1,q-1), where lcm(a,b) represents the least common multiple of a and b; then select a random parameter g, So that g satisfies gcd(L(g λ mod n 2 ),n)=1, in, Therefore, the generated homomorphic public key pk is (n, g), and the homomorphic private key sk is λ; after the homomorphic key pair is generated, the encryption module in the Paillier method module is used to encrypt the data to be encrypted, and then the decryption module is used to decrypt the encrypted data.

5. A cross-chain data interaction privacy protection method based on homomorphic encryption according to claim 4, characterized in that: Step 2: Randomly select an integer r and use the homomorphic public key (n, g) to encrypt the data s that the data sender needs to transmit. The corresponding ciphertext h is: h=g s ·r n mod n 2 The Paillier algorithm satisfies the properties of additive homomorphism, and the relations it satisfies are as follows: The data sender uses its own encrypted data as a contract parameter on Appchain A and calls the method for initiating a cross-chain transaction on the cross-chain business contract on Appchain A. This step is the trigger point for cross-chain communication, causing the data to leave Appchain A and enter the cross-chain communication process. After the cross-chain business contract is called, the cross-chain management contract is called through the cross-contract to formally throw a cross-chain request; after the cross-chain request is thrown, the cross-chain request will be captured by the regular retrieval of the plug-in connecting the application chain A and the cross-chain gateway; the plug-in acts as a data bridge, capturing the cross-chain request and forwarding it to the cross-chain gateway.

6. A cross-chain data interaction privacy protection method based on homomorphic encryption according to claim 5, characterized in that: Step 3: After the plug-in of application chain A submits the cross-chain request on the chain to the gateway, the gateway encapsulates the received cross-chain request into a cross-chain transmission protocol; the cross-chain transmission protocol contains detailed information of the request; The cross-chain transmission protocol data structure requires a unified format. The specific data structure is shown in Table 1. Table 1 Data structure of cross-chain transmission protocol The Payload field stores key information. Users store the core transaction data that needs to be transferred across chains in this field. At this point, this transaction data is already encrypted. Since transactions recorded on the relay chain are visible to all blockchains connected to the relay chain, users on other blockchains can see the transaction, but they can only see the encrypted data. The encapsulated cross-chain request is submitted to the relay chain, which is responsible for intermediary connection between different chains. After receiving the request, the relay chain needs to verify the validity of the transaction and determine whether the transaction is credible through the cross-chain transaction proof of the cross-chain transmission protocol. In addition, the relay chain also determines whether the destination chain in the cross-chain transmission protocol has been registered. After verifying the validity of the transaction, the relay chain records the transaction and submits it to the gateway connected to the destination chain of the transaction. The destination chain gateway will further process the request and pass the data to application chain B.

7. A cross-chain data interaction privacy protection method based on homomorphic encryption according to claim 6, characterized in that: Step 4: The specific steps are as follows: After receiving the cross-chain transaction from Appchain A, the gateway of Appchain B first passes it to the cross-chain management contract on Appchain B through the plug-in connecting Appchain B and the cross-chain gateway; The cross-chain management contract passes the cross-chain request to the cross-chain business contract on application chain B through cross-contract calls; After receiving the cross-chain request, the cross-chain business contract passes the data to the data recipient according to the content of the request; the data recipient receives the encrypted ciphertext data sent by the data sender; for the received ciphertext h, the homomorphic private key λ is used to calculate the plaintext s: At this point, the transaction receiver successfully receives the data sent from the transaction sender, and the data is encrypted when it is transmitted on the relay chain; For any given and L(ω λ mod n 2 ) is reversible modulo n, so we can calculate: Based on the decomposition factors p and q of n, we can calculate λ=lcm(p-1,q-1); based on λ and the given g and ω, we can calculate [ω] g During the data interaction process, other users cannot obtain the original data transmitted by the data sender through the homomorphic public key and encrypted data, while the data receiver can decrypt the data using the homomorphic private key to obtain the correct initial data.

Citation Information

Cited By

  • Energy data cross-chain intercommunication privacy enhancement method and system based on homomorphic encryption

    CN119766414A