Blockchain editable system and method for distributed environment

By introducing multiple authoritative institutions and distributed strategy-based chameleon hash algorithms in distributed environments, the problem of centralized authoritative institutions and consensus mechanisms in the existing technology is solved, and a safe and efficient blockchain is achieved Procedural function.

CN114219479BActive Publication Date: 2025-02-11FUJIAN NORMAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111452160.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-02-11
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Existing editable blockchain technologies have security problems. For example, the PCH-based blockchain rewrite mechanism requires a fully trusted central authority, and the consensus-based blockchain rewrite mechanism is vulnerable to attacks.

Method used

A blockchain proofreadable system for distributed environments is proposed. By introducing multiple authoritative institutions, it issues rewrite privileges, reduces the vulnerability of centralized trust, and adopts a distributed strategy-based chameleon hash (DPCH) algorithm, combined with RSA chameleon hash and BLS short signatures realize the editable function of the blockchain.

Benefits of technology

This solution implements programmable campus blockchain in a distributed environment, reducing the risks of central authoritative institutions, improving the security and performance of the system, and promoting the widespread application of programmable campus blockchain protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114219479B_ABST
    Figure CN114219479B_ABST
Patent Text Reader

Abstract

The present invention relates to a blockchain editable system and method for a distributed environment, the system includes an authority, a transaction initiator, a modifier, and a blockchain participant; the method includes the following steps: S1, one of the authority generates the public parameters of the system, a public-private key pair; S2, the other authority generates its own public-private key pair; S3, the authority that performs system initialization generates a private key for the modifier and signs it; S4, each authority generates an attribute key for the modifier according to the attribute set held by the modifier; S5, the transaction initiator calculates the hash value of the transaction; S6, the modifier modifies the transaction content without changing the transaction hash value; S7, any blockchain participant detects whether the hash value of the transaction is reasonable, and outputs 1 if it is, otherwise outputs 0. The system and method have excellent performance and high security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology, and specifically relates to a blockchain editable system and method for a distributed environment. Background Art

[0002] With the continuous development of blockchain, a large number of blockchain-based applications have emerged, such as digital currency, supply chain, etc. Immutability is an important property of blockchain, which ensures that objects that have been put on the chain, that is, blocks or transactions, cannot be modified once they are confirmed. Although immutability provides security for blockchain, it hinders the development of blockchain. Blockchain has been abused to store and disseminate inappropriate content. Chain participants may be reluctant to participate and download the chain for fear of being accused of possessing illegal information. In addition, some data regulations, such as the General Data Protection Regulation (GDPR) and the right to be forgotten, also allow people to edit and modify published data. In order to break the immutability of blockchain in a controllable way, scholars introduced the concept of editable blockchain.

[0003] Existing editable blockchain technologies can be divided into two categories: permissioned and distributed. In permissioned editable blockchains, a trapdoor-based chameleon hash replaces the traditional hash function. An entity holding a trapdoor can rewrite data objects that have been on the chain without changing the block hash value. Derler et al. proposed a fine-grained editable blockchain protocol and introduced a function called policy-based chameleon hash (PCH). In a distributed editable blockchain, blockchain rewrites are based on a consensus voting mechanism. Each chain participant can make a rewrite request, and if enough votes are collected, the rewrite request can be executed.

[0004] There are several security issues with current editable blockchain solutions. PCH-based blockchain rewrite mechanisms require a fully trusted central authority that has the rewrite privileges for any access policy, which is a very strong assumption. Such an authority is a very obvious target for attack and is not in line with the original design of blockchain. Consensus-based blockchain rewrite mechanisms are based on consensus-based electronic voting technology, which is vulnerable to attacks. Summary of the invention

[0005] The purpose of the present invention is to provide a blockchain editable system and method for a distributed environment, which has excellent performance and high security.

[0006] To achieve the above purpose, the technical solution adopted by the present invention is: a blockchain editable system for a distributed environment, comprising:

[0007] The authority is responsible for generating public-private key pairs and attribute keys for modifiers. The authority that performs system initialization is also responsible for generating private keys for modifiers.

[0008] The transaction initiator, used to calculate the hash value of the transaction;

[0009] Modifiers, used to modify transaction contents without changing the transaction hash value; and

[0010] Blockchain participants verify that the hash value of a transaction is correct.

[0011] The present invention also provides a blockchain editable method for a distributed environment, comprising the following steps:

[0012] S1, one of the authoritative organizations generates the public parameters of the system, the public-private key pair;

[0013] S2. Other authoritative institutions generate their own public-private key pairs;

[0014] S3. The authority that performs system initialization generates a private key for the modifier and signs it;

[0015] S4. Each authority generates an attribute key for the modifier based on the attribute set held by the modifier;

[0016] S5. The transaction initiator calculates the hash value of the transaction;

[0017] S6. The modifier modifies the transaction content without changing the transaction hash value;

[0018] S7. Any blockchain participant checks whether the hash value of the transaction is reasonable. If it is, it outputs 1, otherwise it outputs 0.

[0019] Furthermore, the specific implementation method of step S1 is:

[0020] First, an authority selects a bilinear map e:G×G→G T , where G and G T They are all multiplicative cyclic groups of order p, and g is a generator of G;

[0021] After that, we randomly select two large prime numbers p0 and q0 and calculate the Euler function Choose one with Coprime random numbers e0, and calculate d0;

[0022] Randomly select set Z p An element α∈Z p , three hash functions and a mapping function Where → represents mapping from one numerical space to another; {0,1} * represents a bit string of arbitrary length, Represents Z n The set of elements in that are relatively prime to n;

[0023] Finally, output the common parameters of the system Public key pk=(H0,p0q0,e0,g α ) and private key sk=(d0,α), where 1 λ is a security parameter of length λ.

[0024] Furthermore, in step S2, other authoritative institutions randomly select α θ ,y θ ∈Z p , then output the public key and sk θ =(α θ ,y θ ).

[0025] Furthermore, in step S3, the authority that performs system initialization calculates and returns and sk gid =d0 to the modifier.

[0026] Furthermore, in step S4, each authority detects Is it true? If not, terminate the process; otherwise, randomly select a set Z p An element t∈Z p , and calculate and sk gid,A,1 =g t ; Finally, return sk gid,A =(gid,A,sk gid,A,0 ,sk gid,A,1 ).

[0027] Furthermore, the specific implementation method of step S5 is:

[0028] Pick any two large prime numbers p1 and q1 and calculate the Euler function Choose one with Coprime random numbers e1, and calculate d1;

[0029] After that, choose a hash function Randomly select groups An element in and Then calculate and in express The set of elements that are coprime to p0q0, The definition is similar to;

[0030] Randomly choose k←Z p As the key for symmetric encryption, d1 is encrypted to generate ciphertext Encode k as Access Control Structure The corresponding multiplicative perverse matrix is in (matrix Each element in is taken from the set The matrix is ​​l1 rows and l2 columns);

[0031] Randomly select two vectors and And calculate the vector and vector

[0032] Then, randomly select Z p l1 elements in And calculate For each i∈[l1], calculate

[0033] Finally, return pk etd =(H1,n1,e1), h =(h0,h1), r =(r0,r1) and

[0034] Furthermore, the specific implementation method of step S6 is:

[0035] If m=m′, return r′=r, where m′ is the modified message and r′ is the random number corresponding to the modified message; otherwise, perform the following operations:

[0036] If the set of attributes held by the modifier satisfies the access control structure, then calculate where τ i For vector The i-th element in ;

[0037] Calculation Satisfaction Collection in Representation Matrix The i-th element in ;

[0038] After that, decode to get k, and further decrypt to get d1; calculate and

[0039] Finally, return r′=(r′0, r′1).

[0040] Further, in step S7, if and If both are true, output 1; otherwise, output 0.

[0041] Compared with the prior art, the present invention has the following beneficial effects: it provides a blockchain editable system and method for distributed environments, realizes an editable blockchain in a distributed environment, and solves the problems of centralization of the central authority when directly using the PCH algorithm. This solution has better performance than the most advanced solutions currently available, and effectively promotes the widespread application of editable blockchain protocols. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a schematic diagram of the system architecture of an embodiment of the present invention;

[0043] Figure 2 It is a flow chart of the method implementation of the embodiment of the present invention. DETAILED DESCRIPTION

[0044] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0045] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0046] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0047] Symbols and definitions

[0048] The set of all natural numbers.

[0049] Attribute space.

[0050] Message space.

[0051] Identifier space.

[0052] gid: modifier identifier.

[0053] λ: safety parameter.

[0054] pp: public parameters.

[0055] pk: The public key of the authority that performs system initialization.

[0056] sk: executes the private key of the system initialization authority.

[0057] sk gid : The private key of the modifier gid.

[0058] A collection of authorities.

[0059] θ: Authority identifier.

[0060] sk θ : The private key of authority θ.

[0061] pk θ : The public key of authority θ.

[0062] r: a random number.

[0063] c: A ciphertext.

[0064] h: A hash value.

[0065] sk gid,A : Attribute key of the modifier's gid.

[0066] Access control policy.

[0067] pk etd : The public part of the trapdoor.

[0068] sk etd : The secret part of the trapdoor.

[0069] The main idea of ​​the present invention is to propose a blockchain editable scheme for a distributed environment, aiming at the centralization of the central authority of the direct use of the PCH algorithm, allowing the central authority to edit the blockchain in a controlled manner. In the present invention, rewrite privileges are issued by multiple authorities to reduce the vulnerability of centralized trust. The present invention introduces a new encryption concept called distributed policy-based chameleon hashing (DPCH). By applying RSA-based chameleon hashing and BLS short signatures, an example of a distributed policy-based chameleon hash function is given.

[0070] like Figure 1 As shown, this embodiment provides a blockchain editable system for a distributed environment, including: an authority, a transaction initiator, a modifier, and a blockchain participant.

[0071] The authority is used to generate public-private key pairs and attribute keys for modifiers. The authority that performs system initialization is also responsible for generating private keys for modifiers.

[0072] The transaction initiator uses this to calculate the hash value of the transaction.

[0073] The modifier is used to modify the transaction content without changing the transaction hash value.

[0074] Blockchain participants use this to verify that the hash value of the transaction is correct.

[0075] like Figure 2 As shown, this embodiment also provides a blockchain editable method for a distributed environment based on the above system, including the following steps:

[0076] S1. One of the authoritative organizations generates the public parameters of the system, the public-private key pair.

[0077] The specific implementation method of step S1 is:

[0078] First, an authority selects a bilinear map e:G×G→G T , where G and G T They are all multiplicative cyclic groups of order p, and g is a generator of G;

[0079] After that, we randomly select two large prime numbers p0 and q0 and calculate the Euler function Choose one with Coprime random numbers e0, and calculate d0;

[0080] Randomly select set Z p An element α∈Z p , three hash functions and a mapping function Where → represents mapping from one numerical space to another; {0,1} * represents a bit string of arbitrary length, Represents Z n The set of elements in that are relatively prime to n;

[0081] Finally, output the common parameters of the system Public key pk=(H0,p0q0,e0,g α ) and private key sk=(d0,α), where 1 λ is a security parameter of length λ.

[0082] S2. Other authoritative organizations each generate their own public-private key pairs.

[0083] Specifically, other authoritative institutions randomly select α θ ,y θ ∈Z p , then output the public key and sk θ =(α θ ,y θ ).

[0084] S3. The authority that performs system initialization generates a private key for the modifier and signs it.

[0085] Specifically, the authority that performs system initialization calculates and returns and sk gid =d0 to the modifier.

[0086] S4. Each authority generates an attribute key for the modifier based on the attribute set held by the modifier.

[0087] Specifically, each authority tests Is it true? If not, terminate the process. Otherwise, randomly select a set Z p An element t∈Z p , and calculate and sk gid,A,1 =g t Finally, return to sk gid,A =(gid,A,sk gid,A,0 ,sk gid,A,1 ).

[0088] S5. The transaction initiator calculates the hash value of the transaction.

[0089] The specific implementation method of step S5 is:

[0090] Pick any two large prime numbers p1 and q1 and calculate the Euler function Choose one with Coprime random numbers e1, and calculate d1;

[0091] After that, choose a hash function Randomly select groups An element in and Then calculate and in express The set of elements that are coprime to p0q0, The definition is similar to;

[0092] Randomly choose k←Z pAs the key for symmetric encryption, d1 is encrypted to generate ciphertext Encode k as Access Control Structure The corresponding multiplicative perverse matrix is in (matrix Each element in is taken from the set The matrix is ​​l1 rows and l2 columns);

[0093] Randomly select two vectors and And calculate the vector and vector

[0094] Then, randomly select Z p l1 elements in And calculate For each i∈[l1], calculate

[0095] Finally, return pk etd =(H1,n1,e1), h =(h0,h1), r =(r0,r1) and

[0096] S6. The modifier modifies the transaction content without changing the transaction hash value.

[0097] The specific implementation method of step S6 is:

[0098] If m=m′, return r′=r, where m′ is the modified message and r′ is the random number corresponding to the modified message; otherwise, perform the following operations:

[0099] If the set of attributes held by the modifier satisfies the access control structure, then calculate where τ i For vector The i-th element in ;

[0100] Calculation Satisfaction Collection in Representation Matrix The i-th element in ;

[0101] After that, decode to get k, and further decrypt to get d1; calculate and

[0102] Finally, return r′=(r′0, r′1).

[0103] S7. Any blockchain participant checks whether the hash value of the transaction is reasonable. If it is, it outputs 1, otherwise it outputs 0.

[0104] Specifically, if and If both are true, output 1. Otherwise, output 0.

[0105] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. A blockchain editable method for a distributed environment, characterized in that: Provide a blockchain editable system for distributed environments, including: The authority is responsible for generating public-private key pairs and attribute keys for modifiers. The authority that performs system initialization is also responsible for generating private keys for modifiers. The transaction initiator, used to calculate the hash value of the transaction; Modifiers, used to modify transaction contents without changing the transaction hash value; and Blockchain participants verify that the hash value of the transaction is correct; The blockchain editable method for a distributed environment comprises the following steps: S1, one of the authoritative organizations generates the public parameters of the system, the public-private key pair; S2. Other authoritative institutions generate their own public-private key pairs; S3. The authority that performs system initialization generates a private key for the modifier and signs it; S4. Each authority generates an attribute key for the modifier based on the attribute set held by the modifier; S5. The transaction initiator calculates the hash value of the transaction; S6. The modifier modifies the transaction content without changing the transaction hash value; S7. Any blockchain participant checks whether the hash value of the transaction is reasonable. If it is, it outputs 1, otherwise it outputs 0; The specific implementation method of step S1 is: First, an authority selects a bilinear map e:G×G→G T , where G and G T They are all multiplicative cyclic groups of order p, and g is a generator of G; After that, we randomly select two large prime numbers p0 and q0 and calculate the Euler function Choose one with Coprime random numbers e0, and calculate d0; Randomly select set Z p An element α∈Z p , three hash functions and a mapping function Where → represents mapping from one numerical space to another; {0,1} * represents a bit string of arbitrary length, Represents Z n The set of elements in that are relatively prime to n; Finally, output the common parameters of the system Public key pk=(H0,p0q0,e0,g α ) and private key sk=(d0,α), where 1 λ is a security parameter of length λ; In step S2, other authoritative institutions randomly select α θ ,y θ ∈Z p , then output the public key and sk θ =(α θ ,y θ ); In step S3, the authority that performs system initialization calculates and returns and sk gid =d0 to the modifier; In step S4, each authority detects Is it true? If not, terminate the process; otherwise, randomly select a set Z p An element t∈Z p , and calculate and sk gid,A,1 =g t ; Finally, return sk gid,A =(gid,A,sk gid,A,0 ,sk gid,A,1 ); The specific implementation method of step S5 is: Pick any two large prime numbers p1 and q1 and calculate the Euler function Choose one with Coprime random numbers e1, and calculate d1; After that, choose a hash function Randomly select groups An element in and Then calculate and in Represents Z p0q0 The set of elements that are coprime to p0q0, Represents Z p1q1 The set of elements that are coprime with p1q1; Randomly choose k←Z p As the key for symmetric encryption, d1 is encrypted to generate ciphertext Encode k as Access Control Structure The corresponding multiplicative perverse matrix is in matrix Each element in is taken from the set The matrix has l1 rows and l2 columns; Randomly select two vectors and And calculate the vector and vector Then, randomly select Z p There are l1 elements t1,t2,...,t l1 ∈Z p And calculate For each i∈[l1], calculate Finally, return pk etd =(H1,n1,e1), h =(h0,h1), r =(r0,r1) and The specific implementation method of step S6 is: If m=m′, return r′=r, where m′ is the modified message and r′ is the random number corresponding to the modified message; otherwise, perform the following operations: If the set of attributes held by the modifier satisfies the access control structure, then calculate where τ i For vector The i-th element in ; Calculation Satisfaction Collection in Representation Matrix The i-th element in ; After that, decode to get k, and further decrypt to get d1; calculate and Finally, return r′=(r0′, r1′).

2. The blockchain editable method for a distributed environment according to claim 1 is characterized in that: In step S7, if and If both are true, output 1; otherwise, output 0.

Citation Information

Patent Citations

  • Period-based block chain compiling and correcting method for supporting specified modification times

    CN113438073A