CN113139016A - Block chain workload proving method and system with quantum resistance - Google Patents
Block chain workload proving method and system with quantum resistance Download PDFInfo
- Publication number
- CN113139016A CN113139016A CN202110360170.0A CN202110360170A CN113139016A CN 113139016 A CN113139016 A CN 113139016A CN 202110360170 A CN202110360170 A CN 202110360170A CN 113139016 A CN113139016 A CN 113139016A
- Authority
- CN
- China
- Prior art keywords
- equation set
- block
- value
- workload
- current block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 20
- 238000013480 data collection Methods 0.000 claims description 12
- 238000010276 construction Methods 0.000 claims description 5
- 238000004806 packaging method and process Methods 0.000 claims 1
- 238000012795 verification Methods 0.000 abstract description 4
- 230000006870 function Effects 0.000 description 28
- 238000005065 mining Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012856 packing Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
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/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- 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
- G06F16/2255—Hash tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/11—Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
- G06F17/12—Simultaneous equations, e.g. systems of linear equations
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Algebra (AREA)
- Operations Research (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a block chain workload proving method and a system with quantum resistance, wherein the method comprises the following steps: collecting data of historical blocks in a block chain, and generating seed numbers by using an initial Nonce value of a current block and a hash value of a previous block; generating a random number sequence by utilizing the seed number, determining the parameters of an equation set, and generating a multivariate quadratic equation set; solving the multivariate quadratic equation set, and obtaining a hash function of the multivariate quadratic equation set based on the solution output; determining the minimum difficulty value which needs to be met by the current block by using a difficulty adjustment algorithm; calculating the solution of the hash function of the multivariate quadratic equation set and verifying whether the solution meets the workload proving condition; if not, adding 1 to the initial Nonce value to regenerate a multivariate quadratic equation set and solving the multivariate quadratic equation set until the multivariate quadratic equation set meets the workload proving condition; and after the conditions are met, other nodes carry out workload certification and transaction validity verification on the current Nonce value and the transaction output, and when the current Nonce value and the transaction output both meet the conditions, the current block is linked to the block chain.
Description
Technical Field
The invention relates to the technical field of block chains, in particular to a block chain workload proving method and system with quantum resistance.
Background
The block chain technology has huge innovativeness and application scenes, and mainly solves the problem of how to achieve consensus in an open, untrusted and central node-free distributed network environment. One of the most important rings in the blockchain technology system is the consensus algorithm, i.e., how to achieve consensus among different nodes in the blockchain network. The block chain is currently mainly PoW, PoS, DPo, PBFT and VRF-based consensus algorithms. The proof of workload (PoW) is the first and most widely used consensus algorithm in blockchain, and has the excellent characteristics of stability, safety and decentralization under the support of a large amount of calculation power. The workload certification is based on CPU mining, so that everyone has equal right to obtain the accounting right, thereby achieving the aim of decentralization. However, with the advent of GPUs, FPGAs, and ASIC mining machines (e.g., continental ant mining machines S7, S9), mining computing power is becoming more concentrated, and billing rights are also becoming more concentrated in a small number of computationally intensive miners, with the view of breaking centralized networks. To solve the problem of over-concentration of resolution, the hash algorithm based on the workload proof presented later generally has the attribute of difficult memory, so that constructing the relevant ASIC chip is expensive. In addition, the ability to have transparency, redundancy, and accountability for blockchain techniques is provided through public key encryption and hash functions. However, with the rapid development of quantum computing, a potential attack is formed on public key cryptography and a hash function based on a Grover and Shor (glover and schuler) algorithm, and the existing blockchain system does not have a quantum computing attack resistance characteristic at present, so that privacy and security of blockchain data face a significant threat.
Chinese patent CN111275552A, published on 12.6.2020, provides a block chain-based data processing method, apparatus, computer device and storage medium. The method comprises the following steps: receiving an inherited Mercker root hash value of the inherited candidate block, and adding the inherited Mercker root hash value into currency-based transaction data of the block body of the bottom layer candidate block of the bottom layer chain; generating a bottom layer Mercker root hash value of a bottom layer chain according to the currency-based transaction data, and adding the bottom layer Mercker root hash value into a block head of a bottom layer alternative block; accounting is carried out according to the block head of the bottom layer alternative block to obtain a hash result value corresponding to the bottom layer alternative block; and determining a target inheritance block according to the hash result value and the inheritance difficulty threshold value and broadcasting. By adopting the method, the calculation power inheritance of the block chain can be realized, and the calculation power of small and medium-sized block chain items is lower than that of large-sized block chain items, so that the network security problem is caused. However, the data processing method of the invention is based on workload certification and a hash algorithm, still has the difficult attribute of memory, and cannot simultaneously contain the calculated amount and the memory of the node; in addition, the method can ensure the safety of the small block chain when the small block chain is subjected to the computational power attack of the large block chain, and cannot be subjected to the quantum computational attack.
Disclosure of Invention
In order to overcome the defects that the conventional block chain workload proving system cannot simultaneously contain the calculated amount and the memory of the node and does not have the quantum computing attack resistance characteristic, the invention provides the block chain workload proving method and the block chain workload proving system with the quantum computing attack resistance characteristic, so that the block chain workload proving system simultaneously contains the calculated amount and the memory of the node and has the quantum computing attack resistance characteristic, and the privacy and the safety of block chain data are ensured.
In order to solve the technical problems, the technical scheme of the invention is as follows:
the invention provides a block chain workload proving method with quantum resistance, which comprises the following steps:
s1: collecting data of historical blocks in a block chain, determining a hash value of a previous block of a current block, and generating a seed number by using an initial Nonce value of the current block and the hash value of the previous block;
s2: generating a random number sequence by utilizing the seed number, and determining the parameters of the equation set according to the random number sequence; generating a multivariate quadratic equation set based on the equation set parameters;
s3: solving the multi-element quadratic equation system to obtain a solution output (x)1,x2,…,xn) Wherein x isnRepresenting an nth solution of a multivariate quadratic equation;
s4: solution output (x) based on a system of multivariate quadratic equations1,x2,…,xn) Obtaining the Hash function H of the multi-element quadratic equation systemsha256(x1,x2,…,xn) In which H issha256(. -) represents the sha256 operation;
s5: determining a minimum difficulty value D which needs to be met by the current block according to the difficulty value of the historical block of the block chain by using a difficulty adjustment algorithm;
s6: calculating the Hash function H of the multivariate quadratic equation set by using the minimum difficulty value Dsha256(x1,x2,…,xn) Solution Sha256 (x)1,x2,…,xn);
S7: validating solution Sha256 (x) of hash function1,x2,…,xn) Whether a workload proving condition is satisfied; if not, adding 1 to the initial Nonce value as a new initial Nonce value to be substituted into the step S1, and repeating the steps S1-S6 until the solution of the hash function of the calculated multivariate quadratic equation set satisfies the workload proving condition; if yes, the current Nonce value is resolved and output (x)1,x2,…,xn) Packing the current block, and broadcasting the current block to other nodes in the block chain;
s8: after other nodes in the block chain receive the current block of the broadcast, verifying whether the current Nonce value contained in the current block meets the workload certification or not and verifying the validity of the transaction; if both are satisfied, the current block is used as the latest block to be linked to the block chain, otherwise, the current block is rejected to be chain-linked.
Preferably, in S1, the data of the history block includes a timestamp, a Nonce value, a workload certification recipe solution, a version, a Merkele tree root, a difficulty value, a hash value, a transaction script, and a transaction signature; the timestamp, Nonce value, workload certification recipe solution, version, Merkele tree root, difficulty value, and hash value are recorded in a tile header of the tile, and the transaction script and transaction signature are recorded in a tile body of the tile.
Preferably, in S2, the specific method for generating the multivariate quadratic equation set includes:
setting the variable number as n, the equation number as m, and the number of random numbers contained in the generated random number sequence as n2N + m + m, where n is the random number n, so that the system of equations has a unique solution3(n +2) x n, the resulting system of equations is:
wherein x isiRepresenting the ith variable vector to be solved, i is 1, …, n; x is the number ofjRepresents the j variable vector to be solved, j is 1, …, n;ck、dkfor the corresponding parameters of the multivariate quadratic system, i is 1, …, n, j is 1, …, n, k is 1, …, m.
Preferably, in S3, the multivariate quadratic equation system is solved by using Grobner-based F4 and F5 solving algorithm.
Preferably, in S7, the specific method for verifying whether the solution of the hash function satisfies the workload certification condition is: setting a hash value PowLimit corresponding to the minimum workload required to be met by the current block, and comparing the solution Sha256 (x) of the hash function1,x2,…,xn) With the size of PowLimit/D, if Sha256 (x)1,x2,…,xn) Less than or equal to PowLimit/D, then Sha256 (x)1,x2,…,xn) The workload proving condition is satisfied; if Sha256 (x)1,x2,…,xn)>PowLimit/D, then Sha256 (x)1,x2,…,xn) The workload proving condition is not satisfied.
The invention also provides a block chain workload proving system with quantum resistance, which comprises a data collection and seed generation unit, an equation set solving unit, a hash function generation unit, a difficulty generation solving unit and a workload proving unit;
the data collection and seed generation unit is used for collecting data of historical blocks in the block chain, determining a hash value of a previous block of the current block, and generating a seed number by using an initial Nonce value of the current block and the hash value of the previous block;
the equation set generating unit generates a random number sequence by using the seed number and determines equation set parameters according to the random number sequence; generating a multivariate quadratic equation set based on the equation set parameters;
the equation system solving unit is used for solving a multi-element quadratic equation system to obtain solution output;
the hash function generation unit is used for obtaining a hash function of the multivariate quadratic equation set based on the solution output of the multivariate quadratic equation set;
the difficulty generation solving unit determines the minimum difficulty value required to be met by the current block according to the difficulty value of the block chain historical block by using a difficulty adjustment algorithm, and calculates the solution of the hash function of the multivariate quadratic equation set by using the minimum difficulty value;
and the workload proving unit is used for verifying whether the solution of the hash function meets the workload proving condition.
Preferably, the data collection and seed generation unit comprises a block data hashing module, a seed generation module and a Nonce module;
the block data hash module is used for acquiring data of a historical block and transmitting a hash value of the previous block to the seed generation module;
the Nonce module is used for generating an initial Nonce value and transmitting the initial Nonce value to the seed generation module;
and the seed generation module generates a seed number according to the hash value and the initial Nonce value of the previous block and transmits the seed number to the equation set generation unit.
Preferably, the data collection and seed generation unit further comprises an SHA hashing module;
the SHA hash module is used for ensuring that the number of bits of the seeds generated by the seed generation module is consistent with the number of bits of the hash value, and ensuring that the seed generation module works normally.
Preferably, the equation set generating unit comprises a pseudo random number generating module and an equation set constructing module;
the pseudo-random number generation module generates coefficients of all equations of the equation set according to the seed number and transmits the coefficients to the equation set construction module;
the equation set building module generates a multi-element quadratic equation set according to coefficients of all equations in the equation set and transmits the multi-element quadratic equation set to the equation set solving unit.
Preferably, the workload proving unit verifies whether a solution of the hash function satisfies a workload proving condition; if the current block is satisfied, the current block is broadcasted to other nodes, and if the current block is not satisfied, the current Nonce value is returned to the Nonce module; and other nodes verify the current Nonce value contained in the current block and whether the decoded output meets the workload certification and verifies the validity of the transaction, if so, the current block is taken as the latest block to be linked to the block chain, and if not, the current block is rejected to be linked.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
compared with the traditional workload certification that a Nonce value is continuously and randomly generated, the Nonce value is found, the hash value of the current block is smaller than a certain specified value, and the workload certification process is completed, the method generates a seed number through the initial Nonce value of the current block and the hash value of the previous block, generates a random number sequence by using the seed number, generates a multivariate quadratic equation set based on the equation set parameters determined by the random number sequence, solves the multivariate quadratic equation set, generates a hash function of solution output, and calculates the solution of the hash function; updating the initial Nonce value by verifying whether the solution of the hash function satisfies the workload certification condition until the workload certification is completed; according to the invention, the workload certification is integrated in the construction and solution of the multivariate quadratic equation set, and the particularity of the solution of the multivariate quadratic equation set enables the block chain workload certification system to not only contain the calculated amount of the nodes, but also contain the memory of the nodes; meanwhile, the solving process of the multivariate quadratic equation system has the quantum computation attack resistance characteristic, so that the block chain workload proving system also has the quantum computation attack resistance characteristic, and the privacy and the safety of block chain data are ensured.
Drawings
FIG. 1 is a flow chart of a method for proving the workload of a block chain with quantum resistant property described in example 1;
fig. 2 is a schematic diagram of a blockchain workload proving system with quantum resistant properties as described in embodiment 2.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
The embodiment provides a method for proving the workload of a block chain with quantum resistance, as shown in fig. 1, the method includes the following steps:
s1: collecting data of historical blocks in a block chain, determining a hash value of a previous block of a current block, and generating a seed number by using an initial Nonce value of the current block and the hash value of the previous block, wherein the initial Nonce value is 0;
s2: generating a random number sequence by utilizing the seed number, and determining the parameters of the equation set according to the random number sequence; generating a multivariate quadratic equation set based on the equation set parameters;
s3: solving the multi-element quadratic equation system to obtain a solution output (x)1,x2,…,xn) Wherein x isnRepresenting an nth solution of a multivariate quadratic equation;
s4: solution output (x) based on a system of multivariate quadratic equations1,x2,…,xn) Obtaining the Hash function H of the multi-element quadratic equation systemsha256(x1,x2,…,xn) In which H issha256(. -) represents the sha256 operation;
s5: determining a minimum difficulty value D which needs to be met by the current block according to the difficulty value of the historical block of the block chain by using a difficulty adjustment algorithm;
s6: calculating the Hash function H of the multivariate quadratic equation set by using the minimum difficulty value Dsha256(x1,x2,…,xn) Solution Sha256 (x)1,x2,…,xn);
S7: validating solution Sha256 (x) of hash function1,x2,…,xn) Whether a workload proving condition is satisfied; if not, adding 1 to the initial Nonce value as a new initial Nonce value to be substituted into the step S1, and repeating the steps S1-S6 until the solution of the hash function of the calculated multivariate quadratic equation set satisfies the workload proving condition; if yes, the current Nonce value is resolved and output (x)1,x2,…,xn) Packing the current block, and broadcasting the block to other nodes in the block chain;
s8: after other nodes in the block chain receive the broadcasted blocks, verifying whether the current Nonce value contained in the blocks and the resolution output meet the workload certification or not, and simultaneously verifying the validity of the transaction; if both are satisfied, the current block is used as the latest block to be linked to the block chain, otherwise, the current block is rejected to be chain-linked.
In S1, the data of the history block includes a timestamp, a Nonce value, a workload certification equation set solution, a version, a Merkele tree root, a difficulty value, a hash value, a transaction script, and a transaction signature; the timestamp, Nonce value, workload certification recipe solution, version, Merkele tree root, difficulty value, and hash value are recorded in a tile header of the tile, and the transaction script and transaction signature are recorded in a tile body of the tile.
In S2, the specific method for generating the multivariate quadratic equation set includes:
setting the variable number as n and the equation number as m, determining the set of random equations, wherein the required random coefficient number is quadratic coefficient + first order coefficient + constant coefficient + equation right constant, so that the generated random number sequence contains the random number n22 xm + nxm + m + m + m; in order to make the equation system have unique solution, if m is n, the random number is n3(n +2) x n, the resulting system of equations is:
wherein x isiRepresenting the ith variable to be solvedVector of quantities, i ═ 1, …, n; x is the number ofjRepresents the j variable vector to be solved, j is 1, …, n;ck、dkfor the corresponding parameters of the multivariate quadratic system, i is 1, …, n, j is 1, …, n, k is 1, …, m.
In the step S3, the multivariate quadratic equation set is solved by using Grobner-based F4 and F5 solving algorithms. The Grobner-based F4 and F5 solving algorithm is the most efficient algorithm for solving the random multivariate multiple equation system in a finite field, and has both calculation difficulty and memory difficulty.
In S7, the specific method for verifying whether the solution of the hash function satisfies the workload certification condition is: determining a hash value PowLimit corresponding to the minimum workload required to be met by the current block, and comparing the solution Sha256 (x) of the hash function1,x2,…,xn) With the size of PowLimit/D, if Sha256 (x)1,x2,…,xn) Less than or equal to PowLimit/D, then Sha256 (x)1,x2,…,xn) The workload proving condition is satisfied; if Sha256 (x)1,x2,…,xn)>PowLimit/D, then Sha256 (x)1,x2,…,xn) The workload proving condition is not satisfied.
In the implementation process, when a transaction occurs, the user can generate a transaction data through the common whole node or the light node and broadcast the transaction data to the blockchain network. After receiving a transaction in the network, other nodes of the block chain verify whether the transaction exists in the local block, if not, verify the validity of the transaction, store the valid transaction in the local memory pool, and broadcast the transaction to the adjacent nodes. Each transaction data comprises the flow direction of account funds and transaction validity verification data, and if the transaction data is a miner node responsible for generating blocks, a plurality of transactions received within a period of time are packaged into the blocks;
the miner node generates a seed number seed according to the hash value of the previous block and the initial Nonce value of the current block,Seed=Sha256(Sha256(Blocki-1) I Nonce), and generates a set of finite-domain random multivariate quadratic equations according to Seed, wherein | represents a connection operator of a character string, the initial value of Nonce is 0, and the initial value is increased progressively along with the process of mining to generate a new random equation set, after the Seed is generated, the Seed is used as input, and a set of finite-domain random numbers are generated through a pseudo random number generator PRNG. Randomi (PRNG (Seed, i)/q, where i is 0, 1, …, n, where q represents the size of the finite field F (gf (q)) base, and the number of finite field random numbers to be generated is determined according to the scale of the equation set;
the miners node solves the multivariate quadratic equation system by using Grobner base solution algorithm (F4, F5) to obtain solution output (x)1,x2,…,xn)=GrobnerBasis(f1,…,fn) And outputting (x) based on the solution of the system of multivariate quadratic equations1,x2,…,xn) Obtaining the Hash function H of the multi-element quadratic equation systemsha256(x1,x2,…,xn);
After the miners 'nodes receive the whole network transaction within a period of time and pack the transaction into blocks, the miners' nodes dig the mine difficulty value (D) according to the historical blocksi-1,Di-4,Di-3...) to determine the difficulty value D that the current block needs to satisfy, where i is the current block height; the difficulty value of how many past blocks are needed is determined according to the specific situation of the difficulty adjustment algorithm, for example, the mining difficulty value of the bitcoin is determined based on the average weight of the past 2016 blocks; however, the difficulty value D which needs to be satisfied by the current block cannot be smaller than 1, and if D is smaller than 1, D is assigned as 1; calculating the Hash function H of the multivariate quadratic equation set by using the minimum difficulty value Dsha256(x1,x2,…,xn) Solution Sha256 (x)1,x2,…,xn);
The miner node verifies whether the solution of the hash function meets the workload certification condition, if Sha256 (x)1,x2,…,xn) And less than or equal to PowLimit/D, the current Nonce value is resolved and output (x)1,x2,…,xn) Is packed intoThe current block broadcasts the block to other nodes in the block chain; if Sha256 (x)1,x2,…,xn)>And PowLimit/D, making the initial Nonce value +1 to generate a new seed number, further generating a new finite field random quadratic multivariate equation set, and further solving. The above processes are circularly carried out until the solution meeting the workload certification is solved; the PowLimit represents the hash value corresponding to the minimum workload which needs to be met by the current block, and is represented by a 256-bit unsigned large integer, which belongs to a parameter commonly known by a block chain and cannot be changed.
After other nodes in the network receive the block broadcasted by the miner node, seed numbers are generated according to the hash value of the block and the current Nonce, and a finite field random quadratic multivariate equation set is generated according to the seed numbers:
will output (x) the solution1,x2,…,xn) Substituting the value of the block into the finite field random quadratic multivariate equation set for verification, if the equations are all satisfied when i is 1, … and n, entering the next verification step, and if not, rejecting the current block; and next, verifying the validity of the transaction, if the transaction is legal, linking the current block serving as the latest block to a block chain and broadcasting the block chain, and if the transaction is legal, rejecting the block.
Example 2
The embodiment provides a block chain workload proving system with quantum resistance based on the method described in embodiment 1, and as shown in fig. 2, the system includes a data collection and seed generation unit, an equation set solving unit, a hash function generation unit, a difficulty generation solving unit, and a workload proving unit;
the data collection and seed generation unit is used for collecting data of historical blocks in the block chain, determining a hash value of a previous block of the current block, and generating a seed number by using an initial Nonce value of the current block and the hash value of the previous block;
the equation set generating unit generates a random number sequence by using the seed number and determines equation set parameters according to the random number sequence; generating a multivariate quadratic equation set based on the equation set parameters;
the equation system solving unit is used for solving a multi-element quadratic equation system to obtain solution output;
the hash function generation unit is used for obtaining a hash function of the multivariate quadratic equation set based on the solution output of the multivariate quadratic equation set;
the difficulty generation solving unit determines the minimum difficulty value required to be met by the current block according to the difficulty value of the block chain historical block by using a difficulty adjustment algorithm, and calculates the solution of the hash function of the multivariate quadratic equation set by using the minimum difficulty value;
and the workload proving unit is used for verifying whether the solution of the hash function meets the workload proving condition.
The data collection and seed generation unit comprises a block data hash module, a seed generation module and a Nonce module;
the block data hash module is used for acquiring data of a historical block and transmitting a hash value of the previous block to the seed generation module;
the Nonce module is used for generating an initial Nonce value and transmitting the initial Nonce value to the seed generation module;
and the seed generation module generates a seed number according to the hash value and the initial Nonce value of the previous block and transmits the seed number to the equation set generation unit.
The data collection and seed generation unit also comprises an SHA hash module;
the SHA hash module is used for ensuring that the number of bits of the seeds generated by the seed generation module is consistent with the number of bits of the hash value, and ensuring that the seed generation module works normally.
The equation set generating unit comprises a pseudo-random number generating module and an equation set constructing module;
the pseudo-random number generation module generates coefficients of all equations of the equation set according to the seed number and transmits the coefficients to the equation set construction module;
the equation set building module generates a multi-element quadratic equation set according to coefficients of all equations in the equation set and transmits the multi-element quadratic equation set to the equation set solving unit.
The workload proving unit verifies whether a solution of the hash function satisfies a workload proving condition; if the current block is satisfied, the current block is broadcasted to other nodes, and if the current block is not satisfied, the current Nonce value is returned to the Nonce module; and other nodes verify the current Nonce value contained in the current block and whether the decoded output meets the workload certification and verifies the validity of the transaction, if so, the current block is taken as the latest block to be linked to the block chain, and if not, the current block is rejected to be linked.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.
Claims (10)
1. A method for proof of blockchain workload with quantum resistant properties, the method comprising the steps of:
s1: collecting data of historical blocks in a block chain, determining a hash value of a previous block of a current block, and generating a seed number by using an initial Nonce value of the current block and the hash value of the previous block;
s2: generating a random number sequence by utilizing the seed number, and determining the parameters of the equation set according to the random number sequence; generating a multivariate quadratic equation set based on the equation set parameters;
s3: solving the multi-element quadratic equation set to obtain solution output;
s4: obtaining a hash function of the multivariate quadratic equation set based on the solution output of the multivariate quadratic equation set;
s5: determining the minimum difficulty value which needs to be met by the current block according to the difficulty value of the historical block of the block chain by using a difficulty adjustment algorithm;
s6: calculating the solution of the hash function of the multivariate quadratic equation set by using the minimum difficulty value;
s7: verifying whether the solution of the hash function meets the workload proving condition; if not, adding 1 to the initial Nonce value as a new initial Nonce value to be substituted into the step S1, and repeating the steps S1-S6 until the solution of the hash function of the calculated multivariate quadratic equation set satisfies the workload proving condition; if yes, decoding and outputting the current Nonce value, packaging the decoded Nonce value into a current block, and broadcasting the current block to other nodes in the block chain;
s8: after other nodes in the block chain receive the broadcast, verifying whether the current Nonce value contained in the current block and the resolution output meet the workload certification, and verifying the validity of the transaction; if both are satisfied, the current block is used as the latest block to be linked to the block chain, otherwise, the current block is rejected to be chain-linked.
2. The method for proving blockchain workload of claim 1, wherein in S1, the data of the historical blocks comprises a timestamp, a Nonce value, a workload proving equation set solution, a version, a Merkele tree root, a difficulty value, a hash value, a transaction script and a transaction signature of each block; the timestamp, Nonce value, workload certification recipe solution, version, Merkele tree root, difficulty value, and hash value are recorded in a tile header of the tile, and the transaction script and transaction signature are recorded in a tile body of the tile.
3. The method for proving blockchain workload with quantum resistance as claimed in claim 2, wherein in the step S2, the specific method for generating the multivariate quadratic equation system is as follows:
setting the variable number as n, the equation number as m, and the number of random numbers contained in the generated random number sequence as n2N + m + m, where n is the random number n, so that the system of equations has a unique solution3(n +2) x n, the resulting system of equations is:
4. The method for proving blockchain workload with quantum resistance as recited in claim 3, wherein in the step S3, the multivariate quadratic equation system is solved by using Grobner-based F4 and F5 solving algorithm.
5. The method for proving the workload of the blockchain with the quantum resistance as claimed in claim 4, wherein in the step S7, the specific method for verifying whether the solution of the hash function satisfies the workload proving condition is: setting a hash value PowLimit corresponding to the minimum workload required to be met by the current block, and comparing the solution Sha256 (x) of the hash function1,x2,…,xn) With the size of PowLimit/D, if Sha256 (x)1,x2,…,xn) Less than or equal to PowLimit/D, then Sha256 (x)1,x2,…,xn) The workload proving condition is satisfied; if Sha256 (x)1,x2,…,xn) > PowLimit/D, then Sha256 (x)1,x2,…,xn) The workload proving condition is not satisfied.
6. A block chain workload proving system with quantum resistant property based on the method of claim 1, wherein the system comprises a data collection and seed generating unit, an equation set solving unit, a hash function generating unit, a difficulty generating solving unit and a workload proving unit;
the data collection and seed generation unit is used for collecting data of historical blocks in the block chain, determining a hash value of a previous block of the current block, and generating a seed number by using an initial Nonce value of the current block and the hash value of the previous block;
the equation set generating unit generates a random number sequence by using the seed number and determines equation set parameters according to the random number sequence; generating a multivariate quadratic equation set based on the equation set parameters;
the equation system solving unit is used for solving a multi-element quadratic equation system to obtain solution output;
the hash function generation unit is used for obtaining a hash function of the multivariate quadratic equation set based on the solution output of the multivariate quadratic equation set;
the difficulty generation solving unit determines the minimum difficulty value required to be met by the current block according to the difficulty value of the block chain historical block by using a difficulty adjustment algorithm, and calculates the solution of the hash function of the multivariate quadratic equation set by using the minimum difficulty value;
and the workload proving unit is used for verifying whether the solution of the hash function meets the workload proving condition.
7. The system of claim 6, wherein the data collection and seed generation unit comprises a block data hashing module, a seed generation module, and a Nonce module;
the block data hash module is used for acquiring data of a historical block and transmitting a hash value of the previous block to the seed generation module;
the Nonce module is used for generating an initial Nonce value and transmitting the initial Nonce value to the seed generation module;
and the seed generation module generates a seed number according to the hash value and the initial Nonce value of the previous block and transmits the seed number to the equation set generation unit.
8. The system of claim 7, wherein the data collection and seed generation unit further comprises a SHA hashing module;
the SHA hash module is used for ensuring that the number of bits of the seeds generated by the seed generation module is consistent with the number of bits of the hash value of the previous block, and ensuring that the seed generation module works normally.
9. The system of claim 8, wherein the system of equations generation unit comprises a pseudo random number generation module and a system of equations construction module;
the pseudo-random number generation module generates coefficients of all equations of the equation set according to the seed number and transmits the coefficients to the equation set construction module;
the equation set building module generates a multi-element quadratic equation set according to coefficients of all equations in the equation set and transmits the multi-element quadratic equation set to the equation set solving unit.
10. The system of claim 9, wherein the workload certification unit verifies whether a solution of a hash function satisfies a workload certification condition; if the current block is satisfied, the current block is broadcasted to other nodes, and if the current block is not satisfied, the current Nonce value is returned to the Nonce module; and other nodes verify the current Nonce value contained in the current block and whether the decoded output meets the workload certification and verifies the validity of the transaction, if so, the current block is taken as the latest block to be linked to the block chain, and if not, the current block is rejected to be linked.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110360170.0A CN113139016A (en) | 2021-04-02 | 2021-04-02 | Block chain workload proving method and system with quantum resistance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110360170.0A CN113139016A (en) | 2021-04-02 | 2021-04-02 | Block chain workload proving method and system with quantum resistance |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113139016A true CN113139016A (en) | 2021-07-20 |
Family
ID=76810450
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110360170.0A Pending CN113139016A (en) | 2021-04-02 | 2021-04-02 | Block chain workload proving method and system with quantum resistance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113139016A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114362962A (en) * | 2022-01-07 | 2022-04-15 | 北京智云芯科技有限公司 | Block chain workload proof generation method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110874351A (en) * | 2018-08-29 | 2020-03-10 | 深圳启元信息服务有限公司 | Workload certification cooperative work method, block chain node and block chain system |
CN111448579A (en) * | 2017-10-04 | 2020-07-24 | 丁津泰 | Quantum certified block chains |
-
2021
- 2021-04-02 CN CN202110360170.0A patent/CN113139016A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111448579A (en) * | 2017-10-04 | 2020-07-24 | 丁津泰 | Quantum certified block chains |
CN110874351A (en) * | 2018-08-29 | 2020-03-10 | 深圳启元信息服务有限公司 | Workload certification cooperative work method, block chain node and block chain system |
Non-Patent Citations (1)
Title |
---|
JIAHUI CHEN等: ""On the Construction of a Post-Quantum Blockchain"", 《2021 IEEE CONFERENCE ON DEPENDABLE AND SECURE COMPUTING (DSC)》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114362962A (en) * | 2022-01-07 | 2022-04-15 | 北京智云芯科技有限公司 | Block chain workload proof generation method |
CN114362962B (en) * | 2022-01-07 | 2024-04-02 | 北京智云芯科技有限公司 | Block chain workload evidence generation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4112373B2 (en) | Efficient calculation method and apparatus for one-way chain in cryptographic application | |
CN110378697B (en) | Block chain light node UTXO transaction verification method and device based on RSA accumulator | |
CN109903212A (en) | A kind of image encryption method based on H Geometric Fractal and Hilbert curve | |
CN106612320A (en) | Encrypted data dereplication method for cloud storage | |
CN111597590B (en) | Block chain-based data integrity quick inspection method | |
CN109542883A (en) | A kind of information duplicate checking method based on block chain | |
CN103778387B (en) | Big data dynamic memory integrity verification method based on lattice | |
CN110213038B (en) | Method and system for forming consensus of block chain | |
CN104270247A (en) | Efficient generic Hash function authentication scheme suitable for quantum cryptography system | |
CN106611136A (en) | Data tampering verification method in cloud storage | |
CN110413652A (en) | A kind of big data privacy search method based on edge calculations | |
CN112906056A (en) | Cloud storage key security management method based on block chain | |
CN103916393B (en) | Cloud data-privacy protection public's auditing method based on symmetric key | |
CN113139016A (en) | Block chain workload proving method and system with quantum resistance | |
CN116260587A (en) | Quantum-resistant signature authentication method based on hash signature and having small size | |
CN107454975A (en) | Encryption system and key generating device | |
CN112699123A (en) | Method and system for verifying existence and integrity of data in data storage system | |
CN113939821A (en) | System and method for non-parallel mining on a workload justification blockchain network | |
CN114244838A (en) | Encryption method and system, decryption method, device and equipment for block chain data | |
CN111611311B (en) | Method and system for forming decentralised distributed database, electronic device and computer readable storage medium | |
CN111758127B (en) | Secret calculation device and method thereof secret calculation authentication system and recording medium | |
WO2023093004A1 (en) | Key data processing method and electronic device | |
CN113612758B (en) | Block chain-based Internet of things data security management system and method | |
CN113507366B (en) | Grid-based searchable log blind signature scheme | |
KR20240045231A (en) | Creation of digitally signed shares |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210720 |