Nothing Special   »   [go: up one dir, main page]

CN111104678A - Block chain consensus method and device - Google Patents

Block chain consensus method and device Download PDF

Info

Publication number
CN111104678A
CN111104678A CN201811248907.4A CN201811248907A CN111104678A CN 111104678 A CN111104678 A CN 111104678A CN 201811248907 A CN201811248907 A CN 201811248907A CN 111104678 A CN111104678 A CN 111104678A
Authority
CN
China
Prior art keywords
witness
node
nodes
key
data
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.)
Granted
Application number
CN201811248907.4A
Other languages
Chinese (zh)
Other versions
CN111104678B (en
Inventor
唐鹏毅
刘建宏
余刚
卢昌斌
薛路
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Quantum Information Technology Co ltd
Quantumctek Co Ltd
Original Assignee
Beijing Quantum Information Technology Co ltd
Quantumctek Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Quantum Information Technology Co ltd, Quantumctek Co Ltd filed Critical Beijing Quantum Information Technology Co ltd
Priority to CN201811248907.4A priority Critical patent/CN111104678B/en
Publication of CN111104678A publication Critical patent/CN111104678A/en
Application granted granted Critical
Publication of CN111104678B publication Critical patent/CN111104678B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a block chain consensus method and a block chain consensus device, wherein the method comprises the following steps: determining witness nodes; distributing a global key for each witness node based on a quantum key distribution network; and selecting the nodes meeting preset conditions from the witness nodes as accounting nodes by using the global key and the transaction data. Because all witness nodes commonly hold the global key, the nodes meeting the preset conditions are selected by using the global key, namely, the accounting nodes are selected through a quantum lottery mechanism, and therefore the trust problem of the witness nodes and the problem of how to fairly select the accounting nodes in the witness nodes are solved based on the use of the quantum key.

Description

Block chain consensus method and device
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a block chain consensus method and apparatus.
Background
The block chain is a distributed account book, each transaction participant is a node of the block chain network, each node has a complete public account book backup, and transaction history information is recorded on the public account book backup. Any node initiating a transaction may need to update the relevant information to the account book of each node in the block network, so that all nodes may participate in the verification of the transaction. How to coordinate and maintain consistency among various accounts is the problem that needs to be solved by the consensus mechanism.
The basic idea of the consensus mechanism is that one node is temporarily selected as the accounting node each time, other nodes verify whether each transaction recorded by the accounting node is real and effective, and if not, the next accounting node needs to be replaced. Due to the security problem, accounting nodes need to be reselected during accounting every time in block chain design, and the difference of the existing consensus mechanism is mainly in the selection mode of the accounting nodes, for example, the core thought of a DPoS (rights of stock authorization certification) mechanism is that witness nodes are selected for alternative accounting, the fairness of the method is not high, the consensus mechanism depends on the credibility of the witness nodes and the scheme of selecting the witness nodes, and the trust problem of the witness nodes exists, so that the accounting nodes cannot be selected fairly.
Disclosure of Invention
In view of the above problems, the present invention provides a block chain consensus method and apparatus, which solve the trust problem of witness nodes and the problem of how to fairly select accounting nodes among witness nodes based on the use of quantum keys.
In order to achieve the purpose, the invention provides the following technical scheme:
a method of block chain consensus, comprising:
determining witness nodes;
distributing a global key for each witness node based on a quantum key distribution network;
and selecting the nodes meeting preset conditions from the witness nodes as accounting nodes by using the global key and the transaction data.
Optionally, the distributing a global key for each witness node based on the quantum key distribution network includes:
constructing a quantum key distribution network among the witness nodes;
in the quantum key distribution network, randomly selecting a pair of quantum network nodes, generating a group of symmetric keys, and taking the symmetric keys as global keys;
and distributing the global key to all quantum network nodes, and indicating the witness nodes to extract the global key from the quantum network nodes corresponding to the witness nodes, so that all the witness nodes obtain the same global key.
Optionally, the method further comprises:
after the witness node extracts the global key from the quantum network node corresponding to the witness node, the accuracy of the global key is verified by sending the digest of the witness node, and if the verification is successful, the witness node is indicated to record the global key.
Optionally, the selecting, as an accounting node, a node that meets a preset condition in the witness nodes by using the global key and the transaction data includes:
generating a group key according to the global key of the witness node before the transaction data accumulation is completed;
dividing the group key to obtain a plurality of group keys, and sending each group key to each witness node, wherein each group key is only used as a certificate of one witness node;
in response to completion of transaction data collection, combining the transaction data with the hash value corresponding to the last tile to generate hash data;
obtaining difference value information of each witness node, and taking the witness node with the minimum difference value as a candidate accounting node;
and verifying the voucher and the transaction data of the candidate accounting node, and taking the candidate accounting node as an accounting node if the verification is successful.
Optionally, the combining the transaction data and the hash value corresponding to the last tile to generate hash data in response to completion of the transaction data collection comprises:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
generating a preset matrix through the unused random number, and multiplying the preset matrix by the combined data to obtain the scattered data;
wherein the difference information characterizes a difference between the hashed data and a credential of a corresponding witness node.
Optionally, the combining the transaction data and the hash value corresponding to the last tile to generate hash data in response to completion of the transaction data collection comprises:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
generating a preset matrix through the certificate of the witness node, and multiplying the preset matrix with the combined data to obtain the scattered data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
Optionally, the combining the transaction data and the hash value corresponding to the last tile to generate hash data in response to completion of the transaction data collection comprises:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to all the witness nodes, the hash value of the previous block and the certificate to generate combined data;
hashing the combined data through a preset hashing function to obtain the hashed data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
A blockchain consensus apparatus, comprising:
the determining unit is used for determining witness nodes;
the distribution unit is used for distributing a global key for each witness node based on a quantum key distribution network;
and the selecting unit is used for selecting the nodes meeting the preset conditions from the witness nodes as the accounting nodes by using the global key and the transaction data.
Optionally, the distribution unit includes:
the construction subunit is used for constructing a quantum key distribution network among the witness nodes;
a key generation subunit, configured to randomly select a pair of quantum network nodes in the quantum key distribution network, generate a set of symmetric keys, and use the symmetric keys as global keys;
and the key extraction subunit is used for distributing the global key to all the quantum network nodes, and indicating the witness nodes to extract the global key from the quantum network nodes corresponding to the witness nodes, so that all the witness nodes can obtain the same global key.
Optionally, the method further comprises:
and the verifying subunit is used for verifying the accuracy of the global key by sending the digest of the witness node after the witness node extracts the global key from the corresponding quantum network node, and if the verification is successful, indicating the witness node to record the global key.
Optionally, the selecting unit includes:
the group key generation subunit is used for responding to the transaction data before the accumulation is completed and generating a group key according to the global key of the witness node;
the dividing subunit is configured to divide the group key to obtain a plurality of block group keys, and send each block group key to each witness node, where each block group key is only used as a credential of one witness node;
the hash generation subunit is used for combining the transaction data and the hash value corresponding to the last block to generate hash data in response to the completion of the transaction data collection;
the difference determining subunit is used for acquiring difference information of each witness node and taking the witness node with the minimum difference as a candidate accounting node;
and the verification subunit is used for verifying the voucher and the transaction data of the candidate accounting node, and taking the candidate accounting node as an accounting node if the verification is successful.
Optionally, the hash generation subunit includes:
a first random number obtaining subunit, configured to obtain an unused random number in the global key;
the first combination subunit is used for combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
a first hash data generation subunit, configured to generate a preset matrix according to the unused random number, and multiply the preset matrix with the combined data to obtain the hash data;
wherein the difference information characterizes a difference between the hashed data and a credential of a corresponding witness node.
Optionally, the hash generation subunit includes:
a second random number obtaining subunit, configured to obtain an unused random number in the global key;
the second combination subunit is used for combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
a second hash data generation subunit, configured to generate a preset matrix according to the credential of the witness node, and multiply the preset matrix with the combined data to obtain the hash data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
Optionally, the hash generation subunit includes:
a third random number obtaining subunit, configured to obtain an unused random number in the witness node global key;
the third combination subunit is used for combining the transaction data corresponding to all the witness nodes, the hash value of the previous block and the certificate to generate combined data;
a third hash data generation subunit, configured to hash the combined data by using a preset hash function to obtain the hash data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
Compared with the prior art, the invention provides a block chain consensus method and a block chain consensus device, wherein witness nodes are determined firstly, then the witness nodes are enabled to obtain the same global key in a quantum key distribution network constructed in the witness nodes, all witness nodes share the global key, and the global key is utilized to select the nodes meeting preset conditions, namely, the accounting nodes are selected through a quantum lottery mechanism, so that the trust problem of the witness nodes and the problem of how to fairly select the accounting nodes in the witness nodes are solved based on the use of the quantum key.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a block chain consensus method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for determining a global key according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for selecting an accounting node according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a block chain consensus device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not set forth for a listed step or element but may include steps or elements not listed.
In an embodiment of the present invention, a block chain consensus method is provided, referring to fig. 1, including:
s11, determining witness nodes;
in determining witness nodes in embodiments of the present invention, it is not a fully decentralized trust of the PoW (proof of work) mechanism. Quantum networks are basically only considered for federation chains and private chains in combination with block chains. When the members in the alliance chain establish the alliance chain, the members vote to select witness nodes (also called witness nodes or witnesses), and a quantum network is constructed for the witness nodes or witnesses. If the link is a public link, the stock voting witnesses can be performed by referring to a DPoS mechanism.
S12, distributing a global key for each witness node based on a quantum key distribution network;
after witness nodes are determined, a quantum key distribution network is constructed at least between witness nodes. Then, each witness node (also a quantum node in the quantum key distribution network) distributes a global key through the trusted key relay, namely, all quantum nodes continuously generate the same random number.
Referring to fig. 2, in an embodiment of the present invention, a method for determining a global key is provided, including:
s121, constructing a quantum key distribution network among the witness nodes;
by constructing a quantum key distribution network among witness nodes, each witness node can distribute a global key through a trusted key relay based on the special quantum key distribution network, namely all quantum nodes continuously generate the same random number, namely the random number obtained by the node is guaranteed to be a true random number through the quantum key distribution network.
S122, randomly selecting a pair of quantum network nodes in the quantum key distribution network, generating a group of symmetric keys, and taking the symmetric keys as global keys;
a pair of quantum nodes (quantum network nodes) is randomly selected to generate a set of symmetric keys. It should be noted that the quantum key distribution network and the blockchain network are separated, the selected blockchain link points notify their quantum nodes to distribute the global key, the global key is transmitted to each quantum network node through the throughput sub-network (i.e. key relay), and then each blockchain working node extracts the global key. Unless a selected pair of nodes (symmetric keys) jointly replace the procedure of quantum equipment in the quantum network, and the keys are cooperatively faked, the quantum random numbers are obtained. The replacement procedure may result in authentication with other quantum devices being unable to pass.
S123, distributing the global key to all quantum network nodes, and indicating the witness nodes to extract the global key from the quantum network nodes corresponding to the witness nodes, so that all the witness nodes can obtain the same global key.
After all witness nodes extract the keys from the quantum network nodes of the witness nodes, the accuracy of the keys needs to be checked by sending the abstract, so that all witness nodes obtain the completely same random numbers, namely the global keys.
And S13, selecting the nodes meeting the preset conditions from the witness nodes as accounting nodes by using the global key and the transaction data.
A global key commonly held by all nodes is generated, and the accounting node (also called an accounting person node or an accounting person) can be selected publicly by using the global key. In the embodiment of the invention, quantum true random numbers are used for selecting which node is used for accounting, the implementation process is similar to a lottery drawing process, and the consensus mechanism can be called as a quantum lottery mechanism.
For example, the process of purchasing a lottery ticket is as follows: with key distribution in the quantum network, a random number is distributed for each node, and each node knows what random numbers are distributed by other nodes (for the corporate notary who is the winner); the lottery drawing process is as follows: when enough transaction data is accumulated, all nodes combine the hash values of the current transaction data and the transaction data of the previous block to calculate a new hash value (hash value), the difference value of the new hash value and the random number allocated to the new hash value is published, and the node with the minimum difference value is elected to be the next accounting node; the prize exchanging process is as follows: all nodes verify whether the transaction data recorded by the newly elected accounting node is reliable, whether the hash value of the last block is correct, whether the random number allocated to the block is correct, and whether the calculated difference is correct. When a certain number of nodes confirm that the new accounting node is error-free, the blockchain acknowledges the transaction data recorded by the accounting node. The block chain is composed of a plurality of blocks, and each block has a time stamp, namely the time generated by the block is recorded, so that the blocks on the whole block chain can be arranged according to the time sequence based on the time stamp. Each block comprises two parts, namely a block header and a block body, wherein the block header records meta-information of the current block, the block body is actual data, and the meta-information in the block header can comprise a timestamp, a hash value of the block body and a hash value of the last block. If the block chain is used to record transaction data, the actual data of the block is the transaction data, and when performing hash calculation or verification on the block of the block, it is necessary to know the hash value of the block immediately before the block timestamp to perform calculation.
Specifically, referring to fig. 3, the method for confirming the accounting node according to the embodiment of the present invention may include the following steps:
s131, generating a group key according to the global key of the witness node before the transaction data accumulation is completed;
before the transaction data accumulation is completed each time, a string of global keys (true random numbers), also called group keys, is generated, that is, the global keys corresponding to each witness node are stored in a key pool, so that the key pool corresponds to a string of global keys, namely the group keys.
S132, dividing the group keys to obtain a plurality of block group keys, and sending each block group key to each witness node, wherein each block group key is only used as a certificate of one witness node;
the group key is divided into blocks from which each node claims a block as a credential.
S133, in response to the completion of transaction data collection, combining the transaction data and the hash value corresponding to the last block to generate hash data;
s134, obtaining difference value information of each witness node, and taking the witness node with the minimum difference value as a candidate accounting node, wherein the difference value information represents the difference value between the scattered data and a voucher of the corresponding witness node;
when the transaction data collection is completed, all the nodes take out the unused random numbers in the global key, and combine the transaction data and the hash value of the previous block for hashing to generate the hash data. The hash mode is that a Toeplitz matrix is generated by using the taken random number, the Toeplitz matrix is multiplied by the combined data, each node publishes the difference value between the hashed data and the certificate of the node, and the node with the minimum difference value obtains the accounting right, namely, the preset condition which should be met by the accounting node is set according to the difference value.
And S135, verifying the voucher and the transaction data of the candidate accounting node, and taking the candidate accounting node as an accounting node if the verification is successful.
Since each node knows the credentials of the other nodes, as well as the transaction data, the hash value of the previous chunk, and the random number used for this hash, the accounting rights and transaction data can be verified.
Further comprising: and regenerating a new global key for the next consensus. For example, referring to table 1, table 1 is a global key pool key usage table.
TABLE 1
Figure BDA0001841183740000091
Figure BDA0001841183740000101
The quantum random number is adopted for data transmission no matter transaction data are transmitted or data transmission during consensus, and the quantum random number is also adopted for a consensus lottery drawing mechanism, so that the possibility of external node attack or accounting participation is avoided.
Correspondingly, when determining the accounting node, the following method may be further included in the embodiment of the present invention:
the first method comprises the following steps:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
generating a preset matrix through the certificate of the witness node, and multiplying the preset matrix with the combined data to obtain the scattered data;
and each witness node publishes the difference value between the hash data and the unused random number, and the witness node with the minimum difference value is used as a candidate accounting node.
The second method comprises the following steps:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to all the witness nodes, the hash value of the previous block and the certificate to generate combined data;
hashing the combined data by using a preset hash function to obtain the hashed data;
and each witness node publishes the difference value between the hash data and the unused random number, and the witness node with the minimum difference value is used as a candidate accounting node.
Specifically, according to the description in the above embodiment, the method for determining the accounting node is the lottery running algorithm in the quantum lottery mechanism, and the lottery running algorithm may be replaced with the following ones:
all nodes combine the transaction data with the hash value of the last chunk, construct a Toeplitz matrix using their own credential random numbers for hashing, and then compare with the n +1 th fragment random number in the global key that is not claimed. The closest node is the new accounting node.
Or all nodes combine the transaction data, the Hash value of the last block and the random number of the certificate of the node, Hash the transaction data, the Hash value of the last block and the random number of the certificate of the node by using a common Hash function, and then compare the Hash value with the random number of the n +1 th fragment which is not claimed in the global key. The closest node is the new accounting node.
The invention is premised on that all nodes are led to believe that the random number is a true random number and is not a random number specially made by a certain node. The method is equivalent to that enough fairness and randomness need to be ensured when the lottery is issued, all nodes can be convinced, and the true randomness of the account person can be realized without manual operation. The above requirements can be achieved using a quantum key distribution network according to the principles of physical quantum unclonable and the characteristics of micro-world random probability. Therefore, the selection of the accounting nodes can achieve fairness and true randomness and complete irregularity, and the possibility that some witness nodes predict and jointly control the trend of the block chain by finding alternate accounting rules is eliminated. The random number comes from quantum key distribution, and all nodes can believe that the random number cannot be tampered and manipulated by people. The non-eavesdropping principle of the quantum key is utilized to ensure that the consensus mechanism is free from the attack of external nodes, and as long as most quantum nodes in the network are credible, the consensus process of the block chain is safe. Due to fairness and true randomness, 51% of nodes need to be combined instead of 51% of computing power when the consensus mechanism is attacked, so that individual nodes can be prevented from being attacked by a super computer or a quantum computer, and safety is improved.
An embodiment of the present invention further provides a block chain consensus apparatus, which is shown in fig. 4 and includes:
a determination unit 10 for determining witness nodes;
a distribution unit 20, configured to distribute a global key for each witness node based on a quantum key distribution network;
and the selecting unit 30 is configured to select, as an accounting node, a node that meets a preset condition from the witness nodes by using the global key and the transaction data.
Optionally, the dispensing unit 20 includes:
the construction subunit is used for constructing a quantum key distribution network among the witness nodes;
a key generation subunit, configured to randomly select a pair of quantum network nodes in the quantum key distribution network, generate a set of symmetric keys, and use the symmetric keys as global keys;
and the key extraction subunit is used for distributing the global key to all the quantum network nodes, and indicating the witness nodes to extract the global key from the quantum network nodes corresponding to the witness nodes, so that all the witness nodes can obtain the same global key.
Optionally, the method further comprises:
and the verifying subunit is used for verifying the accuracy of the global key by sending the digest of the witness node after the witness node extracts the global key from the corresponding quantum network node, and if the verification is successful, indicating the witness node to record the global key.
Optionally, the selecting unit 30 includes:
the group key generation subunit is used for responding to the transaction data before the accumulation is completed and generating a group key according to the global key of the witness node;
the dividing subunit is configured to divide the group key to obtain a plurality of block group keys, and send each block group key to each witness node, where each block group key is only used as a credential of one witness node;
the hash generation subunit is used for combining the transaction data and the hash value corresponding to the last block to generate hash data in response to the completion of the transaction data collection;
the difference determining subunit is used for acquiring difference information of each witness node and taking the witness node with the minimum difference as a candidate accounting node;
and the verification subunit is used for verifying the voucher and the transaction data of the candidate accounting node, and taking the candidate accounting node as an accounting node if the verification is successful.
Optionally, the hash generation subunit includes:
a first random number obtaining subunit, configured to obtain an unused random number in the global key;
the first combination subunit is used for combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
a first hash data generation subunit, configured to generate a preset matrix according to the unused random number, and multiply the preset matrix with the combined data to obtain the hash data;
wherein the difference information characterizes a difference between the hashed data and a credential of a corresponding witness node.
Optionally, the hash generation subunit includes:
a second random number obtaining subunit, configured to obtain an unused random number in the global key;
the second combination subunit is used for combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
a second hash data generation subunit, configured to generate a preset matrix according to the credential of the witness node, and multiply the preset matrix with the combined data to obtain the hash data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
Or, the hash generation subunit includes:
a third random number obtaining subunit, configured to obtain an unused random number in the witness node global key;
the third combination subunit is used for combining the transaction data corresponding to all the witness nodes, the hash value of the previous block and the certificate to generate combined data;
a third hash data generation subunit, configured to hash the combined data by using a preset hash function to obtain the hash data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
Compared with the prior art, the invention provides a block chain consensus device, which comprises a determining unit for determining witness nodes, a distribution unit for enabling each witness node to obtain the same global key in a quantum key distribution network constructed in the witness nodes, wherein all the witness nodes share the global key, and nodes meeting preset conditions are selected by using the global key, namely accounting nodes are selected through a quantum lottery mechanism.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

1. A block chain consensus method, comprising:
determining witness nodes;
distributing a global key for each witness node based on a quantum key distribution network;
and selecting the nodes meeting preset conditions from the witness nodes as accounting nodes by using the global key and the transaction data.
2. The method of claim 1, wherein the quantum-based key distribution network distributes a global key for each witness node, comprising:
constructing a quantum key distribution network among the witness nodes;
in the quantum key distribution network, randomly selecting a pair of quantum network nodes, generating a group of symmetric keys, and taking the symmetric keys as global keys;
and distributing the global key to all quantum network nodes, and indicating the witness nodes to extract the global key from the quantum network nodes corresponding to the witness nodes, so that all the witness nodes obtain the same global key.
3. The method of claim 2, further comprising:
after the witness node extracts the global key from the quantum network node corresponding to the witness node, the accuracy of the global key is verified by sending the digest of the witness node, and if the verification is successful, the witness node is indicated to record the global key.
4. The method according to any one of claims 1 to 3, wherein the selecting out the nodes meeting the preset condition from the witness nodes as accounting nodes by using the global key and the transaction data comprises:
generating a group key according to the global key of the witness node before the transaction data accumulation is completed;
dividing the group key to obtain a plurality of group keys, and sending each group key to each witness node, wherein each group key is only used as a certificate of one witness node;
in response to completion of transaction data collection, combining the transaction data with the hash value corresponding to the last tile to generate hash data;
obtaining difference value information of each witness node, and taking the witness node with the minimum difference value as a candidate accounting node;
and verifying the voucher and the transaction data of the candidate accounting node, and taking the candidate accounting node as an accounting node if the verification is successful.
5. The method of claim 4, wherein combining transaction data with a hash value corresponding to a last chunk to generate hashed data in response to completion of collection of transaction data comprises:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
generating a preset matrix through the unused random number, and multiplying the preset matrix by the combined data to obtain the scattered data;
wherein the difference information characterizes a difference between the hashed data and a credential of a corresponding witness node.
6. The method of claim 4, wherein combining transaction data with a hash value corresponding to a last chunk to generate hashed data in response to completion of collection of transaction data comprises:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
generating a preset matrix through the certificate of the witness node, and multiplying the preset matrix with the combined data to obtain the scattered data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
7. The method of claim 4, wherein combining transaction data with a hash value corresponding to a last chunk to generate hashed data in response to completion of collection of transaction data comprises:
acquiring unused random numbers in the witness node global key;
combining the transaction data corresponding to all the witness nodes, the hash value of the previous block and the certificate to generate combined data;
hashing the combined data through a preset hashing function to obtain the hashed data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
8. A blockchain consensus apparatus, comprising:
the determining unit is used for determining witness nodes;
the distribution unit is used for distributing a global key for each witness node based on a quantum key distribution network;
and the selecting unit is used for selecting the nodes meeting the preset conditions from the witness nodes as the accounting nodes by using the global key and the transaction data.
9. The apparatus of claim 8, wherein the distribution unit comprises:
the construction subunit is used for constructing a quantum key distribution network among the witness nodes;
a key generation subunit, configured to randomly select a pair of quantum network nodes in the quantum key distribution network, generate a set of symmetric keys, and use the symmetric keys as global keys;
and the key extraction subunit is used for distributing the global key to all the quantum network nodes, and indicating the witness nodes to extract the global key from the quantum network nodes corresponding to the witness nodes, so that all the witness nodes can obtain the same global key.
10. The apparatus of claim 9, further comprising:
and the verifying subunit is used for verifying the accuracy of the global key by sending the digest of the witness node after the witness node extracts the global key from the corresponding quantum network node, and if the verification is successful, indicating the witness node to record the global key.
11. The apparatus according to any one of claims 8 to 10, wherein the selecting unit comprises:
the group key generation subunit is used for responding to the transaction data before the accumulation is completed and generating a group key according to the global key of the witness node;
the dividing subunit is configured to divide the group key to obtain a plurality of block group keys, and send each block group key to each witness node, where each block group key is only used as a credential of one witness node;
the hash generation subunit is used for combining the transaction data and the hash value corresponding to the last block to generate hash data in response to the completion of the transaction data collection;
the difference determining subunit is used for acquiring difference information of each witness node and taking the witness node with the minimum difference as a candidate accounting node;
and the verification subunit is used for verifying the voucher and the transaction data of the candidate accounting node, and taking the candidate accounting node as an accounting node if the verification is successful.
12. The apparatus of claim 11, wherein the hash generation subunit comprises:
a first random number obtaining subunit, configured to obtain an unused random number in the global key;
the first combination subunit is used for combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
a first hash data generation subunit, configured to generate a preset matrix according to the unused random number, and multiply the preset matrix with the combined data to obtain the hash data;
wherein the difference information characterizes a difference between the hashed data and a credential of a corresponding witness node.
13. The apparatus of claim 11, wherein the hash generation subunit comprises:
a second random number obtaining subunit, configured to obtain an unused random number in the global key;
the second combination subunit is used for combining the transaction data corresponding to the witness node and the hash value of the previous block to generate combined data;
a second hash data generation subunit, configured to generate a preset matrix according to the credential of the witness node, and multiply the preset matrix with the combined data to obtain the hash data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
14. The apparatus of claim 11, wherein the hash generation subunit comprises:
a third random number obtaining subunit, configured to obtain an unused random number in the witness node global key;
the third combination subunit is used for combining the transaction data corresponding to all the witness nodes, the hash value of the previous block and the certificate to generate combined data;
a third hash data generation subunit, configured to hash the combined data by using a preset hash function to obtain the hash data;
wherein the difference information characterizes a difference between the hash data and the unused random numbers.
CN201811248907.4A 2018-10-25 2018-10-25 Block chain consensus method and device Active CN111104678B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811248907.4A CN111104678B (en) 2018-10-25 2018-10-25 Block chain consensus method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811248907.4A CN111104678B (en) 2018-10-25 2018-10-25 Block chain consensus method and device

Publications (2)

Publication Number Publication Date
CN111104678A true CN111104678A (en) 2020-05-05
CN111104678B CN111104678B (en) 2022-03-18

Family

ID=70418672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811248907.4A Active CN111104678B (en) 2018-10-25 2018-10-25 Block chain consensus method and device

Country Status (1)

Country Link
CN (1) CN111104678B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116349A (en) * 2020-08-12 2020-12-22 北京智融云河科技有限公司 High-throughput-rate-oriented graph type account book randomization consensus method and device
CN113055174A (en) * 2021-04-14 2021-06-29 长春大学 Inter-multi-node quantum key synchronization method based on consensus mechanism
CN113079000A (en) * 2021-03-04 2021-07-06 深圳大学 Consensus method based on verifiable quantum random number
CN113271204A (en) * 2021-05-06 2021-08-17 西安电子科技大学 Byzantine fault-tolerant consensus method based on quantum key distribution
CN113315630A (en) * 2021-05-11 2021-08-27 中国联合网络通信集团有限公司 Block chain, quantum key distribution method and device
CN114598477A (en) * 2022-03-02 2022-06-07 济南量子技术研究院 A consensus system and method based on device-independent quantum random numbers
CN116361385A (en) * 2022-09-01 2023-06-30 矩阵时光数字科技有限公司 Block chain consensus method and system

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790431A (en) * 2016-12-05 2017-05-31 同济大学 Cloud manufacturing service Transaction Information record system and method based on block chain
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107347009A (en) * 2017-08-30 2017-11-14 北京知金链网络技术有限公司 Block chain one-dimensional random number common recognition election method
CN107395349A (en) * 2017-08-16 2017-11-24 深圳国微技术有限公司 A kind of block chain network cryptographic key distribution method based on self-certified public key system
CN107493173A (en) * 2017-08-30 2017-12-19 北京知金链网络技术有限公司 Block chain random number common recognition election method
CN107566124A (en) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 Common recognition method for building up, block catenary system and storage medium based on lottery mechanism
CN107578337A (en) * 2017-08-28 2018-01-12 杭州云象网络技术有限公司 A kind of intelligence based on block chain intelligence contract technology, which is thrown, cares for product trustship method
CN107682364A (en) * 2017-11-03 2018-02-09 杭州秘猿科技有限公司 One kind license chain privacy method of commerce
US20180046766A1 (en) * 2016-06-27 2018-02-15 Novus Paradigm Technologies Corporation System for rapid tracking of genetic and biomedical information using a distributed cryptographic hash ledger
CN107819753A (en) * 2017-10-31 2018-03-20 捷德(中国)信息科技有限公司 Not exclusively anonymous block chain transaction system and method
CN108449175A (en) * 2018-02-27 2018-08-24 浙江科易理想量子信息技术有限公司 A kind of quantum trusted node distribution route searching method
CN108509615A (en) * 2018-03-30 2018-09-07 深圳市元征科技股份有限公司 Common recognition method for building up, device and readable storage medium storing program for executing based on lottery mechanism
US20180287997A1 (en) * 2017-03-31 2018-10-04 Peking University Shenzhen Graduate School Systems and methods for managing top-level domain names using consortium blockchain
CN108632028A (en) * 2017-03-17 2018-10-09 夏桂根 Certification network

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180046766A1 (en) * 2016-06-27 2018-02-15 Novus Paradigm Technologies Corporation System for rapid tracking of genetic and biomedical information using a distributed cryptographic hash ledger
CN106790431A (en) * 2016-12-05 2017-05-31 同济大学 Cloud manufacturing service Transaction Information record system and method based on block chain
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
CN108632028A (en) * 2017-03-17 2018-10-09 夏桂根 Certification network
US20180287997A1 (en) * 2017-03-31 2018-10-04 Peking University Shenzhen Graduate School Systems and methods for managing top-level domain names using consortium blockchain
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107395349A (en) * 2017-08-16 2017-11-24 深圳国微技术有限公司 A kind of block chain network cryptographic key distribution method based on self-certified public key system
CN107566124A (en) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 Common recognition method for building up, block catenary system and storage medium based on lottery mechanism
CN107578337A (en) * 2017-08-28 2018-01-12 杭州云象网络技术有限公司 A kind of intelligence based on block chain intelligence contract technology, which is thrown, cares for product trustship method
CN107493173A (en) * 2017-08-30 2017-12-19 北京知金链网络技术有限公司 Block chain random number common recognition election method
CN107347009A (en) * 2017-08-30 2017-11-14 北京知金链网络技术有限公司 Block chain one-dimensional random number common recognition election method
CN107819753A (en) * 2017-10-31 2018-03-20 捷德(中国)信息科技有限公司 Not exclusively anonymous block chain transaction system and method
CN107682364A (en) * 2017-11-03 2018-02-09 杭州秘猿科技有限公司 One kind license chain privacy method of commerce
CN108449175A (en) * 2018-02-27 2018-08-24 浙江科易理想量子信息技术有限公司 A kind of quantum trusted node distribution route searching method
CN108509615A (en) * 2018-03-30 2018-09-07 深圳市元征科技股份有限公司 Common recognition method for building up, device and readable storage medium storing program for executing based on lottery mechanism

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ALEKSEY FEDOROV: "《Quantum key distribution networks and their applications for blockchain-based technologies》", 《2ND INTERNATIONAL CONFERENCE ON QUANTUM PHYSICS AND QUANTUM TECHNOLOGY》 *
E.O.KIKTENKO等: "《quantum-secured blockchain》", 《QUANTUM SCIENCE AND TECHNOLOGY》 *
姚前: "《分布式账本技术研究进展综述》", 《武汉金融》 *
无: "《区块链的安全与防护》", 《信息化建设》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116349A (en) * 2020-08-12 2020-12-22 北京智融云河科技有限公司 High-throughput-rate-oriented graph type account book randomization consensus method and device
CN112116349B (en) * 2020-08-12 2023-12-26 北京智融云河科技有限公司 High-throughput-rate-oriented random consensus method and device for drawing account book
CN113079000A (en) * 2021-03-04 2021-07-06 深圳大学 Consensus method based on verifiable quantum random number
CN113055174A (en) * 2021-04-14 2021-06-29 长春大学 Inter-multi-node quantum key synchronization method based on consensus mechanism
CN113055174B (en) * 2021-04-14 2022-06-28 长春大学 Multi-node quantum key synchronization method based on consensus mechanism
CN113271204A (en) * 2021-05-06 2021-08-17 西安电子科技大学 Byzantine fault-tolerant consensus method based on quantum key distribution
CN113315630A (en) * 2021-05-11 2021-08-27 中国联合网络通信集团有限公司 Block chain, quantum key distribution method and device
CN113315630B (en) * 2021-05-11 2022-09-27 中国联合网络通信集团有限公司 Block chain, quantum key distribution method and device
CN114598477A (en) * 2022-03-02 2022-06-07 济南量子技术研究院 A consensus system and method based on device-independent quantum random numbers
CN114598477B (en) * 2022-03-02 2024-06-04 济南量子技术研究院 A consensus system and method based on device-independent quantum random numbers
CN116361385A (en) * 2022-09-01 2023-06-30 矩阵时光数字科技有限公司 Block chain consensus method and system

Also Published As

Publication number Publication date
CN111104678B (en) 2022-03-18

Similar Documents

Publication Publication Date Title
CN111104678B (en) Block chain consensus method and device
Kogias et al. Enhancing bitcoin security and performance with strong consistency via collective signing
AU2017395785B2 (en) Voting system and method
CN109842606B (en) Block chain consensus algorithm and system based on consistent Hash algorithm
CN101247223B (en) A two-way authentication method for entities based on a trusted third party
CN101222328B (en) Entity bidirectional identification method
EP3419210A1 (en) Method for generating a transaction of a blockchain and method for validating a block of a blockchain
CN112257095B (en) Method for selecting alliance chain consensus node
CN110289966A (en) Consensus method of anti-adaptive attack alliance chain based on Byzantine fault tolerance
CN112865962B (en) Distributed identification authentication method and device based on block chain and electronic equipment
CN110855432A (en) Asynchronous BFT&DPOS Consensus Mechanism Based on Verifiable Random Function to Distribute Validator Rewards
CN108632362A (en) A kind of method that privately owned block chain builds the election of block node
US11362836B2 (en) Consensus protocol for permissioned ledgers
CN112116349B (en) High-throughput-rate-oriented random consensus method and device for drawing account book
CN109685505A (en) Byzantine failure tolerance common recognition optimization method based on association ring signatures
CN113259135B (en) Lightweight blockchain communication authentication device and method for detecting data tamper
CN112910661B (en) Block chain consensus method, device, equipment and medium suitable for electronic subscription
Mookherji et al. Blockchain-based e-voting protocols
CN113497823A (en) Labor service subpackage personnel management system based on block chain
CN110780848A (en) Double-random generation method and supervision system based on block chain distributed random process
CN111865595A (en) Block chain consensus method and device
CN108173658B (en) Block chain consistency maintenance method and device
CN117395007A (en) Block chain consensus method, system and terminal based on publicly verifiable random numbers
Chen et al. A digital copyright protection system based on Blockchain and with Sharding network
Zhang et al. FortunChain: EC-VRF-based scalable blockchain system for realizing state sharding

Legal Events

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