A method for verifying the correctness of cross-chain interactive data calculation results of blockchain

Through Paillier homomorphic encryption and Bloom filter technology, the problem of correctness verification of data calculation results in cross-chain interaction of blockchain is solved, ensuring the decentralization and privacy of the blockchain system, and realizing the cross-chain interaction process the accuracy and security of data calculation results.

CN115361110BActive Publication Date: 2024-12-17NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210785783.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-04
Publication Date
2024-12-17
Estimated Expiration
2042-07-04

AI Technical Summary

Technical Problem

During the cross-chain interaction of blockchain, the correctness of data calculation results cannot be effectively verified, resulting in unreliable and insufficient security of calculations.

Method used

Paillier homomorphic encryption and Bloom filter technology are used to implement the collaboration of the main chain, side chain and chain of custody to encrypt, decrypt and correctness verification of data calculation results to ensure the accuracy of data calculation results during cross-chain interaction. and privacy.

Benefits of technology

It realizes the correctness audit of data calculation results in cross-chain interaction, ensures the decentralized characteristics and privacy of the blockchain system, and ensures the reliability and security of the calculation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115361110B_ABST
    Figure CN115361110B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for verifying the correctness of the calculation results of cross-chain interactive data of blockchain, comprising the following steps: the user of the side chain encrypts the data involved in the calculation obtained from the side chain, and calculates the data according to the calculation request of the user of the main chain, and sends the calculation result and the ciphertext of the data involved in the calculation to the side chain for storage; the side chain processes the data to be transmitted across the chain; the side chain sends the audit information used for correctness verification to the supervision chain, and the supervision chain verifies the correctness of the data processing results in the cross-chain interaction according to the received audit information. The present invention applies Paillier homomorphic encryption technology to process the data involved in the calculation, and applies Bloom filter to verify the real-time performance of the data involved in the calculation, thereby realizing the accurate verification of the correctness of the calculation results of the cross-chain interactive data, and at the same time ensuring the privacy and security of the data in the cross-chain interaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing security and data auditing technology, and specifically to a method for verifying the correctness of blockchain cross-chain interactive data calculation results. Background Art

[0002] As the underlying technical solutions of blockchain are becoming more and more perfect, blockchain presents a broad prospect for application development. However, with the increase of storage and transaction throughput on blockchain, the storage and computing performance of blockchain, especially the storage and computing performance of single chain, has gradually become a bottleneck restricting the further development of blockchain network. In order to solve the performance problem in blockchain, the idea of ​​"multi-chain parallel" was proposed. The application of cross-chain technology for inter-chain interaction has realized the expansion of blockchain performance and broken through the performance bottleneck of single-chain architecture.

[0003] At present, the most discussed cross-chain solutions include notary method, relay, side chain, hash lock and distributed key control. Cross-chain technology can connect scattered blockchain islands and become a bridge to expand the performance of blockchain. Although the multi-chain architecture expands the performance of blockchain, it also brings new security issues. Existing technologies generally focus on the technical implementation of cross-chain, and lack in-depth research on issues such as the correctness verification of data in cross-chain interactions.

[0004] When a blockchain requests data calculation results from another blockchain, the chain requesting the data cannot determine the correctness of the calculation results. Therefore, it is necessary to design a correctness audit mechanism for cross-chain data calculation results to ensure that the calculation is reliable and secure during cross-chain interaction. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a method for verifying the correctness of the calculation results of cross-chain interactive data of blockchains, and the verification method comprises the following steps:

[0006] Step 1: User A of the main chain obtains the current timestamp from the main chain, and sends the data calculation request and timestamp to user B of the side chain and the supervision chain;

[0007] Step 2: User B of the side chain obtains relevant data from the side chain according to the data calculation request, calculates the data, and performs Paillier encryption on the data involved in the calculation. User B sends the calculation and processing results back to the side chain for storage, and sends the private key used to decrypt the calculation results to user A;

[0008] Step 3: The side chain encrypts the data calculation results and sends the encrypted results to the main chain for storage;

[0009] Step 4: User A of the main chain obtains the encrypted data calculation result from the main chain, decrypts the ciphertext calculation result according to the private key he has, and obtains the plaintext of the required data calculation result;

[0010] Step 5: The side chain generates audit information for correctness verification and sends the audit information to the supervision chain. The supervision chain verifies the audit information according to the correctness verification method designed in the smart contract to determine the correctness of the cross-chain interaction data settlement result. If the audit information verification passes, it means that the calculation result of the cross-chain interaction data is correct. Otherwise, it means that there is a problem with the calculation result of the cross-chain interaction data. After the verification is completed, the supervision chain sends the verification result to the main chain.

[0011] Preferably, in step 2, the side chain user B calculates the request based on the data of the main chain user A, and the operation process is as follows:

[0012] Data calculation: Sidechain user B obtains data for calculation from the sidechain based on user A’s calculation request. And perform calculations to obtain the result M, where k is the number of data involved in the calculation;

[0013] Homomorphic processing: User B generates a public key N and a private key pair (λ, μ) for Paillier homomorphic encryption, and encrypts the data involved in the calculation Perform Paillier homomorphic encryption to obtain ciphertext The calculation formula is Among them, g is a random large prime number, T is the timestamp obtained from the main chain, N is the public key of the Paillier encryption algorithm, and the hash function Indicates that there is N 2 An integer set with elements.

[0014] Data transfer: Sidechain user B sends the private key (λ, μ) used to decrypt the data to mainchain user A, and the data calculation result M, N, h are sent to the side chain for storage.

[0015] Preferably, in step 3, the side chain transmits the data calculation result across chains to the main chain for storage, and the operation process is as follows:

[0016] Privacy processing: The side chain performs Paillier homomorphic encryption on the calculation result M to be transmitted across the chain to generate the ciphertext C to prevent the plaintext calculation result M from leaking privacy or being tampered with during the cross-chain transmission process. The calculation formula is: C = g M ·h(T) N (modN 2 ).

[0017] Data transfer: The side chain transfers the ciphertext C to the main chain.

[0018] Preferably, in step 4, user A of the main chain has a private key pair (λ, μ) for obtaining the data plaintext information, obtains the ciphertext C from the side chain from the main chain, and uses the private key (λ, μ) to decrypt the ciphertext C to restore the plaintext of the data calculation result. The calculation formula is: r =L(C λ (modN 2 ))·μmodN, where L(u)=(u-1) / N, and N is the public key of the Paillier encryption algorithm.

[0019] Preferably, in step 5, the chain of custody verifies the correctness of the audit information transmitted by the side chain, and the operation process is as follows:

[0020] Audit information generation: After the cross-chain data transfer, the side chain needs to send the audit information for correctness verification to the supervision chain, including the ciphertext of the data involved in the operation. For the homomorphic calculation result C of the calculation result M, the set B and B of Bloom filters used to determine the real-time performance of the data involved in the calculation s .in, It is used to reproduce the calculation process, C is used to compare with the ciphertext calculation result to determine the correctness of the operation, and B and B s Used to determine whether the data involved in the operation is the latest data stored on the chain. To ensure that the data involved in the operation are the latest data stored on the side chain, the real-time data on the side chain is mapped to the set B of the Bloom filter, and the set B is stored in the block header of the latest block of the side chain. When generating correctness audit information, the side chain maps the data involved in the operation to the new set B. s and set B and B s Entered into chain of custody as part of a correctness audit.

[0021] Correctness audit: The chain of custody verifies the correctness of the audit information received from the side chain, first reproducing the ciphertext The calculation process is to obtain the calculation result δ of the ciphertext. If δ=C, it proves that the calculation result of the cross-chain data is correct. s Compare each bit in, if for all B s [i]≠0, and B[i]≠0, it means that the data involved in the calculation is the latest data stored on the side chain, where i∈[1,n], n is the set B and B s If both verifications are passed, it means that the calculation result of the cross-chain interaction data is correct. After the audit is completed, the supervision chain will send the audit results to the main chain.

[0022] Compared with the prior art, the present invention has the following beneficial effects:

[0023] The present invention provides a method for verifying the correctness of the calculation results of cross-chain interactive data of blockchains, introduces a regulatory blockchain to audit the cross-chain interaction process, and ensures that the decentralized characteristics of the blockchain system are not affected. The design uses Paillier homomorphic encryption calculation and Bloom filter technology to process the calculation process and results, realizes the correctness audit of the data settlement results in the cross-chain interaction process, and ensures the privacy of the cross-chain interaction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a schematic diagram of a model role of the present invention;

[0025] Figure 2 It is a schematic diagram of the system flow of the present invention;

[0026] Figure 3 It is a schematic diagram of the verification process flow of the present invention; DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. To make the above-mentioned objects, features and advantages of the present invention more clearly understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0028] A method for verifying the correctness of cross-chain interactive data calculation results of blockchain, such as Figure 1 As shown in the figure, the participants include three blockchains and two off-chain users. The main chain is the initiator of the calculation request, the side chain stores the data involved in the calculation, the user B of the side chain performs data calculation according to the calculation request of the main chain, and transmits the result across the chain to the main chain. The supervision chain is responsible for receiving the audit information from the side chain and verifying the correctness of the calculation results of the cross-chain interaction data. Figure 2 As shown, the method specifically comprises the following steps:

[0029] When user A of the main chain needs the side chain to perform data calculation, the current timestamp T is obtained from the main chain, and the data calculation request R and timestamp T are sent to user B of the side chain and the supervision chain.

[0030] User B of the side chain calculates request R based on user A’s data and performs the following operations:

[0031] (1) Obtaining the data set used for calculation from the side chain And perform data calculation to obtain the data calculation result M, where k is the number of data involved in the calculation;

[0032] (2) Generate parameters for Paillier homomorphic encryption: Select three large prime numbers p, q, g, calculate the public key N = pq, calculate the private key λ = lcm(p-1,q-1), μ = (L(gλ (modN 2 ))) -1 (modN 2 ), L(u) = (u-1) / N, randomly select a hash function Yes N 2 An integer set with elements;

[0033] (3) Data involved in the calculation Perform Paillier homomorphic encryption to obtain ciphertext The calculation formula is

[0034] (4) Sidechain user B sends the private key (λ, μ) used to decrypt the data to mainchain user A, and sends the data calculation result M to the mainchain user A. N, h are sent to the side chain for storage.

[0035] The side chain performs Paillier homomorphic encryption on the calculation result M to be transferred across the chain to generate the ciphertext C to prevent the plaintext calculation result M from leaking privacy or being maliciously tampered with during the cross-chain transmission process. The encryption calculation formula is: C = g M ·h(T) N (modN 2 ). The side chain transfers the ciphertext C across chains to the main chain for storage.

[0036] User A of the main chain obtains the ciphertext C from the side chain from the main chain, decrypts the ciphertext C using the private key (λ, μ), and recovers the plaintext of the data calculation result. The calculation formula is: r =L(C λ (modN 2 ))·μmodN, where L(u)=(u-1) / N, and N is the public key of the Paillier encryption algorithm.

[0037] In order to verify the correctness of the cross-chain data calculation results, when the cross-chain data interaction is completed, the side chain needs to generate audit information for correctness verification. The specific process is as follows: Figure 3 To ensure that the data involved in the operation are the latest data stored on the side chain, the real-time data on the side chain is mapped to the set B of the Bloom filter, and the set B is stored in the block header of the latest block of the side chain. When generating correctness audit information, the side chain maps the data involved in the operation to the new set B. s and set B and B s As part of the correctness audit, the sidechain will be a collection of audit information. into a chain of custody, where It is used to reproduce the calculation process, C is used to compare with the ciphertext calculation result to determine the correctness of the operation, and B and B sUsed to determine whether the data involved in the calculation is the latest data stored on the chain.

[0038] The custody chain receives the audit information π from the side chain and first calculates the request R to reproduce the ciphertext based on the data. The calculation process is to obtain the calculation result δ of the ciphertext, and compare δ with C. If δ = C, it proves that the calculation result of the cross-chain data is correct; for sets B and B s Compare each bit in, if for all B s [i]≠0, and B[i]≠0, it means that the data involved in the calculation is the latest data stored on the side chain, where i∈[1,n], n is the set B and B s If both verifications are passed, it means that the calculation result of the cross-chain interaction data is correct. After the audit is completed, the supervision chain will send the audit results to the main chain.

[0039] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for verifying the correctness of cross-chain interactive data calculation results of blockchains. It is characterized in that The verification method comprises the following steps: 1) User A of the main chain obtains the current timestamp from the main chain, and sends the data calculation request and timestamp to user B of the side chain and the supervision chain; 2) User B of the side chain obtains the data involved in the calculation from the side chain according to the data calculation request, calculates and performs Paillier homomorphic encryption on the data involved in the calculation, and sends the first plaintext obtained by the calculation and the first ciphertext obtained by the Paillier homomorphic encryption back to the side chain for storage, and sends the private key to user A; 3) The side chain encrypts the first plaintext obtained in step 2) to obtain a second ciphertext, and sends the second ciphertext to the main chain for storage; 4) User A of the main chain decrypts the second ciphertext according to the private key obtained in step 2) to obtain the second plaintext; 5) The side chain generates audit information for correctness verification and sends the audit information to the supervision chain. The supervision chain verifies the audit information according to the correctness verification method designed in the smart contract to determine the correctness of the cross-chain interaction data calculation result. If the audit information verification passes, it indicates that the cross-chain interaction data calculation result is correct. Otherwise, it indicates that there is a problem with the cross-chain interaction data calculation result. After the verification is completed, the supervision chain sends the verification result to the main chain; The implementation process of step 2) is as follows: User B obtains the data set involved in the calculation from the side chain according to the data calculation request Where k is the number of data involved in the calculation; User B generates a public key N and a private key pair (λ, μ) for Paillier homomorphic encryption, and Calculate the first plaintext M and calculate the data set involved in the calculation Perform Paillier homomorphic encryption to obtain the first ciphertext The calculation formula of Paillier homomorphic encryption is: Among them, g is a random large prime number, T is the timestamp obtained from the main chain, and the hash function h is: Indicates that there is N 2 An integer set with elements; After getting the first ciphertext After that, user B uses the private key pair (λ, μ) for decrypting data, the first plaintext M, and the first ciphertext The public key N and hash function h are sent to the side chain for storage; To prevent the first plaintext M from leaking privacy or being tampered with during the cross-chain transmission process, the side chain performs Paillier homomorphic encryption on the first plaintext M to be transmitted across the chain to generate the second ciphertext C, and transmits the second ciphertext C to the main chain; The implementation process of step 4) is as follows: when user A obtains the second ciphertext C from the main chain based on the private key pair (λ, μ), he obtains the second plaintext corresponding to the data calculation result according to the Paillier decryption algorithm: M r =L(C λ (modN 2 ))·μmodN, where the function L(u)=(u-1) / N, and N is the public key of the Paillier homomorphic encryption; The audit information in step 5) includes the first ciphertext The second ciphertext C, set B and B s ; For sets B and B s According to the Bloom filter technology, the real-time data on the side chain is mapped to set B and stored in the header of the latest block of the side chain. At the same time, the side chain will participate in the calculation of the data set in step 2). Map to set B s middle; Step 5) In the correctness verification method, the chain of custody is used to verify the first ciphertext The calculation process is repeated to obtain the calculation result δ. The custody chain compares the calculation result δ with the second ciphertext C. If δ = C, it proves that the cross-chain data calculation result is correct. s Compare each bit in, if for all B s [i]≠0, and B[i]≠0, it means that the data involved in the calculation is the latest data stored on the side chain, where i∈[1,n], n is the set B and B s length; if both verifications are passed, it means that the calculation result of the cross-chain interaction data is correct; after the audit is completed, the supervision chain will send the audit results to the main chain.