CN110474762B - Method for constructing ring-type editable block chain - Google Patents
Method for constructing ring-type editable block chain Download PDFInfo
- Publication number
- CN110474762B CN110474762B CN201910777120.5A CN201910777120A CN110474762B CN 110474762 B CN110474762 B CN 110474762B CN 201910777120 A CN201910777120 A CN 201910777120A CN 110474762 B CN110474762 B CN 110474762B
- Authority
- CN
- China
- Prior art keywords
- block
- new
- editable
- block chain
- ring
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
Abstract
The invention relates to a method for constructing a ring-type editable block chain, which comprises the following steps: A. initialization: outputting a system public parameter and an initial block through a hash function according to the security parameter; B. and (3) generating a secret key: obtaining a private key x of a user according to system public parametersiAnd the public key yi(ii) a C. Generating a ring type editable block chain: recording the transaction information into blocks, arranging each block according to the generation time, and connecting the last block with the initial block to form a ring type editable block chain; obtaining a public key set according to the ring type editable block chain, wherein each block corresponds to a public key yiEach public key yiCorresponding to a private key xi. The invention realizes the efficient management and editing of the block chain, can carry out batch editing on the block chain, and also supports the batch deletion of the blocks on the block chain. And the loop structure of the block chain remains unchanged after the batch editing is performed.
Description
Technical Field
The invention relates to the field of network security, in particular to a method for constructing a ring-type editable block chain.
Background
The concept of blockchains was first formally proposed in 2008 and can be used to implement public ledgers and unalterable transaction records in a decentralized environment.
The conventional block chain adopts a chain structure, namely, a new block is inserted from the tail part of the chain. However, the block chain currently faces the problems of memory consumption and scalability. That is, the data content of the block chain is too large to be stored conveniently, and the block structure is single, so that further expansion cannot be performed from the chain structure, thereby supporting more diversified services and functions. In order to solve the problem, a plurality of research projects such as a lightning payment chain are available at present for solving the problems of slow payment and expandability of the block chain, and the research of an ether house is used for expanding the block chain to support more diversified designs and functions. But all current research is based on the chain structure of block chains.
Atenise et al in 2016 proposed a renewable Blockchain-or-reusing history in bitcoin and friends, which proposed an editable block chain technique based on chameleon hash function, allowing a block to re-edit the contents of a problem block (such as illegal information or illegal transactions) while keeping the hash value unchanged, thereby ensuring safe and reliable operation of the block chain. However, this solution does not specifically mention how to implement editing of tile content in a fully decentralized environment. Furthermore, the scheme is also based on a conventional chain of linked blocks, i.e. new blocks are inserted from the end of the chain. Therefore, once a certain block needs to be edited again, all blockchains after the block need to be traversed, and the calculation cost for editing is enormous (especially considering the length of the current blockchain, the traversal difficulty and complexity of tens of thousands of blockchains). In addition, the editable blockchain is based on a traditional chained blockchain, and cannot achieve better function expansion. Thus, for the reasons described above, the application prospects of editable blockchains are limited.
Disclosure of Invention
The invention provides a method for constructing a ring-type editable blockchain, which is used for safely and efficiently managing and editing the blockchain in a decentralized environment and providing a wider application scene for the blockchain through a ring-type structure.
The invention relates to a method for constructing a ring-type editable block chain, which comprises the following steps:
A. initialization: outputting a system public parameter P and an initial block B through a hash function according to a security parameter lambda1(Genesis Block); the security parameter lambda is a parameter which is input by an initialization party according to needs in a system initialization stage, and the parameter is widely embodied in the setting of any existing password schemeThe counter is a known parameter, and is typically the selected key length (e.g., 128256 bits, etc.). The initiator may be the system owner, or the user who needs to run the algorithm, etc.
B. And (3) generating a secret key: according to the system public parameter P, calculating to obtain the private key x of the useriAnd the public key yiWherein i is more than or equal to 1 and less than or equal to n, and n is the total number of blocks for generating the block chain; the users include any miners (who are responsible for transaction confirmation and data packaging in the blockchain) or any users who join the blockchain network.
C. Generating a ring type editable block chain: recording the transaction information into blocks, arranging the blocks according to the generation time, and arranging the last block and the initial block B1Connected to form a ring-type editable block chain RCn(ii) a According to the ring type editable block chain RCnGet the public key set L ═ { y ═ yi}1≤i≤nWherein each block BiCorresponding to one said public key yiEach public key yiCorresponding to one of said private keys xi。
The invention can provide efficient management and editing for the block chain by combining a ring-type novel block chain structure with a chameleon hash function. Under the support of the ring structure, batch editing on the block chain can be realized, and batch deletion of blocks on the block chain is also supported. And the loop structure of the block chain remains unchanged after the batch editing is performed. A wider application scene is provided for the block chain through the ring structure. For example, application scenarios based on ring or group signatures can be implemented by being portable to block chains in a ring structure, such as ring signatures, group signatures, anonymous voting, and the like.
Furthermore, through the ring structure of the block chain, batch editing and deleting of the blocks are realized, and the method comprises the following steps:
D. verifying ring type editable block chains: calculating according to a verification formula of the block chain and then outputting a verification result;
E. add new blocks to the circular block chain: according to the ring type editable block chain RCnAnd need toBlock { B'i}n+1≤i≤n+kAnd outputting a new ring type editable block chain RC after calculationn+kOr adding a failed identifier, wherein k is the number of new blocks needing to be added;
F. editing a ring type block chain: according to the ring type editable block chain RCnAnd the user's private key set xi}1≤i≤nBy recalculating new chameleon random value r 'for each tile'iChanging the contents of each block to different chameleon hash valuesThe same, set the original blocks { B }i}1≤i≤nEdit as a new set of tiles { B'i}1≤i≤nOutput edited ring-type editable Block chain RC'n;
G. Ring reconstruction: from said circular editable block chain RCnAfter d blocks are deleted, the reconstructed ring type editable block chain RC is outputn-dWherein d is a ring-type editable block chain RCnThe number of blocks to be deleted, and n-2>d。
Specifically, the step a comprises:
A1. selecting a group G with a generator G and a group order q according to a safety parameter lambda;
A2. the hash functions are set as follows: h1:{0,1}*→ G and H2:{0,1}*→ZqWherein H is1Is a first hash function, which is used to form a character string {0,1} of any length with 0 or 1*Mapping to an arbitrary element of the group G, representing the character string {0,1} as an arbitrary length, H2Is a second hash function, and is used for forming a character string {0,1} of any length by 0 or 1*Integer group Z mapped to q-th order composed of (0,1, …, q-1) elementsqIn the above, Z represents an integer group;
A3. output system public parameter P ═<G,q,g,H1,H2>;
A4. Generating an initial block B1Writing the system public parameter P intoStarting block B1。
Specifically, the private key x of the user is calculated in the step BiAnd the public key yiComprises the following steps: selecting a random number according to the system public parameter PAs the private key x of the useriR represents an integer group Z of order qqIn randomly selecting an element xiAccording to said private key xiComputing public keys
Specifically, the step C includes: packaging the transaction information of the current time period, recording the transaction information into a block, and recording the block { B }i}1≤i≤nArranging according to the sequence of the generation time, and arranging the last block BnAnd the initial block B1Are connected to form B1||…||Bn||B1And then by calculating { Bi}1≤i≤nTo obtain a ring-type editable blockchainWherein, c1Is to initialize a block B1For the calculation parameters of the ring start, array { Bi,ri,βiThe elements in the sequence represent the ith block BiThe chameleon random value and the normal random value, indicating that L is a public key set for generating the tile,indicates that the binding is the latest block BnCorresponding private key xnWherein H ═ H1(L) passing the set of public keys L through a first hash function H1One element mapped onto group G, (u, v) is the calculation parameter for inserting a new block.
Specifically, the calculation { B }i}1≤i≤nThe hash value of (d) is:
C1. calculating H as H1(L) andselecting two random numbersCalculating an initial block B1Is calculated as a parameter(u, v) are calculated parameters for inserting a new block;
C2. selecting two random numbersWherein i is (1, …, n-1), calculating chameleon random valueAnd chameleon hash valueWherein B isiFor the content of the ith block, the block B is calculated againi+1Is calculated as a parameterAccording to the characteristics of ring structure ending connection, c is obtainedn+1=c1;
C3. Calculate the nth block BnRandom number alpha ofn=(u-xncnmod q),βn=(v-xncnmod q) to obtain the nth block BnChameleon random value of
When operating on the blockchain, step D comprises: for ring type editable block chain with length nWherein, c1Is an initial block B1The calculated parameter of (1), array { Bi,ri,βiThe elements in the sequence represent the ith block BiThe chameleon random value and the normal random value, indicating that L is a public key set for generating the tile,indicates that the binding is the latest block BnCorresponding private key xnWherein H ═ H1(L) passing the set of public keys L through a first hash function H1One element mapped onto group G, (u, v) is the calculation parameter for inserting a new block;
respectively setting a first hash function H1:{0,1}*→ G and a second hash function H2:{0,1}*→ZqQ is the group order, and H is calculated as H1(L), H represents passing the set of public keys L through a first hash function H1Mapping to an element of group G according to the ith block BiChameleon random value ofαi=(u-xicimod q),ciIs a block BiThe calculation parameters of (2); calculating a corresponding chameleon hash valueAnd block Bi+1Is calculated as a parameter
The equation is then verified:andand whether all the signals are true or not is judged, if yes, 1 is output, and if not, 0 is output.
Specifically, the step E includes:
E1. adding a new public key to a public key setCombining L to generate new public key set L' ═ L | { yi}n+1≤i≤n+kCalculating H ═ H1(L') and binding the newest tile Bn+kCorresponding private key xn+kNew parametersGet block B1New calculation parameters g is a generator;
E2. calculating a new chameleon hash valueαi=(u-xicimod q), i ═ 1, …, n, and then block B is computedi+1New calculation parametersβi=(v-xicimod q);
E3. Selecting two random numbersi ═ n +1, …, n + k), and chameleon random values were calculatedAnd a new chameleon hash valueBiIs the content of the ith block, and then the block B is obtainedi+1New calculation parameters
E4. For i n + k, block B is calculatedn+kCorresponding random number alphan+k=(u-xn+kc′n+kmod q) and its corresponding ordinary random value βn+k=(v-xn+kc′n+kmod q), and corresponding chameleon random values
E5. Verification equationAnd whether all the blocks are true or not, and if all the blocks are true, the new blocks { B'i}n+1≤i≤n+kSuccessfully added, and a new block { B 'is inserted into the output'i}n+1≤i≤n+kBack loop editable blockchainsOtherwise, outputting an insertion failure identifier.
Specifically, the step F includes: with the length of n and the block set as { Bi}1≤i≤nCircular editable blockchains I is more than or equal to 1 and less than or equal to n according to the private key set { xi}1≤i≤nCalculating new chameleon random valueMake each new chameleon hash valueThe same, namely:then outputs a new block set of length n and new block set of { B'i}1≤i≤nCircular editable blockchains
Specifically, in step G, the ring-type editable blockchain with the length of nDeleting d blocks, comprising the steps of:
G1. calculation loop type editable block chain RCnAfter d blocks are deleted, the public key set L ″ ═ L \ y { y } of the new ring-type editable block chain formed by the remaining blocksi}i≤|n-d|、h=H1(L') andwherein x isn-d-1The private key corresponding to the most front end block of the new ring type editable block chain is represented,denotes xn-d-1Corresponding parameters;
G2. according to H ″, H1(L') calculating parameters of the private key corresponding to the new ring-type editable block chainAnd calculateWhere H "represents passing the public key set L" of the new ring-type editable block chain through the first hash function H1One element, c ", mapped to group G1For calculating parameters starting from one of the blocks in the new ring-type editable block chain, guRepresenting the calculation of a variable of a new ring type editable block chain, wherein u and v are random numbers for realizing a block chain ring type structure respectively;
G3. respectively calculating the hash values of the new chameleonAndi is (1, …, n-d-2), and the random number alpha corresponding to the most front block of the new loop type editable block chain is calculatedn-d-1=(u-xn-d- 1c″n-d-1mod q), block Bn-d-1Corresponding ordinary random value betan-d-1=(v-xn-d-1c″n-d-1mod q) to obtain a block Bn-d-1Chameleon random value of
G4. Verification equationAndif yes, representing block chain reconstruction engineering, and outputting reconstructed new ring type editable block chainOtherwise, a failure flag is output.
The method for constructing the ring-type editable block chain can realize batch editing, adding or deleting of the blocks, effectively improve the editing efficiency of the block chain, reduce the editing difficulty, expand the application scene of the block chain and improve the expandability of the block chain by using automatic execution modes such as intelligent contract and the like.
The present invention will be described in further detail with reference to the following examples. This should not be understood as limiting the scope of the above-described subject matter of the present invention to the following examples. Various substitutions and alterations according to the general knowledge and conventional practice in the art are intended to be included within the scope of the present invention without departing from the technical spirit of the present invention as described above.
Drawings
FIG. 1 is a flowchart illustrating a method for constructing a chain of ring-type editable blocks according to the invention.
Detailed Description
As shown in fig. 1, the method for constructing a circular editable block chain according to the present invention includes:
A. initialization:
A1. selecting a group G with a generator G and a group order q according to a safety parameter lambda;
A2. the hash functions are set as follows: h1:{0,1}*→ G and H2:{0,1}*→ZqWherein H is1Is a first hash function, which is used to form a character string {0,1} of any length with 0 or 1*Mapping to an arbitrary element of the group G, representing the character string {0,1} as an arbitrary length, H2Is a second hash function, and is used for forming a character string {0,1} of any length by 0 or 1*Integer group Z mapped to q-th order composed of (0,1, …, q-1) elementsqIn the above, Z represents an integer group;
A3. output system public parameter P ═<G,q,g,H1,H2>;
A4. Generating an initial block B1(Genesis Block), writing the system disclosure parameter P into the initial Block B1。
B. And (3) generating a secret key: computing a private key x of a useriAnd the public key yi: selecting a random number according to the system public parameter PAs the private key x of the useriR represents an integer group Z of order qqIn randomly selecting an element xiAccording to said private key xiComputing public keysWherein i is more than or equal to 1 and less than or equal to n, and n is the total number of blocks for generating the block chain; the users include any miners (responsible for transaction confirmation and data packaging in the blockchain) or any joiningUsers of a blockchain network.
C. Generating a ring type editable block chain: packaging the transaction information of the current time period, recording the transaction information into a block, and recording the block { B }i}1≤i≤n(n is more than or equal to 3, otherwise, the end-to-end rings cannot be formed) are arranged according to the sequence of the generation time, and the last block B to be arranged is arrangednAnd the initial block B1Are connected to form B1||…||Bn||B1And then by calculating { Bi}1≤i≤nTo obtain a ring-type editable blockchainWherein, c1Is to initialize a block B1For the calculation parameters of the ring start, array { Bi,ri,βiThe elements in the sequence represent the ith block BiThe contents of (a), chameleon random values and normal random values,indicates that the binding is the latest block BnCorresponding private key xnL ═ yi}1≤i≤nTo generate a set of public keys for a tile, each tile BiCorresponding to one said public key yiEach public key yiCorresponding to one of said private keys xi,h=H1(L) passing the set of public keys L through a first hash function H1One element mapped onto group G, (u, v) is the calculation parameter for inserting a new block. Wherein { B is calculatedi}1≤i≤nThe hash value of (d) is:
C1. calculating H as H1(L) andselecting two random numbersCalculating an initial block B1Is calculated as a parameter(u, v) are calculated parameters for inserting a new block;
C2. selecting two random numbersWherein i is (1, …, n-1), calculating chameleon random valueAnd chameleon hash valueWherein B isiFor the content of the ith block, the block B is calculated againi+1Is calculated as a parameterAccording to the characteristics of ring structure ending connection, c is obtainedn+1=c1;
C3. Calculate the nth block BnRandom number alpha ofn=(u-xncnmod q),βn=(v-xncnmod q) to obtain the nth block BnChameleon random value of
Through the ring type structure of the block chain, the batch editing and deleting of the blocks are realized, and the method comprises the following steps:
D. verifying ring type editable block chains: for ring type editable block chain with length nWherein, c1Is an initial block B1The calculated parameter of (1), array { Bi,ri,βiThe elements in the sequence represent the ith block BiThe contents of (a), chameleon random values and normal random values,indicating that the binding is up-to-dateBlock BnCorresponding private key xnL is the set of public keys for generating the block, H ═ H1(L) passing the set of public keys L through a first hash function H1One element mapped onto group G, (u, v) is the calculation parameter for inserting a new block;
respectively setting a first hash function H1:{0,1}*→ G and a second hash function H2:{0,1}*→ZqQ is the group order, and H is calculated as H1(L) passing the public key set L through a first hash function H1Mapping to group G according to ith block BiChameleon random value ofαi=(u-xicimod q),ciIs a block BiThe calculation parameters of (2); calculating a corresponding chameleon hash valueAnd block Bi+1Is calculated as a parameter
The equation is then verified:andand whether all the signals are true or not is judged, if yes, 1 is output, and if not, 0 is output.
E. Add new blocks to the circular block chain: ring-oriented editable block chain RCnAdding a new block { B'i}n+1≤i≤n+kWherein k is the number of new blocks to be added, and the steps are as follows:
E1. adding a new public key to the public key set L to generate a new public key set L' ═ L | { yi}n+1≤i≤n+kCalculating H ═ H1(L'), calculating the latest binding block Bn+kCorresponding private key xn+kNew parametersGet block B1New calculation parametersg is a generator;
E2. calculating a new chameleon hash valueαi=(u-xicimod q), i ═ 1, …, n, and then block B is computedi+1New calculation parametersβi=(v-xicimod q);
E3. Selecting two random numbersi ═ n +1, …, n + k), and chameleon random values were calculatedAnd a new chameleon hash valueBiIs the content of the ith block, and then the block B is obtainedi+1New calculation parameters
E4. For i n + k, block B is calculatedn+kCorresponding random number alphan+k=(u-xn+kc′n+kmod q) and its corresponding ordinary random value βn+k=(v-xn+kc′n+kmod q), and corresponding chameleon random values
E5. Verification equationAndwhether all the blocks are true or not, and if all the blocks are true, the new blocks { B'i}n+1≤i≤n+kSuccessfully added, and a new block { B 'is inserted into the output'i}n+1≤i≤n+kBack loop editable blockchainsOtherwise, outputting an insertion failure identifier 0.
F. Editing a ring type block chain: with the length of n and the block set as { Bi}1≤i≤nCircular editable blockchains I is more than or equal to 1 and less than or equal to n according to the private key set { xi}1≤i≤nCalculating new chameleon random valueMake each new chameleon hash valueThe same, namely:therefore, the blocks can be edited on the premise of not influencing the consistency of the hash values of the blocks. Then outputs a new block set of length n and new block set of { B'i}1≤i≤nCircular editable blockchains
G. Ring reconstruction: from a ring of length n editable blockchainsN-2 blocks of medium deletion>d, the steps are as follows:
G1. calculation loop type editable block chain RCnAfter d blocks are deleted, the public key set L ″ ═ L \ y { y } of the new ring-type editable block chain formed by the remaining blocksi}i≤|n-d|、h=H1(L') andwherein x isn-d-1The private key corresponding to the most front end block of the new ring type editable block chain is represented,denotes xn-d-1Corresponding parameters;
G2. according to H ″, H1(L') calculating parameters of the private key corresponding to the new ring-type editable block chainAnd calculateWhere H "represents passing the public key set L" of the new ring-type editable block chain through the first hash function H1One element, c ", mapped to group G1For calculating parameters starting from one of the blocks in the new ring-type editable block chain, guRepresenting the calculation of a variable of a new ring type editable block chain, wherein u and v are random numbers for realizing a block chain ring type structure respectively;
G3. respectively calculating the hash values of the new chameleonAndi is (1, …, n-d-2), and the random number alpha corresponding to the most front block of the new loop type editable block chain is calculatedn-d-1=(u-xn-d- 1c″n-d-1mod q), block Bn-d-1Corresponding ordinary random value betan-d-1=(v-xn-d-1c″n-d-1mod q) to obtain a block Bn-d-1Chameleon random value of
G4. Verification equationAndif yes, representing block chain reconstruction engineering, and outputting reconstructed new ring type editable block chainOtherwise, outputting a failure identification.
Through a ring type block chain structure and a chameleon hash function, efficient management and editing of the block chain are achieved, batch editing can be performed on the block chain, and batch deletion of blocks on the block chain is supported. And the loop structure of the block chain remains unchanged after the batch editing is performed.
Claims (8)
1. The method for constructing the ring-type editable block chain is characterized by comprising the following steps:
A. initialization: according to security parametersOutputting system public parameters through a hash functionPAnd an initial blockB 1;
A2. The hash functions are set as follows:andwherein, in the step (A),H 1is a first hash function, which is used to form a character string {0,1} of any length with 0 or 1*Mapping to a groupGIndicates that the character string 0,1 is of any length,H 2is a second hash function, and is used for forming a character string {0,1} of any length by 0 or 1*Mapping to a map of the data represented by (0,1, …,q-1) of elementsqInteger group of ordersZ q In the above-mentioned manner,Zrepresents an integer group;
A4. Generating an initial blockB 1Exposing parameters of the systemPWriting to an initial blockB 1;
B. And (3) generating a secret key: disclosing parameters according to the systemPCalculating to obtain the private key of the userAnd public keyWherein i is more than or equal to 1 and less than or equal to n, and n is the total number of blocks for generating the block chain;
C. generating a ring type editable block chain: recording the transaction information into blocks, arranging the blocks according to the generation time, and arranging the last block and the initial blockB 1Connected to form a ring-type editable block chain(ii) a According to the ring type editable block chainObtaining a public key setWherein each blockB i Corresponding to one of said public keysy i Each public keyy i Corresponding to one of said private keysx i ;
D. Verifying ring type editable block chains: calculating according to a verification formula of the block chain and then outputting a verification result;
E. add new blocks to the circular block chain: according to the ring type editable block chainAnd blocks that need to be newly addedOutputting new ring type editable block chain after calculationOr an identification of a failure to add a new block, whereinkThe number of new blocks needing to be added;
F. editing a ring type block chain: editable blockchains according to ring typeAnd a user's private key setBy recalculating new chameleon random values for each tileChanging the contents of each block to different chameleon hash valuesThe same, the original blocks are collectedEditing into a new set of blocksOutputting the edited ring-type editable block chain;
2. the method of claim 1, wherein the method comprises: calculating the private key of the user in the step BAnd public keyComprises the following steps: disclosing parameters according to the systemPSelecting a random numberAs private key of user,RRepresents fromqInteger group of ordersZ q In which an element is randomly selectedx i According to said private keyComputing public keys。
3. The method of claim 2, wherein the method comprises: the step C comprises the following steps: packaging the transaction information of the current time period, recording the transaction information into a block, and recording the blockArranging in the order of generation time, and arranging the last blockB nAnd the initial blockB 1Are connected to formEnd-to-end ring structures of, then by calculationTo obtain a ring-type editable blockchainWherein, in the step (A),is to start the blockB 1For calculating parameters of the ring start, arrayThe elements in (1) sequentially represent the ith blockB iThe contents of (a), chameleon random values and normal random values,Lto generate the set of public keys for the block,indicating the latest binding blockB nCorresponding private keyx n WhereinDenotes the aggregation of public keysLBy a first hash functionH 1Mapping to a groupGOne of the elements of (a) above,are the calculated parameters for inserting a new block.
C1. computingAndselecting two random numbersCalculating an initial blockB 1Is calculated as a parameter;Is a calculation parameter for inserting a new block;
C2. selecting two random numbersWhereinCalculating chameleon random valueAnd chameleon hash valueWhereinFor the content of the ith block, the block is recalculatedB i+1Is calculated as a parameterAccording to the characteristics of ring structure ending connection;
5. The method of claim 1, wherein the method comprises: the step D comprises the following steps: for ring type editable block chain with length nWherein, in the step (A),is an initial blockB 1Of the calculation parameters, arrayThe elements in (1) sequentially represent the ith blockB iContent, chameleon random value and ordinary random value ofLTo generate the set of public keys for the block,indicating the latest binding blockB nCorresponding private keyx n WhereinDenotes the aggregation of public keysLBy a first hash functionH 1Mapping to a groupGOne of the elements of (a) above,is a calculation parameter for inserting a new block;
respectively setting a first hash function:and a second hash function,qFor the group order, calculate,hRepresenting a collection of public keysLBy a first hash functionH 1Mapping to a groupGAn element of (1), according to the ith blockB iChameleon random value of, mod,c i Is a blockB iThe calculation parameters of (2); calculating a corresponding chameleon hash valueAnd the blockB i+1Is calculated as a parameter;
6. The method of claim 5, wherein: the step E comprises the following steps:
E1. adding a new public key to a public key setLGenerating a new public key setCalculatingAnd binding the latest blockB n+kCorresponding private keyx n+k New parametersObtaining a blockB 1New calculation parameters,To generate a primitive;
E2. calculating a new chameleon hash value, mod,Then calculate the blockB i+1New calculation parameters, mod ;
E3. Selecting two random numbers,Calculating chameleon random valueAnd a new chameleon hash value,B i Is the content of the ith block, and then the block is obtainedB i+1New calculation parameters;
E4. For i = n + k, the block is calculatedB n+k Corresponding random number mod And its corresponding ordinary random value mod And the corresponding chameleon random value;
7. The method of claim 6, wherein: the step F comprises the following steps: the block set with the length of n isCircular editable blockchains,From a set of private keysCalculating new chameleon random valueMake each new chameleon hash valueThe same, namely:then, a new block set with the length of n and a new block set with the length of n are outputCircular editable blockchains。
8. The method of claim 7, wherein: in step G, the chain of editable blocks is formed from a circular chain of length nDeletion indA block comprising the steps of:
G1. computing endless editable blockchainsDelete itdAfter each block, the public key set of the new ring type editable block chain formed by the rest blocks,、Andwherein, in the step (A),the private key corresponding to the most front end block of the new ring type editable block chain is represented,to representCorresponding parameters;
G2. according toCalculating the parameters of the private key corresponding to the new ring type editable block chainAnd calculateWhereinPublic key set representing a chain of editable blocks with new ring typesBy a first hash functionH 1Mapping to a groupGOne of the elements of (a) above,to calculate parameters starting from one of the blocks in the new ring-type editable block chain,a variable representing the calculation of a new ring-type editable block chain,uandvrespectively random numbers for realizing the block chain-ring structure;
G3. respectively calculating the hash values of the new chameleonAnd are and,calculating the random number corresponding to the most front block of the new ring type editable block chain mod q) Block, blockB n-d-1 Corresponding ordinary random valuemod ) Obtaining a blockB n-d-1 Chameleon random value of;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910777120.5A CN110474762B (en) | 2019-08-22 | 2019-08-22 | Method for constructing ring-type editable block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910777120.5A CN110474762B (en) | 2019-08-22 | 2019-08-22 | Method for constructing ring-type editable block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110474762A CN110474762A (en) | 2019-11-19 |
CN110474762B true CN110474762B (en) | 2021-05-25 |
Family
ID=68513529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910777120.5A Active CN110474762B (en) | 2019-08-22 | 2019-08-22 | Method for constructing ring-type editable block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110474762B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11323246B2 (en) | 2019-12-11 | 2022-05-03 | The Bank Of New York Mellon | Ring chain architecture |
CN111339185B (en) * | 2020-02-13 | 2023-12-15 | 北京工业大学 | Incomplete decentralization method based on block chain technology |
CN112272092B (en) * | 2020-08-30 | 2021-07-27 | 河南大学 | Data editing method applied to block chain |
CN112884477B (en) * | 2020-11-10 | 2022-08-19 | 支付宝(杭州)信息技术有限公司 | Block chain transaction initiating method and system |
CN113225324B (en) * | 2021-04-26 | 2022-10-04 | 安徽中科晶格技术有限公司 | Block chain anonymous account creation method, system, device and storage medium |
CN113536389B (en) * | 2021-06-15 | 2022-05-20 | 复旦大学 | Fine-grained controllable decentralized editable block chain construction method and system |
CN114417429B (en) * | 2022-04-02 | 2022-06-07 | 湖南宸瀚科技有限公司 | Editable block chain system based on ring type verification |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109067547A (en) * | 2018-09-21 | 2018-12-21 | 北京计算机技术及应用研究所 | A kind of block chain method for secret protection based on disposable ring signatures |
CN110061850A (en) * | 2019-04-24 | 2019-07-26 | 电子科技大学 | The collision calculation method and editable block chain building method of chameleon hash function |
CN110071812A (en) * | 2019-04-29 | 2019-07-30 | 电子科技大学 | A kind of editable can link, the ring signatures method of non-repudiation |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9785369B1 (en) * | 2016-05-23 | 2017-10-10 | Accenture Global Solutions Limited | Multiple-link blockchain |
-
2019
- 2019-08-22 CN CN201910777120.5A patent/CN110474762B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109067547A (en) * | 2018-09-21 | 2018-12-21 | 北京计算机技术及应用研究所 | A kind of block chain method for secret protection based on disposable ring signatures |
CN110061850A (en) * | 2019-04-24 | 2019-07-26 | 电子科技大学 | The collision calculation method and editable block chain building method of chameleon hash function |
CN110071812A (en) * | 2019-04-29 | 2019-07-30 | 电子科技大学 | A kind of editable can link, the ring signatures method of non-repudiation |
Non-Patent Citations (1)
Title |
---|
可更改区块链技术研究;李佩丽 等;《密码学报》;20181031;第5卷(第5期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110474762A (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110474762B (en) | Method for constructing ring-type editable block chain | |
JP6955026B2 (en) | Systems and methods for parallel processing blockchain transactions | |
US10887096B2 (en) | Methods and apparatus for a distributed database including anonymous entries | |
CN110061850B (en) | Collision calculation method of chameleon hash function and editable block chain construction method | |
US11509482B2 (en) | Parameterisable smart contracts | |
CN110046894B (en) | Erasure code-based block chain establishing method capable of reconstructing groups | |
CN108615156A (en) | A kind of data structure based on block chain | |
CN112862490B (en) | Output consensus method under asynchronous network | |
CN109245878B (en) | Method and device for generating new blocks of block chain and readable storage medium | |
TWI742586B (en) | Methods and devices for providing traversable key-value data storage on blockchain | |
CN107181797A (en) | The block compression method and system of a kind of block chain | |
CN110730963A (en) | System and method for information protection | |
CN113726751A (en) | Weight management method, device and equipment in block chain type account book | |
US20220044241A1 (en) | Achieving Decentralized Blockchain Consensus Using A State Function Driven Protocol | |
Avin et al. | Random preferential attachment hypergraph | |
CN114328518A (en) | UTXO model-based low storage consumption method and system | |
CN111292190A (en) | Transaction generation method, block creation method, related device and equipment | |
CN110365493B (en) | Multi-form derivable annular block chain construction method | |
CN110162659B (en) | Fixed-rhythm new music generation method based on pitch network | |
Azzolini et al. | Modeling Bitcoin Protocols with Probabilistic Logic Programming. | |
CN111177263A (en) | Block chain consensus method and node | |
CN112632187B (en) | Attribute hiding and canceling method based on counting bloom filter | |
CN111414421A (en) | Sectional type block chain storage method and storage device | |
CN113810185A (en) | Anti-trapdoor leakage on-chain data restoration system and method | |
CN111597268A (en) | Block chain expansion method, block chain node and block chain 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |