A multi-chain shared data consistency audit method based on chain of custody
By introducing a chain of custody into the blockchain system, the data shared by multiple chains is regularly audited, which solves the problem of difficult to ensure data consistency between multiple blockchains, and realizes secure sharing and efficient audit of data.
Patent Information
- Application Number
- CN202211533751.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-12-02
AI Technical Summary
When prior art shares data between multiple blockchains, there is a lack of effective audits of data consistency, resulting in malicious blockchains that may tamper with or forge data, affecting the results of federated learning and medical research.
Adopt a multi-chain shared data consistency audit method based on the chain of custody to conduct regular audits of multi-chain shared data by deploying the chain of custody to generate challenge information and proof information is generated by the access chain. The chain of custody to aggregate the proof information to audit the data consistency.
Effectively prevent malicious blockchains from tampering with or forging data during data sharing, ensuring the consistency of data between multiple blockchains, and at the same time, protecting data privacy through the difficulty of encryption and discrete logarithmic problems, improving audit efficiency.
Smart Images

Figure CN115987563B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain auditing, and in particular to a multi-chain data consistency auditing method based on a supervision chain. Background Art
[0002] Existing technology "Kang J, Li X, Nie J, et al. Communication-Efficient and Cross-chain Empowered Federated Learning for Artificial Intelligence of Things[J]. IEEE Transactions on Network Science and Engineering, 2022." proposed cross-chain authorized federated learning. The core idea is to deploy multiple blockchains for specific federated learning tasks, execute learning tasks separately to protect data privacy, and achieve secure blockchain collaboration and interaction through cross-chain methods.
[0003] Existing technology "Qiao R, Luo XY, Zhu SF, et al. Dynamic autonomous cross-consortium chain mechanism in e-healthcare [J]. IEEE journal of biomedical and health informatics, 2020, 24 (8): 2157-2168." proposed a dynamic autonomous cross-consortium chain mechanism in e-healthcare, which enables patients to share records in the medical consortium chain. Secure and autonomous data interaction between medical institutions can increase the number of clinical trial records, which is of great significance for improving the level of medical trial collaboration, especially for clinical decision-making for rare diseases.
[0004] Whether it is federated learning or medical research institutions, data needs to be shared between multiple blockchains. The above method only proposes how to conduct cross-chain collaboration and interaction based on blockchain, but does not study the consistency of multi-chain shared data. If a blockchain tampers with and abuses shared data, it will have an immeasurable impact on the results of federated learning or medical research.
[0005] Most of the existing research on data consistency focuses on off-chain. For example, the paxos consensus algorithm proposed in "Lamport L. The part-time parliament [M] / / Concurrency: the Works of Leslie Lamport. 2019: 277-317" and the raft consensus algorithm proposed in "Ongaro D, Ousterhout J. In search of an understandable consensus algorithm [C] / / 2014 USENIX Annual Technical Conference (Usenix ATC14). 2014: 305-319" solve the problem of data consistency, but these studies are aimed at off-chain data and are not applicable to cross-chain data. For example, the cross-chain data integrity audit method proposed in "Jiang J, Zhang Y, Zhu Y, et al. DCIV: Decentralized cross-chain data integrity verification with blockchain [J]. Journal of King Saud University-Computer and Information Sciences, 2022" audits cross-chain data based on the supervision chain, ensuring the integrity of data before and after the cross-chain. But her research only applies to the case of one sender and one receiver, and is not applicable to data that needs to be shared across multiple blockchains. Summary of the invention
[0006] Purpose of the invention: The purpose of the present invention is to provide a method for auditing the consistency of multi-chain shared data based on the supervision chain. The method deploys the supervision chain to conduct regular audits on multi-chain shared data, effectively preventing malicious blockchains from tampering with or forging data when participating in data sharing, and solving the consistency problem of shared data among multiple blockchains.
[0007] Technical solution: A multi-chain shared data consistency audit method based on the custody chain, including the following steps:
[0008] (1) The data owner uploads the original data M to the receiving chain, which processes the data M to obtain the first data group σ;
[0009] (2) The receiving chain processes the original data M to obtain a second data group M', and the receiving chain sends the first data group σ and the second data group M' together to all access chains participating in data sharing;
[0010] (3) When the custody chain audits the consistency of multi-chain data, the custody chain first generates a challenge message Q and sends the challenge message Q to the access chain being audited;
[0011] (4) After the audited access chain receives the challenge information Q sent by the supervision chain, the access chain generates proof information based on the stored data and returns the proof information to the supervision chain. The supervision chain aggregates the received proof information and audits the consistency of the data based on the aggregation results. If the audit passes, it indicates that the data stored in the access chain is consistent. Otherwise, it indicates that the access chain has tampered with or forged the data.
[0012] Furthermore, the process of processing the original data M in step (1) includes:
[0013] Parameter setting: G is a cyclic group of order p, g is the generator of group G; the receiving chain selects a large prime number p and a random value As the private key SK, calculate Y = g x as the public key PK; the receiving chain then selects a keyed hash function H k (·), defined as And share the parameter k with the supervision chain through a secure channel; finally, the receiving chain in the integer domain Secretly select random numbers And calculate R = g r ;
[0014] Data block: The receiving chain divides the data M into data blocks of the same size, expressed as M = (m1, m2, ... m n );
[0015] Signature generation: The receiving chain generates signatures in units of data blocks i =(m i -H k (R||i)x)r -1 , i = 1, 2, ... n, and the signature s i Together with the parameter R, it is the signature set σ=(R,s i ),i=1,2,…,n.
[0016] In this step, preferably, the receiving chain divides the data M into pieces of size 8KB.
[0017] Furthermore, the process of processing the original data M in step (2) includes:
[0018] Key generation: The access chain generates a public-private key pair (e, d). The public key e is made public, and the private key d is shared by all access chains through a secure channel.
[0019] Data encryption: The receiving chain uses data blocks as units, using the public key e and encryption formula Encrypt the data block, and the encrypted data is M';
[0020] Data transfer: The receiving chain sends the signature set σ=(R,s i ), i = 1, 2, ..., n and the encrypted data M' are synchronized to all access chains participating in data sharing;
[0021] Data decryption: After the access chain receives the data M' synchronized by the receiving chain, it uses the private key d and the decryption formula m i =(m i ') d Mod n, i = 1, 2, ..., n decrypts the data to obtain the original data M;
[0022] Signature verification: Access chain through formula Verify the original data block m i , i = 1, 2, ... n and signature s i ,i=1,2,…n consistency, if the verification passes, the data is accepted and stored, otherwise it is rejected.
[0023] Furthermore, the process of generating the challenge information Q in step (3) includes:
[0024] Randomly select access chains: There are s access chains participating in data sharing. During each audit, the supervision chain randomly selects d access chains from all s access chains for audit, and the selected access chains constitute set D;
[0025] Randomly select data blocks: During each audit, the chain of custody randomly selects c data blocks from the data block [1,n] for audit, and the selected data blocks constitute the set Q;
[0026] Challenge information generation: For each selected data block m i ,i∈Q, the chain of custody generates the corresponding random coefficient v i , and Q={(i,v i )} i∈Q As a challenging message;
[0027] Data transfer: The chain of custody will challenge the information Q = {(i,v i )} i∈Q Sent to all selected access chains.
[0028] In this step, preferably, the number of randomly selected d access chains is half of the total number of access chains participating in data sharing, that is,
[0029] Furthermore, the audit process in step (4) includes:
[0030] Proof generation: Receive challenge information Q = {(i,v i )} i∈Q After that, the access chain generates proof information based on the stored data M and signature set σ β j =∑ i∈Q v i m i ,j∈D and
[0031] Data transfer: The access chain will {α j ,γ j ,R} is sent to the custody chain as proof information;
[0032] Audit: Chain of Custody received proof of information {α j ,γ j ,R} j∈D After that, first determine the α in all access chain proof information j ,j∈D are consistent. If not, it means that there is a forged signature in the access chain, and the supervision chain deducts the tokens pledged in advance; if the signatures of all access chains are consistent, the supervision chain aggregates the proof information of the access chain, and the aggregation result is Finally, the chain of custody is calculated based on the aggregated results according to the equation Determine the consistency of the audited access chain shared data. If the equation holds true, it means that the data stored in the access chain is consistent. If not, it means that the access chain has tampered with or forged data.
[0033] Beneficial effects: Compared with the prior art, the multi-chain shared data consistency audit method based on the supervision chain described in the present invention can audit the consistency of shared data of multiple access chains. At the same time, during the audit process, through data encryption and the difficulty of discrete logarithm problems, on the one hand, it can prevent off-chain opponents from obtaining data from the cross-chain process, and on the other hand, it can prevent the supervision chain from inferring data from the audit process, thereby ensuring the privacy of the data. In addition, this method not only solves the consistency problem of shared data, but also has high audit efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the model role of the present invention;
[0035] Figure 2 It is a schematic diagram of the audit process of the present invention. DETAILED DESCRIPTION
[0036] The technical method of the present invention is further described in detail below in conjunction with the embodiments and drawings.
[0037] refer to Figure 1 and Figure 2The present invention provides a multi-chain shared data consistency audit method based on the custody chain. Combined with the above technical solution, the implementation of the present invention mainly includes the following four stages:
[0038] (1) Key generation phase: This phase is completed by the receiving chain.
[0039] The receiving chain selects a random value as the private key and calculates the public key based on the private key. The private key is stored secretly by the receiving chain, and the public key is made public by the receiving chain. In addition, the receiving chain generates system public parameters, including the cyclic group G, its generator g, the large prime number p, and the keyed hash function H. k (·)wait.
[0040] The method for generating public and private keys and system public parameters in stage (1) includes:
[0041] Public and private key generation: the receiving chain selects a random value Use it as the private key SK and calculate Y = g x As the public key PK. The receiving chain makes the public key PK public and keeps the private key SK secret.
[0042] System public parameter generation: The receiving chain selects a large prime number p, which is required to be greater than 1024 bits, so that the discrete logarithm problem can be solved in is not feasible. G is a cyclic group of order p, and g is a generator of the group G. The receiving chain selects the keyed hash function H k (·), defined as And share the parameter k with the custody chain through a secure channel.
[0043] (2) Signature generation phase: This phase is completed by the receiving chain.
[0044] First, the user uploads the shared data to the receiving chain. Then, the receiving chain divides the shared data uploaded by the user into blocks and generates signatures in units of data blocks.
[0045] Specifically, first, the user uploads the data M to be shared to the receiving chain. After receiving the shared data M uploaded by the user, the receiving chain divides the data M into n blocks, represented as M = (m1, m2, ..., m n ). Then, the receiving chain is in the integer domain Secretly select random numbers And calculate R = g r Finally, the receiving chain uses its own private key x and the keyed hash function H k (·), according to the following formula for each data block m i Generate signatures i :
[0046] s i =(mi -H k (R||i)x)r -1 ,i=1,2,…n.
[0047] (3) Data encryption stage: This stage is completed jointly by the receiving chain and the access chain.
[0048] In order to prevent external adversaries from stealing data privacy information during the cross-chain process, the data needs to be encrypted before the receiving chain synchronizes the shared data to the access chain. First, the receiving chain encrypts the divided data blocks through an encryption algorithm, and synchronizes the encrypted data blocks and the signature set generated in stage (2) to the access chain. After the access chain receives the shared data synchronized by the receiving chain, it decrypts the data blocks through a decryption algorithm to obtain the original data. In order to prevent the receiving chain from maliciously synchronizing false or erroneous data to the access chain, the access chain first verifies whether the decrypted data is consistent with the signature through a verification formula. After the verification is passed, it accepts and stores the data synchronized by the receiving chain. Otherwise, the access chain refuses to accept the data.
[0049] Specifically, the receiving chain encrypts the data M in blocks before synchronizing and sharing the data with the access chain. First, the access chain generates a public-private key pair (e, d), where the public key e is public and the private key d is shared by all access chains through a secure channel. Then, the receiving chain uses the public key e to encrypt the data block m. i To encrypt, the encryption formula is as follows:
[0050]
[0051] The encrypted data is expressed as M'=(m'1, m'2, ..., m' n ), the receiving chain will send the encrypted data M' and the signature set σ=(R,s i ),i=1,2,…,n are sent to the access chain together.
[0052] In order to prevent the receiving chain from maliciously sending false or erroneous data to the access chain, after the access chain receives the encrypted data M' and the signature set σ, it uses the private key d to encrypt the received data block m. i 'Decrypt one by one, the decrypted data block is m i , the decryption formula is as follows:
[0053] m i =(m i ') d mod n,i=1,2,…,n.
[0054] Finally, the access chain uses the public key PK and parameter R to verify the decrypted data block m i and signatures i Whether they are consistent, the verification formula is as follows:
[0055]
[0056] If the equation holds, the verification is successful, and the access link accepts and stores the data M and the signature set σ.
[0057] (4) Audit stage: This stage is completed jointly by the access chain and the supervision chain.
[0058] Before the audit begins, the access chains participating in data sharing need to pledge a certain number of tokens to the supervision chain. The audit process is divided into three steps, namely challenge generation, proof generation and audit. First, the supervision chain randomly selects some access chains to participate in the challenge. The supervision chain sends the challenge information to the selected access chain, which includes information such as the index of the audited data block. After receiving the challenge information, the access chain generates proof information based on the stored data block and signature, and returns the proof information to the supervision chain. After the supervision chain receives the proof information returned by the access chain, in order to improve the audit efficiency, the supervision chain first aggregates the proof information, and then audits the aggregated results through the audit formula. If the audit is successful, it means that the data of all access chains are consistent. Otherwise, it means that the access chain has tampered with or forged the data, and the supervision chain will deduct its pledged tokens.
[0059] The specific steps are as follows:
[0060] (4.1) Challenge generation
[0061] There are s access chains participating in data sharing, and each access chain stores shared data M. During each audit, the supervision chain randomly selects a subset Q of c elements from the data block [1,n], and for each data block m i ,i∈Q, the chain of custody generates the corresponding random coefficient v i The supervision chain randomly selects d access chains from all s access chains to form a set D, and sends the challenge information Q = {(i,v i )} i∈Q Sent to all selected access chains.
[0062] (4.2) Proof generation (taking any access chain as an example).
[0063] Receive the challenge message Q = {(i,v i )} i∈Q Afterwards, the access chain generates a proof based on the stored data M and signature set σ. The formula is as follows:
[0064]
[0065] β j =∑ i∈Q v i m i ,j∈D
[0066]
[0067] Then, the access chain will {α j ,γ j ,R} is sent to the custody chain as proof information.
[0068] (4.3) Audit.
[0069] The custody chain receives the proof information of all access chains {α j ,γ j ,R} j∈D After that, the proof information is parsed first to determine the α in all access chain proof information. j ,j∈D are consistent. If not, it means that the access chain has forged the signature. The supervision chain sends a request message to the receiving chain. After receiving the request message, the receiving chain sends the original signature set σ=(R,s i ), i = 1, 2, ..., n is returned to the supervision chain, which parses the received signature information and uses the signature s i , i=1,2,…,n calculate α, the calculation formula is as follows:
[0070]
[0071] The custody chain compares the calculation result α with the signature α in the access chain proof information j ,j∈D are compared in turn, and the inconsistent access chain is regarded as a forged signature, and its previously pledged tokens are deducted.
[0072] If all access chain signatures are consistent, that is, α = α j , j∈D, the supervision chain aggregates the proof information of the access chain according to the following formula:
[0073]
[0074]
[0075] Finally, the supervision chain determines the consistency of the access chain shared data according to the following formula based on the aggregation result:
[0076]
[0077] If the equation holds true, it means that the data stored in all access chains are consistent. If not, it means that some access chains have tampered with or forged the data.
[0078] Rewards and punishments: The supervision chain first punishes the access chain with inconsistent signatures, and then punishes the access chain with inconsistent data based on the audit results. The punishment method is to deduct the tokens pledged in advance.
[0079] As can be seen from the above specific implementation manners, the present invention performs regular audits on the shared data between all access chains based on the chain of custody, realizing "governing chains with chains". At the same time, by using encryption algorithms and the intractability of problems such as discrete logarithms, the data privacy in the cross-chain process and the audit process is protected. This method has good audit efficiency and audit results, and has a low computational cost for the consistency problem of multi-chain shared data, and is an efficient multi-chain data audit method.
[0080] Example 1
[0081] Combined with the steps implemented in the present invention above, for the case of multi-chain data sharing, the data block sizes are respectively set to be different from 4 KB to 32 KB, and on this basis, the time spent in the three stages of signature generation, proof generation, and audit is statistically analyzed. The statistical results are shown in Table 1. Analyzing Table 1, it can be seen that the time spent in the signature generation stage is the most, because the signature generation is performed on all n data blocks, while the proof generation and audit are only performed on the c data blocks (c < n) selected by the supervised chain. In addition, from Table 1, it can be seen that the time spent in the three stages decreases with the increase of the data block size, because when the size of the data file remains unchanged, with the increase of the data block size, the number of divided data blocks decreases, and thus the required time decreases. If the data block is too large, it is not conducive to auditing, while if the data block is too small, it will lead to a long audit time. Therefore, this embodiment gives the optimal choice, that is, dividing the data into 8 KB in size has the best effect.
[0082] Table 1 Comparison of time costs in the three stages of signature generation, proof generation, and audit
[0083]
[0084] For the case of data sharing with 2000 data blocks, assuming that 2% (i.e., 40), 3% (i.e., 60), 5% (i.e., 100), and 10% (i.e., 200) of the data blocks on a certain access chain are tampered with, resulting in inconsistent data with other access chains. The supervised chain randomly selects 20 to 160 data blocks from the 2000 data blocks and audits them through the method described in the present invention, and the success probability of the audit is statistically analyzed. The statistical results are shown in Table 2, where auditing any inconsistent data block is considered an audit success. Analyzing Table 2, it can be seen that when 2% of the data blocks are tampered with, auditing any 120 data blocks can achieve a detection probability of more than 90%; when 10% of the data blocks are tampered with, auditing any 40 data blocks can achieve a detection probability of more than 90%.
[0085] Table 2 Inconsistency detection probability
[0086]
[0087] Through the above embodiments, it can be seen that the audit method of the present invention adopts the method of randomly selecting data blocks for auditing, which saves the time cost of the audit process while ensuring the audit success rate, and greatly improves the audit efficiency. The method has good audit efficiency and audit success rate, and is a safe and efficient audit algorithm.
Claims
1. A multi-chain shared data consistency audit method based on a custody chain, characterized in that: The following steps are involved: (1) The data owner uploads the original data M to the receiving chain, which processes the data M to obtain the first data group σ; The process of processing the original data M includes: Parameter setting: G is a cyclic group of order p, g is the generator of group G; the receiving chain selects a prime number p greater than 1024 bits and a random value As the private key SK, calculate Y = g x as the public key PK; the receiving chain then selects a keyed hash function H k (·), defined as And share the parameter k with the supervision chain through a secure channel; finally, the receiving chain in the integer domain Secretly select random numbers And calculate R = g r ; Data block: The receiving chain divides the data M into data blocks of the same size, expressed as M = (m1, m2, ... m n ); Signature generation: The receiving chain generates signatures in units of data blocks i =(m i -H k (R||i)x)r -1 , i = 1, 2, ... n, and the signature s i Together with the parameter R, it is the signature set σ=(R,s i ),i=1,2,…,n; (2) The receiving chain processes the original data M to obtain a second data group M', and the receiving chain sends the first data group σ and the second data group M' together to all access chains participating in data sharing; The process of processing the original data M includes: Key generation: The access chain generates a public-private key pair (e, d). The public key e is made public, and the private key d is shared by all access chains through a secure channel. Data encryption: The receiving chain uses data blocks as units, using the public key e and encryption formula mod n, i=1,2,…n to encrypt the data block, and the encrypted data is M'; Data transfer: The receiving chain sends the signature set σ=(R,s i ), i = 1, 2, ..., n and the encrypted data M' are synchronized to all access chains participating in data sharing; Data decryption: After the access chain receives the data M' synchronized by the receiving chain, it uses the private key d and the decryption formula m i =(m i ') d modn,i=1,2,…,n decrypts the data to obtain the original data M; Signature verification: Access chain through formula Verify the original data block m i , i = 1, 2, ... n and signature s i ,i=1,2,…n consistency, if the verification passes, the data is accepted and stored, otherwise it is rejected; (3) When the custody chain audits the consistency of multi-chain data, the custody chain first generates a challenge message Q and sends the challenge message Q to the access chain being audited; The process of generating challenge information Q includes: Randomly select access chains: There are s access chains participating in data sharing. During each audit, the supervision chain randomly selects d access chains from all s access chains for audit, and the selected access chains constitute set D; Randomly select data blocks: During each audit, the chain of custody randomly selects c data blocks from the data block [1,n] for audit, and the selected data blocks constitute the set Q; Challenge information generation: For each selected data block m i ,i∈Q, the chain of custody generates the corresponding random coefficient v i , and Q={(i,v i )} i∈Q As a challenging message; Data transfer: The chain of custody will challenge the information Q = {(i,v i )} i∈Q Send to all selected access chains; (4) After the audited access chain receives the challenge information Q sent by the supervision chain, the access chain generates proof information based on the stored data and returns the proof information to the supervision chain. The supervision chain aggregates the received proof information and audits the consistency of the data based on the aggregation result. If the audit passes, it means that the data stored in the access chain is consistent. Otherwise, it means that the access chain has tampered with or forged the data. The audit process includes: Proof generation: Receive challenge information Q = {(i,v i )} i∈Q After that, the access chain generates proof information based on the stored data M and signature set σ and Data transfer: The access chain will {α j ,γ j ,R} is sent to the custody chain as proof information; Audit: Chain of Custody received proof of information {α j ,γ j ,R} j∈D After that, first determine the α in all access chain proof information j ,j∈D are consistent. If not, it means that there is a forged signature in the access chain, and the supervision chain deducts the tokens pledged in advance; if the signatures of all access chains are consistent, the supervision chain aggregates the proof information of the access chain, and the aggregation result is Finally, the chain of custody is calculated based on the aggregated results according to the equation Determine the consistency of the audited access chain shared data. If the equation holds true, it means that the data stored in the access chain is consistent. If not, it means that the access chain has tampered with or forged data.
2. The multi-chain shared data consistency audit method based on the custody chain according to claim 1 is characterized in that: The receiving chain divides the data M into 8KB pieces.
3. According to the multi-chain shared data consistency audit method based on the custody chain of claim 1, it is characterized in that: The number of randomly selected d access chains is half of the total number of access chains participating in data sharing, that is,
Citation Information
Patent Citations
Block chain cross-chain supervision method based on shared nodes
CN114978638A
Integrity verification method for cross-chain interaction data calculation result of block chain
CN115150057A
