Verifiable and fully editable blockchain system, method, device and terminal
Through the double trapdoor chameleon hash cluster and the trapdoor-free universal accumulator, combined with the maximum sequence number consensus rule, the complete editability and verifiability of the blockchain is achieved, solving the incomplete blockchain operation in the existing technology. problems, improving the security and application of blockchain.
Patent Information
- Application Number
- CN202210281106.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-03-22
AI Technical Summary
The existing editable blockchain cannot achieve complete editability and is difficult to be compatible with block addition, insertion, modification, and deletion operations. It also lacks the verifiability of the blockchain status and is prone to lazy updates and historical replay attacks. .
Double trapdoor chameleon hash clusters and trapdoor-free universal accumulators are used to generate non-interactive verifiable proofs, achieve distributed updates of the blockchain through the maximum sequence number consensus rule, and verify that the connectivity and status of the blockchain are valid sex.
It achieves the complete editability and verifiability of the blockchain, solves problems such as lazy updates and historical replay, and improves the feasibility and practicality of the editable blockchain.
Smart Images

Figure CN115118429B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of blockchain security technology, and in particular to a verifiable and fully editable blockchain system, method, device and terminal. Background Art
[0002] At present, blockchain technology is an organic integration of distributed consensus, smart contracts, cryptography and other technologies. Its essence is a distributed block chain data structure with excellent characteristics such as decentralization, trustlessness, openness, transparency and immutability. In recent years, blockchain technology has attracted widespread attention from all walks of life, led a research boom in academia and industry, and has been highly valued by governments around the world. Immutability is one of the most important features of blockchain technology and an important reason why it is so popular. This feature eliminates the dependence of entities that do not trust each other in a non-trusted environment on third-party intermediaries, lays an important foundation for the security and transparency of various blockchain applications, and promotes the continued positive role of blockchain in the economic society.
[0003] However, permanent data storage is not suitable for all application scenarios of blockchain. For example, content of any format can be inserted into the transaction field of blockchain. Some malicious users will take the opportunity to insert some improper or even illegal data such as pornographic literature and illegal websites, and these contents are permanently stored in the blockchain system. Faced with this situation, a large number of users are worried that some illegal content will be left on their computers after downloading the blockchain, so they are unwilling to join the blockchain system, which seriously damages the blockchain ecosystem. It can be seen that when unalterable data becomes a burden, it is urgent for blockchain to have editable functions. At the same time, some official organizations have also promulgated various data protection policies and laws and regulations, requiring blockchain to have editable characteristics. For example, the EU's General Data Protection Regulation regards the "right to be forgotten" as a key right of the data subject, stipulating that the data subject has the right to request the data controller to delete personal data about him, and the controller has the responsibility to delete personal data in a timely manner under certain circumstances. Therefore, it is of great practical significance to study editable blockchain.
[0004] As we all know, the hash value of the previous block in the blockchain is the prev_hash field of the next block, thus forming the so-called "chain". The immutability of the blockchain is derived from the anti-collision property of the hash function. Inspired by this, Atenes et al. first proposed a method to modify and delete blocks. The core idea is to replace the ordinary hash function with the chameleon hash function, so that the holder of the chameleon hash trap can modify the content of the block by looking for the collision of the hash value without affecting other blocks on the blockchain. Following this groundbreaking work, more and more experts and scholars have conducted more in-depth research on editable blockchains.
[0005] Most existing editable blockchains only support modification and deletion operations, ignoring the insertion operation. Block insertion is different from conventional append operations. Its operation location is anywhere in the blockchain except the head of the chain. As we all know, smart contracts are a series of automatically executed computer programs running on the blockchain. In June 2016, the DAO contract was hacked due to a code vulnerability and lost 3641694 ETH. If the blockchain supported the insertion operation at that time, the patch code could be quickly inserted to stop the loss in time. In addition, since the editable blockchain supports the deletion operation, it is difficult to avoid accidental deletion, and the insertion operation needs to be performed to correct it in time. Dousti et al. tried to propose a signature-based editable blockchain that supports all operations. However, the proposed method is not compatible with the deletion operation, and it is difficult to maintain a consistent blockchain state due to its imperfect verification strategy.
[0006] Existing editable blockchains lack verifiability of blockchain status. However, verifiable editable blockchains are necessary in real-world applications. In the traditional blockchain verification process, the main focus is on checking whether the prev-hash of the next block is the hash value of the previous block, that is, the connectivity of the chain, without considering the content version of the block. For an editable blockchain based on chameleon hashing, it can pass the verification even if it does not update the blockchain to the latest status as required. Therefore, if the state of the blockchain does not support verifiability, the editable blockchain will not be effective and feasible. Therefore, it is of great significance to study a verifiable and fully editable blockchain.
[0007] In addition, proposing a verifiable and fully editable blockchain requires not only full editability, but also verifiability of the blockchain state, ensuring that all editing operations are distributed and updated to the user's local blockchain, solving problems such as lazy updates and history replay.
[0008] Through the above analysis, the problems and defects of the prior art are as follows:
[0009] (1) Existing editable blockchains cannot achieve full editability and are difficult to simultaneously support block append, insertion, modification, and deletion operations.
[0010] (2) Existing editable blockchains lack the verifiability of blockchain status and are vulnerable to attacks such as lazy updates and history replay. Summary of the invention
[0011] In response to the problems existing in the prior art, the present invention provides a verifiable and fully editable blockchain system, method, device and terminal.
[0012] The present invention is implemented as follows: a verifiable and fully editable blockchain system control method, which includes four processes: system establishment, full editing operation of blocks, full editing verification of blocks and blockchain verification.
[0013] After generating system parameters, the regulator generates its own regulatory key pair; the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs;
[0014] Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates; when a new user joins the blockchain system, the connectivity of the entire blockchain and the validity of the blockchain status are verified.
[0015] Furthermore, the verifiable and fully editable blockchain system control method comprises the following steps:
[0016] Step 1: System establishment: Generate system parameters and key pairs for regulators;
[0017] Step 2: Full editing of blocks: The block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify, and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs;
[0018] Step 3: Full edit verification of the block: Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and implement distributed blockchain status updates;
[0019] Step 4: Blockchain verification: Verify the connectivity of the entire blockchain and the validity of the blockchain status, allowing new users to join the blockchain system.
[0020] Further, the system establishment in step 1 includes:
[0021] (1) SysGen(1 λ )→(pp) algorithm, input the security parameter λ, and execute as follows:
[0022] Choose a cyclic group of order large prime number q and a group of unknown order Pick two generators and Initialize A0←h and select two hash functions H1: {0, 1} * →{0, 1} λ and H prime : {0, 1}* →Primes(λ), output system parameters
[0023] (2) KeyGen(pp)→(sk, pk) algorithm, input system parameter pp, and execute as follows:
[0024] Regulators randomly select Calculate Y=xP and output the key pair (sk, pk)=(x, Y).
[0025] Furthermore, the full editing operation of the block in step 2 includes:
[0026] (1) The input length is Blockchain Chameleon hash key pair (tk i , hk)=((sk,t i ), pk), where The supervisor is B i The specific trapdoor selected, B i The Merkle root of the transaction contained in and the solution of the proof of work are performed as follows:
[0027] Analysis calculate and Get B i of Find out Get the serial number i←s m +1; calculate η i ←H prime (m||i), get the accumulator state calculate Get with A i The corresponding evidence i ←Q i ; Supervisor calculation and B i The verification string of the chameleon hash corresponding to each field in Finally get Among them B i := <p i ,ctr,m,i,ξ i , A i , w i >.
[0028] (2) The input length is Blockchain B i The corresponding Chameleon hash key pair (tk i , hk)=((sk,ti ), pk), The corresponding Chameleon hash key pair B i The m and ctr values contained in To insert position l in the , execute as follows:
[0029] Analysis turn up Get B i The serial number i←s m +1; calculate η i ←H prime (m||i), get the accumulator state calculate Get an A i Evidence i ←Q i ; Regulators calculate Use the Chameleon Hash Trapdoor to get the Chameleon Hash verification string thus
[0030] Due to the insertion of B i After that, the prev_hash of the original lth block changes, so the calculation Regulator calculations get At this time, the original lth block becomes Output blockchain
[0031] (3) The input length is Blockchain The lth block on the chain The modified target value m′, Chameleon key pair Execute as follows:
[0032] Analysis turn up Get the new sequence number i′←s m +1; Initialization calculate and Get evidence of old version data deletion Calculate η i′ ←H prime (m′||i′), get the updated accumulator state And evidence of adding new version data initialization if but Calculated by extended Euclidean algorithm Calculate μ i′ ←h α and v i′ ←A i′ β ,get All historical versions of data are not member proof (z i′ , d i′ , Q i′ ,3)←NI-PoKE.Prove(β , A i′ , ν i′ ) and Q i′,4 ←NI-PoE. Combining the above results, we can get the evidence of the current accumulator state. The regulator calculates cont i′ ←p i ||m′||i′||A i′ ||w i′ , using the Chameleon Hash Trapdoor it holds to obtain the Chameleon Hash Verification String corresponding to the updated data Output Among them B i′ := <p i ,ctr i ,m′,i′,ξ i′ , A i′ , w i′ >.
[0033] (4) The input length is Blockchain A set of consecutive block positions The smallest of these is The largest record No. (L max +1) blocks in position The corresponding Chameleon hash key pair B containing m and ctr i The corresponding Chameleon hash (tk i , hk)=((sk,t i ), pk), this block is used to record the deletion event that occurred, and is executed as follows:
[0034] renew of Regulators calculate through Chameleon hash trapdoor Get the updated Recorded as
[0035] turn up Get the serial number i←sm +1; get calculate initialization and For all l∈L, compute And determine whether there is If yes, then Get the evidence that the block shown in L has been deleted Calculate η i ←H prime (m||i), get the new accumulator state and newly added B i Evidence initialization and calculate μ i ←h α , ν i ←A i β , get the evidence that all the deleted block history versions are invalid (z i , d i , Q i,3 )←NI-PoKE.Prove(β, A i , ν i )and In summary, we get the evidence of the accumulator The regulator uses trapdoor calculation Output Among them B i := <p i ,ctr,m,i,ξ i , A i , w i >.
[0036] Furthermore, the full edit verification of the block in step 3 includes:
[0037] (1) Algorithm, input additional block B i , the length is The local blockchain of the validator Execute as follows:
[0038] Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where w i :=Q i , find out In Parse the serial number to s m Block Calculate cont i ←p i ||m i ||i||A i ||w i and If i == s m +1, H1(ctr i ||h i )<D, then calculate η i ←H prime (m i ||i), and returns the verification result
[0039] (2) Algorithm, input is inserted into block B at position l i , the updated version of the block that was originally at that location Length is Validators of the local blockchain Execute as follows:
[0040] Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where w i :=Q i , analysis as well as on turn up And parse pass calculate If i == s m +1, H1(ctr i ||h i )<D holds true, then calculate and η i ←H prime (m i ||i), returns the verification result
[0041] (3) Algorithm, input the modified block B at the lth position i , the length is The local blockchain of the validator Execute as follows:
[0042] Parsing Block B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where Analyzing the blockchain on turn up of And parse Calculate cont i ←p i ||m i ||i||A i |w i And restore If H1(ctr i ||h i )<D and i==s m +1, then calculate η i ←H prime (m i ||i) and Return verification result & &NI-PoKE.Verify(A i , ν i , z i , d i , Q i,3 )&
[0043] (4) Algorithm, input block B that records the deletion event i , the set of deleted block locations Length is The local blockchain of the validator Execute as follows:
[0044] Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where Analysis In turn up In And parse use calculate If H1(ctr i ||h i )<D、i==s m +1, If both are true, then calculate η i ←H prime (m i ||i) and Return verification result & &NI-PoKE.Verify(A i , ν i , z i , d i , Q i,3 )&
[0045] Furthermore, the blockchain verification in step 4 includes:
[0046] The input length is Blockchain The validator performs the following:
[0047] For all j∈[n], calculate as well as If exists or Then return 0 directly; otherwise calculate turn up In And parse Return verification result
[0048] Another object of the present invention is to provide a verifiable and fully editable blockchain system to which the verifiable and fully editable blockchain system control method is applied, wherein the verifiable and fully editable blockchain system comprises:
[0049] System establishment module, used to generate system parameters and key pairs for regulators;
[0050] Full editing operation module, the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to perform block append, insertion, modification and deletion with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs;
[0051] Full edit verification module, which is used to verify the validity of blockchain users, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates;
[0052] The blockchain verification module is used to verify the connectivity of the entire blockchain and the validity of the blockchain status, allowing new users to join the blockchain system.
[0053] Another object of the present invention is to provide a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0054] After generating system parameters, the regulator generates its own regulatory key pair; the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs;
[0055] Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates; when a new user joins the blockchain system, the connectivity of the entire blockchain and the validity of the blockchain status are verified.
[0056] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0057] After generating system parameters, the regulator generates its own regulatory key pair; the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs;
[0058] Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates; when a new user joins the blockchain system, the connectivity of the entire blockchain and the validity of the blockchain status are verified.
[0059] Another object of the present invention is to provide an information data processing terminal, which is used to implement the verifiable and fully editable blockchain system.
[0060] In combination with the above technical solutions and the technical problems solved, please analyze the advantages and positive effects of the technical solutions to be protected by the present invention from the following aspects:
[0061] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems. The specific description is as follows:
[0062] The present invention generates a key pair for the regulator through the system establishment steps, which facilitates the regulator to generate a chameleon hash for each block that can only be edited by him, and finally constructs a fully editable blockchain.
[0063] In view of the problems that the existing editable blockchain is difficult to be compatible with block append, insertion, modification and deletion operations at the same time, lacks the verifiability of blockchain status, and is easily subject to lazy update and history replay attacks, the present invention provides a verifiable and fully editable blockchain, which can simultaneously achieve complete editability of block content and verifiability of blockchain status, is of great significance for improving the feasibility and practicality of editable blockchain, and helps to further promote the development and wide application of blockchain.
[0064] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:
[0065] The present invention can simultaneously realize the full editability of blockchain and the verifiability of blockchain status, solving the problems of lazy update and history replay of editable blockchain. The present invention can simultaneously realize the full editability and verifiability of blockchain, which is of great significance for improving the feasibility and practicality of editable blockchain, and helps to further promote the development and wide application of blockchain. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0067] Figure 1 It is a flow chart of a verifiable and fully editable blockchain control method provided by an embodiment of the present invention;
[0068] Figure 2 This is a block diagram of the verifiable and fully editable blockchain system structure provided by an embodiment of the present invention; in the figure: 1. system establishment module; 2. full editing operation module; 3. full editing verification module; 4. blockchain verification module.
[0069] Figure 3It is a verifiable and fully editable blockchain system architecture diagram provided by an embodiment of the present invention;
[0070] Figure 4 It is a schematic diagram of the time cost of generating a block provided by an embodiment of the present invention;
[0071] Figure 5 This is a schematic diagram of a block header size provided by an embodiment of the present invention;
[0072] Figure 6 is a schematic diagram of a block size provided by an embodiment of the present invention;
[0073] Figure 7 is a schematic diagram of the time cost of modifying a block provided by an embodiment of the present invention;
[0074] Figure 8 is a schematic diagram of the time cost of deleting consecutive blocks provided by an embodiment of the present invention;
[0075] Fig. 9 is a schematic diagram of the time cost of deleting discontinuous blocks provided by an embodiment of the present invention;
[0076] Fig.10 Schematic diagram of the time cost of verification append operation provided by an embodiment of the present invention;
[0077] Fig.11 Schematic diagram of the time cost of verifying and deleting operations provided by an embodiment of the present invention;
[0078] Fig.12 is a schematic diagram of the time overhead for verifying the deletion of consecutive blocks provided by an embodiment of the present invention;
[0079] Fig.13 Schematic diagram of time cost for verifying deletion of discontinuous blocks provided by an embodiment of the present invention;
[0080] Fig.14 This is a schematic diagram of the time cost of verifying the entire blockchain provided by an embodiment of the present invention; DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0082] In view of the problems existing in the prior art, the present invention provides a verifiable and fully editable blockchain system, method, device and terminal. The present invention is described in detail below with reference to the accompanying drawings.
[0083] 1. Explanatory Examples In order to enable those skilled in the art to fully understand how to implement the present invention, this section provides an illustrative example that expands and describes the technical solution of the claims.
[0084] like Figure 1 As shown, the verifiable and fully editable blockchain system control method provided by the embodiment of the present invention includes the following steps:
[0085] S101, system establishment: generating system parameters and key pairs for regulators;
[0086] S102, full editing operation of the block: the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to perform block appending, insertion, modification and deletion with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs;
[0087] S103, full edit verification of the block: Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status update;
[0088] S104, blockchain verification: verify the connectivity of the entire blockchain and the validity of the blockchain status, allowing new users to join the blockchain system.
[0089] Furthermore, the system establishment in step S101 includes:
[0090] (1) SysGen(1 λ )→(pp) algorithm, input the security parameter λ, and execute as follows:
[0091] Choose a cyclic group of order large prime number q and a group of unknown order Pick two generators and Initialize A0←h and select two hash functions H1: {0, 1} * →{0, 1} λ and H prime : {0, 1} * →Primes(λ), output system parameters
[0092] (2) KeyGen(pp)→(sk, pk) algorithm, input system parameter pp, and execute as follows:
[0093] Regulators randomly select Calculate Y=xP and output the key pair (sk, pk)=(x, Y).
[0094] Furthermore, the full editing operation of the block in step S102 includes:
[0095] (1) The input length is Blockchain Chameleon hash key pair (tk i , hk)=((sk,t i ), pk), where The supervisor is B i The specific trapdoor selected, B i The Merkle root m of the transaction contained in and the solution of the proof of work ctr are executed as follows:
[0096] Analysis calculate and Get B i of Find out Get the serial number i←s m +1; calculate η i ←H prime (m||i), get the accumulator state calculate Get with A i The corresponding evidence i ←Q i ; Supervisor calculation and B i The verification string of the chameleon hash corresponding to each field in Finally get Among them B i := <p i ,ctr,m,i,ξ i , A i , w i >.
[0097] (2) The input length is Blockchain B i The corresponding Chameleon hash key pair (tk i , hk)=((sk,t i ), pk), The corresponding Chameleon hash key pair B i The m and ctr values contained in To insert position l in the , execute as follows:
[0098] Analysis turn up Get B i The serial number i←s m +1; calculate η i ←Hprime (m||i), get the accumulator state calculate Get an A i Evidence i ←Q i ; Regulators calculate Use the Chameleon Hash Trapdoor to get the Chameleon Hash verification string thus
[0099] Due to the insertion of B i After that, the prev_hash of the original lth block changes, so the calculation Regulator calculations get At this time, the original lth block becomes Output blockchain
[0100] (3) The input length is Blockchain The lth block on the chain The modified target value m′, Chameleon key pair Execute as follows:
[0101] Analysis turn up Get the new sequence number i′←s m +1; Initialization calculate and Get evidence of old version data deletion Calculate η i′ ←H prime (m′||i′), get the updated accumulator state And evidence of adding new version data initialization if but Calculated by extended Euclidean algorithm Calculate μ i′ ←h α and v i′ ←A i′ β ,get All historical versions of data are not member proof (z i′ , d i′ , Q i′,3 )←NI-PoKE.Prove(β, A i′ , v i′ )and Combining the above results, we can get the evidence of the current accumulator state. The regulator calculates cont i′ ←p i ||m′||i′||A i′ ||w i′ , using the Chameleon Hash Trapdoor it holds to obtain the Chameleon Hash Verification String corresponding to the updated data Output Among them B i′ := <p i ,ctr i ,m′,i′,ξ i′ , A i′ , w i′ >.
[0102] (4) The input length is Blockchain A set of consecutive block positions The smallest of these is The largest record No. (L max +1) blocks in position The corresponding Chameleon hash key pair B containing Chuan and Ctr i The corresponding Chameleon hash (tk i , hk)=((sk,t i ), pk), this block is used to record the deletion event that occurred, and is executed as follows:
[0103] renew The prev_hash field Regulators calculate through Chameleon hash trapdoor Get the updated Recorded as
[0104] turn up Get the serial number i←s m +1; get calculate initialization and For all l∈L, compute And determine whether there is If yes, then Get the evidence that the block shown in L has been deleted Calculate η i ←H prime (m||i), get the new accumulator state and newly added B iEvidence initialization and calculate μ i ←h α 、v i ←A i β , get the evidence that all the deleted block history versions are invalid (z i , d i , Q i,3 )←NI-PoKE.Prove(β, A i , v i )and In summary, we get the evidence of the accumulator The regulator uses trapdoor calculation Output Among them B i := <p i ,ctr,m,i,ξ i , A i , w i >.
[0105] Furthermore, the full editing verification of the block in step S103 includes:
[0106] (1) Algorithm, input additional block B i , the length is The local blockchain of the validator Execute as follows:
[0107] Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where w i :=Q i , find out In Parse the serial number to s m Block Calculate cont i ←p i ||m i ||i||A i ||w i and If i == s m +1, H1(ctr i ||h i )<D, then calculate η i←H prime (m i ||i), and returns the verification result
[0108] (2) Algorithm, input is inserted into block B at position l i , the updated version of the block that was originally at that location Length is Validators of the local blockchain Execute as follows:
[0109] Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where w i :=Q i , analysis as well as on turn up And parse pass calculate If i == s m +1, H1(ctr i ||h i )<D holds true, then calculate and η i ←H prime (m i ||i), returns the verification result
[0110] (3) Algorithm, input the modified block B at the lth position i , the length is The local blockchain of the validator Execute as follows:
[0111] Parsing Block B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where Analyzing the blockchain on turn up of And parse Calculate conti ←p i ||m i ||i||A i ||w i And restore If H1(ctr i ||h i )<D and i==s m +1, then calculate η i ←H prime (m i ||i) and Return verification result & &NI-PoKE.Verify(A i , ν i , z i , d i , Q i,3 )&
[0112] (4) Algorithm, input block B that records the deletion event i , the set of deleted block locations Length is The local blockchain of the validator Execute as follows:
[0113] Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where Analysis In turn up In And parse use calculate If H1(ctr i ||h i )<D、i==s m +1, If both are true, then calculate η i ←H prime (m i |i) and Return verification result & &NI-PoKE.Verify(A i , ν i , z i , di , Q i,3 )&
[0114] Furthermore, the blockchain verification in step S104 includes:
[0115] The input length is Blockchain The validator performs the following:
[0116] For all j∈[n], calculate as well as If exists or Then return 0 directly; otherwise calculate turn up In And parse Return verification result
[0117] like Figure 2 As shown, the verifiable and fully editable blockchain system provided by the embodiment of the present invention includes:
[0118] System establishment module 1, used to generate system parameters and key pairs for regulators;
[0119] Full editing operation module 2, the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to perform block appending, insertion, modification, and deletion with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs;
[0120] Full edit verification module 3, used to use blockchain users to verify the validity of the certificate, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates;
[0121] The blockchain verification module 4 is used to verify the connectivity of the entire blockchain and the validity of the blockchain status, so that new users can join the blockchain system.
[0122] 2. Application Examples: In order to prove the creativity and technical value of the technical solution of the present invention, this section provides application examples of the technical solution of the claims on specific products or related technologies.
[0123] Blockchain technology has been praised for its immutability and has attracted widespread attention from academia, industry and other industries. However, permanent data storage is prone to copyright disputes and other issues, and some official organizations have also issued various data protection policies and laws and regulations, requiring blockchains to be editable. Editable blockchain is an excellent variant of blockchain, which allows block content to be edited without affecting other blocks in the blockchain. Most studies on editable blockchains only consider the modification and deletion of blocks, but ignore the insertion operation. This operation is different from block appending, which inserts a block at any position in a given blockchain. Block insertion is quite necessary when a smart contract has a code vulnerability that requires a patch to be added, or when a block is accidentally deleted. In addition, existing studies have not considered the verifiability of editable blockchains. However, the inability to verify the blockchain state will lead to attacks such as lazy updates and history replay, which seriously undermine the feasibility and usability of editable blockchains. Therefore, how to design an editable blockchain that supports full block editability and verifiable blockchain state is an urgent problem to be solved.
[0124] Aiming at the security, effectiveness, functionality, feasibility, and usability requirements of editable blockchains in real-world scenarios, the present invention proposes for the first time a verifiable and fully editable blockchain that simultaneously satisfies the full editability of blocks and the verifiability of blockchain states. The present invention constructs an editable blockchain based on a double-trapdoor chameleon hash cluster to achieve computationally efficient, key-leak-resistant block append, insert, modify, and delete operations. On this basis, combined with a trapdoor-free universal accumulator and a maximum sequence number consensus rule, the verifiability of blockchain states is achieved, effectively solving problems such as lazy updates and history replay.
[0125] 1. System architecture
[0126] like Figure 3 As shown, in a verifiable and fully editable blockchain system provided by an embodiment of the present invention, a block is defined as B=<p,m,i,A,w,ctr,ξ> . Let H1 be {0, 1} * →{0, 1} λ is a cryptographic collision-resistant hash function, is a chameleon hash function. A block is valid if and only if it satisfies the following formula:
[0127]
[0128] Among them, cont = p||m||i||A||w, p is the hash of the previous block, m is the Merkle tree root of the transactions contained in B, i is a globally unique sequence number, A is the accumulator state of the blockchain up to block B, w is the evidence corresponding to A, ctr is the nonce value of the proof of work, ξ is the verification string of the chameleon hash matching cont, and D is the difficulty value of the proof of work.
[0129] Blockchain It is composed of several blocks connected together, and its expansion method is to add blocks at the rightmost position. The rightmost block is called the chain head and is recorded as like The chain head of is B, then Expand to When B′:=<p′,m′,i′,A′,w′,ctr′,ξ′> The prev_hash field in satisfies
[0130] also, Represents the number of blocks in a blockchain. Assume Then for any 0≤k≤n, express The result of cutting off the leftmost k blocks is, is the result of cutting off the rightmost k blocks. Representatives in Insert block B at the kth position * ; Yes Modify The kth block of; Yes Delete The kth block of .
[0131] 2. Preliminary knowledge
[0132] (1) Chameleon hash function
[0133] Chen et al. proposed a double-trapdoor chameleon hash cluster that meets computational efficiency and collision resistance, denoted as a set of algorithms The specific description is as follows:
[0134] The algorithm inputs the security parameter λ and outputs the trapdoor key tk=(x, t) and the hash key hk=Y, where Y = xP, P is a group A generator of .
[0135] Algorithm, input tk, message m, calculate h = tP as the hash value. Randomly select Calculate the verification string ξ=(r,K), where K=kP, r=t-H0(m,K)·(k+x).
[0136] The algorithm can calculate the hash value h by h=H0(m, K)·(K+Y)+rP without tk.
[0137] algorithm, which verifies the formula Verify that the hash value matches the message and verification string.
[0138] The algorithm searches for a collision ξ′=(r′, K′) for a new message m′, where r′=t-H0(m′, K′)·(k′+x), K′=k′P,
[0139] (2) Concise non-interactive proof
[0140] NI-PoE is a discrete logarithmic relationship A concise proof of , is performed as follows:
[0141] 1) NI-PoE.Prove(x, u, w)→(Q) algorithm gives the proof: Calculate l←H prime (x, u, w), and r←x mod l, and give proof Q←u q .
[0142] 2) NI-PoE.Verify(x, u, w, Q)→({0, 1}) algorithm verification proof: Calculate l←H prime (x, u, w) and r←x mod l, verify the equality And output the result.
[0143] NI-PoKE is an extension of NI-PoE, which is a discrete logarithmic relationship A concise proof of knowledge is performed as follows:
[0144] 1) NI-PoKE.Prove(x,u,w)→(z,r,Q) algorithm gives the proof: Calculate z←u ′x , l←H prime (u, w, z), a←H(u, w, z, l) and Prove that (z, Q←(uu ′a ) q , r←x mod l).
[0145] 2) NI-PoKE.Verify(u, w, z, r, Q) → ({0, 1}) algorithm verification proof: calculation l←H prime (u, w, z) and a←H(u, w, z, l), by verifying the equation Q l (uu ′a ) r =wz a Give the verification results.
[0146] (3) Trap-free Universal Accumulator
[0147] The trap-free universal accumulator is an extension of the classic RSA accumulator for distributed scenarios. It does not require the participation of a trusted manager and supports both membership proof and non-membership proof. The accumulator is built on an unknown order group. The present invention makes some adaptive fine-tuning to it, and the algorithm composition.
[0148] Algorithm, input security parameter λ, output element set and the initial accumulator state A(S)←h, where
[0149] The purpose of the algorithm is to add an element to the accumulator and update its state. If x∈S, the accumulator state remains unchanged and directly outputs A(S′)←A(S); otherwise, the updated accumulator state A(S′)←A(S) is output. x .
[0150] The purpose of the algorithm is to remove an element from the accumulator and update its state. The accumulator state remains unchanged, and A(S′)←A(S) is directly output; otherwise, S′←S\{x} is executed, and the calculation is Output the updated accumulator state
[0151] The algorithm is to prove that x is in the accumulator set. Calculate and Give the proof π←NI-PoE.Prove(x,w,A(S)).
[0152] The algorithm is used to prove calculate Using the extended Euclidean algorithm Exgcd(x, x * ) Calculate d←hα and v←A(S) β, give a proof that π=(π d , π h )←(NI-PoKE.Prove(A(S), v, β), NI-PoE(x, d, hv -1 )).
[0153] In order to verify the validity of the membership proof, the verification result is determined by NI-PoE.Verify(x, w, A(S), π).
[0154] To verify the validity of the non-membership proof, the algorithm verifies the validity of the non-membership proof if and only if NI-PoKE.Verify(A(S), v, π d )→1 and NI-PoE.Verify(x, d, hv -1 , π h )→1 are both true, the verification is successful.
[0155] 3. Method Overview
[0156] The blockchain in this invention adopts the maximum sequence number consensus rule instead of the longest chain rule to encourage users to compete for the right to write blocks (i.e., revenue) based on the latest blockchain version, solving the problem of delayed editing and updating. In addition, in order to invalidate the historical version of the revised block, we use a trap-free universal accumulator to commit to all blocks in the blockchain, achieving the verifiability of the blockchain state.
[0157] Specifically, when there are block append and insert operations, the block creator uses Update the accumulator state and run Generate a membership proof for the accumulator for this block. Since inserting a block will destroy the connectivity of the blockchain due to the different operation positions, it is necessary to run an additional run for the blocks after the inserted block.
[0158] When a block needs to be modified, the block creator uses Delete the historical version and run Add the new version content to the accumulator. After that, run and Provide accumulator non-membership and membership proofs for invalid and valid versions respectively.
[0159] When a block is deleted, the intuitive solution is to call Update the accumulator state. However, since the latest block on the blockchain remains unchanged before and after the operation, such a simple operation will cause delayed editing and updating. Therefore, we append an additional new block to record the deletion event, called the record block, and the sequence number of this block is the maximum sequence number after the update. Then execute Add the record block to the accumulator and run and Generate non-membership and membership proofs for deleted and added blocks respectively.
[0160] 4. Specific structure
[0161] The present invention consists of 11 algorithms in total, and the specific construction method is described as follows:
[0162] SysGen(1 λ )→(pp) algorithm, input the security parameter λ, and execute as follows:
[0163] 1) Choose a cyclic group of order q and a group of unknown order Pick two generators and Initialize A0←h.
[0164] 2) Select two hash functions H1: {0, 1} * →{0, 1} λ and H prime : {0, 1} * →Primes(λ).
[0165] 3) Output system parameters
[0166] KeyGen(pp)→(sk, pk) algorithm, input system parameter pp, execute as follows:
[0167] 1) Supervisors are randomly selected Calculate Y=xP.
[0168] 2) Output the key pair (sk, pk) = (x, Y).
[0169] The input length is Blockchain Chameleon hash key pair (tk i , hk)=((sk,t i ), pk), where The supervisor is B i The specific trapdoor selected, B i The Merkle root m of the transaction contained in and the solution of the proof of work ctr are executed as follows:
[0170] 1) Analysis calculate and Get B i The prev_hash field
[0171] 2) Find out Get the serial number i←s m +1; calculate η i ←H prime (m||i), get the accumulator state calculate Get with A i The corresponding evidence i ←Q i .
[0172] 3) Supervisor calculation and B i The verification string of the chameleon hash corresponding to each field in
[0173] 4) Output blockchain Among them B i := <p i ,ctr,m,i,ξ i , A i , w i >.
[0174] The input length is Blockchain B i The corresponding Chameleon hash key pair (tk i , hk)=((sk,t i ), p k ), The corresponding Chameleon hash key pair B i The m and ctr values contained in To insert position l in the , execute as follows:
[0175] 1) Solution turn up Get B i The serial number i←s m +1; calculate η i ←H prime (m||i), get the accumulator state calculate Get an A i Evidence i ←Q i .
[0176] 2) Regulator calculation Use the Chameleon Hash Trapdoor to get the Chameleon Hash verification string thus
[0177] 3) Due to the insertion of B i After that, the prev_hash of the original lth block changes, so the calculation Regulator calculations get At this time, the original lth block becomes
[0178] 4) Output blockchain
[0179] The input length is Blockchain The lth block on the chain The modified target value m′, Chameleon key pair Execute as follows:
[0180] 1) Analysis turn up Get the new sequence number i′←s m +1.
[0181] 2) Initialization calculate and Get evidence of old version data deletion
[0182] 3) Calculate η i′ ←H prime (m′||i′), get the updated accumulator state And evidence of adding new version data
[0183] 4) Initialization if but Calculated by extended Euclidean algorithm Calculate μ i′ ←h α and ν i′ ←A i′ β ,get All historical versions of data are not member proof (z i′ , d i′ , Q i′,3 )←NI-PoKE.Prove(β, A i′ , ν i′ )and
[0184] 5) Get evidence of the current accumulator state
[0185] 6) The supervisor calculates cont i′ ←p i ||m′||i′||A i′ ||w i′ , using the Chameleon Hash Trapdoor it holds to obtain the Chameleon Hash Verification String corresponding to the updated data
[0186] 7) Export blockchain Among them B i′ := <p i ,ctr i ,m′,i′,ξ i′ , A i′ , w i′ >.
[0187] The input length is Blockchain A set of consecutive block positions The smallest of these is The largest record No. (L max +1) blocks in position The corresponding Chameleon hash key pair B containing m and ctr i The corresponding Chameleon hash (tk i , hk)=((sk,t i ), pk), this block is used to record the deletion event that occurred, and is executed as follows:
[0188] 1) Update of Regulators calculate through Chameleon hash trapdoor Get the updated Recorded as
[0189] 2) Find Get the serial number i←s m +1; get calculate initialization and For all l∈L, compute And determine whether there is If yes, then Get the evidence that the block shown in L has been deleted
[0190] 3) Calculate η i ←H prime (m||i), get the new accumulator state and newly added B i Evidence
[0191] 4) Initialization and calculate μ i ←h α 、v i ←A i β , get the evidence that all the deleted block history versions are invalid (z i , d i , Q i,3 )←NI-PoKE.Prove(β, A i , ν i )and
[0192] 5) In summary, we get the evidence of the accumulator
[0193] 6) The supervisor uses trapdoor calculation
[0194] 7) Export blockchain Among them B i := <p i ,ctr,m,i,ξ i , A i , w i >.
[0195] Algorithm, input additional block B i , the length is The local blockchain of the validator Execute as follows:
[0196] 1) Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where w i :=Q i .
[0197] 2) Find out In Parse the serial number to s m Block
[0198] 3) Calculate cont i ←p i ||m i ||i||Ai ||w i and
[0199] 4) If i == s m +1, H1(ctr i ||h i )<D, then calculate η i ←H prime (m i ||i).
[0200] 5) Return verification results
[0201] Algorithm, input is inserted into block B at position l i , the updated version of the block that was originally at that location Length is Validators of the local blockchain Execute as follows:
[0202] 1) Analysis B i := <p i ,ctr i, m i ,i,ξ i , A i , w i >, where w i :=Q i , analysis as well as on
[0203] 2) Find And parse
[0204] 3) Pass calculate
[0205] 4) If i == s m +1, H1(ctr i ||h i )<D holds true, then calculate and η i ←H prime (m i ||i).
[0206] 5) Return verification results
[0207] Algorithm, input the modified block B at the lth positioni , the length is The local blockchain of the validator Execute as follows:
[0208] 1) Parsing block B i := <p i ,ctr i , m i ,i,ξ i , A i , w i >, where Analyzing the blockchain on
[0209] 2) Find of And parse
[0210] 3) Calculate cont i ←p i ||m i ||i||A i ||w i And restore
[0211] 4) If H1(ctr i ||h i )<D and i==s m +1, then calculate η i ←H prime (m i ||i) and
[0212] 5) Return verification results & &NI-PoKE.Verify(A i , v i , z i , d i , Q i,3 )&
[0213] Algorithm, input block B that records the deletion event i , the set of deleted block locations Length is The local blockchain of the validator Execute as follows:
[0214] 1) Analysis B i := <p i ,ctr i , m i,i,ξ i , A i , w i >, where Analysis In turn up In And parse
[0215] 2) Utilize calculate
[0216] 3) If H1(ctr i ||h i )<D、i==s m +1, If both are true, then calculate η i ←H prime (m i |i) and
[0217] 4) Return verification results & &NI-PoKE.Verify(A i , v i , z i , d i , Q i,3 )&
[0218] The input length is Blockchain The validator performs the following:
[0219] 1) For all j∈[n], calculate as well as
[0220] 2) If it exists or Then return 0 directly.
[0221] 3) Otherwise calculate turn up In And parse
[0222] 4) Return verification results
[0223] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0224] 3. Evidence of the effects of the embodiments. The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages over the prior art. The following content is described in conjunction with the data, charts, etc. of the test process.
[0225] In order to test the present invention, the blockchain of the present invention was implemented by programming. At the same time, the scheme of the present invention was compared with the ordinary blockchain that cannot be edited and the Ateniese scheme [Redactable blockchain-or-rewriting history in bitcoin and friends].
[0226] The present invention was implemented using Python 3.8.10 on Ubuntu 20.04.4LTS (2GB memory) running on VMware 12.5.2, and the experimental equipment was equipped with Intel(R) Core(TM) i5-7500 CPU@3.40GHz and 8GB memory. The collected experimental data were graphed using MATLAB R2019a V9.
[0227] We demonstrate the practicality of the blockchain of the present invention from three aspects:
[0228] 1. When no editing operations are involved, what is the cost of generating a block compared to the non-editable ordinary blockchain and the Ateniese solution;
[0229] Second, the time required to edit (modify / delete) an existing block compared to the Ateniese solution;
[0230] 3. The cost of verifying various editing operations and the entire blockchain.
[0231] First, compare the cost of generating a block, such as Figure 4-6 As shown in , we tested the cost of generating blocks in . Figure 4 As can be seen from the figure, since ordinary blockchains are not editable, the time required to generate a block is the least. In addition, since the present invention realizes the verifiability of the blockchain state, it is necessary to run an additional and The algorithm generates verifiable accumulator states, so its runtime for generating blocks is slightly higher than the Ateniese scheme. Figure 5 The sizes of the block headers of the above three blockchains are compared in . Since the present invention needs to record the membership evidence of the current version of the block belonging to the accumulator and the non-membership evidence of its historical version, the size of the block header is slightly larger than that of the other two solutions. Figure 6 As shown, the size difference of the block header is negligible for the entire block. In summary, the additional overhead in the block generation process does not affect the usability of the verifiable and fully editable blockchain in the present invention.
[0232] Secondly, compare the cost of editing blocks. Figure 7-9 The figure shows the comparison of the running time of modifying and deleting blocks in the present invention and the Ateniese solution. Figure 7 It can be seen that the computational cost of modifying a block in the Ateniese scheme is constant, while in the present invention it increases with the length of the blockchain. This is because the present invention calls The algorithm invalidates the historical version of the modified block, thereby resisting replay attacks and enhancing the security and availability of the blockchain. Figure 8-9 The following is the comparison result of the deletion operation. We divide the position set L of the deleted blocks into two categories for testing: one is the set of continuous positions; the other is the set of discontinuous positions, which can be regarded as the union of multiple sets containing continuous positions. In the Ateniese scheme, each continuous subset needs to be found after being deleted. Therefore, the running time does not change with the number of continuous blocks in the set, but increases with the increase of the number of subsets. In the blockchain of the present invention, in addition to executing the same method as the Ateniese scheme, In addition, H needs to be calculated for all deleted blocks. prime (·) and perform cumulative multiplication. Therefore, the running time of the deletion operation will increase in both cases. However, since the additional computational cost in the present invention is to achieve the verifiability of the blockchain state, these additional small overheads are acceptable in real scenarios.
[0233] Finally, the overhead of verifying the editing operation and verifying the blockchain is tested. Since the editable blockchain in the present invention is verifiable, Figure 10-14 The cost of each operation in the verification and the cost of verifying the entire blockchain were tested in . Figure 10-11 As can be seen from the figure, the verification time for block creation and modification does not vary with the length of the blockchain. The whole process is user-friendly and its time cost is only about tens of milliseconds. Figure 12-13 In this paper, the running time of the deletion operation is verified by dividing the deleted blocks into two cases: whether the deleted blocks are continuous or not. prime (·) and multiply, so the runtime increases with the number of subsets and the size of L. Even so, the runtime of verifying deletion is only in milliseconds. Fig.14 The figure below is a comparison of the time required to verify blockchains with lengths between 100 and 1100 between the blockchain of the present invention and the common blockchain and the Ateniese solution. Although the verification time of the three blockchains increases with the length of the blockchain, the verification time of the blockchain of the present invention is several seconds longer than that of the other two. This is because the present invention needs to restore the accumulator state of the current blockchain and compare it with the latest state recorded on the chain to verify the state of the blockchain.
[0234] In summary, the verifiability of the blockchain in the present invention imposes an acceptable computational burden on users and does not affect its feasibility.
[0235] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A verifiable and fully editable blockchain system control method, characterized in that: The verifiable and fully editable blockchain system control method includes four processes: system establishment, full editing operation of blocks, full editing verification of blocks and blockchain verification; After generating system parameters, the regulator generates its own regulatory key pair; the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs; Blockchain users verify the validity of proofs, adopt various operations according to the maximum sequence number consensus rule, and implement distributed blockchain status updates; when new users join the blockchain system, verify the connectivity of the entire blockchain and the validity of the blockchain status; The verifiable and fully editable blockchain system control method comprises the following steps: Step 1: System establishment: Generate system parameters and key pairs for regulators; Step 2: Full editing of blocks: The block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify, and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs; Step 3: Full edit verification of the block: Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and implement distributed blockchain status updates; Step 4: Blockchain verification: Verify the connectivity of the entire blockchain and the validity of the blockchain status, so that new users can join the blockchain system; The system establishment in step 1 includes: (1) SysGen(1 λ )→(pp) algorithm, input the security parameter λ, and execute as follows: Choose a cyclic group of order large prime number q and a group of unknown order Pick two generators and Initialize A0←h and select two hash functions H1: {0, 1} * →{0, 1} λ and H prime : {0, 1} * →Primes(λ), output system parameters (2) KeyGen(pp)→(sk, pk) algorithm, input system parameter pp, and execute as follows: Regulators randomly select Calculate Y = xP, and output the key pair (sk, pk) = (x, Y); The full editing operation of the block in step 2 includes: (1) The input length is Blockchain Chameleon hash key pair (tk i , hk)=((sk,t i ), pk), where The supervisor is B i The specific trapdoor selected, B i The Merkle root m of the included transactions and the solution ctr of the proof of work are executed as follows: Analysis calculate and Get B i of Find out Get the serial number i←s m +1; calculate η i ←H prime (m||i), get the accumulator state calculate Get with A i Corresponding evidence i ←Q i ; Supervisor calculation and B i The verification string of the chameleon hash corresponding to each field in Finally get Among them B i := <p i ,ctr,m,i,ξ i , A i ,ω i > (2) The input length is Blockchain B i The corresponding Chameleon hash key pair (tk i , hk)=((sk,t i ), pk), The corresponding Chameleon hash key pair B i The m and ctr values contained in To insert position l in the , execute as follows: Analysis turn up Get B i The serial number i←s m +1; calculate η i ←H prime (m||i), get the accumulator state calculate Get an A i Evidence i ←Q i ; Regulators calculate Use the Chameleon Hash Trapdoor to get the Chameleon Hash verification string thus Due to the insertion of B i After that, the prev_hash of the original lth block changes, so the calculation Regulator calculations get The original lth block becomes Output blockchain (3) The input length is Blockchain The lth block on the chain The modified target value m′, Chameleon key pair Execute as follows: Analysis turn up Get the new sequence number i′←s m +1; Initialization calculate and Get evidence of old version data deletion Calculate η i′ ←H prime (m′‖i′), get the updated accumulator state And evidence of adding new version data initialization if but Calculated by extended Euclidean algorithm Calculate μ i′ ←h α and v i′ ←A i′ β, we get All historical versions of data are non-member proof (z i′ , d i′ , Q i′,3 )←NI-PoKE.Prove(β, A i′ , v i′ )and Combining the above results, we can get the evidence of the current accumulator state. The regulator calculates and uses the cont i′ ←p i ||m′‖i′||A i′ ‖ω i′ Chameleon hash trapdoor obtains the chameleon hash verification string corresponding to the updated data Output Among them B i′ := <p i ,ctr i ,m′,i′,ξ i′ , A i′ ,ω i′ > (4) The input length is Blockchain A set of consecutive block positions The smallest of these is The largest record No. (L max +1) blocks in position The corresponding Chameleon hash key pair B containing m and ctr i The corresponding Chameleon hash (tk i , hk)=((sk,t i ), pk), this block is used to record the deletion event that occurred, and is executed as follows: renew of Regulators calculate through Chameleon hash trapdoor Get the updated Recorded as ;turn up Get the serial number i←s m +1; get calculate initialization and For all l∈L, compute And determine whether there is If yes, then Get the evidence that the block shown in L has been deleted Calculate η i ←H prime (m||i), get the new accumulator state and newly added B i Evidence initialization and calculate μ i ←h α , ν i ←A i β , get the evidence that all the deleted block history versions are invalid (z i , d i , Q i,3 )←NI-PoKE.Prove(β, A i , v i )and In summary, we get the evidence of the accumulator ; The regulator calculates through the trapdoor ; Final output Among them B i := <p i ,ctr,m,i,ξ i , A i ,ω i > The full edit verification of the block in step 3 includes: (1) Algorithm, input additional block B i , the length is The local blockchain of the validator Execute as follows: Analysis of S i := <p i , ctr i , m i , i, ξ i , A i , ω i >, where ω i := Q i , find in the block with parsing serial number s m Calculate cont i ← p i || m i || i || A i || ω i and ; if i == s m + 1, H1(ctr i || h i ) < D both hold, then calculate η i ← H prime (m i || i), and return the verification result: (2) Algorithm, input is inserted into block B at position l i , an updated version of the block that was originally at that location, with a length of Validators of the local blockchain Execute as follows: Analysis B i :=(p i ,ctr i , m i ,i,ξ i , A i ,ω i >, where ω i :=Q i , analysis and C turn up And parse pass Calculate h i , If i == s m +1, H1(ctr i ||h i )<D holds true, then calculate And, η i ←H prime (m i ||i), returns the verification result (3) Algorithm, input the modified block B at the Zth position i , the length is The local blockchain of the validator Execute as follows. Parsing block B i : = <p i , ctr i , m i , i, ξ i , A i , ω i 】>, where Parsing blockchain on found of and parse Calculate cont i ← p i || m i || i || A i || ω i and recover If H1(ctr i || h i ) < D and i == s m + 1, then calculate η i ← H prime (m i || i) and Return the verification result & & NI - PoKE.Verify(A i , v i , z i , d i , Q i.3 ) & (4) Algorithm, input block B that records the deletion event i , the set of deleted block locations Length is The local blockchain of the validator Execute as follows: Analysis B i := <p i ,ctr i , m i ,i,ξ i , A i ,ω i >, where Analysis In turn up In And parse use Calculate h i , If H1(ctr i ||h i )<D、i==s m +1, If both are true, then calculate η i ←H prime (m i ||i) and Return verification result & &NI-PoKE.Verify(A i , ν i , z i , d i , Q i,3 )& The blockchain verification in step 4 includes: The input length is Blockchain The validator performs the following: For all j∈[n], calculate as well as If exists or Then return 0 directly; otherwise calculate turn up In And parse Return verification result 2. A verifiable and fully editable blockchain system using the verifiable and fully editable blockchain system control method as claimed in claim 1, characterized in that: The verifiable and fully editable blockchain system includes: System establishment module, used to generate system parameters and key pairs for regulators; Full editing operation module, the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to perform block append, insertion, modification and deletion with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs; Full edit verification module, which is used to verify the validity of blockchain users, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates; The blockchain verification module is used to verify the connectivity of the entire blockchain and the validity of the blockchain status, allowing new users to join the blockchain system.
3. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the verifiable and fully editable blockchain system control method according to claim 1, comprising the following steps: After generating system parameters, the regulator generates its own regulatory key pair; the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs; Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates; when a new user joins the blockchain system, the connectivity of the entire blockchain and the validity of the blockchain status are verified.
4. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the verifiable and fully editable blockchain system control method of claim 1, comprising the following steps: After generating system parameters, the regulator generates its own regulatory key pair; the block creator uses a double-trapdoor chameleon hash cluster and a trapdoor-free universal accumulator to append, insert, modify and delete blocks with the assistance of the regulator, update the blockchain status, and generate corresponding non-interactive verifiable proofs; Blockchain users verify the validity of the proof, adopt various operations according to the maximum sequence number consensus rule, and realize distributed blockchain status updates; when a new user joins the blockchain system, the connectivity of the entire blockchain and the validity of the blockchain status are verified.
5. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the verifiable and fully editable blockchain system as described in claim 2.
