One-time editable blockchain system and working method based on conditional restrictions
Through a blockchain system based on conditional restrictions, the deposit mechanism and revision of control rules are used to realize controllable editing of blockchain data, solving the legal and technical incompatibility problems caused by blockchain immutability, and ensuring data Privacy and compliance.
Patent Information
- Application Number
- CN202310529997.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-05-11
AI Technical Summary
The immutability of blockchain technology limits the editing and deletion of data, resulting in incompatibility between laws and technologies, especially in conflicts in privacy protection and the ‘right to be forgotten’ of data regulations.
Adopt a one-time modification editable blockchain system based on conditional restrictions, initialize system parameters through certification agencies, users and modifyers pay deposits, restrict modification permissions, introduce revision control rules and a chameleon hash, ensuring that modifyers can only perform one-time Modify and modify the transaction content according to the revised control rules.
It realizes controllable editing without destroying the immutability of blockchain, avoids data abusive data modification and legal conflicts, and ensures data privacy and compliance.
Smart Images

Figure CN117236954B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a one-time editable blockchain system and a working method based on conditional restrictions. Background Art
[0002] The application of blockchain technology to the Internet of Things can not only protect transactions in the Internet of Things, but also the deployment of blockchain can eliminate central agencies in the Internet of Things. Some scholars have used cryptographic tools to design a new consensus algorithm for the attack problems encountered by blockchain technology in the application of the Internet of Things. The author not only selected a suitable method to quantify the security protection level of the consensus algorithm, but also proved the superiority of the new consensus algorithm in terms of security and scalability through a large number of experimental evaluations. Intelligent manufacturing is part of the smart city entity, and the two collaborate by using technical information to make the process more efficient. Some scholars have designed a general configurable blockchain intelligent manufacturing system using the trustless characteristics of blockchain. Using this system, complex manufacturing structures can be agreed to be processed. At the same time, the author solved the efficiency and delay problems of blockchain in real-time manufacturing processes by formulating optimizations such as block size and task scheduling.
[0003] Because of the decentralized, transparent, and tamper-proof characteristics of blockchain, blockchain technology has great deployment potential in supply chain operations management. Any data in the blockchain-based supply chain system cannot be changed, which can achieve dynamic connections between network stakeholders and mitigate security and fraud threats.
[0004] Applying blockchain technology to digital asset transactions can solve problems such as tampering, forgery, and profit distribution in digital content trading environments. Some scholars have proposed a blockchain based on secret blocks to address the problems of difficult digital content dissemination, limited capacity, and privacy leakage encountered by blockchain technology in digital asset transactions. This type of blockchain can solve the privacy and storage capacity limitations of current blockchain technology in digital asset transactions. In this article, the author proposed a weight-based consensus algorithm for environments where authenticated and unauthenticated users coexist to achieve reliable consensus.
[0005] It can be seen that blockchain technology has considerable application prospects in all walks of life. Specifically, blockchain is a new type of database that integrates multiple technologies such as distributed networks, encryption technology, and smart contracts. The ecological environment of blockchain systems is orderly. In short, blockchain is a distributed ledger that cannot be tampered with or forged by combining data blocks in a sequential manner using hash functions in chronological order. Among them, the data block contains the specific content of each transaction and various auxiliary information. As one of the basic properties of blockchain, immutability ensures that transactions added to historical blocks cannot be tampered with, and is the cornerstone of blockchain security. Because any modification to a block will affect the relevant block and all subsequent blocks. Therefore, blocks confirmed by a series of subsequent blocks cannot be tampered with. However, due to the various needs of real applications and the provisions of relevant laws, immutability has become an important obstacle to the development of blockchain technology.
[0006] For example, some people use the immutability of blockchain technology to spread inappropriate content on the blockchain. If the blocks on the chain contain illegal content, chain participants may inadvertently become disseminators of illegal content because they cannot identify the legitimacy of the transaction content. If chain participants can identify it, they will be worried about being accused of possessing illegal content and refuse to participate in and download the chain.
[0007] Data owners have the right to request that their private information be deleted from the Internet or search engines to protect their privacy from being violated. However, the immutability of blockchain makes it impossible to modify or delete messages that have been added to the blockchain. This feature violates the "right to be forgotten" of data regulations. Inevitably, various legal differences and incompatibilities have arisen between blockchain technology and data protection regulations. Therefore, it is necessary to edit the information on the blockchain in a controllable manner. Summary of the invention
[0008] The content of the present invention is to provide a one-time editable blockchain system and working method based on conditional restrictions, which can overcome certain or some defects of the prior art.
[0009] The one-time modification editable blockchain system based on conditional restrictions according to the present invention includes a certification authority, a user, a modifier, and a blockchain user;
[0010] The certification body initializes a one-time editable blockchain based on conditional restrictions The system parameters are broadcast to other parties. After receiving the authorization key request from the modifier, the certification authority checks the signature of the modifier's deposit and issues an authorization key to the modifier.
[0011] Users are allowed to publish two types of transactions on the chain: one is an immutable transaction that cannot be modified; the other is a mutable transaction that can be modified by authorized modifiers;
[0012] The modifier is a chain participant who is issued modification privileges by the certification body. The modifier must pay a certain amount of deposit when obtaining the modification privilege. If the modified transaction passes the verification, the modifier's deposit will be returned. If the modifier is found to have maliciously modified the transaction content, the modifier will lose his deposit.
[0013] Blockchain users validate transactions and add them to a global public ledger where blocks are secured by blockchain users and linked end to end to form a chain.
[0014] As a preference, a one-time modification based on conditional constraints can edit the blockchain The following eight algorithms are included:
[0015] 1) The probability setting algorithm is run by the certification authority; with a security parameter As input, it outputs a public parameter pp and a master public-private key pair (msk, mpk), where msk is the master private key and mpk is the master public key. The public parameter pp and master public key mpk in the algorithm are implicit inputs of other algorithms.
[0016] 2) The probabilistic user setup algorithm is run by each user; it takes the public parameter pp as input and outputs the user's public-private key pair (sk u ,pk u ), where sk u is the user's private key, pk u is the user's public key;
[0017] 3) The probabilistic modifier setup algorithm is run by each modifier; it takes the public parameter pp as input and outputs the modifier's public-private key pair (sk m ,pk m ), where sk m is the private key of the modifier, pk m is the public key of the modifier;
[0018] 4) The probabilistic modifier authorization key generation algorithm is run by the certification authority; with the master public key msk and the modifier public key pk m and attribute set S as input, and output a modifier authorization key mak;
[0019] 5) The probabilistic hashing algorithm is run by each user; with the master public key mpk and the user private key sku , one includes the transaction tag τ, the transaction content tx τ , revision control rule ADM and the associated description desc message, an access structure As input; output hash value h, random value r and signature σ τ ; ADM is the transaction content tx τ The set of modifiable subsets in ADM is called revision control rule; and desc is the explanation and description given by the user on how to modify ADM;
[0020] 6) The probabilistic adaptive algorithm is run by the modifier; with the master public key mpk and the modifier private key sk m , one includes the transaction tag τ, the transaction content tx τ , revision control rule ADM and associated message description desc, hash value h, random value r, signature σ τ and another one including transaction tag τ, transaction content tx τ ′, the revised control rule ADM and the message describing desc are input; output is another random value r′ and the signature σ τ ′;
[0021] 7) The deterministic verification algorithm is run by the chain participants; with the master public key mpk, the public key pk, a transaction content tx containing the transaction tag τ τ , revision control rule ADM and associated message description desc, hash value h, random value r and signature σ τ As input; output a decision bit b, where b∈{0,1}; if b=0, it means that the transaction verification failed; if b=1, it means that the transaction verification succeeded; here there are two types of public keys: if the transaction has not been modified, the public key is pk u ; If the transaction has been modified, the public key is (pk u ,pk m ,mak);
[0022] 8) The deterministic extraction algorithm is run by the CA; it uses the modifier's public key pk m , a transaction content tx containing a transaction tag τ τ , the revised control rule ADM and the related description desc message, and another including the transaction tag τ′, the transaction content tx τ ′, the revision control rule ADM and the related description desc message and two signatures (στ,στ′) as input; output the signature private key sk of the modifier m .
[0023] The present invention provides a working method of a one-time modification editable blockchain system based on conditional restrictions, which adopts the above-mentioned one-time modification editable blockchain system based on conditional restrictions and includes the following steps:
[0024] 1. System initialization;
[0025] 2. Transaction generation;
[0026] 3. Modification of variable transactions;
[0027] 4. Transaction verification, signature key extraction and malicious punishment.
[0028] Preferably, in step 1, system initialization includes: system parameter initialization, user parameter initialization and modifier parameter initialization;
[0029] System parameters initialization: CA runs The algorithm generates public parameters pp and master public key mpk, and broadcasts pp and mpk to other parties on the chain;
[0030] User parameter initialization: After each user receives the public parameters pp and master public key mpk from the CA, the modifier setting algorithm is run Generate your own public and private key pair (sk u ,pk u );
[0031] Modifier parameter initialization: After each modifier receives the public parameters pp and master public key mpk from the CA, it runs the modifier setting algorithm Generate your own public and private key pair (sk m ,pk m ); Then, the modifier submits a signature sk using the modifier's private key m The deposit after that; if the modifier has malicious modification or more than one modification, the deposit can be withdrawn using the CA and the modifier's private key; then, the modifier will use his public key pk m Sent to CA; CA specifies the modifier's attribute set S and runs the modifier authorization key generation algorithm Generate a modifier authorization key mak for the modifier.
[0032] Preferably, in step 2, transaction generation includes immutable transaction generation and mutable transaction generation;
[0033] Immutable transaction generation: users are allowed to generate immutable transactions in traditional blockchains; users use their own private key sk u And the traditional hash function generates transaction tx and signature σ tx , and use your public key pk u Transaction tx and signature σtx Broadcast to the blockchain system;
[0034] Mutable transaction generation: Users are allowed to generate mutable transactions, i.e. users run hash algorithms Generate a hash value h, a random value r and a signature σ τ ; Then, the user will use the public key pk u , a transaction with label τ (τ,tx τ ,ADM,desc) and signature (h,r,σ τ ) is broadcast to the blockchain system.
[0035] As a preferred method, in step 3, the mutable transaction modification is the mutable transaction rewrite: when the transaction modifier receives a mutable transaction modification request, the authorized modifier checks whether its attribute set S satisfies the access structure If the attribute set S satisfies the access structure The modifier runs the adaptive algorithm Generate a random value r′ and signature σ τ ′; Then, the modifier changes the public key pk=(pk u ,pk m ,mak), the modified transaction with label τ (τ,tx τ ′,ADM,desc) and signature (h,r′,σ τ ′) Broadcast to the blockchain system.
[0036] Preferably, in step 4, transaction verification includes immutable transaction verification, mutable transaction verification and transaction rewrite verification;
[0037] Immutable transaction verification is as follows: When a blockchain user receives a public key pk u , the transaction content is tx and the transaction signature is σ tx After the immutable transaction, the traditional immutable blockchain verification algorithm is run to verify the signature σ tx ; If the algorithm output is 1, the blockchain user adds the transaction to the blockchain; otherwise, the blockchain user refuses to add the transaction;
[0038] Variable transaction verification: When a blockchain user receives a public key pk u , the transaction is (τ,tx τ ,ADM,desc) and the signature is (h,r,σ τ ) after the variable transaction, run Verification algorithm Verify the mutable transaction; if the algorithm output is 1, the blockchain user adds the transaction to the blockchain; otherwise, the blockchain user refuses to add the transaction;
[0039] Transaction rewrite verification: When a blockchain user receives a public key (pk u ,pk m ,mak), the transaction is (τ,tx τ ′,ADM,desc) and the signature is (h,r′,σ τ ') after rewriting the transaction, run Verification algorithm Verify the rewrite transaction; if the algorithm output is 1, the blockchain user adds the rewrite transaction to the blockchain; otherwise, the blockchain user refuses to add the rewrite transaction.
[0040] As a preferred method, in step 4, signature key extraction: if the authorized modifier violates the revision control rule ADM given by the user or there is more than one modification, the blockchain user runs the key extraction algorithm Get the signature key sk of the modifier m ; Then the blockchain user will obtain the signature key sk m And your own public key pk miner Send to CA.
[0041] As a preferred step, in step 4, malicious penalty: CA receives the signature key sk of the malicious modifier m And the blockchain user public key pk miner Afterwards, use your own private key sk CA And the private key sk of the malicious modifier m Get the transaction of the modifier's deposit; then, CA distributes part of the deposit to blockchain users as a reward.
[0042] The present invention introduces revision control rules to restrict the modifier from making arbitrary modifications. When publishing a transaction, the user specifies the transaction content that the modifier can modify, that is, the revision control rules are introduced to restrict the transaction content that the modifier can rewrite. When modifying, the modifier can only modify the content in the revision control rules, and the content outside the revision control rules is not allowed to be modified.
[0043] The present invention prohibits the authority from granting the modifier any number of modification rights through a one-time chameleon hash. The modification rights of the modifier are granted by the authority (CA), and the authority may arbitrarily grant the modifier the number of modifications, resulting in the modifier abusing the modification. Therefore, the present invention uses a one-time chameleon hash so that the authority can only grant the modifier the right to modify once. If the modifier modifies more than once or does not modify according to the relevant description of the revision control rules, the modifier's deposit will be withdrawn as a penalty for its malicious behavior. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1A schematic diagram of a one-time modification editable blockchain system based on conditional restrictions in an embodiment;
[0045] Figure 2 In the embodiment System initialization diagram;
[0046] Figure 3 In the embodiment Transaction generation diagram of ;
[0047] Figure 4 This is a schematic diagram of variable transaction modification in the embodiment;
[0048] Figure 5 This is a schematic diagram of immutable transaction verification in an embodiment;
[0049] Figure 6 This is a schematic diagram of variable transaction verification in an embodiment;
[0050] Figure 7 This is a schematic diagram of variable transaction rewriting verification in the embodiment;
[0051] Figure 8 Schematic diagram of malicious punishment in the embodiment. DETAILED DESCRIPTION
[0052] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0053] Example
[0054] Prerequisites
[0055] A Note
[0056] make Represents the set of all natural numbers. We use the Greek letter λ to denote the security parameter and uppercase letters such as A and B to denote algorithms. Unless otherwise specified, all algorithms are required to run in probabilistic polynomial time (PPT), that is, the running time is determined by a polynomial in the length of their input. In addition, a special symbol ⊥ is returned when an algorithm fails. If A is a probabilistic algorithm, then y←A(x,r) means that x and a random value r are taken as inputs of A and the output y is calculated. We assume that 1 λ is an implicit input to all algorithms. For the function if We call Can be ignored.
[0057] B Access Structure
[0058] make Represents the attribute domain. A non-empty set yes An access structure on . The set in is called the authorization set, and the set not in The set in is called the unauthorized set. is called monotonic if if and but
[0059] CDigital Signature
[0060] With message space Digital signature Includes four algorithms
[0061] With a safety parameter It takes as input and outputs a public parameter pp, where the public parameter pp is the implicit input of the other three algorithms.
[0062] Take the public parameter pp as input and output a signature key pair (pk, sk), where pk is the public key and sk is the signature private key.
[0063] With the private key sk and a message As input, it outputs a signature σ.
[0064] With a public key pk, a signature σ and a message As input, it outputs a decision bit b∈{0,1}. If b=0, the verification fails; if b=1, the verification succeeds.
[0065] The correctness of the digital signature requires that all security parameters For all public parameters For all For all messages We have
[0066] EUF-CMA security: The EUF-CMA security of digital signatures is based on the following experiments:
[0067]
[0068]
[0069] D one-time chameleon Hash function
[0070] With message space The Chameleon hash with one pass consists of the following five algorithms {CH_Setup, CH_KeyGen, CH_Hash, CH_Verify, CH_Adapt}:
[0071] CH_Setup(1 λ )→pp: with a security parameter is the input and outputs a common parameter pp, where pp is the implicit input of the other four algorithms.
[0072] CH_KeyGen(pp)→(sk,pk): takes the public parameter pp as input and outputs a public-private key pair (sk,pk), where sk is the trapdoor private key and pk is the public key.
[0073] CH_Hash(pk,τ,m)→(h,r): with public key pk, tag τ and message As input, it outputs a,q,hash value h and a random value r.
[0074] CH_Verify(pk, τ, m, h, r) → b: with public key pk, label τ, message The hash value h and the random value r are used as output, and a decision bit b∈{0,1} is output. If b=0, the verification fails; if b=1, the verification passes.
[0075] CH_Adapt(sk,τ,m,m′,h,r)→r′: Input private key sk, label τ, message information Hash value h and random value r, output another random value r′.
[0076] The correctness requirement of a Chameleon hash is that for all security parameters For all common parameters pp←CH_Setup(1 λ ), for all (sk, pk)←CH_KeyGen(pp), for all messages For all (h, r)←CHET_Hash(pk,τ,m), for all r′←CH_Adapt(sk,τ,m,m′,h,r), we have CH_Verify(pk,τ,m,h,r)=1∧CH_Verify(pk,τ,m′,h,r′)=1.
[0077] The security of a Chameleon hash is guaranteed by the following two properties.
[0078] Property 1: For any adversary Its success probability Pr((CH_Verify(pk,τ,h,m',r')=1)∧(CH_Verify(pk,τ,h,m,r)=1)∧(m≠m')∧(τ,m,m')) is negligible. In other words, for any tag that has collided once, it is infeasible to calculate a new collision.
[0079] Property 2: There exists a probabilistic polynomial-time adversary The input consists of a triple collision, namely (τ1,h1,m 1,1 ,r 1,1 ,m 1,2 ,r 1,2 ,m 1,3 ,r 1,3 ), satisfying m 1,1 ,m 1,2 ,m 1,3 Each pair is different and CH_Verify(pk,τ1,h1,m 1,j ,r 1,j )=1,j=1,2,3,a double collision, that is, (τ2,h2,m 2,1 ,r 2,1 ,m 2,2 ,r 2,2 ) satisfies m 2,1 ≠m 2,2 And CH_Verify(pk,τ2,h2,m 2,j ,r 2,j )=1,j=1,2 and m 2,1 and m 2,2 Different target messages 2,3 , Successful output r 2,3 The probability Pr((CH_Verify(pk,τ2,h2,m 2,3 ,r 2,3 )=1), that is, (τ2,h2,m 2,1 ,r 2,1 ,m 2,2 ,r 2,2 ,m 2,3 ,r 2,3 ) is a triple collision with a non-negligible probability. In other words, once three messages under a certain tag collide to a hash value, that is, the collision under that tag exceeds one time, it is feasible to calculate a new collision for any tag that has collided once.
[0080] E Collision Resistant Hash
[0081] A hash function that satisfies the following properties is called a collision-resistant hash function.
[0082] For all probabilistic polynomial-time adversaries The probability of successfully finding a collision is negligible.
[0083] One-time editable blockchain based on conditional restrictions
[0084] like Figure 1 As shown, this embodiment provides a one-time modification editable blockchain system based on conditional restrictions, which includes a certification authority, a user, a modifier, and a blockchain user;
[0085] The certification authority (CA) initializes a one-time editable blockchain based on conditional restrictions The system parameters are broadcast to other parties. After receiving the authorization key request from the modifier, the certification authority checks the signature of the modifier's deposit and issues an authorization key to the modifier.
[0086] Users are allowed to publish two types of transactions on the chain: one is an immutable transaction that cannot be modified; the other is a mutable transaction that can be modified by authorized modifiers;
[0087] The modifier is a chain participant who is issued modification privileges by the certification body. The modifier must pay a certain amount of deposit when obtaining the modification privilege. If the modified transaction passes the verification, the modifier's deposit will be returned. If the modifier is found to have maliciously modified the transaction content, the modifier will lose his deposit.
[0088] Blockchain users validate transactions and add them to a global public ledger where blocks are secured by blockchain users and linked end to end to form a chain.
[0089] One-time editable blockchain based on conditional restrictions The following eight algorithms are included:
[0090] 1) The probability setting algorithm is run by the certification authority; with a security parameter As input, it outputs a public parameter pp and a master public-private key pair (msk, mpk), where msk is the master private key and mpk is the master public key. The public parameter pp and master public key mpk in the algorithm are implicit inputs of other algorithms.
[0091] 2) The probabilistic user setup algorithm is run by each user; it takes the public parameter pp as input and outputs the user's public-private key pair (sk u ,pk u ), where sk u is the user's private key, pk uis the user's public key;
[0092] 3) The probabilistic modifier setup algorithm is run by each modifier; it takes the public parameter pp as input and outputs the modifier's public-private key pair (sk m ,pk m ), where sk m is the private key of the modifier, pk m is the public key of the modifier;
[0093] 4) The probabilistic modifier authorization key generation algorithm is run by the certification authority; with the master public key msk and the modifier public key pk m and attribute set S as input, and output a modifier authorization key mak;
[0094] 5) The probabilistic hashing algorithm is run by each user; with the master public key mpk and the user private key sk u , one includes the transaction tag τ, the transaction content tx τ , revision control rule ADM and the associated description desc message, an access structure As input; output hash value h, random value r and signature σ τ ; ADM is the transaction content tx τ The set of modifiable subsets in ADM is called revision control rule; and desc is the explanation and description given by the user on how to modify ADM;
[0095] 6) The probability adaptive algorithm is run by the modifier; the probability adaptive algorithm is run by the modifier; with the master public key mpk and the modifier's private key sk m , one includes the transaction tag τ, the transaction content tx τ , revision control rule ADM and associated message description desc, hash value h, random value r, signature σ τ and another one including transaction tag τ, transaction content tx τ ′, the revised control rule ADM and the message describing desc are input; output is another random value r′ and the signature σ τ ′;
[0096] 7) The deterministic verification algorithm is run by the chain participants; with the master public key mpk, the public key pk, a transaction content tx containing the transaction tag τ τ , revision control rule ADM and associated message description desc, hash value h, random value r and signature σ τAs input; output a decision bit b, where b∈{0,1}; if b=0, it means that the transaction verification failed; if b=1, it means that the transaction verification succeeded; here there are two types of public keys: if the transaction has not been modified, the public key is pk u ; If the transaction has been modified, the public key is (pk u ,pk m ,mak);
[0097] 8) The deterministic extraction algorithm is run by the CA; it uses the modifier's public key pk m , a transaction content tx containing a transaction tag τ τ , the revised control rule ADM and the related description desc message, and another including the transaction tag τ′, the transaction content tx τ ′, the revised control rule ADM and the associated message describing desc and two signatures (σ τ ,σ τ ′) as input; output the modifier's signature private key sk m .
[0098] The working method of the one-time modification editable blockchain system based on conditional restrictions adopts the above-mentioned one-time modification editable blockchain system based on conditional restrictions and includes the following steps:
[0099] 1. System initialization;
[0100] 2. Transaction generation;
[0101] 3. Modification of variable transactions;
[0102] 4. Transaction verification, signature key extraction and malicious punishment.
[0103] like Figure 2 As shown, system initialization includes: system parameter initialization, user parameter initialization and modifier parameter initialization;
[0104] System parameters initialization: CA runs The algorithm generates public parameters pp and master public key mpk, and broadcasts pp and mpk to other parties on the chain;
[0105] User parameter initialization: After each user receives the public parameters pp and master public key mpk from the CA, the modifier setting algorithm is run Generate your own public and private key pair (sk u ,pk u );
[0106] Modifier parameter initialization: After each modifier receives the public parameters pp and master public key mpk from the CA, it runs the modifier setting algorithm Generate your own public and private key pair (sk m ,pk m ); Then, the modifier submits a signature sk using the modifier's private key m The deposit after that; if the modifier has malicious modification or more than one modification, the deposit can be withdrawn using the CA and the modifier's private key; then, the modifier will use his public key pk m Sent to CA; CA specifies the modifier's attribute set S and runs the modifier authorization key generation algorithm Generate a modifier authorization key mak for the modifier.
[0107] like Figure 3 As shown, transaction generation includes immutable transaction generation and mutable transaction generation;
[0108] Immutable transaction generation: users are allowed to generate immutable transactions in traditional blockchains; users use their own private key sk u And the traditional hash function generates transaction tx and signature σ tx , and use your public key pk u Transaction tx and signature σ tx Broadcast to the blockchain system;
[0109] Mutable transaction generation: Users are allowed to generate mutable transactions, i.e. users run hash algorithms Generate a hash value h, a random value r and a signature σ τ ; Then, the user will use the public key pk u , a transaction with label τ (τ,tx τ ,ADM,desc) and signature (h,r,σ τ ) is broadcast to the blockchain system.
[0110] like Figure 4 As shown, mutable transaction modification is mutable transaction rewriting: When a transaction modifier receives a mutable transaction modification request, the authorized modifier checks whether its attribute set S satisfies the access structure If the attribute set S satisfies the access structure The modifier runs the adaptive algorithm Generate a random value r′ and signature σ τ ′; Then, the modifier changes the public key pk=(pk u ,pk m ,mak), the modified transaction with label τ (τ,tx τ ′,ADM,desc) and signature (h,r′,σ ′τ′) is broadcast to the blockchain system.
[0111] Transaction verification includes immutable transaction verification, mutable transaction verification, and transaction rewrite verification;
[0112] like Figure 5 As shown, the immutable transaction verification is as follows: When a blockchain user receives a public key pk u , the transaction content is tx and the transaction signature is σ tx After the immutable transaction, the traditional immutable blockchain verification algorithm is run to verify the signature σ tx ; If the algorithm output is 1, the blockchain user adds the transaction to the blockchain; otherwise, the blockchain user refuses to add the transaction;
[0113] like Figure 6 As shown, variable transaction verification: When a blockchain user receives a public key pk u , the transaction is (τ,tx τ , ADM, desc) and the signature is (h, r, σ τ ) after the variable transaction, run Verification algorithm Verify the mutable transaction; if the algorithm output is 1, the blockchain user adds the transaction to the blockchain; otherwise, the blockchain user refuses to add the transaction;
[0114] like Figure 7 As shown, transaction rewrite verification: When a blockchain user receives a public key (pk u , pk m ,mak), the transaction is (τ,tx τ ′, ADM, desc) and the signature is (h, r′, σ τ ') after rewriting the transaction, run Verification algorithm Verify the rewrite transaction; if the algorithm output is 1, the blockchain user adds the rewrite transaction to the blockchain; otherwise, the blockchain user refuses to add the rewrite transaction.
[0115] like Figure 8 As shown, signature key extraction: If the authorized modifier violates the revision control rule ADM given by the user or there is more than one modification, the blockchain user runs the key extraction algorithm Get the signature key sk of the modifier m ; Then the blockchain user will obtain the signature key sk m And your own public key pk miner Send to CA.
[0116] Malicious penalty: CA receives the signature key sk of the malicious modifier. m And the blockchain user public key pk miner Afterwards, use your own private key sk CA And the private key sk of the malicious modifier m Get the transaction of the modifier's deposit; then, CA distributes part of the deposit to blockchain users as a reward.
[0117] Threat Model
[0118] In our threat model, we assume that the authority (CA) is fully trusted, that is, the CA is honest. In the blockchain system, the number of modifiers is only a small number. Therefore, we assume that most of the modifiers and blockchain users are honest. However, there are a small number of dishonest modifiers and blockchain users in the system. They will launch a conspiracy attack together, that is, they will rewrite unauthorized transactions or make more than one modification without the authorization key without any punishment. In our scheme, modifications made by unauthorized users cannot be verified. Therefore, the private key of the CA is kept secret, and our scheme is secure. We give users the right to edit transactions through digital signatures by the authority, and unauthorized users cannot effectively edit transactions. Therefore, the security of our scheme depends on the security of the underlying digital full name. We give the formal proof of the security of the scheme EUF-CMA as follows:
[0119]
[0120] Let the modifier oracle be Modifier Corruption Oracle is User Oracle is The user corruption oracle is The modifier authorization key oracle is The hash oracle is The adaptive oracle is
[0121] Instantiation
[0122] In this solution, we use EUF-CMA secure digital signature and collision-resistant one-shot chameleon hash OCH = {CH_Setup, CH_KeyGen, CH_Hash, CH_Verify, CH_Adapt} to instantiate our The specific instantiation process is as follows:
[0123] Initialize the algorithm by running the digital signature parameters Parameters for generating digital signatures Run the key generation algorithm Get the digital signature key pair (sk ca , pk ca ). Choose a collision-resistant chameleon hash function H: By running the Chameleon hashing algorithm CH_Setup(1 λ )→pp Generates the parameters of a Chameleon hash Choose two large prime numbers p and q of the same length, and calculate N = pq. Choose a sufficiently large prime number e, and calculate ed = 1 mod (p-1) (q-1). Random selection calculate Then, choose two secure hash functions: H e : and H N : Run the key generation algorithm CH_KeyGen(pp)→(sk, pk) to get the public key pk of the Chameleon hash ch =(N, e, X0, H e , H N ) and private key sk ch =d. The algorithm returns the public parameters Master private key msk = sk ca and master public key mpk=(sk ch ,pk ca , pk ch , H).
[0124] The user sets the algorithm by running the signature generation algorithm Return the user's private key sk u and public key pk u .
[0125] The modifier sets the algorithm by running the digital signature key algorithm Initialize the signature key pair (sk m ′,pk m ′). Then, choose a random exponent and randomly choosesterms Calculate c = g α . Returns the modifier's private key sk m =(sk′ m , {β, r}) and the public key pk m =(pk′ m ,c).
[0126] The modifier authorization key algorithm returns ⊥ if the deposit signed by the modifier is not received, otherwise the authority CA runs the digital signature algorithm Get the authorization key mak.
[0127] The hash algorithm runs the Chameleon hash algorithm CH_Hash(pk,τ,m)→(h,r) to calculate the hash value and random values in, Then, generate the signature by To define access policies Among them, our hash value h and signature σ τ is linked by the transaction tag τ. And, our signature σ τ Contains the revision control rules ADM and related descriptions desc, but does not contain the specific information of the transaction tx τ , to prevent any party from inferring previous transaction information. The algorithm returns a hash value h, a random value r, and a signature σ τ .
[0128] The adaptive algorithm runs the Chameleon Hash adaptive algorithm CH_Adapt(sk ch ,(τ,tx τ ,ADM,desc),h,r,(τ,tx τ ′,ADM,desc))→r′generates another random value:
[0129] Then, through the digital signature algorithm Generate another signature σ τ ′. The algorithm returns another random value r′ and another signature σ τ ′=(σ τ ′,z), where
[0130] If the transaction is not edited, that is, r = r′ and public key pk = pk u .if Then the algorithm returns 1. Otherwise, the algorithm returns 0. If the transaction is edited, that is, r≠r′ and the public key pk=(pk u ,pk m ,mak).
[0131] if
[0132] Then the algorithm returns 1. Otherwise, the algorithm returns 0.
[0133] if The key extraction algorithm returns Otherwise, the algorithm returns the failure symbol ⊥.
[0134] In this embodiment, we propose a one-time editable blockchain based on conditional restrictions, which aims to limit the malicious modification of transaction content by modifiers and malicious authorization by authorized agencies. We prohibit modifiers from making arbitrary modifications to transaction content by revising control rules and related descriptions. By introducing a one-time chameleon hash function, the authority is limited to granting modifiers the authority to modify any number of times. In future work, we will consider a group of authoritative agencies to issue modification permissions to avoid corruption of a single authoritative agency.
[0135] The present invention and its embodiments are described schematically above, and the description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it and designs a structural method and an embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they shall all fall within the protection scope of the present invention.
Claims
1. A one-time editable blockchain system based on conditional restrictions, characterized by: Including certification bodies, users, modifiers and blockchain users; The certification body initializes a one-time editable blockchain based on conditional restrictions system parameters and broadcast the relevant parameters of the system to other parties; After receiving the authorization key request from the modifier, the certification authority checks the signature of the modifier's deposit and issues an authorization key to the modifier; Users are allowed to publish two types of transactions on the chain: one is an immutable transaction that cannot be modified; One is a mutable transaction that can be modified by authorized modifiers; A modifier is a chain participant who is issued modification privileges by a certification body. When a modifier obtains modification privileges, he must pay a certain amount of deposit. If the modified transaction passes the verification, the modifier's deposit will be returned. If the modifier is found to have maliciously modified the transaction content, the modifier will lose his deposit; Blockchain users verify transactions and add verified transactions to a global public ledger where blocks are fixed by blockchain users and connected end to end to form a chain; One-time editable blockchain based on conditional restrictions Includes the following eight algorithms: 1) The probability setting algorithm is run by the certification authority; with a security parameter As input, it outputs a public parameter pp and a master public-private key pair (msk, mpk), where msk is the master private key and mpk is the master public key; the public parameter pp and master public key mpk in the algorithm are implicit inputs of other algorithms; 2) The probabilistic user setup algorithm is run by each user; it takes the public parameter pp as input and outputs the user's public-private key pair (sk u , pk u ), where sk u is the user's private key, pk u is the user's public key; 3) The probabilistic modifier setup algorithm is run by each modifier; it takes the public parameter pp as input and outputs the modifier's public-private key pair (sk m , pk m ), where sk m is the private key of the modifier, pk m is the public key of the modifier; 4) The probabilistic modifier authorization key generation algorithm is run by the certification authority; with the master public key mpk and the modifier public key pk m and attribute set S as input, and output a modifier authorization key mak: 5) The probabilistic hashing algorithm is run by each user; with the master public key mpk and the user private key sk u , one includes the transaction tag τ, the transaction content tx τ , revision control rule ADM and the associated description desc message, an access structure As input; output hash value h, random value r and signature σ τ ; ADM is the transaction content tx τ The set of modifiable subsets in ADM is called revision control rule; and desc is the explanation and description given by the user on how to modify ADM; 6) The probabilistic adaptive algorithm is run by the modifier; with the master public key mpk and the modifier private key sk m , one includes the transaction tag τ, the transaction content tx τ , revision control rule ADM and associated message description desc, hash value h, random value r, signature σ τ and another one including transaction tag τ, transaction content tx τ ′, the revised control rule ADM and the message describing desc are input; output is another random value r′ and the signature σ τ ′; 7) The deterministic verification algorithm is run by the chain participants; with the master public key mpk, the public key pk, a transaction content tx containing the transaction tag τ τ , revision control rule ADM and associated message description desc, hash value h, random value r and signature σ τ As input; output a decision bit b, where b∈{0,1}; if b=0, it means that the transaction verification failed; if b=1, it means that the transaction verification succeeded; here there are two types of public keys: if the transaction has not been modified, the public key is pk u ; If the transaction has been modified, the public key is (pk u , pk m , mak); 8) The deterministic extraction algorithm is run by the CA; it uses the modifier's public key pk m , a transaction content tx containing a transaction tag τ τ , the revised control rule ADM and the related description desc message, and another including the transaction tag τ′, the transaction content tx τ ′, the revised control rule ADM and the associated message describing desc and two signatures (σ τ , σ τ ′) as input; output the modifier's signature private key sk m ; Secure digital signature using EUF-CMA and collision-resistant one-time chameleon hash OCH = {CH_Setup, CH_KeyGen, CH_Hash, CH_Verify, CH_Adapt} to instantiate The specific steps of the instantiation process are as follows: Initialize the algorithm by running the digital signature parameters Parameters for generating digital signatures Run the key generation algorithm Get the digital signature key pair (sk ca , pk ca ), choose a collision-resistant chameleon hash function H: By running the Chameleon hashing algorithm CH_Setup(1 λ )→pp Generates the parameters of a Chameleon hash Select two p and q of the same length, calculate N = pq, select a prime number e, calculate ed = 1 mod (p-1)(q-1), and randomly select calculate Then, choose two secure hash functions: H e : and H N : Run the key generation algorithm CH_KeyGen(pp)→(sk, pk) to get the public key pk of the Chameleon hash ch =(N,e,X0,H e , H N ) and private key sk ch =d, the algorithm returns the public parameters Master private key msk = sk ca and master public key mpk=(sk ch , pk ca , pk ch , H); The user sets the algorithm by running the signature generation algorithm Return the user's private key sk u and public key pk u ; The modifier sets the algorithm by running the digital signature key algorithm Initialize the signature key pair (sk m ′,pk m ′); then, choose a random exponent and randomly choosesterms Calculate c = g α , returns the modifier's private key sk m =(sk′ m , {β, r}) and the public key pk m =(pk′ m , c); The modifier authorization key algorithm returns ⊥ if the deposit signed by the modifier is not received, otherwise the authority CA runs the digital signature algorithm Get the authorization key mak; The hash algorithm runs the Chameleon hash algorithm CH_Hash(pk, τ, m) → (h, r) to calculate the hash value and random values in, Then, generate the signature by To define access policies Among them, the hash value h and the signature σ τ are linked by transaction tag τ; and signature σ τ Contains the revision control rules ADM and related descriptions desc, but does not contain the specific information of the transaction tx τ To prevent any party from inferring previous transaction information, the algorithm returns a hash value h, a random value r, and a signature σ τ ; The adaptive algorithm runs the Chameleon Hash adaptive algorithm CH_Adapt(sk ch ,(τ,tx τ ,ADM,desc),h,r,(τ,tx τ ′, ADM, desc))→r′generates another random value: Then, through the digital signature algorithm Generate another signature σ τ ′, the algorithm returns another random value r′ and another signature σ′ τ =(σ′ τ , z), where If the transaction is not edited, that is, r = r′ and public key pk = pk u ;if 1 and CH_Verify(pk ch ,(τ,tx τ , ADM, desc), h, r) = 1, the algorithm returns 1, otherwise, the algorithm returns 0; if the transaction is edited, that is, r≠r′ and the public key pk = (pk u , pk m , mak); if And CH_Verify(pk ch ,(τ,tx τ , ADM,desc),h,r)=1 and and and Then the algorithm returns 1, otherwise, the algorithm returns 0; If τ = τ′ and and and The key extraction algorithm returns Otherwise, the algorithm returns the failure symbol ⊥.
2. A working method of a one-time editable blockchain system based on conditional restrictions, characterized in that: It adopts a one-time modification editable blockchain system based on conditional restrictions as described in claim 1, and includes the following steps:
1. System initialization; 2. Transaction generation; 3. Modification of variable transactions; In step 3, the mutable transaction modification is the mutable transaction rewrite: When the transaction modifier receives a mutable transaction modification request, the authorized modifier checks whether its attribute set S satisfies the access structure If the attribute set S satisfies the access structure The modifier runs the adaptive algorithm Generate a random value r′ and signature σ′ τ ; Then, the modifier changes the public key pk=(pk u , pk m , mak), the modified transaction with label τ (τ, tx τ ′, ADM, desc) and signature (h, r′, σ′ τ )Broadcast to the blockchain system; 4. Transaction verification, signature key extraction and malicious punishment.
3. The working method of the one-time editable blockchain system based on conditional restrictions according to claim 2 is characterized in that: In step 1, system initialization includes: system parameter initialization, user parameter initialization and modifier parameter initialization; System parameters initialization: CA runs The algorithm generates public parameters pp and master public key mpk, and broadcasts pp and mpk to other parties on the chain; User parameter initialization: After each user receives the public parameters pp and master public key mpk from the CA, the modifier setting algorithm is run Generate your own public and private key pair (sk u , pk u ); Modifier parameter initialization: After each modifier receives the public parameters pp and master public key mpk from the CA, it runs the modifier setting algorithm Generate your own public and private key pair (sk m , pk m ); Then, the modifier submits a signature sk using the modifier's private key m The deposit after that; if the modifier has malicious modification or more than one modification, the deposit can be withdrawn using the CA and the modifier's private key; then, the modifier will use his public key pk m Sent to CA; CA specifies the modifier's attribute set S and runs the modifier authorization key generation algorithm Generate a modifier authorization key mak for the modifier.
4. The working method of the one-time editable blockchain system based on conditional restrictions according to claim 3 is characterized in that: In step 2, transaction generation includes immutable transaction generation and mutable transaction generation; Immutable transaction generation: users are allowed to generate immutable transactions in traditional blockchains; users use their own private key sk u And the traditional hash function generates transaction tx and signature σ tx , and use your public key pk u Transaction tx and signature σ tx Broadcast to the blockchain system; Mutable transaction generation: Users are allowed to generate mutable transactions, i.e. users run hash algorithms Generate a hash value h, a random value r and a signature σ τ ; Then, the user will use the public key pk u , transactions with label τ (τ, tx τ , ADM, desc) and signature (h, r, σ τ ) is broadcast to the blockchain system.
5. The working method of the one-time editable blockchain system based on conditional restrictions according to claim 4 is characterized in that: In step 4, transaction verification includes immutable transaction verification, mutable transaction verification, and transaction rewrite verification; Immutable transaction verification is as follows: When a blockchain user receives a public key pk u , the transaction content is tx and the transaction signature is σ tx After the immutable transaction, the traditional immutable blockchain verification algorithm is run to verify the signature σ tx ; If the algorithm output is 1, the blockchain user adds the transaction to the blockchain; otherwise, the blockchain user refuses to add the transaction; Variable transaction verification: When a blockchain user receives a public key pk u , the transaction is (τ, tx τ , ADM, desc) and the signature is (h, r, σ τ ) after the variable transaction, run Verification algorithm Verify the mutable transaction; If the algorithm output is 1, the blockchain user adds the transaction to the blockchain; Otherwise, the blockchain user refuses to add the transaction; Transaction rewrite verification: When a blockchain user receives a public key (pk u , pk m ,mak), the transaction is (τ,tx τ ′, ADM, desc) and the signature is (h, r′, σ τ ') after rewriting the transaction, run Verification algorithm Verify the rewrite transaction; if the algorithm output is 1, the blockchain user adds the rewrite transaction to the blockchain; otherwise, the blockchain user refuses to add the rewrite transaction.
6. The working method of the one-time editable blockchain system based on conditional restrictions according to claim 5 is characterized in that: In step 4, signature key extraction: If the authorized modifier violates the revision control rule ADM given by the user or makes more than one modification, the blockchain user runs the key extraction algorithm Get the signature key sk of the modifier m ; Then the blockchain user will obtain the signature key sk m And your own public key pk miner Send to CA.
7. The working method of the one-time editable blockchain system based on conditional restrictions according to claim 6 is characterized in that: In step 4, malicious punishment: CA receives the signature key sk of the malicious modifier m And the blockchain user public key pk miner Afterwards, use your own private key sk CA And the private key sk of the malicious modifier m Get the transaction of the modifier's deposit; The CA will then distribute part of the deposit to blockchain users as rewards.
