CN115118429A - Verifiable and fully editable block chain system, method, equipment and terminal - Google Patents

Verifiable and fully editable block chain system, method, equipment and terminal Download PDF

Info

Publication number
CN115118429A
CN115118429A CN202210281106.8A CN202210281106A CN115118429A CN 115118429 A CN115118429 A CN 115118429A CN 202210281106 A CN202210281106 A CN 202210281106A CN 115118429 A CN115118429 A CN 115118429A
Authority
CN
China
Prior art keywords
block
block chain
supervisor
verifiable
trapdoor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210281106.8A
Other languages
Chinese (zh)
Inventor
陈晓峰
沈珺
田国华
王剑锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN202210281106.8A priority Critical patent/CN115118429A/en
Publication of CN115118429A publication Critical patent/CN115118429A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/60Digital content management, e.g. content distribution
    • H04L2209/603Digital right managament [DRM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the technical field of block chain safety, and discloses a verifiable and completely editable block chain system, method, equipment and terminal.A supervisor generates a supervision key pair after generating system parameters; the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate; verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating; and when a new user joins the block chain system, verifying the connectivity of the whole block chain and the validity of the block chain state.

Description

Verifiable and fully editable block chain system, method, equipment and terminal
Technical Field
The invention belongs to the technical field of block chain security, and particularly relates to a verifiable and completely editable block chain system, method, equipment and terminal.
Background
At present, a block chain technology is an organic integration of a plurality of technologies such as distributed consensus, intelligent contracts and cryptography, is essentially a distributed block chain type data structure, and has the excellent characteristics of decentralization, distrust, public transparency, no tampering and the like. In recent years, the block chain technology has attracted wide attention of all social circles, has led to the research enthusiasm of academic circles and industrial circles, and has received high attention from governments of all countries in the world. The non-tamper property is one of the most important features of the block chain technology and is also an important reason for its pursuit. The characteristic eliminates the dependence of entities which are not trusted with each other in an untrusted environment on third-party intermediaries, lays an important foundation stone for the safety and the transparency of various applications of the block chain, and promotes the block chain to play a continuous positive role in the economic society.
However, persistent data storage is not applicable to all application scenarios of blockchains. For example, the transaction field of the blockchain can be inserted with contents in any format, some malicious users can insert some pornography, illegal websites and other illegal or even illegal data opportunistically, and the contents are all stored in the blockchain system permanently. In the face of this situation, a large number of users worry about some illegal contents left on the computer after downloading the blockchain, and are reluctant to add the blockchain system, which seriously damages the blockchain ecosystem. It can be seen that when data that cannot be tampered with becomes a burden, it is highly desirable that the blockchain have editable functionality. At the same time, some official organizations have promulgated various data protection policies and laws and regulations requiring block chaining to have editable properties. For example, the european union 'universal data protection regulation' uses "forgotten rights" as a key right of a data body, and specifies that the data body has a right to require a data controller to delete personal data, and that the controller is responsible for deleting personal data in a timely manner under specific circumstances. Therefore, the method has important practical significance for editable block chain expansion research.
As is known, the hash value of the previous block in the chain of blocks is the prev _ hash field of the next block, thus forming a so-called "chain", the non-tamperptability of which is due to the collision resistance of the hash function. Inspired by the above, the Atenies et al first proposed a method for modifying and deleting a block, and the core idea thereof is to replace a common hash function with a chameleon hash function, so that a chameleon hash trapdoor holder can modify the contents of the block by searching for a collision of a hash value without affecting other blocks in a block chain. Following this breakthrough work, more and more experts have developed more intensive research into editable blockchains.
Most existing editable block chains only support two operations of modification and deletion, and the insertion operation is omitted. The block insertion is different from the conventional addition operation in that the operation position thereof is an arbitrary position in the block chain except for the chain head. As is well known, smart contracts are a series of automatically executing computer programs running on a blockchain. In 2016, 6 months, the DAO contract was hacked because of the code vulnerability, losing 3641694 ETH. If the time zone block chain supports the insertion operation, the patch code can be quickly inserted and the loss can be stopped in time. In addition, since the editable block chain supports the deletion operation, it is difficult to avoid the occurrence of the false deletion, and the insertion operation needs to be performed for timely correction. Dousti et al attempts to propose a signature-based editable blockchain that supports full operations. However, the proposed method is not compatible with delete operations and it is difficult to maintain a consistent blockchain state due to its imperfect verification policy.
Existing editable block chains lack verifiability of the block chain state. However, verifiable editable blockchains are necessary in real world applications. In the conventional block chain verification process, it is mainly checked whether the prev-hash of the next block is the hash value of the previous block, i.e. the connectivity of the chain, regardless of the content version of the block. An editable blockchain based on chameleon hash passes verification even if it does not update the blockchain to the latest state as required. Thus, if the state of the blockchain does not support verifiability, the editable blockchain is not valid and feasible. Therefore, it is of great significance to study a block chain that is verifiable and fully editable.
In addition, the verified and completely editable block chain is provided, so that not only is complete editability realized, but also verifiability of the state of the block chain is realized, all editing operations are ensured to be updated on the local block chain of a user in a distributed manner, and the problems of sluggish updating, historical replay and the like are solved.
Through the above analysis, the problems and defects of the prior art are as follows:
(1) the existing editable block chain can not realize complete editability, and is difficult to be compatible with block adding, inserting, modifying and deleting operations at the same time.
(2) The existing editable block chain lacks the verifiability of the state of the block chain, and can be attacked by sluggish updating, historical replay and the like.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a verifiable and fully editable block chain system, a method, equipment and a terminal.
The invention is realized by a verifiable and fully editable block chain system control method, which comprises the following steps: the method comprises four processes of system establishment, full editing operation of the blocks, full editing verification of the blocks and block chain verification.
After generating system parameters, a supervisor generates a supervisory key pair of the supervisor; the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating; when a new user joins the block chain system, the connectivity of the whole block chain and the validity of the block chain state are verified.
Further, the verifiable and fully editable block chain system control method comprises the following steps:
step one, system establishment: generating system parameters and generating a key pair for a supervisor;
step two, block full editing operation: the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
step three, block full editing verification: verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating;
step four, verifying the block chain: and verifying the connectivity of the whole block chain and the validity of the block chain state, so that a new user is added into the block chain system.
Further, the system establishment in the first step includes:
(1)SysGen(1 λ ) The → (pp) algorithm, inputs the security parameter λ, performs as follows:
selecting a cyclic group with a large prime number q
Figure RE-GDA0003810504540000031
And an unknown order group
Figure RE-GDA0003810504540000032
Selecting two generators
Figure RE-GDA0003810504540000033
And
Figure RE-GDA0003810504540000034
initialization A 0 And c, refining the mixture to obtain two Hash functions H 1 :{0,1} * →{0,1} λ And H prime :{0,1} * → Primes (. lamda.), output System parameters
Figure RE-GDA0003810504540000035
(2) The KeyGen (pp) → (sk, pk) algorithm, entering the system parameters pp, performs the following:
supervisorRandom selection
Figure RE-GDA0003810504540000036
Y is calculated as xP, and the output key pair (sk, pk) is (x, Y).
Further, the full editing operation of the block in the second step includes:
(1)
Figure RE-GDA0003810504540000037
algorithm, input length of
Figure RE-GDA0003810504540000038
Block chain of
Figure RE-GDA0003810504540000039
Chameleon hash key pair (tk) i ,hk)=((sk,t i ) Pk) of, wherein
Figure RE-GDA00038105045400000310
The supervisor is B i Selected specific trapdoors, B i The Merkle root of the transaction and the solution ctr of the workload certification are executed as follows:
Parse
Figure RE-GDA00038105045400000311
computing
Figure RE-GDA00038105045400000312
And
Figure RE-GDA00038105045400000313
to obtain B i Is/are as follows
Figure RE-GDA00038105045400000314
Find out
Figure RE-GDA00038105045400000315
Get the serial number i ← s m + 1; calculating eta i ←H prime (m | | i) to get the accumulator state
Figure RE-GDA00038105045400000316
Computing
Figure RE-GDA00038105045400000317
To obtain a i Corresponding evidence w i ←Q i (ii) a Supervisor calculation and B i Chameleon hash verification string corresponding to each field in the database
Figure RE-GDA00038105045400000318
To obtain finally
Figure RE-GDA00038105045400000319
Wherein B is i :=<p i ,ctr,m,i,ξ i ,A i ,w i >。
(2)
Figure RE-GDA00038105045400000320
Algorithm, input length of
Figure RE-GDA00038105045400000321
Block chain of (2)
Figure RE-GDA00038105045400000322
B i Corresponding chameleon hash key pair (tk) i ,hk)=((sk,t i ),pk),
Figure RE-GDA00038105045400000323
Corresponding chameleon hash key pair
Figure RE-GDA00038105045400000324
B i The values of m and ctr contained in the table are
Figure RE-GDA00038105045400000325
At position l of the insertion, the following is performed:
Parse
Figure RE-GDA00038105045400000326
find out
Figure RE-GDA00038105045400000327
To obtain B i Serial number i ← s m + 1; calculating eta i ←H prime (m | | i), resulting in the accumulator state
Figure RE-GDA00038105045400000328
Calculating out
Figure RE-GDA00038105045400000329
To obtain A i Evidence w of (A) i ←Q i (ii) a Supervisor calculations
Figure RE-GDA00038105045400000330
Verification string for obtaining chameleon hash by using chameleon hash trapdoor held by chameleon hash trapdoor
Figure RE-GDA00038105045400000331
Thereby the device is provided with
Figure RE-GDA00038105045400000332
Due to the insertion of B i Prev _ hash of the last original block is changed, so calculation
Figure RE-GDA00038105045400000333
Supervisor calculations
Figure RE-GDA00038105045400000334
To obtain
Figure RE-GDA00038105045400000335
At this time, the original first block becomes
Figure RE-GDA00038105045400000336
Output block chain
Figure RE-GDA00038105045400000337
(3)
Figure RE-GDA00038105045400000338
Algorithm, input length of
Figure RE-GDA00038105045400000339
Block chain of (2)
Figure RE-GDA00038105045400000340
The first block in the chain
Figure RE-GDA0003810504540000041
The modified target value m' of (a),
Figure RE-GDA0003810504540000042
chameleon key pair
Figure RE-GDA0003810504540000043
The following is performed:
Parse
Figure RE-GDA0003810504540000044
find out
Figure RE-GDA0003810504540000045
Obtaining new serial number i' ← s m + 1; initialization
Figure RE-GDA0003810504540000046
Computing
Figure RE-GDA0003810504540000047
And
Figure RE-GDA0003810504540000048
obtaining evidence of data deletion of old version
Figure RE-GDA0003810504540000049
Calculating eta i′ ←H prime (m '| i') to get updated accumulator state
Figure RE-GDA00038105045400000410
And evidence to add new version data
Figure RE-GDA00038105045400000411
Initialization
Figure RE-GDA00038105045400000412
If it is not
Figure RE-GDA00038105045400000413
Then the
Figure RE-GDA00038105045400000414
By extended Euclidean algorithm computation
Figure RE-GDA00038105045400000415
Calculating mu i′ ←h α And v i′ ←A i′ β To obtain
Figure RE-GDA00038105045400000416
Non-member proof of all historical version data (z) i′ ,d i′ ,Q i′3 )←NI-PoKE.Prove(β A i′ ,ν i′ ) And Q i′,4 ←NI-PoE.
Figure RE-GDA00038105045400000456
Synthesizing the above results to obtain evidence of the current accumulator state
Figure RE-GDA00038105045400000417
Supervisor calculates cont i′ ←p i ||m′||i′||A i′ ||w i′ And obtaining the chameleon Hash verification string corresponding to the updated data by using the chameleon Hash trapdoor held by the chameleon Hash trapdoor
Figure RE-GDA00038105045400000418
Output of
Figure RE-GDA00038105045400000419
Wherein B is i′ :=<p i ,ctr i ,m′,i′,ξ i′ ,A i′ ,w i′ >。
(4)
Figure RE-GDA00038105045400000420
Algorithm, input length of
Figure RE-GDA00038105045400000421
Block chain of
Figure RE-GDA00038105045400000422
Continuous set of block locations
Figure RE-GDA00038105045400000423
The smallest of them is recorded as
Figure RE-GDA00038105045400000424
Maximum notation
Figure RE-GDA00038105045400000425
To (L) max +1) blocks in a position
Figure RE-GDA00038105045400000426
Corresponding chameleon hash key pair
Figure RE-GDA00038105045400000427
B comprising m and ctr i Corresponding chameleon hash (tk) i ,hk)=((sk,t i ) Pk), the block is used to record the deletion event, the following is performed:
updating
Figure RE-GDA00038105045400000428
Is/are as follows
Figure RE-GDA00038105045400000429
Supervisor calculates through chameleon hash trapdoor
Figure RE-GDA00038105045400000430
Is updated
Figure RE-GDA00038105045400000431
Record as
Figure RE-GDA00038105045400000432
Find out
Figure RE-GDA00038105045400000433
Get the serial number i ← s m + 1; to obtain
Figure RE-GDA00038105045400000434
Computing
Figure RE-GDA00038105045400000435
Initialization
Figure RE-GDA00038105045400000436
And
Figure RE-GDA00038105045400000437
for all L ∈ L, calculate
Figure RE-GDA00038105045400000438
And determine whether there is
Figure RE-GDA00038105045400000439
If so, then
Figure RE-GDA00038105045400000440
Get the evidence that the block indicated by the delete L is deleted
Figure RE-GDA00038105045400000441
Calculating eta i ←H prime (m | | i) to get a new accumulator state
Figure RE-GDA00038105045400000442
And newly added B i Evidence of (1)
Figure RE-GDA00038105045400000443
Initialization
Figure RE-GDA00038105045400000444
And
Figure RE-GDA00038105045400000445
computing
Figure RE-GDA00038105045400000446
μ i ←h α 、ν i ←A i β Evidence of historical version failure of all deleted blocks is obtained (z) i ,d i ,Q i,3 )←NI-PoKE.Prove(β,A i ,ν i ) And
Figure RE-GDA00038105045400000447
to sum up, obtain the evidence of the accumulator
Figure RE-GDA00038105045400000448
The supervisor calculates through the trapdoor
Figure RE-GDA00038105045400000449
Output of
Figure RE-GDA00038105045400000450
Wherein B is i :=<p i ,ctr,m,i,ξ i ,A i ,w i >。
Further, the full edit verification of the block in step three comprises:
(1)
Figure RE-GDA00038105045400000451
algorithm, input additional Block B i Length of
Figure RE-GDA00038105045400000452
Is local to the verifier
Figure RE-GDA00038105045400000453
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i Find out
Figure RE-GDA00038105045400000454
In (1)
Figure RE-GDA00038105045400000455
Resolve the sequence number as s m Block of
Figure RE-GDA0003810504540000051
Calculating cont i ←p i ||m i ||i||A i ||w i And
Figure RE-GDA0003810504540000052
if i is equal to s m +1、
Figure RE-GDA0003810504540000053
H 1 (ctr i ||h i ) If both < D are true, then η is calculated i ←H prime (m i I) and returns the verification result
Figure RE-GDA0003810504540000054
(2)
Figure RE-GDA0003810504540000055
Algorithm, input block B inserted in position l i Updated version of the block originally at that location
Figure RE-GDA0003810504540000056
Has a length of
Figure RE-GDA0003810504540000057
Is proved byLocal block chain of a person
Figure RE-GDA0003810504540000058
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i Analysis of
Figure RE-GDA0003810504540000059
And
Figure RE-GDA00038105045400000510
on
Figure RE-GDA00038105045400000511
Find out
Figure RE-GDA00038105045400000512
And analyze
Figure RE-GDA00038105045400000513
By passing
Figure RE-GDA00038105045400000514
Computing
Figure RE-GDA00038105045400000515
If i is equal to s m +1、
Figure RE-GDA00038105045400000516
H 1 (ctr i ||h i ) If < D is both true, then calculate
Figure RE-GDA00038105045400000517
And η i ←H prime (m i | i), returning a verification result
Figure RE-GDA00038105045400000518
(3)
Figure RE-GDA00038105045400000519
Algorithm, inputting modified block B at I position i Length of
Figure RE-GDA00038105045400000520
Is local to the verifier
Figure RE-GDA00038105045400000521
The following is performed:
parsing block B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >In which
Figure RE-GDA00038105045400000522
Resolving blockchains
Figure RE-GDA00038105045400000523
On
Figure RE-GDA00038105045400000524
Find out
Figure RE-GDA00038105045400000525
Is/are as follows
Figure RE-GDA00038105045400000526
And analyze
Figure RE-GDA00038105045400000527
Calculating cont i ←p i ||m i ||i||A i |w i And recover to
Figure RE-GDA00038105045400000528
If H is present 1 (ctr i ||h i ) < D and i ═ s m +1, then calculate η i ←H prime (m i I) and
Figure RE-GDA00038105045400000529
return authenticationAs a result, the
Figure RE-GDA00038105045400000530
&
Figure RE-GDA00038105045400000531
&NI-PoKE.Verify(A i ,ν i ,z i ,d i ,Q i,3 )&
Figure RE-GDA00038105045400000532
(4)
Figure RE-GDA00038105045400000533
Algorithm, input block B recording deletion event i Deleted set of block locations
Figure RE-GDA00038105045400000534
Has a length of
Figure RE-GDA00038105045400000535
Verifier's local blockchain
Figure RE-GDA00038105045400000536
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein
Figure RE-GDA00038105045400000537
Parse
Figure RE-GDA00038105045400000538
In (1)
Figure RE-GDA00038105045400000539
Find out
Figure RE-GDA00038105045400000540
In (1)
Figure RE-GDA00038105045400000541
And analyze
Figure RE-GDA00038105045400000542
By using
Figure RE-GDA00038105045400000543
Computing
Figure RE-GDA00038105045400000544
If H is present 1 (ctr i ||h i )<D、 i==s m +1、
Figure RE-GDA00038105045400000545
All are true, then η is calculated i ←H prime (m i I) and
Figure RE-GDA00038105045400000546
returning verification results
Figure RE-GDA00038105045400000547
&
Figure RE-GDA00038105045400000548
&NI-PoKE.Verify(A i ,ν i ,z i ,d i ,Q i,3 )&
Figure RE-GDA00038105045400000549
Further, the block chain verification in step four comprises:
Figure RE-GDA00038105045400000550
algorithm, input length of
Figure RE-GDA00038105045400000551
Block chain of
Figure RE-GDA00038105045400000552
The verifier performs the following:
for all j e [ n ∈ [ ]]Calculating
Figure RE-GDA00038105045400000553
And
Figure RE-GDA00038105045400000554
if present
Figure RE-GDA00038105045400000555
Or
Figure RE-GDA00038105045400000556
Then go back to 0 directly; otherwise calculate
Figure RE-GDA0003810504540000061
Find out
Figure RE-GDA0003810504540000062
In (1)
Figure RE-GDA0003810504540000063
And analyze
Figure RE-GDA0003810504540000064
Returning verification results
Figure RE-GDA0003810504540000065
Another object of the present invention is to provide a verifiable and fully editable block-chain system applying the verifiable and fully editable block-chain system control method, which comprises:
the system establishing module is used for generating system parameters and generating a key pair for a supervisor;
the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, adds, inserts, modifies and deletes blocks with the assistance of a supervisor, updates the state of a block chain, and generates a corresponding non-interactive verifiable certificate;
the full-editing verification module is used for adopting various operations according to the maximum serial number consensus rule by utilizing the validity of the block chain user verification certificate to realize distributed block chain state updating;
and the block chain verification module is used for verifying the connectivity of the whole block chain and the validity of the block chain state, so that a new user is added into the block chain system.
It is a further object of the invention to provide a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
after generating system parameters, a supervisor generates a supervisory key pair of the supervisor; the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating; and when a new user joins the block chain system, verifying the connectivity of the whole block chain and the validity of the block chain state.
It is another object of the present invention to provide a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
after generating system parameters, the supervisor generates a supervisory key pair of the supervisor; the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating; and when a new user joins the block chain system, verifying the connectivity of the whole block chain and the validity of the block chain state.
Another object of the present invention is to provide an information data processing terminal for implementing the verifiable and fully editable block-chaining system.
In combination with the technical solutions and the technical problems to be solved, please analyze the advantages and positive effects of the technical solutions to be protected in the present invention from the following aspects:
first, aiming at the technical problems existing in the prior art and the difficulty in solving the problems, the technical problems to be solved by the technical scheme of the present invention are closely combined with results, data and the like in the research and development process, and some creative technical effects are brought after the problems are solved. The specific description is as follows:
according to the method, the key pair of the supervisor is generated through the system establishing step, so that the supervisor can conveniently generate the chameleon hash which can be edited only by the supervisor for each block, and finally a fully editable block chain is constructed.
Aiming at the problems that the existing editable block chain is difficult to be compatible with block addition, insertion, modification and deletion operations at the same time, lacks the verifiability of the state of the block chain, is easy to suffer from sluggish updating, historical replay attack and the like, the invention provides the verifiable and completely editable block chain, can simultaneously realize the complete editability of the content of the block and the verifiability of the state of the block chain, has important significance for improving the feasibility and the practicability of the editable block chain, and is favorable for further promoting the development and the wide application of the block chain.
Secondly, considering the technical scheme as a whole or from the perspective of products, the technical effect and advantages of the technical scheme to be protected by the invention are specifically described as follows:
the invention can simultaneously realize the complete editability of the block chain and the verifiability of the state of the block chain, and solves the problems of sluggish updating, historical replay and the like of the editable block chain. The invention can realize the complete editability and verifiability of the block chain at the same time, has important significance for improving the feasibility and the practicability of the editable block chain, and is beneficial to further promoting the development and the wide application of the block chain.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for verifying and fully-editable block chain control according to an embodiment of the invention;
FIG. 2 is a block diagram of a verifiable and fully editable block chain system architecture provided by an embodiment of the present invention; in the figure: 1. a system establishing module; 2. a full editing operation module; 3. a full-editing verification module; 4. a block chain verification module.
FIG. 3 is a block chain architecture diagram that is verifiable and fully editable as provided by embodiments of the present invention;
FIG. 4 is a schematic diagram illustrating the time overhead for generating a block according to an embodiment of the present invention;
FIG. 5 is a block header size diagram according to an embodiment of the present invention;
FIG. 6 is a block size diagram according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of the time overhead of modifying a block according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating the time overhead for deleting consecutive blocks according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of the time overhead for deleting discontinuous blocks according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of the time overhead of a verify append operation provided by an embodiment of the present invention;
FIG. 11 is a schematic diagram illustrating the time overhead of verifying a delete operation according to an embodiment of the present invention;
FIG. 12 is a schematic diagram illustrating the time overhead for verifying deletion of consecutive blocks according to an embodiment of the present invention;
FIG. 13 is a schematic diagram illustrating the time overhead for verifying deletion of non-contiguous blocks according to an embodiment of the present invention;
FIG. 14 is a schematic diagram illustrating the time overhead for verifying the entire blockchain according to an embodiment of the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In view of the problems in the prior art, the present invention provides a verifiable and fully editable block chain system, method, device and terminal, and the present invention is described in detail below with reference to the accompanying drawings.
First, an embodiment is explained. This section is an explanatory embodiment expanding on the claims so as to fully understand how the present invention is embodied by those skilled in the art.
As shown in fig. 1, the method for controlling a block chain system that is verifiable and fully editable according to an embodiment of the present invention includes the following steps:
s101, system establishment: generating system parameters and generating a key pair for a supervisor;
s102, full editing operation of the blocks: the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
s103, block full-editing verification: verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating;
s104, block chain verification: and verifying the connectivity of the whole block chain and the validity of the block chain state, so that a new user is added into the block chain system.
Further, the system establishment in step S101 includes:
(1)SysGen(1 λ ) The → (pp) algorithm, inputs the security parameter λ, performs as follows:
selecting a cyclic group with order of large prime number q
Figure RE-GDA0003810504540000081
And an unknown order group
Figure RE-GDA0003810504540000082
Selecting two generators
Figure RE-GDA0003810504540000083
And
Figure RE-GDA0003810504540000084
initialization A 0 And c, mixing the obtained mixture to obtain two Hash functions H 1 :{0,1} * →{0,1} λ And H prime :{0,1} * → Primes (lambda), output system parameters
Figure RE-GDA0003810504540000085
(2) The KeyGen (pp) → (sk, pk) algorithm, entering the system parameters pp, performs the following:
supervisor random selection
Figure RE-GDA0003810504540000086
X, and (x, Y) are calculated as the output key pair (sk, pk).
Further, the full editing operation of the tile in step S102 includes:
(1)
Figure RE-GDA0003810504540000087
algorithm, input length of
Figure RE-GDA0003810504540000088
Block chain of
Figure RE-GDA0003810504540000089
Chameleon hash key pair (tk) i ,hk)=((sk,t i ) Pk) of, wherein
Figure RE-GDA00038105045400000810
The supervisor is B i Selected specific trapdoors, B i The Merkle root m of the transaction contained in and the solution ctr of the workload proof are executed as follows:
Parse
Figure RE-GDA00038105045400000811
computing
Figure RE-GDA00038105045400000812
And
Figure RE-GDA00038105045400000813
to obtain B i Is
Figure RE-GDA00038105045400000814
Find out
Figure RE-GDA00038105045400000815
Get the serial number i ← s m + 1; calculating eta i ←H prime (m | | i) to get the accumulator state
Figure RE-GDA00038105045400000816
Computing
Figure RE-GDA00038105045400000817
To obtain a i Corresponding evidence w i ←Q i (ii) a Supervisor calculation and B i Chameleon hash verification string corresponding to each field in the database
Figure RE-GDA00038105045400000823
To finally obtain
Figure RE-GDA00038105045400000818
Wherein B is i :=<p i ,ctr,m,i,ξ i ,A i ,w i >。
(2)
Figure RE-GDA00038105045400000819
Algorithm, input length of
Figure RE-GDA00038105045400000820
Block chain of
Figure RE-GDA00038105045400000821
B i Corresponding chameleon hash key pair (tk) i ,hk)=((sk,t i ),pk),
Figure RE-GDA00038105045400000822
Corresponding chameleon hash key pair
Figure RE-GDA0003810504540000091
B i The m and ctr values contained in the table are
Figure RE-GDA0003810504540000092
At position l of the insertion, the following is performed:
Parse
Figure RE-GDA0003810504540000093
find out
Figure RE-GDA0003810504540000094
To obtain B i Step (ii) serial number i ← s m + 1; calculating eta i ←H prime (m | | i) to get the accumulator state
Figure RE-GDA0003810504540000095
Computing
Figure RE-GDA0003810504540000096
To obtain A i Evidence w of (A) i ←Q i (ii) a Supervisor calculations
Figure RE-GDA0003810504540000097
Verification string for obtaining chameleon hash by using chameleon hash trapdoor held by chameleon hash trapdoor
Figure RE-GDA0003810504540000098
Thereby the device is provided with
Figure RE-GDA0003810504540000099
Due to the insertion of B i Prev _ hash of the last previous block is changed, so the calculation
Figure RE-GDA00038105045400000910
Supervisor calculations
Figure RE-GDA00038105045400000911
To obtain
Figure RE-GDA00038105045400000912
At this time, the original first block becomes
Figure RE-GDA00038105045400000913
Output block chain
Figure RE-GDA00038105045400000914
(3)
Figure RE-GDA00038105045400000915
Algorithm, input length of
Figure RE-GDA00038105045400000916
Block chain of
Figure RE-GDA00038105045400000917
The first block in the chain
Figure RE-GDA00038105045400000918
The modified target value m' of (a),
Figure RE-GDA00038105045400000919
chameleon key pair
Figure RE-GDA00038105045400000920
The following is performed:
Parse
Figure RE-GDA00038105045400000921
find out
Figure RE-GDA00038105045400000922
Obtaining new serial number i' ← s m + 1; initialization
Figure RE-GDA00038105045400000923
Computing
Figure RE-GDA00038105045400000924
And
Figure RE-GDA00038105045400000925
obtaining evidence of data deletion of old version
Figure RE-GDA00038105045400000926
Calculating eta i′ ←H prime (m '| i') to get updated accumulator state
Figure RE-GDA00038105045400000927
And evidence to add new version data
Figure RE-GDA00038105045400000928
Initialization
Figure RE-GDA00038105045400000929
If it is not
Figure RE-GDA00038105045400000930
Then
Figure RE-GDA00038105045400000931
By extended Euclidean algorithm computation
Figure RE-GDA00038105045400000932
Calculating mu i′ ←h α And v i′ ←A i′ β To obtain
Figure RE-GDA00038105045400000933
Non-member proof of all historical version data (z) i′ ,d i′ ,Q i′,3 )←NI-PoKE.Prove(β,A i′ ,v i′ ) And
Figure RE-GDA00038105045400000934
synthesizing the above results to obtain evidence of current accumulator state
Figure RE-GDA00038105045400000935
Supervisor calculates cont i′ ←p i ||m′||i′||A i′ ||w i′ And obtaining the chameleon Hash verification string corresponding to the updated data by using the chameleon Hash trapdoor held by the chameleon Hash trapdoor
Figure RE-GDA00038105045400000936
Output the output
Figure RE-GDA00038105045400000937
Wherein B is i′ :=<p i ,ctr i ,m′,i′,ξ i′ ,A i′ ,w i′ >。
(4)
Figure RE-GDA00038105045400000938
Algorithm, input length of
Figure RE-GDA00038105045400000939
Block chain of
Figure RE-GDA00038105045400000940
Continuous set of block locations
Figure RE-GDA00038105045400000941
The smallest of them is recorded as
Figure RE-GDA00038105045400000942
Maximum notation
Figure RE-GDA00038105045400000943
To (L) max +1) blocks in a position
Figure RE-GDA00038105045400000944
Corresponding chameleon hash key pair
Figure RE-GDA00038105045400000945
B comprising Sichuan and ctr i Corresponding chameleon hash (tk) i ,hk)=((sk,t i ) Pk), the block is used to record the deletion event, the following is performed:
updating
Figure RE-GDA00038105045400000946
Prev _ hash field of
Figure RE-GDA00038105045400000947
Supervisor calculation through chameleon Hash trapdoor
Figure RE-GDA00038105045400000948
Is updated
Figure RE-GDA00038105045400000949
Record as
Figure RE-GDA00038105045400000950
Find out
Figure RE-GDA00038105045400000951
Get the serial number i ← s m + 1; to obtain
Figure RE-GDA00038105045400000952
Computing
Figure RE-GDA00038105045400000953
Figure RE-GDA00038105045400000954
Initialization
Figure RE-GDA00038105045400000955
And
Figure RE-GDA00038105045400000956
for all L ∈ L, calculate
Figure RE-GDA00038105045400000957
And judge whether there is
Figure RE-GDA00038105045400000958
If so, then
Figure RE-GDA00038105045400000959
Get the evidence that the block indicated by the delete L is deleted
Figure RE-GDA0003810504540000101
Calculating eta i ←H prime (m | | i) to get a new accumulator state
Figure RE-GDA0003810504540000102
And newly added B i Evidence of (1)
Figure RE-GDA0003810504540000103
Initialization
Figure RE-GDA0003810504540000104
And
Figure RE-GDA0003810504540000105
computing
Figure RE-GDA0003810504540000106
μ i ←h α 、v i ←A i β Evidence of historical version failure of all deleted blocks is obtained (z) i ,d i ,Q i,3 )←NI-PoKE.Prove(β,A i ,v i ) And
Figure RE-GDA0003810504540000107
to sum up, obtain the evidence of the accumulator
Figure RE-GDA0003810504540000108
The supervisor calculates through the trapdoor
Figure RE-GDA0003810504540000109
Output of
Figure RE-GDA00038105045400001010
Wherein B is i :=<p i ,ctr,m,i,ξ i ,A i ,w i >。
Further, the full edit verification of the block in step S103 includes:
(1)
Figure RE-GDA00038105045400001011
algorithm, input additional Block B i Length of
Figure RE-GDA00038105045400001012
Is local to the verifier
Figure RE-GDA00038105045400001013
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i Find out
Figure RE-GDA00038105045400001014
In (1)
Figure RE-GDA00038105045400001015
Resolution orderColumn number is s m Block of
Figure RE-GDA00038105045400001016
Calculating cont i ←p i ||m i ||i||A i ||w i And
Figure RE-GDA00038105045400001017
if i is equal to s m +1、
Figure RE-GDA00038105045400001018
H 1 (ctr i ||h i ) If both < D are true, then η is calculated i ←H prime (m i I) and returns the verification result
Figure RE-GDA00038105045400001019
(2)
Figure RE-GDA00038105045400001020
Algorithm, input block B inserted in position l i Updated version of the block originally located at that location
Figure RE-GDA00038105045400001021
Has a length of
Figure RE-GDA00038105045400001022
Verifier local block chain
Figure RE-GDA00038105045400001023
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i Analysis of
Figure RE-GDA00038105045400001024
And
Figure RE-GDA00038105045400001025
on
Figure RE-GDA00038105045400001026
Find out
Figure RE-GDA00038105045400001027
And analyze
Figure RE-GDA00038105045400001028
By passing
Figure RE-GDA00038105045400001029
Calculating out
Figure RE-GDA00038105045400001030
If i is equal to s m +1、
Figure RE-GDA00038105045400001031
H 1 (ctr i ||h i ) If < D is both true, then calculate
Figure RE-GDA00038105045400001032
And η i ←H prime (m i | i), returning a verification result
Figure RE-GDA00038105045400001033
(3)
Figure RE-GDA00038105045400001034
Algorithm, inputting modified block B at I position i Length of
Figure RE-GDA00038105045400001035
Is local to the verifier
Figure RE-GDA00038105045400001036
The following is performed:
parsing block B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >In which
Figure RE-GDA00038105045400001037
Resolving block chains
Figure RE-GDA00038105045400001038
On
Figure RE-GDA00038105045400001039
Find out
Figure RE-GDA00038105045400001040
Is/are as follows
Figure RE-GDA00038105045400001041
And analyze
Figure RE-GDA00038105045400001042
Calculating cont i ←p i ||m i ||i||A i ||w i And recover to
Figure RE-GDA00038105045400001043
If H is present 1 (ctr i ||h i ) < D and i ═ s m +1, then calculate η i ←H prime (m i I) and
Figure RE-GDA00038105045400001044
returning verification results
Figure RE-GDA00038105045400001045
&
Figure RE-GDA00038105045400001046
&NI-PoKE.Verify(A i ,ν i ,z i ,d i ,Q i,3 )&
Figure RE-GDA00038105045400001047
(4)
Figure RE-GDA00038105045400001048
Algorithm, input Block B which records deletion events i Deleted set of block locations
Figure RE-GDA00038105045400001049
Has a length of
Figure RE-GDA00038105045400001050
Verifier's local blockchain
Figure RE-GDA00038105045400001051
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein
Figure RE-GDA0003810504540000111
Parse
Figure RE-GDA0003810504540000112
In (1)
Figure RE-GDA0003810504540000113
Find out
Figure RE-GDA0003810504540000114
In (1)
Figure RE-GDA0003810504540000115
And analyze
Figure RE-GDA0003810504540000116
By using
Figure RE-GDA00038105045400001125
Computing
Figure RE-GDA0003810504540000117
If H is present 1 (ctr i ||h i )<D、 i==s m +1、
Figure RE-GDA0003810504540000118
All are true, then η is calculated i ←H prime (m i Ii) and
Figure RE-GDA0003810504540000119
returning verification results
Figure RE-GDA00038105045400001110
&
Figure RE-GDA00038105045400001111
&NI-PoKE.Verify(A i ,ν i ,z i ,d i ,Q i,3 )&
Figure RE-GDA00038105045400001112
Further, the block chain verification in step S104 includes:
Figure RE-GDA00038105045400001113
algorithm, input length of
Figure RE-GDA00038105045400001114
Block chain of
Figure RE-GDA00038105045400001115
The verifier performs the following:
for all j e [ n ∈ [ ]]Calculating
Figure RE-GDA00038105045400001116
And
Figure RE-GDA00038105045400001117
if present
Figure RE-GDA00038105045400001118
Or
Figure RE-GDA00038105045400001119
Then go back to 0 directly; otherwise calculate
Figure RE-GDA00038105045400001120
Find out
Figure RE-GDA00038105045400001121
In (1)
Figure RE-GDA00038105045400001122
And analyze
Figure RE-GDA00038105045400001123
Returning verification results
Figure RE-GDA00038105045400001124
As shown in fig. 2, the verifiable and fully editable block chain system provided by the embodiment of the present invention includes:
the system establishing module 1 is used for generating system parameters and generating a key pair for a supervisor;
the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, adds, inserts, modifies and deletes blocks with the assistance of a supervisor, updates the state of a block chain, and generates a corresponding non-interactive verifiable certificate;
the full-editing verification module 3 is used for adopting various operations according to the maximum serial number consensus rule by utilizing the validity of the block chain user verification certificate to realize distributed block chain state updating;
and the block chain verification module 4 is used for verifying the connectivity of the whole block chain and the validity of the block chain state, so that a new user is added into the block chain system.
And II, application embodiment. In order to prove the creativity and the technical value of the technical scheme of the invention, the part is the application example of the technical scheme of the claims on specific products or related technologies.
The block chain technology is praised due to its non-tamper-resistance, which has attracted a great deal of attention from various industries such as academia and industry. However, the permanent storage of data is easy to cause problems such as copyright dispute, and some official organizations have issued various data protection policies and laws and regulations, and require block chains to have editable characteristics. An editable blockchain is a good variant of a blockchain, and the contents of a block can be edited without affecting other blocks in the blockchain. Most of the studies on editable blockchains only consider modification and deletion of blocks, and ignore insertion operations. This operation is different from block addition in that a block is inserted at an arbitrary position of a predetermined block chain. When the intelligent contract has code bugs, patches need to be added, and block deletion errors occur, block insertion is quite necessary. Furthermore, none of the existing studies consider the verifiability of editable blockchains. However, the failure of the block chain state to verify can lead to sluggish updating, historical replay and other attacks, and seriously damage the feasibility and usability of the editable block chain. Therefore, how to design an editable blockchain supporting complete editability of blocks and verifiable state of the blockchain is a problem to be solved.
The invention provides a verifiable and completely editable block chain aiming at the requirements of safety, effectiveness, functionality, feasibility, availability and the like of the editable block chain in a real scene, and simultaneously meets the verifiability of the complete editable and block chain state of the block. The editable block chain is constructed based on the double trapdoor chameleon Hash cluster, and block adding, inserting, modifying and deleting operations with high calculation efficiency and key leakage resistance are realized. On the basis, the verifiability of the block chain state is realized by combining the trapdoor-free general accumulator and the maximum serial number consensus rule, and the problems of sluggish updating, historical replay and the like are effectively solved.
1. System architecture
As shown in fig. 3, in a verifiable and fully editable block chain system, a block is defined as B ═ in an embodiment of the present invention<p,m,i,A,w,ctr,ξ>. Note H 1 :{0,1} * →{0,1} λ Is a cryptographic anti-collision hash function,
Figure RE-GDA0003810504540000121
is a chameleon hash function. A block is valid if and only if it satisfies the following equation:
Figure RE-GDA0003810504540000122
where cont | | | m | | | i | | | a | | | | w, p is the hash of the previous block, m is the Merkle tree root of the transaction contained in B, i is a globally unique serial number, a is the accumulator state where the block chain ends to block B, w is the evidence corresponding to a, ctr is the nonce value of the workload certification, ξ is the verification string of the chameleon hash matching with cont, and D is the difficulty value of the workload certification.
Block chain
Figure RE-GDA0003810504540000123
The expansion mode is that the block is added at the rightmost position. The rightmost block is called the head of the chain and is denoted as
Figure RE-GDA0003810504540000124
If it is
Figure RE-GDA0003810504540000125
If the chain head is B, then
Figure RE-GDA0003810504540000126
Is extended to
Figure RE-GDA0003810504540000127
When, B': is equal to<p′,m′,i′,A′,w′,ctr′,ξ′>The prev _ hash field in (2)
Figure RE-GDA0003810504540000128
In addition to this, the present invention is,
Figure RE-GDA0003810504540000129
representThe number of blocks contained in one block chain. Suppose that
Figure RE-GDA00038105045400001210
Then for any 0. ltoreq. k. ltoreq.n,
Figure RE-GDA00038105045400001211
represent
Figure RE-GDA00038105045400001212
The result of cutting out the left-most k blocks,
Figure RE-GDA00038105045400001213
it is the result of cutting off the rightmost k blocks. In this way,
Figure RE-GDA00038105045400001214
is represented in
Figure RE-GDA00038105045400001215
Is inserted into the block B at the k-th position *
Figure RE-GDA00038105045400001216
Is to modify
Figure RE-GDA00038105045400001217
The kth block of (1);
Figure RE-GDA00038105045400001218
is to delete
Figure RE-GDA00038105045400001219
The k-th block of (1).
2. Preliminary knowledge
(1) Chameleon hash function
Chen et al propose a chameleon hash cluster with double trapdoors, which satisfies computational effectiveness and collision resistance, and is written as a set of algorithms
Figure RE-GDA00038105045400001220
DETAILED DESCRIPTIONSThe following:
Figure RE-GDA00038105045400001221
algorithm, input security parameter λ, output trapdoor key tk ═ (x, t) and hash key hk ═ Y, where
Figure RE-GDA00038105045400001222
Y is xP, and P is a group
Figure RE-GDA00038105045400001223
A generator of (2).
Figure RE-GDA00038105045400001224
And (3) an algorithm for inputting tk and a message m and calculating h-tP as a hash value. Random selection
Figure RE-GDA00038105045400001225
Calculating a validation string ξ ═ (r, K), where K ═ kP and r ═ t-H 0 (m,K)·(k+x)。
Figure RE-GDA00038105045400001226
An algorithm that can pass H-H without tk 0 (m, K) · (K + Y) + rP the hash value h is calculated.
Figure RE-GDA00038105045400001227
Algorithm passing verification formula
Figure RE-GDA00038105045400001228
And verifying the matching of the hash value and the message and the verification string.
Figure RE-GDA00038105045400001229
The algorithm looks for the collision xi ' ═ (r ', K ') for the new message m ', where r ' ═ t-H 0 (m′,K′)·(k′+x),K′=k′P,
Figure RE-GDA0003810504540000131
(2) Compact non-interactive proof
NI-PoE is for discrete logarithm relationship
Figure RE-GDA0003810504540000132
For the sake of brevity, the following is performed:
1) the NI-poe. cave (x, u, w) → (Q) algorithm gives evidence that: calculate l ← H prime (x,u,w)、
Figure RE-GDA0003810504540000133
And r ← x mod l, giving proof Q ← u q
2) Verification of the NI-poe. verify (x, u, w, Q) → ({0, 1}) algorithm proves that: calculate l ← H prime (x, u, w) and r ← x mod l, validating equation
Figure RE-GDA0003810504540000134
And outputs the result.
Extension of NI-PoKE to NI-PoE, to discrete logarithmic relationships
Figure RE-GDA0003810504540000135
The following is performed, as is demonstrated by the compact knowledge of (1):
1) the NI-poke. pro (x, u, w) → (z, r, Q) algorithm gives evidence that: computing
Figure RE-GDA0003810504540000136
z←u ′x 、 l←H prime (u, w, z), a ← H (u, w, z, l) and
Figure RE-GDA0003810504540000137
give proof (z, Q ← (uu) ′a ) q ,r←x mod l)。
2) Verification of the NI-poke. verify (u, w, z, r, Q) → ({0, 1}) algorithm proves that: calculating out
Figure RE-GDA0003810504540000138
l←H prime (u, w, z) and a ← H (u, w, z, l), by verifying equation Q l (uu ′a ) r =wz a And giving a verification result.
(3) Universal accumulator without trapdoor
The trapdoor-free universal accumulator is an extension of a classical RSA accumulator oriented to a distributed scene, does not need the participation of a trusted manager, and simultaneously supports member certification and non-member certification. The accumulator is constructed in an unknown order group
Figure RE-GDA0003810504540000139
In the above, the invention performs some adaptive fine tuning on the algorithm
Figure RE-GDA00038105045400001310
And (4) forming.
Figure RE-GDA00038105045400001311
Algorithm, input security parameter λ, output element set
Figure RE-GDA00038105045400001312
And an initial accumulator state A (S) ← h, in which
Figure RE-GDA00038105045400001313
Figure RE-GDA00038105045400001314
The purpose of the algorithm is to add an element to the accumulator and update its state. If x belongs to S, the state of the accumulator is kept unchanged, and A (S') ← A (S) is directly output; otherwise, outputting the updated accumulator state A (S') ← A (S) x
Figure RE-GDA00038105045400001315
The purpose of the algorithm is to delete the accumulatorAnd updates its state. If it is not
Figure RE-GDA00038105045400001316
The state of the accumulator is kept unchanged, and A (S') ← A (S) is directly output; otherwise, executing S' ← S \ x } and calculating
Figure RE-GDA00038105045400001317
Outputting updated accumulator states
Figure RE-GDA00038105045400001318
Figure RE-GDA00038105045400001319
The algorithm is to prove that x is in the accumulator set. Computing
Figure RE-GDA00038105045400001320
And
Figure RE-GDA00038105045400001321
evidence is given as ← NI-PoE.Prove (x, w, A (S)).
Figure RE-GDA00038105045400001322
Algorithm to prove
Figure RE-GDA00038105045400001323
Computing
Figure RE-GDA00038105045400001324
Using the extended Euclidean algorithm Exgcd (x, x) * ) To obtain
Figure RE-GDA00038105045400001325
Computing d ← h α and v ← A (S) β Giving proof of pi ═ pi (pi) d ,π h )←(NI-PoKE.Prove(A(S),v,β),NI-PoE(x,d,hv -1 ))。
Figure RE-GDA00038105045400001326
In order to verify the validity of member certification, the verification result is determined by NI-PoE.
Figure RE-GDA0003810504540000141
Algorithm to validate the validity of the non-member proof if and only if NI-PoKE d ) → 1 and NI-PoE.Verify (x, d, hv) -1 ,π h ) → 1 at the same time, the verification succeeds.
3. Overview of the method
The block chain in the invention adopts the maximum serial number consensus rule to replace the longest chain rule so as to encourage users to compete for the block writing right (i.e. profit) based on the latest block chain version, thereby solving the problem of delayed editing and updating. In addition, in order to invalidate the historical version of the revised block, the trapdoor-free general accumulator is adopted to commit all blocks in the block chain, and the verifiability of the state of the block chain is realized.
Specifically, when there are block addition and insertion operations, the block creator uses
Figure RE-GDA0003810504540000142
Update accumulator state and run
Figure RE-GDA0003810504540000143
A membership certificate for the accumulator is generated for the block. Wherein, due to different operation positions, the insertion block will destroy the connectivity of the block chain, so that the block behind the insertion block needs to be operated once more
Figure RE-GDA0003810504540000144
When the block needs to be modified, the block creator uses
Figure RE-GDA0003810504540000145
Delete historical versions and run
Figure RE-GDA0003810504540000146
The new version content is added to the accumulator. Then, run
Figure RE-GDA0003810504540000147
And
Figure RE-GDA0003810504540000148
accumulator non-member and member proofs are provided for invalid and valid versions, respectively.
When block deletion occurs, the intuitive solution is to call
Figure RE-GDA0003810504540000149
The accumulator state is updated. However, such a simple operation causes a problem of delaying the edit update since the latest tile on the blockchain remains unchanged before and after the operation. Therefore, we add a new block to record the deletion event, called record block, whose sequence number is the updated maximum sequence number. Then execute
Figure RE-GDA00038105045400001410
Adding a record block to an accumulator and running
Figure RE-GDA00038105045400001411
And
Figure RE-GDA00038105045400001412
non-member and member certificates are generated for the deleted and added blocks, respectively.
4. Concrete structure
The invention is composed of 11 algorithms, and the specific construction method is explained as follows:
SysGen(1 λ ) The → (pp) algorithm, inputs the security parameter λ, performs as follows:
1) selecting a cyclic group with a large prime number q
Figure RE-GDA00038105045400001413
And one isUnknown order group
Figure RE-GDA00038105045400001414
Selecting two generators
Figure RE-GDA00038105045400001415
And
Figure RE-GDA00038105045400001416
initialization A 0 ←h。
2) Selecting two hash functions H 1 :{0,1} * →{0,1} λ And H prime :{0,1} * →Primes(λ)。
3) Outputting system parameters
Figure RE-GDA00038105045400001417
The KeyGen (pp) → (sk, pk) algorithm, entering the system parameters pp, performs the following:
1) supervisor random selection
Figure RE-GDA00038105045400001418
And calculating Y as xP.
2) The output key pair (sk, pk) is (x, Y).
Figure RE-GDA00038105045400001419
Algorithm, input length of
Figure RE-GDA00038105045400001420
Block chain of
Figure RE-GDA00038105045400001421
Chameleon hash key pair (tk) i ,hk)=((sk,t i ) Pk) of, wherein
Figure RE-GDA00038105045400001422
The supervisor is B i Selected specific trapdoors, B i Merkle root m and workload of transactions contained thereinThe proven solution ctr, is performed as follows:
1) analysis of
Figure RE-GDA0003810504540000151
Calculating out
Figure RE-GDA0003810504540000152
And
Figure RE-GDA0003810504540000153
to obtain B i Prev _ hash field of
Figure RE-GDA0003810504540000154
2) Find out
Figure RE-GDA0003810504540000155
Get the serial number i ← s m + 1; calculating eta i ←H prime (m | | i) to get the accumulator state
Figure RE-GDA0003810504540000156
Calculating out
Figure RE-GDA0003810504540000157
To obtain a i Corresponding evidence w i ←Q i
3) Supervisor calculation and B i Chameleon hash verification string corresponding to each field in the database
Figure RE-GDA0003810504540000158
4) Output block chain
Figure RE-GDA0003810504540000159
Wherein B is i :=<p i ,ctr,m,i,ξ i ,A i ,w i >。
Figure RE-GDA00038105045400001510
Algorithm, input LengthIs composed of
Figure RE-GDA00038105045400001511
Block chain of
Figure RE-GDA00038105045400001512
B i Corresponding chameleon hash key pair (tk) i ,hk)=((sk,t i ),p k ),
Figure RE-GDA00038105045400001513
Corresponding chameleon hash key pair
Figure RE-GDA00038105045400001514
B i The values of m and ctr contained in the table are
Figure RE-GDA00038105045400001515
At position l of the insertion, the following is performed:
1) solution (II)
Figure RE-GDA00038105045400001516
Find out
Figure RE-GDA00038105045400001517
To obtain B i Serial number i ← s m + 1; calculating eta i ←H prime (m | | i) to get the accumulator state
Figure RE-GDA00038105045400001518
Computing
Figure RE-GDA00038105045400001519
To obtain A i Evidence w of (A) i ←Q i
2) Supervisor calculations
Figure RE-GDA00038105045400001520
Verification string for obtaining chameleon hash by using chameleon hash trapdoor held by chameleon hash trapdoor
Figure RE-GDA00038105045400001521
Thereby the device is provided with
Figure RE-GDA00038105045400001522
3) Due to the insertion of B i Prev _ hash of the last original block is changed, so calculation
Figure RE-GDA00038105045400001523
Supervisor calculations
Figure RE-GDA00038105045400001524
To obtain
Figure RE-GDA00038105045400001525
At this time, the original first block becomes
Figure RE-GDA00038105045400001526
4) Output block chain
Figure RE-GDA00038105045400001527
Figure RE-GDA00038105045400001528
Algorithm, input length of
Figure RE-GDA00038105045400001529
Block chain of
Figure RE-GDA00038105045400001530
The first block in the chain
Figure RE-GDA00038105045400001531
The modified target value m' of (a),
Figure RE-GDA00038105045400001532
chameleon key pair
Figure RE-GDA00038105045400001533
The following is performed:
1) analysis of
Figure RE-GDA00038105045400001534
Find out
Figure RE-GDA00038105045400001535
Obtaining new serial number i' ← s m +1。
2) Initialization
Figure RE-GDA00038105045400001536
Computing
Figure RE-GDA00038105045400001537
And
Figure RE-GDA00038105045400001538
obtaining evidence of data deletion of old version
Figure RE-GDA00038105045400001539
3) Calculating eta i′ ←H prime (m '| i') to get updated accumulator state
Figure RE-GDA00038105045400001540
And evidence to add new version data
Figure RE-GDA00038105045400001541
4) Initialization
Figure RE-GDA00038105045400001542
If it is not
Figure RE-GDA00038105045400001543
Then
Figure RE-GDA00038105045400001544
Calculated by expanding Euclidean algorithm
Figure RE-GDA00038105045400001545
Calculating mu i′ ←h α V and v i′ ←A i′ β To obtain
Figure RE-GDA00038105045400001546
Non-member proof of all historical version data (z) i′ ,d i′ ,Q i′,3 )←NI-PoKE.Prove(β,A i′ ,ν i′ ) And
Figure RE-GDA0003810504540000161
5) obtaining evidence of current accumulator state
Figure RE-GDA0003810504540000162
6) Supervisor calculates cont i′ ←p i ||m′||i′||A i′ ||w i′ And obtaining the chameleon Hash verification string corresponding to the updated data by using the chameleon Hash trapdoor held by the chameleon Hash trapdoor
Figure RE-GDA0003810504540000163
7) Output block chain
Figure RE-GDA0003810504540000164
Wherein B is i′ :=<p i ,ctr i ,m′,i′,ξ i′ ,A i′ ,w i′ >。
Figure RE-GDA0003810504540000165
Algorithm, input length of
Figure RE-GDA0003810504540000166
Block chain of
Figure RE-GDA0003810504540000167
Continuous set of block locations
Figure RE-GDA0003810504540000168
The smallest of them is recorded as
Figure RE-GDA0003810504540000169
Maximum notation
Figure RE-GDA00038105045400001610
To (L) max +1) blocks in a position
Figure RE-GDA00038105045400001611
Corresponding chameleon hash key pair
Figure RE-GDA00038105045400001612
B comprising m and ctr i Corresponding chameleon hash (tk) i ,hk)=((sk,t i ) Pk), the block is used to record the deletion event, the following is performed:
1) updating
Figure RE-GDA00038105045400001613
Is/are as follows
Figure RE-GDA00038105045400001614
Supervisor calculation through chameleon Hash trapdoor
Figure RE-GDA00038105045400001615
Is updated
Figure RE-GDA00038105045400001616
Record as
Figure RE-GDA00038105045400001617
2) Find out
Figure RE-GDA00038105045400001618
Get the serial number i ← s m + 1; to obtain
Figure RE-GDA00038105045400001619
Calculating out
Figure RE-GDA00038105045400001620
Initialization
Figure RE-GDA00038105045400001621
And
Figure RE-GDA00038105045400001622
for all L ∈ L, calculate
Figure RE-GDA00038105045400001623
And determine whether there is
Figure RE-GDA00038105045400001624
If so, then
Figure RE-GDA00038105045400001625
Get the evidence that the block indicated by the delete L is deleted
Figure RE-GDA00038105045400001626
3) Calculating eta i ←H prime (m | | i) to get a new accumulator state
Figure RE-GDA00038105045400001627
And newly added B i Evidence of (1)
Figure RE-GDA00038105045400001628
4) Initialization
Figure RE-GDA00038105045400001629
And
Figure RE-GDA00038105045400001630
computing
Figure RE-GDA00038105045400001631
μ i ←h α 、v i ←A i β Obtaining the evidence that the historical versions of all the deleted blocks are invalid (z) i ,d i ,Q i,3 )←NI-PoKE.Prove(β,A i ,ν i ) And
Figure RE-GDA00038105045400001632
5) to sum up, obtain the evidence of the accumulator
Figure RE-GDA00038105045400001633
6) The supervisor calculates through the trapdoor
Figure RE-GDA00038105045400001634
7) Output block chain
Figure RE-GDA00038105045400001635
Wherein B is i :=<p i ,ctr,m,i,ξ i ,A i ,w i >。
Figure RE-GDA00038105045400001636
Algorithm, input additional Block B i Length of
Figure RE-GDA00038105045400001637
Is local to the verifier
Figure RE-GDA00038105045400001638
The following is performed:
1) analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i
2) Find out
Figure RE-GDA00038105045400001639
In (1)
Figure RE-GDA00038105045400001640
Resolve the sequence number as s m Block of
Figure RE-GDA00038105045400001641
3) Calculating cont i ←p i ||m i ||i||A i ||w i And
Figure RE-GDA00038105045400001642
4) if i is equal to s m +1、
Figure RE-GDA00038105045400001643
H 1 (ctr i ||h i ) If < D both holds, then η is calculated i ←H prime (m i ||i)。
5) Returning verification results
Figure RE-GDA0003810504540000171
Figure RE-GDA0003810504540000172
Algorithm, input block B inserted in position l i Updated version of the block originally at that location
Figure RE-GDA0003810504540000173
Has a length of
Figure RE-GDA0003810504540000174
Verifier local block chain
Figure RE-GDA0003810504540000175
The following is performed:
1) analysis B i :=<p i ,ctr i, m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i Analysis of
Figure RE-GDA0003810504540000176
And
Figure RE-GDA0003810504540000177
on
Figure RE-GDA0003810504540000178
2) Find out
Figure RE-GDA0003810504540000179
And analyze
Figure RE-GDA00038105045400001710
3) By passing
Figure RE-GDA00038105045400001711
Computing
Figure RE-GDA00038105045400001712
4) If i is equal to s m +1、
Figure RE-GDA00038105045400001713
H 1 (ctr i ||h i ) If < D is both true, then calculate
Figure RE-GDA00038105045400001714
And η i ←H prime (m i ||i)。
5) Returning verification results
Figure RE-GDA00038105045400001743
Figure RE-GDA00038105045400001715
Algorithm, inputting modified block B at I position i Length of
Figure RE-GDA00038105045400001716
Is local to the verifier
Figure RE-GDA00038105045400001717
The following is performed:
1) parsing block B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >In which
Figure RE-GDA00038105045400001718
Resolving blockchains
Figure RE-GDA00038105045400001719
On
Figure RE-GDA00038105045400001720
2) Find out
Figure RE-GDA00038105045400001721
Is
Figure RE-GDA00038105045400001722
And analyze
Figure RE-GDA00038105045400001723
3) Calculating cont i ←p i ||m i ||i||A i ||w i And recover to
Figure RE-GDA00038105045400001724
4) If H is present 1 (ctr i ||h i ) < D and i ═ s m +1, then calculate η i ←H prime (m i I) and
Figure RE-GDA00038105045400001725
5) returning verification results
Figure RE-GDA00038105045400001726
&
Figure RE-GDA00038105045400001727
& NI-PoKE.Verify(A i ,v i ,z i ,d i ,Q i,3 )&
Figure RE-GDA00038105045400001728
Figure RE-GDA00038105045400001729
Algorithm, input Block B which records deletion events i Deleted set of block locations
Figure RE-GDA00038105045400001730
Has a length of
Figure RE-GDA00038105045400001731
Verifier's local blockchain
Figure RE-GDA00038105045400001732
The following is performed:
1) analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein
Figure RE-GDA00038105045400001733
Parse
Figure RE-GDA00038105045400001734
In (1)
Figure RE-GDA00038105045400001735
Find out
Figure RE-GDA00038105045400001736
In
Figure RE-GDA00038105045400001737
And analyze
Figure RE-GDA00038105045400001738
2) By using
Figure RE-GDA00038105045400001739
Computing
Figure RE-GDA00038105045400001740
3) If H is present 1 (ctr i ||h i )<D、i==s m +1、
Figure RE-GDA00038105045400001741
All are true, then η is calculated i ←H prime (m i Ii) and
Figure RE-GDA00038105045400001742
4) returning verification results
Figure RE-GDA0003810504540000181
&
Figure RE-GDA0003810504540000182
& NI-PoKE.Verify(A i ,v i ,z i ,d i ,Q i,3 )&
Figure RE-GDA0003810504540000183
Figure RE-GDA0003810504540000184
Algorithm, input length of
Figure RE-GDA0003810504540000185
Block chain of
Figure RE-GDA0003810504540000186
The verifier performs the following:
1) for all j e [ n ∈ [ ]]Calculating
Figure RE-GDA0003810504540000187
And
Figure RE-GDA0003810504540000188
2) if present
Figure RE-GDA0003810504540000189
Or
Figure RE-GDA00038105045400001810
Then 0 is returned directly.
3) Otherwise calculate
Figure RE-GDA00038105045400001811
Find out
Figure RE-GDA00038105045400001812
In (1)
Figure RE-GDA00038105045400001813
And analyze
Figure RE-GDA00038105045400001814
4) Returning verification results
Figure RE-GDA00038105045400001815
It should be noted that the embodiments of the present invention can be realized by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portions may be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or specially designed hardware. Those skilled in the art will appreciate that the apparatus and methods described above may be implemented using computer executable instructions and/or embodied in processor control code, such code being provided on a carrier medium such as a disk, CD-or DVD-ROM, programmable memory such as read only memory (firmware), or a data carrier such as an optical or electronic signal carrier, for example. The apparatus and its modules of the present invention may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of hardware circuits and software, e.g., firmware.
And thirdly, evidence of relevant effects of the embodiment. The embodiment of the invention has some positive effects in the process of research and development or use, and indeed has great advantages compared with the prior art, and the following contents are described by combining data, charts and the like in the test process.
To test the present invention, the blockchain implementing the present invention is programmed. Meanwhile, the scheme of the invention is compared with a non-editable common block chain and an Atenise scheme [ reproducible block chain-or-rewriting history in bits and friends ].
The invention is realized by Python 3.8.10 on Ubuntu 20.04.4LTS (2GB memory) running on VMware 12.5.2, and experimental equipment is provided with Intel (R) core (TM) i5-7500 CPU @3.40GHz and 8GB memory. The collected experimental data were plotted graphically using MATLAB R2019a V9.
We demonstrate the utility of the blockchain of the present invention from three aspects:
when the editing operation is not involved, the overhead of generating one block is what compared with the ordinary block chain and the Atenise scheme which are not editable;
second, the time required to edit (modify/delete) an existing block, compared to the Ateniese scheme;
and thirdly, verifying the cost of various editing operations and the whole block chain.
First, comparing the overhead of generating a block, we tested the cost of generating a block in the block as shown in FIGS. 4-6. As can be seen from fig. 4, since the general block chain has no editability, the time required to generate one block is minimal. In addition, since the present invention achieves verifiability of the block chaining state, additional operations are required
Figure RE-GDA0003810504540000191
And
Figure RE-GDA0003810504540000192
the algorithm generates a verifiable accumulator state so its run time to generate the block is slightly higher than the Ateniese scheme. The sizes of the block headers of the three block chains are compared in fig. 5. In the invention, the member evidence that the current version of the block belongs to the accumulator and the non-member evidence of the historical version of the block need to be recorded, so the size of the block head is slightly larger than that of the other two schemes. However, even so, as shown in fig. 6, the size difference of the block header is negligible for the entire block. In sum, the overhead in the block generation process does not affect the availability of verifiable and fully editable block chains in the present invention.
Second, the overhead of editing a block is compared, and FIGS. 7-9 show the run time of modifying and deleting a block in the present invention compared to the Atenise scheme. As can be seen from fig. 7, the computation cost of modifying a block in the Ateniese scheme is constant, whereas in the present invention, it increases as the block chain length increases. This is because the present invention calls
Figure RE-GDA0003810504540000193
The algorithm disables the historical version of the modified block, thereby resisting replay attacks and enhancing the security and usability of the blockchain. Fig. 8-9 show the comparison result of the deleting operation, we test the position set L of the deleted block into two categories: one type is a set of consecutive locations; the other type is a set of non-contiguous locations, which can be viewed as a union of multiple sets containing contiguous locations. In the Ateniese scheme, after each continuous subset is deleted, a chameleon hash collision needs to be found, so that 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 block chain of the present invention, except that the implementation is the same as the Atenise scheme
Figure RE-GDA0003810504540000194
In addition, H needs to be calculated for all the deleted blocks prime (. and) perform multiplications. The run time for the delete operation is increased in both cases. However, since the additional computational cost in the present invention is to achieve verifiability of blockchain status, these additional small amounts of overhead are acceptable in real-world scenarios.
Finally, the verification edit operation and the verification blockchain are tested for overhead, and since the editable blockchain in the present invention is verifiable, the overhead of each operation in verification and the overhead of verifying the entire blockchain are tested in fig. 10-14. As can be seen from fig. 10-11, the verification time for tile creation and modification does not vary with the length of the tile chain, and the overall process is user friendly with a time cost of only about tens of milliseconds. In fig. 12-13, the run time of the delete operation is verified for both cases of whether the divided blocks are contiguous or not. H for all deleted blocks needs to be calculated prime (. cndot.) multiplies, so runtime increases with the number of subsets and the size of L. Even so, the runtime to verify the deletion is only in milliseconds. Fig. 14 is a comparison of the blockchain of the present invention with the normal blockchain, Ateniese scheme, in terms of the time required to verify a blockchain of between 100 and 1100 in length. Although the verification time of these three blockchains increases with the length of the blockchain, in the blockchain of the present invention, the verification time is several seconds longer than the other two. This is because the accumulator state of the current blockchain needs to be recovered and compared with the latest state recorded on the chain to check the state of the blockchain.
In summary, the verifiability of the blockchain in the invention can not affect the feasibility of the blockchain, and the computational burden on the user is acceptable.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A verifiable and fully editable blockchain system control method, characterized in that the verifiable and fully editable blockchain system control method comprises: the method comprises four processes of system establishment, block full-editing operation, block full-editing verification and block chain verification;
after generating system parameters, the supervisor generates a supervisory key pair of the supervisor; the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating; when a new user joins the block chain system, the connectivity of the whole block chain and the validity of the block chain state are verified.
2. The verifiable and fully editable blockchain system control method of claim 1, comprising the steps of:
step one, system establishment: generating system parameters and generating a key pair for a supervisor;
step two, the full editing operation of the block: the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
step three, block full editing verification: verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating;
step four, verifying the block chain: and verifying the connectivity of the whole block chain and the validity of the block chain state, so that a new user is added into the block chain system.
3. The verifiable and fully editable block-chain system control method according to claim 2, wherein the system setup in the first step comprises:
(1)SysGen(I λ ) The → (pp) algorithm, inputs the security parameter λ, performs as follows:
selecting a cyclic group with a large prime number q
Figure RE-FDA0003810504530000011
And an unknown order group
Figure RE-FDA0003810504530000012
Selecting two generators
Figure RE-FDA0003810504530000013
And
Figure RE-FDA0003810504530000014
initialization A 0 And c, refining the mixture to obtain two Hash functions H 1 :{0,1} * →{0,1} λ And H prime :(0,1} * → Primes (lambda), output system parameters
Figure RE-FDA0003810504530000015
(2) The KeyGen (pp) → (sk, pk) algorithm, entering the system parameters pp, performs the following:
supervisor random selection
Figure RE-FDA0003810504530000021
Y is calculated as xP, and the output key pair (sk, pk) is (x, Y).
4. The verifiable and fully editable block-chain system control method according to claim 2, wherein the full editing operation of the block in the second step comprises:
(1)
Figure RE-FDA0003810504530000022
algorithm, input length of
Figure RE-FDA0003810504530000023
Block chain of
Figure RE-FDA0003810504530000024
Chameleon hash key pair (tk) i ,hk)=((sk,t i ) Pk) in which
Figure RE-FDA0003810504530000025
The supervisor is B i Selected specific trapdoors, B i Merkle root m of the involved transaction and the solution ctr of the workload proof are performed as follows:
Parse
Figure RE-FDA0003810504530000026
computing
Figure RE-FDA0003810504530000027
And
Figure RE-FDA0003810504530000028
to obtain B i Is/are as follows
Figure RE-FDA0003810504530000029
Find out
Figure RE-FDA00038105045300000210
Get the serial number i ← s m + 1; calculating eta i ←H prime (m | | i) to get the accumulator state
Figure RE-FDA00038105045300000211
Computing
Figure RE-FDA00038105045300000212
To obtain a i Corresponding evidence w i Axle 300, Qi; supervisor calculation and B i Chameleon hash verification string corresponding to each field in the database
Figure RE-FDA00038105045300000214
To obtain finally
Figure RE-FDA00038105045300000215
Wherein B is i :=<p i ,ctr,m,i,ξ i ,A i ,w i >;
(2)
Figure RE-FDA00038105045300000216
Algorithm, input length of
Figure RE-FDA00038105045300000217
Block chain of
Figure RE-FDA00038105045300000218
B i Corresponding chameleon hash key pair (tk) i ,hk)=((sk,t i ),pk),
Figure RE-FDA00038105045300000219
Corresponding chameleon hash key pair
Figure RE-FDA00038105045300000220
B i The m and ctr values contained in the table are
Figure RE-FDA00038105045300000221
At position l of the insertion, the following is performed:
Parse
Figure RE-FDA00038105045300000222
find out
Figure RE-FDA00038105045300000223
To obtain B i Serial number i ← s m + 1; calculating eta i ←H prime (m | | i) to get the accumulator state
Figure RE-FDA00038105045300000224
Computing
Figure RE-FDA00038105045300000225
To obtain A i Evidence w of (A) i ←Q i (ii) a Supervisor calculations
Figure RE-FDA00038105045300000227
Obtaining chameleon Hash verification string by using held chameleon Hash trapdoor
Figure RE-FDA00038105045300000228
Thereby the device is provided with
Figure RE-FDA00038105045300000229
Due to the insertion of B i Prev _ hash of the last original block is changed, so calculation is performed
Figure RE-FDA00038105045300000230
Supervisor calculations
Figure RE-FDA00038105045300000231
To obtain
Figure RE-FDA00038105045300000232
The original first block becomes
Figure RE-FDA00038105045300000233
Output block chain
Figure RE-FDA0003810504530000031
(3)
Figure RE-FDA0003810504530000032
Algorithm, input length of
Figure RE-FDA0003810504530000033
Block chain of
Figure RE-FDA0003810504530000034
The first block in the chain
Figure RE-FDA0003810504530000035
The modified target value m' of (a),
Figure RE-FDA0003810504530000036
chameleon key pair
Figure RE-FDA0003810504530000037
The following is performed:
Parse
Figure RE-FDA0003810504530000038
find out
Figure RE-FDA0003810504530000039
Obtaining new serial number i' ← s m + 1; initialization
Figure RE-FDA00038105045300000310
Computing
Figure RE-FDA00038105045300000311
And
Figure RE-FDA00038105045300000312
obtaining evidence of data deletion of old version
Figure RE-FDA00038105045300000313
Calculating eta i′ ←H prime (m '| | i') to obtainTo updated accumulator state
Figure RE-FDA00038105045300000314
And evidence to add new version data
Figure RE-FDA00038105045300000315
Initialization
Figure RE-FDA00038105045300000316
If it is not
Figure RE-FDA00038105045300000317
Then
Figure RE-FDA00038105045300000318
By extended Euclidean algorithm computation
Figure RE-FDA00038105045300000319
Calculating mu i′ ←h α V and v i′ ←A i′ β To obtain
Figure RE-FDA00038105045300000320
Non-member proof of all historical version data (z) i′ ,d i′ ,Q i′,3 )←NI-PoKE.Prove(β,A i′ ,ν i′ ) And
Figure RE-FDA00038105045300000321
synthesizing the above results to obtain evidence of current accumulator state
Figure RE-FDA00038105045300000322
Supervisor calculation, using cont held by him i′ ←p i ||m′||i′||A i′ ||w i′ Chameleon Hash verification string corresponding to updated data obtained by chameleon Hash trap door
Figure RE-FDA00038105045300000323
Output the output
Figure RE-FDA00038105045300000324
Wherein B is i′ :=<p i ,ctr i ,m′,i′,ξ i′ ,A i′ ,w i′ >;
(4)
Figure RE-FDA00038105045300000326
Algorithm, input length of
Figure RE-FDA00038105045300000327
Block chain of
Figure RE-FDA00038105045300000328
Continuous set of block locations
Figure RE-FDA00038105045300000337
The smallest of them is recorded as
Figure RE-FDA00038105045300000329
Maximum notation
Figure RE-FDA00038105045300000330
To (L) max +1) blocks in a position
Figure RE-FDA00038105045300000331
Corresponding chameleon hash key pair
Figure RE-FDA00038105045300000332
B comprising m and ctr i Corresponding chameleon hash (tk) i ,hk)=((sk,t i ) Pk), the block is used to record the deletion event, the following is performed:
updating
Figure RE-FDA00038105045300000338
Is/are as follows
Figure RE-FDA00038105045300000333
Supervisor calculation through chameleon Hash trapdoor
Figure RE-FDA00038105045300000334
Is updated
Figure RE-FDA00038105045300000335
Record as
Figure RE-FDA00038105045300000336
Find out
Figure RE-FDA0003810504530000041
Get the serial number i ← s m + 1; to obtain
Figure RE-FDA0003810504530000042
Computing
Figure RE-FDA0003810504530000043
Initialization
Figure RE-FDA0003810504530000044
And
Figure RE-FDA0003810504530000045
for all L ∈ L, calculate
Figure RE-FDA0003810504530000046
And determine whether there is
Figure RE-FDA0003810504530000047
If so, then
Figure RE-FDA0003810504530000048
Get the evidence that the block shown by the delete L is deleted
Figure RE-FDA0003810504530000049
Calculating eta i ←H prime (m | | i) to get a new accumulator state
Figure RE-FDA00038105045300000410
And newly added B i Evidence of (1)
Figure RE-FDA00038105045300000411
Initialization
Figure RE-FDA00038105045300000412
And
Figure RE-FDA00038105045300000413
calculating out
Figure RE-FDA00038105045300000414
Get evidence of historical version failure of all deleted blocks (z) i ,d i ,Q i,3 )←NI-PoKE.Prove(β,A i ,ν i ) And
Figure RE-FDA00038105045300000415
to sum up, obtain the evidence of the accumulator
Figure RE-FDA00038105045300000416
The supervisor calculates through the trapdoor
Figure RE-FDA00038105045300000417
Finally output
Figure RE-FDA00038105045300000418
Wherein B is i :=<p i ctr,m,i,ξ i ,A i ,w i >。
5. The verifiable and fully editable block-chain system control method of claim 2, wherein the full-edit verification of the block in step three comprises:
(1)
Figure RE-FDA00038105045300000419
algorithm, input additional block B i Length of
Figure RE-FDA00038105045300000420
Is local to the verifier
Figure RE-FDA00038105045300000421
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i To find out
Figure RE-FDA00038105045300000422
In (1)
Figure RE-FDA00038105045300000423
Resolve the sequence number to
Figure RE-FDA00038105045300000432
Block of
Figure RE-FDA00038105045300000424
Computing
Figure RE-FDA00038105045300000433
And
Figure RE-FDA00038105045300000425
if i is equal to s m +1、
Figure RE-FDA00038105045300000434
All are true, then η is calculated i ←H prime (m i I) and returns the verification result
Figure RE-FDA00038105045300000427
(2)
Figure RE-FDA00038105045300000428
Algorithm, input block B inserted in position l i Updated version of the block originally located at that location
Figure RE-FDA00038105045300000429
Has a length of
Figure RE-FDA00038105045300000430
Verifier local block chain
Figure RE-FDA00038105045300000431
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein w is i :=Q i Analysis of
Figure RE-FDA0003810504530000051
And
Figure RE-FDA0003810504530000052
on
Figure RE-FDA0003810504530000053
Find out
Figure RE-FDA0003810504530000054
And analyze
Figure RE-FDA0003810504530000055
By passing
Figure RE-FDA0003810504530000056
Computing
Figure RE-FDA0003810504530000057
If i is equal to s m +1、
Figure RE-FDA0003810504530000058
H 1 (ctr i ||h i ) If < D is both true, then calculate
Figure RE-FDA0003810504530000059
And η i ←H prime (m i | i), returning a verification result
Figure RE-FDA00038105045300000510
(3)
Figure RE-FDA00038105045300000511
Algorithm, inputting modified block B at I position i Length of
Figure RE-FDA00038105045300000512
Is local to the verifier
Figure RE-FDA00038105045300000513
The following is performed:
parsing blocks
Figure RE-FDA00038105045300000540
Wherein
Figure RE-FDA00038105045300000514
Resolving blockchains
Figure RE-FDA00038105045300000515
On
Figure RE-FDA00038105045300000516
Find out
Figure RE-FDA00038105045300000517
Is/are as follows
Figure RE-FDA00038105045300000518
And analyze
Figure RE-FDA00038105045300000519
Calculating out
Figure RE-FDA00038105045300000543
And recover to
Figure RE-FDA00038105045300000520
If H is present 1 (ctr i ||h i ) < D and i ═ s m +1, then calculate η i ←H prime (m i I) and
Figure RE-FDA00038105045300000521
returning verification results
Figure RE-FDA00038105045300000522
Figure RE-FDA00038105045300000523
(4)
Figure RE-FDA00038105045300000524
Algorithm, input Block B which records deletion events i Deleted set of block locations
Figure RE-FDA00038105045300000542
Has a length of
Figure RE-FDA00038105045300000525
Verifier's local blockchain
Figure RE-FDA00038105045300000526
The following is performed:
analysis B i :=<p i ,ctr i ,m i ,i,ξ i ,A i ,w i >Wherein
Figure RE-FDA00038105045300000527
Parse
Figure RE-FDA00038105045300000528
In
Figure RE-FDA00038105045300000529
Find out
Figure RE-FDA00038105045300000530
In (1)
Figure RE-FDA00038105045300000531
And analyze
Figure RE-FDA00038105045300000532
By using
Figure RE-FDA00038105045300000533
Computing
Figure RE-FDA00038105045300000534
If it is not
Figure RE-FDA00038105045300000535
Figure RE-FDA00038105045300000536
All are true, then η is calculated i ←H prime (m i I) and
Figure RE-FDA00038105045300000537
returning verification results
Figure RE-FDA00038105045300000538
Figure RE-FDA00038105045300000539
Figure RE-FDA0003810504530000061
6. The verifiable and fully editable block-chain system control method of claim 2, wherein the block-chain verification in step four comprises:
Figure RE-FDA0003810504530000062
algorithm, input length of
Figure RE-FDA0003810504530000063
Block chain of
Figure RE-FDA0003810504530000064
The verifier performs the following:
for all j e [ n ∈ [ ]]Calculating
Figure RE-FDA0003810504530000065
And
Figure RE-FDA0003810504530000066
if present
Figure RE-FDA0003810504530000067
Or alternatively
Figure RE-FDA0003810504530000068
Then go back to 0 directly; otherwise calculate
Figure RE-FDA0003810504530000069
Find out
Figure RE-FDA00038105045300000610
In (1)
Figure RE-FDA00038105045300000611
And analyze
Figure RE-FDA00038105045300000612
Returning verification results
Figure RE-FDA00038105045300000613
7. A verifiable and fully editable blockchain system applying the verifiable and fully editable blockchain system control method according to claims 1 to 6, wherein the verifiable and fully editable blockchain system comprises:
the system establishing module is used for generating system parameters and generating a key pair for a supervisor;
the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, adds, inserts, modifies and deletes blocks with the assistance of a supervisor, updates the state of a block chain, and generates a corresponding non-interactive verifiable certificate;
the full-editing verification module is used for adopting various operations according to the maximum serial number consensus rule by utilizing the validity of the block chain user verification certificate to realize distributed block chain state updating;
and the block chain verification module is used for verifying the connectivity of the whole block chain and the validity of the block chain state so as to enable a new user to join the block chain system.
8. A computer device, characterized in that the computer device comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of:
after generating system parameters, a supervisor generates a supervisory key pair of the supervisor; the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating; when a new user joins the block chain system, the connectivity of the whole block chain and the validity of the block chain state are verified.
9. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
after generating system parameters, a supervisor generates a supervisory key pair of the supervisor; the block creator adopts a double-trapdoor chameleon Hash cluster and a trapdoor-free general accumulator, performs block addition, insertion, modification and deletion with the assistance of a supervisor, updates the block chain state, and generates a corresponding non-interactive verifiable certificate;
verifying the validity of the proof by the block chain user, adopting various operations according to the maximum serial number consensus rule, and realizing distributed block chain state updating; and when a new user joins the block chain system, verifying the connectivity of the whole block chain and the validity of the block chain state.
10. An information data processing terminal characterized in that it is adapted to implement a verifiable and fully editable block-chain system according to claim 7.
CN202210281106.8A 2022-03-22 2022-03-22 Verifiable and fully editable block chain system, method, equipment and terminal Pending CN115118429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210281106.8A CN115118429A (en) 2022-03-22 2022-03-22 Verifiable and fully editable block chain system, method, equipment and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210281106.8A CN115118429A (en) 2022-03-22 2022-03-22 Verifiable and fully editable block chain system, method, equipment and terminal

Publications (1)

Publication Number Publication Date
CN115118429A true CN115118429A (en) 2022-09-27

Family

ID=83325358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210281106.8A Pending CN115118429A (en) 2022-03-22 2022-03-22 Verifiable and fully editable block chain system, method, equipment and terminal

Country Status (1)

Country Link
CN (1) CN115118429A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107113179A (en) * 2014-11-12 2017-08-29 亚伦.吉利 Multiple encoding for authentication
CN109274481A (en) * 2018-08-01 2019-01-25 中国科学院数据与通信保护研究教育中心 A kind of traceable method of data of block chain
CN110061850A (en) * 2019-04-24 2019-07-26 电子科技大学 The collision calculation method and editable block chain building method of chameleon hash function
CN111639935A (en) * 2020-04-30 2020-09-08 南京理工大学 Account book modification method applicable to editable block chain
CN111884815A (en) * 2020-08-07 2020-11-03 上海格尔安全科技有限公司 Block chain-based distributed digital certificate authentication system
CN112468302A (en) * 2020-10-23 2021-03-09 湖南天河国云科技有限公司 Editable blockchain based on verifiable multiparty secret sharing
CN112541195A (en) * 2020-12-21 2021-03-23 清华大学 Method and device for constructing editable block chain
CN112887078A (en) * 2021-02-02 2021-06-01 ***股份有限公司 Method and device for editing blocks in block chain
CN113536389A (en) * 2021-06-15 2021-10-22 复旦大学 Fine-grained controllable decentralized editable block chain construction method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107113179A (en) * 2014-11-12 2017-08-29 亚伦.吉利 Multiple encoding for authentication
CN109274481A (en) * 2018-08-01 2019-01-25 中国科学院数据与通信保护研究教育中心 A kind of traceable method of data of block chain
CN110061850A (en) * 2019-04-24 2019-07-26 电子科技大学 The collision calculation method and editable block chain building method of chameleon hash function
CN111639935A (en) * 2020-04-30 2020-09-08 南京理工大学 Account book modification method applicable to editable block chain
CN111884815A (en) * 2020-08-07 2020-11-03 上海格尔安全科技有限公司 Block chain-based distributed digital certificate authentication system
CN112468302A (en) * 2020-10-23 2021-03-09 湖南天河国云科技有限公司 Editable blockchain based on verifiable multiparty secret sharing
CN112541195A (en) * 2020-12-21 2021-03-23 清华大学 Method and device for constructing editable block chain
CN112887078A (en) * 2021-02-02 2021-06-01 ***股份有限公司 Method and device for editing blocks in block chain
CN113536389A (en) * 2021-06-15 2021-10-22 复旦大学 Fine-grained controllable decentralized editable block chain construction method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Y. YUAN: "Editable Blockchain: Models, Techniques and Methods", ACTA AUTOMATICA SINICA, 1 May 2020 (2020-05-01) *
李佩丽;徐海霞;马添军;穆永恒;: "可更改区块链技术研究", 密码学报, no. 05, 15 October 2018 (2018-10-15) *
袁勇;王飞跃;: "可编辑区块链:模型、技术与方法", 自动化学报, no. 05, 15 May 2020 (2020-05-15) *

Similar Documents

Publication Publication Date Title
US20200159697A1 (en) Immutable ledger with efficient and secure data destruction, system and method
CN110008720B (en) Dynamic data tracing method and device for Internet of things based on alliance chain
KR20230165886A (en) Securing blockchain transaction based on undetermined data
KR20200013680A (en) Script-based Blockchain Interaction
Zheng et al. Efficient query integrity for outsourced dynamic databases
CN115048652A (en) End-to-end security for hardware running verified software
Kundu et al. How to authenticate graphs without leaking
Chang et al. A blind dynamic fingerprinting technique for sequential circuit intellectual property protection
CN111641496B (en) Block chain data updating method, device, equipment, system and readable storage medium
Van Dijk et al. Offline untrusted storage with immediate detection of forking and replay attacks
Mahony et al. A systematic review of blockchain hardware acceleration architectures
Weng et al. Proof of unlearning: Definitions and instantiation
Chen et al. Towards Reliable Utilization of AIGC: Blockchain-Empowered Ownership Verification Mechanism
CN113051624A (en) Intelligent contract information flow integrity verification method and system based on type detection
US10565391B2 (en) Expression evaluation of database statements for restricted data
Parisi Securing Blockchain Networks like Ethereum and Hyperledger Fabric: Learn advanced security configurations and design principles to safeguard Blockchain networks
CN114500347B (en) Method and system for formalized verification of security interconnection protocol
CN115118429A (en) Verifiable and fully editable block chain system, method, equipment and terminal
WO2023082340A1 (en) Method for designing secure boot solution for embedded device on basis of formal verification
Tang et al. Zero-knowledge proof vulnerability analysis and security auditing
CN110795661B (en) Web application system and method for providing end-to-end integrity protection
Selvamani et al. A Novel Approach for Prevention of SQL Injection Attacks Using Cryptography and Access Control Policies
Wagner et al. Faulting Winternitz One-Time Signatures to Forge LMS, XMSS, or Signatures
Li et al. Backdoor-Resistant Public Data Integrity Verification Scheme Based on Smart Contracts
CN112733126A (en) Product license authentication method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination