Block chain-based cross-chain interaction method and device, equipment and storage medium
By using technical means such as public keys and polynomial commitments generated by the key generation center in the cross-chain interaction of blockchains, the problem of data transmission security between blockchains is solved and the production process security is achieved.
Patent Information
- Application Number
- CN202510593573.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-27
AI Technical Summary
In the cross-chain interaction process based on blockchain, how to improve the security of data transmission between blockchains to improve the security of production processes.
By obtaining the public key generated by the key generation center, the first blockchain and the second blockchain are obtained based on the encryption of the public key and the common noise value, and determine whether the plaintext difference of the encryption parameters is consistent. If it is consistent, polynomial commitment, witness information and zero-knowledge proof will be obtained, verification and cross-chain operation will be completed.
It improves the security of data transmission between blockchains, ensures the privacy and integrity of cross-chain operations, and thus improves the security of production processes.
Smart Images

Figure CN120223327A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and particularly to a cross-chain interaction method, device, equipment and storage medium based on blockchain. Background Art
[0002] Cross-chain refers to the process of achieving interoperability between different blockchain networks, allowing assets, data, and smart contracts to be transferred and interacted securely and efficiently across different chains. The core lies in breaking the isolation between blockchains and building an interconnected multi-chain ecosystem, thereby enhancing the practicality and collaborative ability of the overall network. It includes mechanisms such as middleman cross-chain, relay / side-chain cross-chain, and hash-locked cross-chain. Among them, hash locking is used for asset cross-chain; the relay / side-chain mechanism reduces cross-chain efficiency due to the introduction of a new blockchain (relay chain or side-chain). Currently, middleman cross-chain, as the most conventional cross-chain method, is easy to implement but cannot protect transaction privacy.
[0003] As can be seen from the above, how to improve the security of data transmission between blockchains in the process of cross-chain interaction based on blockchain is an urgent problem to be solved at present. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a cross-chain interaction method, device, equipment and storage medium based on blockchain, which can improve the security of data transmission between blockchains in the process of cross-chain interaction based on blockchain, and further improve the security of the production process. The specific solutions are as follows:
[0005] In a first aspect, the present application provides a cross-chain interaction method based on blockchain, which is applied to a middleman system and includes:
[0006] Obtain the first public key generated by the key generation center, and then obtain the first encryption parameter and the second encryption parameter respectively sent by the first blockchain and the second blockchain after encrypting the first negotiation parameter value and the second negotiation parameter value based on the first public key and the common noise value; the common noise value, the first negotiation parameter value, and the second negotiation parameter value are values generated by using a preset numerical generation rule and based on the negotiation process between the first blockchain and the second blockchain;
[0007] Determine the corresponding plaintext difference based on the first encryption parameter and the second encryption parameter, and determine whether the plaintext difference is consistent with the preset plaintext difference. If they are consistent, then call and obtain the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, as well as the witness information and zero-knowledge proof corresponding to the polynomial commitment;
[0008] Perform a first verification operation on the polynomial commitment, the witness information, and the zero-knowledge proof. If the first verification operation passes, obtain the data exchange proof generated after the first blockchain and the second blockchain perform data exchange, and perform a second verification operation on the data exchange proof. If the second verification operation passes, complete the cross-chain operation between the blockchains.
[0009] Optionally, the process by which the key generation center generates the first public key includes:
[0010] Determine the random field element, the prime-order cyclic group, and the corresponding generator for performing the bilinear mapping;
[0011] Based on the prime-order cyclic group, the generator, and the random field element, determine the common string corresponding to the generator;
[0012] Publicize the common string to the first blockchain, the second blockchain, and the middleman system, and then discard the random field element;
[0013] Use the key generation algorithm and, based on the common string, generate the first public key and the first private key for performing Pailler homomorphic encryption;
[0014] Publicize the first public key to the first blockchain, the second blockchain, and the middleman system, and then send the first private key to the middleman system through a preset secure channel.
[0015] Optionally, the process by which the first blockchain and the second blockchain generate the first encryption parameter and the second encryption parameter includes:
[0016] Use the preset numerical generation rule and, based on the negotiation process between the first blockchain and the second blockchain, generate the first negotiation parameter value and the first random number corresponding to the first blockchain, the second negotiation parameter value and the second random number corresponding to the second blockchain, and the common noise value corresponding to both the first blockchain and the second blockchain; the first negotiation parameter value and the second negotiation parameter value include the parameter name and the corresponding parameter value;
[0017] Based on the first public key, the first random number, and the second random number, perform homomorphic encryption on the first negotiation parameter value and the second negotiation parameter value respectively to obtain the first encrypted parameter to be processed and the second encrypted parameter to be processed;
[0018] Based on the first public key and the common noise value, perform homomorphic encryption on the first negotiation parameter value and the second negotiation parameter value respectively to obtain the third encrypted parameter to be processed and the fourth encrypted parameter to be processed;
[0019] Determine the first encryption parameter based on the first encryption parameter to be processed and the third encryption parameter to be processed, then determine the second encryption parameter based on the second encryption parameter to be processed and the fourth encryption parameter to be processed, and send the first encryption parameter and the second encryption parameter to the middleman system.
[0020] Optionally, the determining the corresponding plaintext difference based on the first encryption parameter and the second encryption parameter and determining whether the plaintext difference is consistent with a preset plaintext difference includes:
[0021] Group the first encryption parameter and the second encryption parameter respectively according to the parameter name to obtain a grouping result;
[0022] Perform a noise value elimination operation on the first encryption parameter and the second encryption parameter in each of the grouping results to obtain a first elimination result corresponding to the first encryption parameter and a second elimination result corresponding to the second encryption parameter;
[0023] Call the decryption algorithm corresponding to the Pailler homomorphic encryption and perform a decryption operation on the elimination result and the second elimination result based on the first private key to obtain a corresponding first plaintext and second plaintext;
[0024] Determine the plaintext difference based on the first plaintext and the second plaintext, and determine whether the plaintext difference is the preset plaintext difference;
[0025] Correspondingly, the method further includes:
[0026] If the plaintext difference is not the preset plaintext difference, mark the cross-chain operation between the first blockchain and the second blockchain as an end state.
[0027] Optionally, the process in which the first blockchain determines a polynomial commitment and the witness information and zero-knowledge proof corresponding to the polynomial commitment based on the first negotiation parameter value includes:
[0028] Use a hash algorithm to map the parameter names in the first negotiation parameter value to obtain a mapping result;
[0029] Use the Lagrange interpolation algorithm to process the mapping result to obtain a target polynomial; the mapping result is the solution corresponding to the target polynomial;
[0030] Call the first blockchain and determine a polynomial of the same order corresponding to the target polynomial based on the target polynomial;
[0031] Perform a bilinear pairing combination on the target polynomial, the polynomial of the same order, and the generator to obtain a polynomial commitment;
[0032] Determine the witness information and zero-knowledge proof corresponding to the polynomial commitment based on the polynomial commitment.
[0033] Optionally, the process by which the first blockchain determines the polynomial commitment and the witness information and zero-knowledge proof corresponding to the polynomial commitment based on the first negotiation parameter value includes:
[0034] Determine the polynomial commitment based on the first negotiation parameter value, determine the witness value based on the common string, and then use the hash algorithm to map the parameter names in the first negotiation parameter value to obtain a mapping result;
[0035] Process the mapping result using the Lagrange interpolation algorithm to obtain a target polynomial, and then use the witness value, the preset random number blinding algorithm, and the witness polynomial determined based on the target polynomial to generate the polynomial commitment and the witness information corresponding to the polynomial commitment;
[0036] Construct a hash challenge including the function values corresponding to the target polynomial, the witness value, and the first encryption parameter based on the polynomial commitment;
[0037] Determine the zero-knowledge proof corresponding to the polynomial commitment based on the hash challenge.
[0038] Optionally, perform a first verification operation on the polynomial commitment, the witness information, and the zero-knowledge proof. If the first verification operation passes, obtain the data exchange proof generated after the first blockchain and the second blockchain perform data exchange, and perform a second verification operation on the data exchange proof. If the second verification operation passes, complete the cross-chain operation between the blockchains, including:
[0039] Determine the algebraic relationship between the polynomial commitment and the witness information;
[0040] Verify the algebraic relationship using a preset verification rule to obtain a first verification result; the first verification result is used to represent whether the first negotiation parameter value is correctly committed to the second blockchain;
[0041] Determine the equivalent information between the polynomial commitment and the zero-knowledge proof;
[0042] Verify the equivalent information using the homomorphic encryption operation rule to obtain a second verification result; the second verification result is used to represent the consistency between the first negotiation parameter value and the second negotiation parameter value;
[0043] If both the first verification result and the second verification result indicate successful verification, trigger the cross-chain operation between the first blockchain and the second blockchain, and obtain the data exchange proof generated after the first blockchain and the second blockchain exchange data;
[0044] Verify the data exchange proof, and mark the cross-chain operation between the first blockchain and the second blockchain as completed after the data exchange proof is successfully verified.
[0045] In a second aspect, the present application provides a cross-chain interaction device based on a blockchain, which is applied to an intermediary system and includes:
[0046] An encryption parameter acquisition module, configured to acquire the first public key generated by a key generation center, and then acquire the first encryption parameter and the second encryption parameter respectively sent by the first blockchain and the second blockchain after encrypting the first negotiation parameter value and the second negotiation parameter value based on the first public key and a common noise value; the common noise value, the first negotiation parameter value, and the second negotiation parameter value are values generated by using a preset numerical generation rule and based on the negotiation process between the first blockchain and the second blockchain;
[0047] An encryption parameter judgment module, configured to determine the corresponding plaintext difference based on the first encryption parameter and the second encryption parameter, and judge whether the plaintext difference is consistent with a preset plaintext difference value. If they are consistent, call and acquire the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, as well as the witness information and zero-knowledge proof corresponding to the polynomial commitment;
[0048] A data exchange proof verification module, configured to perform a first verification operation on the polynomial commitment, the witness information, and the zero-knowledge proof. If the first verification operation is passed, acquire the data exchange proof generated after the first blockchain and the second blockchain exchange data, and perform a second verification operation on the data exchange proof. If the second verification operation is passed, complete the cross-chain operation between the blockchains.
[0049] In a third aspect, the present application provides an electronic device, including:
[0050] A memory, configured to store a computer program;
[0051] A processor, configured to execute the computer program to implement the aforementioned cross-chain interaction method based on a blockchain.
[0052] In a fourth aspect, the present application provides a computer-readable storage medium, configured to store a computer program, where the computer program, when executed by a processor, implements the aforementioned cross-chain interaction method based on a blockchain.
[0053] As can be seen from the above, before performing cross-chain interaction based on blockchain, this application needs to obtain the first public key generated by the key generation center, and then obtain the first encryption parameter and the second encryption parameter issued by the first blockchain and the second blockchain after encrypting the first negotiation parameter value and the second negotiation parameter value based on the first public key and the common noise value respectively; the common noise value, the first negotiation parameter value and the second negotiation parameter value are values generated by using a preset numerical generation rule and based on the negotiation process between the first blockchain and the second blockchain; determine whether the plaintext differences corresponding to the first encryption parameter and the second encryption parameter are consistent, if they are consistent, then call and obtain the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, as well as the witness information and zero-knowledge proof corresponding to the polynomial commitment; perform a first verification operation on the polynomial commitment, witness information and zero-knowledge proof to obtain a data exchange proof generated after the first blockchain and the second blockchain exchange data after the verification passes, and perform a second verification operation on the data exchange proof, if the second verification operation passes, then complete the cross-chain operation between the blockchains.
[0054] As can be seen, this application first needs to obtain the first public key generated by the key generation center, and then obtain the first encryption parameter and the second encryption parameter issued by the first blockchain and the second blockchain after encrypting the first negotiation parameter value and the second negotiation parameter value based on the first public key and the common noise value respectively; subsequently, determine whether the plaintext differences corresponding to the first encryption parameter and the second encryption parameter are consistent, if they are consistent, then call and obtain the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, as well as the witness information and zero-knowledge proof corresponding to the polynomial commitment; finally, perform a first verification operation on the polynomial commitment, witness information and zero-knowledge proof to obtain a data exchange proof generated after the first blockchain and the second blockchain exchange data after the verification passes, and perform a second verification operation on the data exchange proof, if the second verification operation passes, then complete the cross-chain operation between the blockchains. In this way, the security of data transmission between blockchains is improved, and thus the security of the production process is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0056] Figure 1 It is a flowchart of a cross-chain interaction method based on blockchain disclosed in this application;
[0057] Figure 2 It is a schematic structural diagram of a cross-chain interaction device based on blockchain disclosed in this application;
[0058] Figure 3 This is a structural diagram of an electronic device disclosed in the present application. Specific implementation manners
[0059] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a 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 those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0060] Cross-chain refers to the process of achieving interoperability between different blockchain networks, allowing assets, data, and smart contracts to be transferred and interacted securely and efficiently across different chains. Its core lies in breaking the isolated state between blockchains and building an interconnected multi-chain ecosystem, thereby enhancing the practicality and collaborative ability of the overall network. It includes mechanisms such as middleman cross-chain, relay / side-chain cross-chain, and hash-locked cross-chain. Among them, hash locking is used for asset cross-chain; the relay / side-chain mechanism reduces cross-chain efficiency due to the introduction of a new blockchain. Currently, middleman cross-chain, as the most conventional type of cross-chain, is easy to implement but cannot protect transaction privacy. Therefore, the present application provides a cross-chain interaction method based on blockchain, which can improve the security of data transmission between blockchains and thus improve the security of the production process.
[0061] See Figure 1 As shown, an embodiment of the present invention discloses a cross-chain interaction method based on blockchain, which is applied to a middleman system and includes:
[0062] Step S11, obtain the first public key generated by the key generation center, and then obtain the first encrypted parameter and the second encrypted parameter issued by the first blockchain and the second blockchain respectively after encrypting the first negotiation parameter value and the second negotiation parameter value based on the first public key and the common noise value; the common noise value, the first negotiation parameter value, and the second negotiation parameter value are values generated by using a preset numerical generation rule and based on the negotiation process between the first blockchain and the second blockchain.
[0063] In this embodiment, a cross-chain system including a key generation center, a middleman system, blockchain system A, and blockchain system B is constructed to perform cross-chain operations between blockchain system A and blockchain system B by using the above cross-chain system. Among them, the key generation center is used to generate corresponding public parameters and keys for the other three parties, and blockchain A and blockchain B implement cross-chain operations through the middleman system.
[0064] In addition, during the cross-chain interaction based on the blockchain, first, the key generation center needs to be called to generate the public string required for the polynomial commitment for the intermediary system and blockchain systems A and B, as well as the public key and private key for Pailler (Paillier Cryptosystem) homomorphic encryption. Then, the above-mentioned public string, public key, and private key are made public, and then the private key is securely distributed to the intermediary system.
[0065] In a specific implementation, the process of calling the key generation center to generate the public string required for the polynomial commitment for the intermediary system and blockchain systems A and B, as well as the public key and private key for Pailler homomorphic encryption, is as follows:
[0066] First, the key generation center needs to select a bilinear mapping of prime order p from the group Randomly select a generator from , and then randomly select a generator from the group , and select , to obtain , where , as the public string of the polynomial commitment, needs to be made public to blockchain A, blockchain B, and the intermediary system, and is cleared.
[0067] Subsequently, the key generation center needs to run the initialization and key generation algorithms of Pailler homomorphic encryption to generate the public key and the private key . Subsequently, the above public key is made public to blockchain A, blockchain B, and the intermediary system, and the private key is distributed to the intermediary system through a secure channel.
[0068] Specifically, the process of the key generation center generating the first public key may include: determining the random field element, prime-order cyclic group, and corresponding generator for the bilinear mapping; determining the public string corresponding to the generator based on the prime-order cyclic group, generator, and random field element; making the public string public to the first blockchain, second blockchain, and the intermediary system, and then discarding the random field element; using the key generation algorithm and generating the first public key and the first private key for Pailler homomorphic encryption based on the public string; making the first public key public to the first blockchain, second blockchain, and the intermediary system, and then sending the first private key to the intermediary system through a preset secure channel.
[0069] Subsequently, the embodiments of this application need to enable both parties participating in cross-chain to conduct cross-chain negotiation to determine the specific parameters of the cross-chain transaction and the noise value used for encryption in this cross-chain, and send the encrypted data containing the noise value to the middleman system to ensure that the middleman system cannot decrypt the encrypted data, so as to obtain the original value in the ciphertext. In a specific implementation, the users of blockchain A and blockchain B negotiate and confirm the parameters of the relevant transaction off-chain: First, confirm the transaction parameter set included and the transaction parameter set included executed on blockchain B, where the meaning of each two-tuple in each parameter set is the parameter name and the parameter value. Subsequently, the users of blockchain A and blockchain B need to securely negotiate a random number as the homomorphic encryption noise for this cross-chain. Furthermore, the user of blockchain A needs to and generate a random number or for each parameter value in the parameter set to calculate the noise encryption value corresponding to each parameter value respectively using the above random number, where , , and the determination formula of each noise encryption value is as follows:
[0070] ;
[0071] ;
[0072] Subsequently, the above parameter noise encryption values are publicly disclosed in the second blockchain and the middleman system in a specific format. Among them, the expression of the specific format is as follows:
[0073] ;
[0074] Similarly, random numbers are also generated for the second blockchain, and the noise encryption values of each parameter value are calculated using the obtained random numbers and publicly disclosed in the first blockchain and the middleman system in a specific form, and the expression is as follows:
[0075] .
[0076] Specifically, the process of the first blockchain and the second blockchain generating the first encryption parameter and the second encryption parameter may include: generating a first negotiation parameter value and a first random number corresponding to the first blockchain, a second negotiation parameter value and a second random number corresponding to the second blockchain, and a common noise value corresponding to both the first blockchain and the second blockchain by using a preset numerical generation rule and based on the negotiation process between the first blockchain and the second blockchain; the first negotiation parameter value and the second negotiation parameter value include a parameter name and a corresponding parameter value; homomorphically encrypting the first negotiation parameter value and the second negotiation parameter value respectively based on the first public key, the first random number, and the second random number to obtain a first to-be-processed encryption parameter and a second to-be-processed encryption parameter; homomorphically encrypting the first negotiation parameter value and the second negotiation parameter value respectively based on the first public key and the common noise value to obtain a third to-be-processed encryption parameter and a fourth to-be-processed encryption parameter; determining the first encryption parameter based on the first to-be-processed encryption parameter and the third to-be-processed encryption parameter, then determining the second encryption parameter based on the second to-be-processed encryption parameter and the fourth to-be-processed encryption parameter, and sending the first encryption parameter and the second encryption parameter to the middleman system.
[0077] Step S12: Determine the corresponding plaintext difference based on the first encryption parameter and the second encryption parameter, and determine whether the plaintext difference is consistent with a preset plaintext difference value. If they are consistent, then call and obtain the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, and the witness information and zero-knowledge proof corresponding to the polynomial commitment.
[0078] In this embodiment, after obtaining the first encryption parameter and the second encryption parameter, a cross-chain initiation operation needs to be performed. That is, call the middleman system to classify and process the ciphertext, calculate and decrypt the classified ciphertext, and initiate a cross-chain interaction operation after confirming that the encrypted values of both parties in the cross-chain contain the same encrypted value.
[0079] In a specific implementation manner, after the middleman system receives all the noise encrypted values, it needs to group all the noise encrypted values by parameter name. Each group contains two noise encrypted values from different users, such as The values contained in the parameter name group are and , The values contained in the parameter name group are and .
[0080] Subsequently, the middleman system needs to sequentially traverse each group of noise encrypted values, and set the two elements of the currently traversed group as and , and then calculate to eliminate the random noise generated during the negotiation process between users A and B; then call the decryption algorithm of Pailler homomorphic encryption, and use the private key Decrypt C to obtain the current plaintext difference m. Subsequently, judge the plaintext difference. If m is not 0, it indicates that there is a disagreement between the two users, and the traversal is exited; if m is 0, continue the next round of traversal. It is worth mentioning that if no situation where m is not 0 is found after all traversals, it means that the two users have reached an agreement, and the middleman system can then call blockchain A to initiate a cross-chain interaction operation with blockchain B. Otherwise, use the middleman system to mark the end of the cross-chain interaction operation between blockchain A and blockchain B.
[0081] Specifically, determining the corresponding plaintext difference based on the first encryption parameter and the second encryption parameter and judging whether the plaintext difference is consistent with the preset plaintext difference value may include: grouping the first encryption parameter and the second encryption parameter respectively according to the parameter name to obtain a grouping result; performing a noise value elimination operation on the first encryption parameter and the second encryption parameter in each grouping result to obtain a first elimination result corresponding to the first encryption parameter and a second elimination result corresponding to the second encryption parameter; calling the decryption algorithm corresponding to Pailler homomorphic encryption and performing a decryption operation on the elimination result and the second elimination result based on the first private key to obtain the corresponding first plaintext and second plaintext; determining the plaintext difference based on the first plaintext and the second plaintext and judging whether the plaintext difference is the preset plaintext difference value; correspondingly, the method further includes: if the plaintext difference is not the preset plaintext difference value, marking the cross-chain operation between the first blockchain and the second blockchain as an end state.
[0082] Step S13: Perform a first verification operation on the polynomial commitment, the witness information, and the zero-knowledge proof. If the first verification operation passes, obtain the data exchange proof generated after the first blockchain and the second blockchain perform data exchange, and perform a second verification operation on the data exchange proof. If the second verification operation passes, complete the cross-chain operation between the blockchains.
[0083] In this embodiment, after blockchain A initiates a cross-chain interaction, the generated polynomial commitment needs to be stored in a block, and witness information in the polynomial commitment is generated, and a zero-knowledge proof equal to the encrypted value in the parameter value and the noise ciphertext in the polynomial commitment is generated, and then the above parameters are sent to the middleman system.
[0084] In a specific implementation manner, the process of generating the polynomial commitment is as follows: First, call blockchain A to use the hash algorithm to map the parameter names in the parameter set to as the solutions of the polynomial, and use as the values of each solution of the polynomial, and then use the Lagrange interpolation algorithm to construct the polynomial with the foregoing solutions and values, where the coefficients of the polynomial are respectively Subsequently, blockchain A is called to generate a random polynomial whose coefficients are respectively , and the order is the same as that of .
[0085] It is worth mentioning that when blockchain A is called to perform cross-chain interaction operations, in the embodiments of the present application, unlike ordinary blockchains that store the hash value of a transaction in a block, the polynomial commitment value is stored in the block. The process of generating the polynomial commitment value is as follows:
[0086] Call blockchain A and generate a polynomial commitment value based on the transaction parameters, and the expression is as follows:
[0087] ;
[0088] Subsequently, the generated polynomial commitment value is stored in the block.
[0089] Furthermore, the process of calling blockchain A and generating witness information in the polynomial commitment and generating a zero-knowledge proof equal to the encrypted value in the parameter value and noise ciphertext in the polynomial commitment is as follows:
[0090] First, call blockchain A and generate its proof in the block based on each parameter and the corresponding encrypted value , and the parameter value in the proof is consistent with the noise encrypted value. Subsequently, call blockchain A and use the hash algorithm to map to , and calculate and as well as . Subsequently, use the following formula to calculate the above polynomial:
[0091] ;
[0092] ;
[0093] Among them, the coefficients corresponding to the above polynomials are respectively and . Subsequently, use the common string of the polynomial commitment to calculate the witness information corresponding to the polynomial commitment, and the expression is as follows:
[0094] ;
[0095] Then, call blockchain A to randomly generate to calculate the commitment value using the following formula:
[0096] ;
[0097] Furthermore, call blockchain A to perform hash calculation using the following formula: to obtain the challenge of zero-knowledge proof .
[0098] Subsequently, call blockchain A to determine the response information of the zero-knowledge proof, and the determining formula is as follows:
[0099] ;
[0100] ;
[0101] ;
[0102] ;
[0103] Subsequently, use the , , and proved to be .
[0104] Finally, call blockchain A to send the block number containing the transaction commitment to the intermediary system, and send the parameter proof to the intermediary system .
[0105] Specifically, the process by which the first blockchain determines the polynomial commitment, the witness information corresponding to the polynomial commitment, and the zero-knowledge proof based on the first negotiation parameter value may include: using a hash algorithm to map the parameter names in the first negotiation parameter value to obtain a mapping result; using the Lagrange interpolation algorithm to process the mapping result to obtain a target polynomial; the mapping result is the solution corresponding to the target polynomial; calling the first blockchain and determining a co-order polynomial corresponding to the target polynomial based on the target polynomial; performing a bilinear pairing combination based on the target polynomial, the co-order polynomial, and the generator to obtain a polynomial commitment; determining the witness information corresponding to the polynomial commitment and the zero-knowledge proof based on the polynomial commitment.
[0106] Alternatively, the process of the embodiment of the present application for determining a polynomial commitment, the witness information corresponding to the polynomial commitment, and the zero-knowledge proof by invoking the first blockchain based on the first negotiation parameter value may include: determining a polynomial commitment based on the first negotiation parameter value, determining a witness value based on a common string, then mapping the parameter names in the first negotiation parameter value using a hash algorithm to obtain a mapping result; processing the mapping result using the Lagrange interpolation algorithm to obtain a target polynomial, and then generating a polynomial commitment and the witness information corresponding to the polynomial commitment using the witness value, a preset random number blinding algorithm, and a witness polynomial determined based on the target polynomial; constructing a hash challenge including the function values corresponding to the target polynomial, the witness value, and a first encryption parameter based on the polynomial commitment; and determining the zero-knowledge proof corresponding to the polynomial commitment based on the hash challenge.
[0107] In this embodiment, after obtaining the polynomial commitment, the witness information corresponding to the polynomial commitment, and the zero-knowledge proof, the embodiment of the present application needs to use an intermediary system to verify the witness information and the zero-knowledge proof to confirm that the correct transaction parameter values are stored in the blockchain after passing the verification.
[0108] In a specific implementation, after the intermediary system receives the block number and the proof the embodiment of the present application first needs to perform parsing to obtain a parsing result, where the parsing result is as follows: . Subsequently, it is confirmed whether the block length corresponding to the block with the given number is greater than a preset block length threshold. If the block length corresponding to the block with the given number is greater than the preset block length threshold, the polynomial commitment is obtained from the block with the given number .
[0109] Subsequently, for each transaction parameter , the intermediary system uses a hash algorithm to map it to , and performs the following hash calculation to obtain a challenge c, and then verifies whether the following equation holds:
[0110] ;
[0111] ;
[0112] .
[0113] If the above equations all hold, it indicates that the transaction parameter verification is successful, the cross-chain interaction of blockchain A is successful, and the intermediary system can call blockchain B to initiate a cross-chain interaction operation. Otherwise, the intermediary system is called to mark the cross-chain as failed and the cross-chain operation ends.
[0114] Specifically, a first verification operation is performed on the polynomial commitment, witness information, and zero-knowledge proof. If the first verification operation passes, a data exchange proof generated after the first blockchain and the second blockchain perform data exchange is obtained, and a second verification operation is performed on the data exchange proof. If the second verification operation passes, the cross-chain operation between the blockchains is completed, which may include: determining the algebraic relationship between the polynomial commitment and the witness information; verifying the algebraic relationship using a preset verification rule to obtain a first verification result; the first verification result is used to indicate whether the first negotiation parameter value is correctly committed to the second blockchain; determining the equivalent information between the polynomial commitment and the zero-knowledge proof; verifying the equivalent information using a homomorphic encryption operation rule to obtain a second verification result; the second verification result is used to indicate the consistency between the first negotiation parameter value and the second negotiation parameter value; if both the first verification result and the second verification result indicate that the verification passes, trigger the cross-chain operation between the first blockchain and the second blockchain, and obtain the data exchange proof generated after the first blockchain and the second blockchain perform data exchange; verify the data exchange proof, and mark the cross-chain operation between the first blockchain and the second blockchain as completed after the data exchange proof verification passes.
[0115] It is worth mentioning that after the cross-chain operation of blockchain A is successfully executed, the embodiments of the present application need to call blockchain B to perform the above operations, verify the obtained parameters, and then call the intermediary system to mark the successful execution of the cross-chain operation between blockchain A and blockchain B after the verification passes, otherwise mark it as a failed cross-chain execution.
[0116] Thus, the embodiments of the present application first need to obtain the first public key generated by the key generation center, and then obtain the first encryption parameter and the second encryption parameter issued after the first blockchain and the second blockchain encrypt the first negotiation parameter value and the second negotiation parameter value respectively based on the first public key and the common noise value; subsequently, determine whether the plaintext differences corresponding to the first encryption parameter and the second encryption parameter are consistent. If they are consistent, call and obtain the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, as well as the witness information and zero-knowledge proof corresponding to the polynomial commitment; finally, perform a first verification operation on the polynomial commitment, witness information, and zero-knowledge proof to obtain the data exchange proof generated after the first blockchain and the second blockchain perform data exchange after the verification passes, and perform a second verification operation on the data exchange proof. If the second verification operation passes, the cross-chain operation between the blockchains is completed. In this way, the security of data transmission between blockchains is improved, and thus the security of the production process is improved.
[0117] Correspondingly, as shown in Figure 2 the present application also provides a cross-chain interaction device based on a blockchain, which is applied to an intermediary system and includes:
[0118] The encryption parameter acquisition module 11 is used to obtain the first public key generated by the key generation center, and then obtain the first encryption parameter and the second encryption parameter sent down after the first blockchain and the second blockchain encrypt the first negotiation parameter value and the second negotiation parameter value respectively based on the first public key and the common noise value; the common noise value, the first negotiation parameter value and the second negotiation parameter value are values generated by using a preset numerical generation rule and based on the negotiation process between the first blockchain and the second blockchain.
[0119] The encryption parameter judgment module 12 is used to determine the corresponding plaintext difference based on the first encryption parameter and the second encryption parameter, and judge whether the plaintext difference is consistent with a preset plaintext difference value. If they are consistent, then call and obtain the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, and the witness information and zero-knowledge proof corresponding to the polynomial commitment.
[0120] The data exchange proof verification module 13 is used to perform a first verification operation on the polynomial commitment, the witness information and the zero-knowledge proof. If the first verification operation passes, then obtain the data exchange proof generated after the first blockchain and the second blockchain perform data exchange, and perform a second verification operation on the data exchange proof. If the second verification operation passes, then complete the cross-chain operation between the blockchains.
[0121] As can be seen from the above, before performing cross-chain interaction based on the blockchain in the embodiment of the present application, it is first necessary to obtain the first public key generated by the key generation center, and then obtain the first encryption parameter and the second encryption parameter sent down after the first blockchain and the second blockchain encrypt the first negotiation parameter value and the second negotiation parameter value respectively based on the first public key and the common noise value; subsequently, judge whether the plaintext differences corresponding to the first encryption parameter and the second encryption parameter are consistent. If they are consistent, then call and obtain the polynomial commitment determined by the first blockchain based on the first negotiation parameter value, and the witness information and zero-knowledge proof corresponding to the polynomial commitment; finally, perform a first verification operation on the polynomial commitment, the witness information and the zero-knowledge proof to obtain the data exchange proof generated after the first blockchain and the second blockchain perform data exchange after the verification passes, and perform a second verification operation on the data exchange proof. If the second verification operation passes, then complete the cross-chain operation between the blockchains. In this way, the security of data transmission between blockchains is improved, and thus the security of the production process is improved.
[0122] In some specific embodiments, the encryption parameter acquisition module 11 may specifically include:
[0123] The generator determination unit is used to determine the random field element, the prime order cyclic group and the corresponding generator for performing bilinear mapping.
[0124] A public string generation unit for determining a public string corresponding to the generator based on the prime order cyclic group, the generator, and the random field element;
[0125] A public string disclosure unit for disclosing the public string to the first blockchain, the second blockchain, and the middleman system, and then discarding the random field element;
[0126] A public key and private key determination unit for using a key generation algorithm and generating a first public key and a first private key for Pailler homomorphic encryption based on the public string;
[0127] A private key distribution unit for publicly disclosing the first public key to the first blockchain, the second blockchain, and the middleman system, and then distributing the first private key to the middleman system through a preset secure channel.
[0128] In some specific embodiments, the encryption parameter acquisition module 11 may specifically include:
[0129] A parameter generation unit for generating a first negotiation parameter value and a first random number corresponding to the first blockchain, a second negotiation parameter value and a second random number corresponding to the second blockchain, and a common noise value corresponding to both the first blockchain and the second blockchain based on a preset numerical generation rule and the negotiation process between the first blockchain and the second blockchain; the first negotiation parameter value and the second negotiation parameter value include a parameter name and a corresponding parameter value;
[0130] A first parameter value encryption unit for homomorphically encrypting the first negotiation parameter value and the second negotiation parameter value respectively based on the first public key, the first random number, and the second random number to obtain a first to-be-processed encrypted parameter and a second to-be-processed encrypted parameter;
[0131] A second parameter value encryption unit for homomorphically encrypting the first negotiation parameter value and the second negotiation parameter value respectively based on the first public key and the common noise value to obtain a third to-be-processed encrypted parameter and a fourth to-be-processed encrypted parameter;
[0132] A parameter distribution unit for determining a first encrypted parameter based on the first to-be-processed encrypted parameter and the third to-be-processed encrypted parameter, then determining a second encrypted parameter based on the second to-be-processed encrypted parameter and the fourth to-be-processed encrypted parameter, and distributing the first encrypted parameter and the second encrypted parameter to the middleman system.
[0133] In some specific embodiments, the encryption parameter judgment module 12 may specifically include:
[0134] A grouping result determination unit, configured to group the first encrypted parameter and the second encrypted parameter according to the parameter name respectively to obtain a grouping result;
[0135] A noise value elimination unit, configured to perform noise value elimination operations on the first encrypted parameter and the second encrypted parameter in each of the grouping results respectively to obtain a first elimination result corresponding to the first encrypted parameter and a second elimination result corresponding to the second encrypted parameter;
[0136] An elimination result decryption unit, configured to call the decryption algorithm corresponding to the Pailler homomorphic encryption and perform decryption operations on the elimination result and the second elimination result based on the first private key to obtain a corresponding first plaintext and second plaintext;
[0137] A plaintext difference determination unit, configured to determine a plaintext difference based on the first plaintext and the second plaintext, and determine whether the plaintext difference is a preset plaintext difference value;
[0138] Correspondingly, the encrypted parameter judgment module may specifically include:
[0139] An operation marking unit, configured to mark the cross-chain operation between the first blockchain and the second blockchain as an end state if the plaintext difference is not the preset plaintext difference value.
[0140] In some specific embodiments, the encrypted parameter judgment module 12 may specifically include:
[0141] A first mapping result determination unit, configured to map the parameter name in the first negotiation parameter value by using a hash algorithm to obtain a mapping result;
[0142] A first polynomial determination unit, configured to process the mapping result by using a Lagrange interpolation algorithm to obtain a target polynomial; the mapping result is the solution corresponding to the target polynomial;
[0143] A second polynomial determination unit, configured to call the first blockchain and determine a same-order polynomial corresponding to the target polynomial based on the target polynomial;
[0144] A polynomial commitment determination unit, configured to perform a bilinear pairing combination based on the target polynomial, the same-order polynomial and the generator to obtain a polynomial commitment;
[0145] A witness information determination unit, configured to determine witness information and zero-knowledge proof corresponding to the polynomial commitment based on the polynomial commitment.
[0146] In some specific embodiments, the encrypted parameter judgment module 12 may specifically include:
[0147] The second mapping result determination unit is configured to determine a polynomial commitment based on the first negotiation parameter value, determine a witness value based on the common string, and then map the parameter names in the first negotiation parameter value using a hash algorithm to obtain a mapping result;
[0148] The third polynomial determination unit is configured to process the mapping result using the Lagrange interpolation algorithm to obtain a target polynomial, and then generate a polynomial commitment and witness information corresponding to the polynomial commitment using the witness value, a preset random number blinding algorithm, and a witness polynomial determined based on the target polynomial;
[0149] The parameter construction unit is configured to construct a hash challenge including function values corresponding to the target polynomial, the witness value, and the first encryption parameter based on the polynomial commitment;
[0150] The unit is configured to determine a zero-knowledge proof corresponding to the polynomial commitment based on the hash challenge.
[0151] In some specific embodiments, the data exchange proof verification module 13 may specifically include:
[0152] The algebraic relation determination unit is configured to determine the algebraic relation between the polynomial commitment and the witness information;
[0153] The algebraic relation verification unit is configured to verify the algebraic relation using a preset verification rule to obtain a first verification result; the first verification result is used to characterize whether the first negotiation parameter value is correctly committed to the second blockchain;
[0154] The equivalent information determination unit is configured to determine the equivalent information between the polynomial commitment and the zero-knowledge proof;
[0155] The equivalent information verification unit is configured to verify the equivalent information using a homomorphic encryption operation rule to obtain a second verification result; the second verification result is used to characterize the consistency between the first negotiation parameter value and the second negotiation parameter value;
[0156] The data exchange proof acquisition unit is configured to, if both the first verification result and the second verification result indicate successful verification, trigger a cross-chain operation between the first blockchain and the second blockchain, and acquire a data exchange proof generated after the first blockchain and the second blockchain perform data exchange;
[0157] The data exchange proof verification subunit is configured to verify the data exchange proof, and mark the cross-chain operation between the first blockchain and the second blockchain as a completed state after the data exchange proof is successfully verified.
[0158] Further, an embodiment of the present application also discloses an electronic device. Figure 3 FIG. 20 is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be regarded as any limitation on the scope of use 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. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the cross-chain interaction method based on blockchain disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0159] In this embodiment, the power supply 23 is used to provide operating 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 external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0160] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a magnetic disk, or an optical disc, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0161] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, and it may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the cross-chain interaction method based on blockchain executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks.
[0162] Further, 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 cross-chain interaction method based on blockchain disclosed above is implemented. For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
[0163] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For related parts, reference can be made to the description in the method section.
[0164] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0165] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0166] Finally, it should also be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0167] The above has introduced the technical solutions provided in this application in detail. Specific examples are used in this article to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A cross-chain interaction method based on blockchain, characterized in that: Applicable to middleman systems, including: Obtain a first public key generated by a key generation center, and then obtain a first encryption parameter and a second encryption parameter issued by the first blockchain and the second blockchain after encrypting the first negotiation parameter value and the second negotiation parameter value based on the first public key and the common noise value respectively; the common noise value, the first negotiation parameter value, and the second negotiation parameter value are values generated by using a preset value generation rule and based on the negotiation process of the first blockchain and the second blockchain; Determine a corresponding plaintext difference based on the first encryption parameter and the second encryption parameter, and determine whether the plaintext difference is consistent with a preset plaintext difference value; if consistent, call and obtain a polynomial commitment determined by the first blockchain based on the first negotiated parameter value, as well as witness information and zero-knowledge proof corresponding to the polynomial commitment; A first verification operation is performed on the polynomial commitment, the witness information, and the zero-knowledge proof. If the first verification operation passes, a data exchange certificate generated after the first blockchain and the second blockchain exchange data is obtained, and a second verification operation is performed on the data exchange certificate. If the second verification operation passes, the cross-chain operation between the blockchains is completed.
2. The cross-chain interaction method based on blockchain according to claim 1, characterized in that: The process of the key generation center generating the first public key includes: Determine the random field elements, prime order cyclic groups and corresponding generators used for bilinear mapping; Determine a common string corresponding to the generator based on the prime-order cyclic group, the generator and the random field element; Publicizing the public string to the first blockchain, the second blockchain, and the middleman system, and then discarding the random domain element; Using a key generation algorithm, and based on the public string, generating a first public key and a first private key for performing Pailler homomorphic encryption; The first public key is published to the first blockchain, the second blockchain and the intermediary system, and then the first private key is sent to the intermediary system through a preset secure channel.
3. The cross-chain interaction method based on blockchain according to claim 2 is characterized in that: The process of generating the first encryption parameter and the second encryption parameter by the first blockchain and the second blockchain includes: A first negotiation parameter value and a first random number corresponding to the first blockchain, a second negotiation parameter value and a second random number corresponding to the second blockchain, and a common noise value corresponding to both the first blockchain and the second blockchain are generated by using a preset value generation rule and based on a negotiation process between the first blockchain and the second blockchain; the first negotiation parameter value and the second negotiation parameter value include a parameter name and a corresponding parameter value; Based on the first public key, the first random number, and the second random number, the first negotiation parameter value and the second negotiation parameter value are homomorphically encrypted to obtain a first encryption parameter to be processed and a second encryption parameter to be processed; Based on the first public key and the common noise value, the first negotiation parameter value and the second negotiation parameter value are homomorphically encrypted to obtain a third encryption parameter to be processed and a fourth encryption parameter to be processed; A first encryption parameter is determined based on the first encryption parameter to be processed and the third encryption parameter to be processed, and then a second encryption parameter is determined based on the second encryption parameter to be processed and the fourth encryption parameter to be processed, and the first encryption parameter and the second encryption parameter are sent to the intermediary system.
4. The cross-chain interaction method based on blockchain according to claim 3 is characterized in that: The determining a corresponding plaintext difference based on the first encryption parameter and the second encryption parameter, and judging whether the plaintext difference is consistent with a preset plaintext difference value, includes: Grouping the first encryption parameter and the second encryption parameter respectively according to the parameter name to obtain a grouping result; Performing a noise value elimination operation on the first encryption parameter and the second encryption parameter in each of the grouping results respectively to obtain a first elimination result corresponding to the first encryption parameter and a second elimination result corresponding to the second encryption parameter; Calling a decryption algorithm corresponding to Pailler homomorphic encryption and performing a decryption operation on the elimination result and the second elimination result based on the first private key to obtain a corresponding first plaintext and a second plaintext; determining a plaintext difference based on the first plaintext and the second plaintext, and determining whether the plaintext difference is a preset plaintext difference value; Accordingly, the method further includes: If the plaintext difference is not the preset plaintext difference value, the cross-chain operation between the first blockchain and the second blockchain is marked as an end state.
5. The cross-chain interaction method based on blockchain according to claim 4 is characterized in that: The process of determining, by the first blockchain, a polynomial commitment and witness information and a zero-knowledge proof corresponding to the polynomial commitment based on the first negotiated parameter value includes: Mapping the parameter name in the first negotiation parameter value by using a hash algorithm to obtain a mapping result; The mapping result is processed by using a Lagrange interpolation algorithm to obtain a target polynomial; the mapping result is a solution corresponding to the target polynomial; Calling the first blockchain and determining a polynomial of the same order corresponding to the target polynomial based on the target polynomial; Performing bilinear pairing combination based on the target polynomial, the polynomial of the same order and the generator to obtain a polynomial commitment; Witness information and a zero-knowledge proof corresponding to the polynomial commitment are determined based on the polynomial commitment.
6. The cross-chain interaction method based on blockchain according to claim 4 is characterized in that: The process of determining, by the first blockchain, a polynomial commitment and witness information and a zero-knowledge proof corresponding to the polynomial commitment based on the first negotiated parameter value includes: Determine a polynomial commitment based on the first negotiation parameter value, determine a witness value based on the public string, and then map the parameter name in the first negotiation parameter value using a hash algorithm to obtain a mapping result; The mapping result is processed by using a Lagrange interpolation algorithm to obtain a target polynomial, and then a polynomial commitment and witness information corresponding to the polynomial commitment are generated by using the witness value, a preset random number blinding algorithm and a witness polynomial determined based on the target polynomial; Constructing a hash challenge including a function value corresponding to the target polynomial, the witness value, and the first encryption parameter based on the polynomial commitment; A zero-knowledge proof corresponding to the polynomial commitment is determined based on the hash challenge.
7. The cross-chain interaction method based on blockchain according to claim 1, characterized in that: The first verification operation is performed on the polynomial commitment, the witness information and the zero-knowledge proof. If the first verification operation passes, a data exchange certificate generated after the first blockchain and the second blockchain exchange data is obtained, and a second verification operation is performed on the data exchange certificate. If the second verification operation passes, the cross-chain operation between the blockchains is completed, including: Determining an algebraic relationship between the polynomial commitment and the witness information; The algebraic relationship is verified using a preset verification rule to obtain a first verification result; the first verification result is used to indicate whether the first negotiation parameter value is correctly committed to the second blockchain; Determining equivalence information between the polynomial commitment and the zero-knowledge proof; The equivalent information is verified using homomorphic encryption operation rules to obtain a second verification result; the second verification result is used to characterize the consistency between the first negotiation parameter value and the second negotiation parameter value; If both the first verification result and the second verification result indicate that the verification is passed, a cross-chain operation between the first blockchain and the second blockchain is triggered, and a data exchange certificate generated after the first blockchain and the second blockchain exchange data is obtained; The data exchange certificate is verified, and after the data exchange certificate is verified, the cross-chain operation between the first blockchain and the second blockchain is marked as completed.
8. A cross-chain interaction device based on blockchain, characterized in that: Applicable to middleman systems, including: An encryption parameter acquisition module is used to obtain a first public key generated by a key generation center, and then obtain a first encryption parameter and a second encryption parameter issued by the first blockchain and the second blockchain after encrypting the first negotiation parameter value and the second negotiation parameter value based on the first public key and the common noise value respectively; the common noise value, the first negotiation parameter value and the second negotiation parameter value are values generated by using a preset value generation rule and based on the negotiation process of the first blockchain and the second blockchain; An encryption parameter judgment module, used to determine a corresponding plaintext difference based on the first encryption parameter and the second encryption parameter, and judge whether the plaintext difference is consistent with a preset plaintext difference value, and if consistent, call and obtain a polynomial commitment determined by the first blockchain based on the first negotiated parameter value and witness information and zero-knowledge proof corresponding to the polynomial commitment; The data exchange proof verification module is used to perform a first verification operation on the polynomial commitment, the witness information and the zero-knowledge proof. If the first verification operation passes, the data exchange proof generated after the first blockchain and the second blockchain exchange data is obtained, and a second verification operation is performed on the data exchange proof. If the second verification operation passes, the cross-chain operation between the blockchains is completed.
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 cross-chain interaction method based on blockchain as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the cross-chain interaction method based on blockchain is implemented as described in any one of claims 1 to 7.
