A blockchain system and corresponding data storage system

CN117938390BActive Publication Date: 2026-08-07QUAKEY LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QUAKEY LTD
Filing Date
2022-10-24
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0007]虽然“工作量证明”能限制区块链的生成速度,防止新区块过快的“女巫攻击”,但是如此多的计算次数也导致大量的电力被浪费在计算试错上

Benefits of technology

[0052]真随机数由物理系统产生,也称硬件随机数。由于真随机数来自于物理世界的真随机性,与计算无关,因此可以抵抗任何算法的预测和破解,这也使得真随机数在信息安全领域应用广泛。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117938390B_ABST
    Figure CN117938390B_ABST
Patent Text Reader

Abstract

The application discloses a kind of blockchain system and corresponding data storage system.The blockchain system includes multiple network nodes m, each network node includes timing device, true random number generating device, data storage device, data communication device and operation device, each network node is connected with each other by respective data communication device and is communicated, and forms blockchain system.The application generates true random number by low-power physical device in each network node, and generates new block by consensus algorithm and true randomness proof, which can replace the blockchain generation method based on high-energy consumption computer proof of work, greatly reduce the construction cost and energy consumption of public blockchain, promote the popularization of blockchain technology, and improve the security, reliability and convenience of distributed storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to blockchain technology, specifically to a blockchain system and a corresponding data storage system. The invention utilizes a node's true random number generator to generate true random numbers, and selects nodes to generate new blockchain blocks through a consensus algorithm among nodes on the true random numbers. Background Technology

[0002] Blockchain technology has developed rapidly over the past decade and has a wide range of applications. In a narrow sense, blockchain is a chain-like data structure that combines data blocks sequentially in chronological order, and is a distributed ledger that is cryptographically guaranteed to be immutable and unforgeable. In a broader sense, blockchain technology utilizes a chain-like data structure to verify and store data, uses distributed node consensus algorithms to generate and update data, employs cryptography to ensure the security of data transmission and access, and utilizes smart contracts composed of automated script code to program and manipulate data—a completely new distributed infrastructure and computing paradigm.

[0003] Because no single node can independently record ledger data, the possibility of a single bookkeeper being controlled or bribed to falsify records is avoided. Furthermore, with a sufficient number of bookkeeping nodes, theoretically, the ledger will not be lost unless all nodes are compromised, thus ensuring the security of the ledger data. Therefore, blockchain technology is of great significance for data security.

[0004] Blockchain technology holds immense promise for applications in finance, logistics, public services, and digital copyright. Taking finance as an example, it has significant potential value in areas such as international remittances, letters of credit, equity registration, and stock exchanges. Applying blockchain technology to the financial industry can eliminate third-party intermediaries, enabling direct peer-to-peer connections, thereby significantly reducing costs and accelerating transaction payments.

[0005] Current blockchain technology generally uses "Proof-of-Work" as the basis for generating new blocks. Proof-of-Work (PoW) is the earliest and most widely used blockchain generation method. Its basic process involves each network node adding a one-time pseudo-random number (nonce) to the data in the previous block and calculating a 256-bit hash value using the SHA-256 algorithm. When a node's calculated hash value meets a given target, that node automatically gains the right to generate a new block and receives the corresponding accounting reward.

[0006] Because the target given in "proof-of-work" is usually an outcome with an extremely low probability of occurrence, it requires a large amount of computational resources to obtain. For example, Bitcoin's "proof-of-work" requires calculating a 256-bit hash value (as of 2022) that is less than the first 80 bits, all of which are 0. This requires nodes to continuously input pseudo-random nonces for trial and error, averaging 2 to the power of 80 trials, to obtain a hash value that meets the target. Therefore, "proof-of-work" is also known as "mining".

[0007] While "proof-of-work" can limit the speed at which blockchains are generated and prevent "Syllabic attacks" from occurring too quickly, the sheer number of computations also results in a significant amount of electricity being wasted on computational trial and error.

[0008] Therefore, blockchain needs a truly fair and energy-efficient new generation mechanism for data storage and protection. Summary of the Invention

[0009] Purpose

[0010] In order to maintain the fairness of blockchain generation while saving a lot of energy, this invention discloses a blockchain system and a corresponding data storage system.

[0011] Specifically, this invention provides a blockchain system comprising multiple network nodes m. Each network node m includes a timing device, a true random number generator, a data storage device, a data communication device, and a computing device. The network nodes communicate and connect with each other through their respective data communication devices to form the blockchain system.

[0012] The timing device is used to perform a block generation countdown based on a preset interval T between adjacent blocks;

[0013] In response to a countdown start command, each of the true random number generators generates a set of true random numbers of a predetermined size as proof of randomness, or selects a set of random numbers of a second predetermined size from the true random numbers it generates as proof of randomness.

[0014] Each of the aforementioned computing devices is used to generate a verification value based on the true random number of the corresponding network node and synchronize it along with the digital signature of that network node to other network nodes;

[0015] The data storage device is used to store data and verification information generated by itself, as well as data and verification information from other network nodes;

[0016] Each network node's computing device is also used to calculate the overall verification value based on the verification values ​​of all network nodes obtained synchronously, according to a first predetermined operation rule. The operation result of the first predetermined operation rule is independent of the operation order of each verification value. Furthermore, it performs an operation on its own verification value and the overall verification value according to a second predetermined operation relationship to determine the operation result. Among the operation results of all network nodes, the network nodes that satisfy the predetermined rules are used as accounting nodes. The accounting nodes generate new blocks based on the data they receive and store at the end of the countdown.

[0017] In a preferred implementation, the computing unit of each network node is further configured to sum the checksums of all network nodes obtained through synchronization, to obtain the sum of checksums SH(n) = ∑ m H(m,n) is obtained, and each network node recalculates the total checksum SH(n) to obtain the overall checksum H. z (n), where m is the network node number and n is the block number that generated the check value.

[0018] In a preferred implementation, the blockchain system further includes an encryption device, which is used to generate a symmetric key for the corresponding network node based on a true random number, and to encrypt data sent by itself based on its own symmetric key, and to decrypt data of other network nodes based on symmetric keys from other network nodes.

[0019] In a preferred implementation, the ledger node is used to send the data of the new block to other network nodes, which then confirm it. After a predetermined number of nodes have verified the data, a consensus on the new block is formed.

[0020] In a preferred implementation, the timing device is used to take the time coordinate t(n+1) of the new block generation as the time point when the new block is completed in this round, and to start the countdown for the next round of block generation from that time point.

[0021] In a preferred implementation, the true random number generator or the computing device selects one or more bytes of random number r from the generated true random number as a selection number, and selects random number R(m,n) for use as proof of randomness.

[0022] In a preferred implementation, the data communication device of each network node m is used to send the verification value and digital signature of the network node m to other network nodes in the form of network broadcast. The encryption devices of other network nodes decrypt the verification value and digital signature using the public key K(m) of the corresponding node and put the verification value H(m,n) into the data list.

[0023] In a preferred implementation, the computing device of each network node is used to calculate its own checksum and the overall checksum H. Z The difference (n) is used to determine the accounting node. The network node whose difference from the overall check value is ranked in a predetermined position among all network nodes is used as the accounting node. Preferably, the predetermined position includes the difference being ranked first or last.

[0024] In a preferred implementation, the communication device of each network node in the blockchain system is used to broadcast its verification value H(m,n) to other network nodes. The computing device of each network node is used to compare the verification value H(m,n) of the current block with the overall verification value H of the previous block. Z The verification value H'(m,n) is obtained by adding (n-1) and the digital signature of the network node, and performing a verification operation. The communication device is also used to broadcast the new verification value H'(m,n) to each network node, and each network node will add the H'(m,n) received from each other network node to the overall verification value H of the previous block. z Subtract from each of the n-1 values ​​to determine the network node whose value of |H(n-1)-H'(m,n)| is in the predetermined position. This network node then obtains the right to generate a new block and becomes the accounting node.

[0025] In a preferred implementation, each network node of the blockchain system synchronizes its own data with other network nodes and confirms the data synchronization status with other nodes every second predetermined time. If the data synchronization is complete, the accounting node is selected; if the data synchronization is not complete, the node continues to wait. Preferably, the verification adopts hash verification, the verification value is a hash value, and the predetermined operation rules include subtraction, addition, or multiplication.

[0026] A data storage system including the blockchain system, wherein each network node includes a data acquisition unit, the data acquisition unit generates or acquires data to be recorded, temporarily stores the data to be recorded, and broadcasts the data to be recorded to other network nodes, each network node generates a data list based on its own data to be recorded and the data received through broadcast, and the blockchain system generates blocks based on the data in the data list.

[0027] The present invention also provides an application of the above-mentioned blockchain system or a method for generating a blockchain using the blockchain system, the application or method comprising:

[0028] Step (1): Set the interval time T between adjacent blocks in the blockchain, and perform a block generation countdown based on the interval time T;

[0029] Step (2): Set up a true random number generator in each network node. Generate a set of true random numbers of a predetermined size through the true random number generator of each network node for use as proof of randomness, or select a set of random numbers of a second predetermined size from the true random numbers generated by each node for use as proof of randomness.

[0030] Step (3): Each network node m generates a corresponding verification value for its own generated true random number, encrypts it with its local private key, and generates a digital signature;

[0031] Step (4): Each network node m synchronizes the verification value and digital signature encrypted with its own private key to other network nodes;

[0032] Step (5): Each network node adds up all the hash values ​​obtained during synchronization to obtain SH(n) = ∑ m H(m,n) is obtained, and each network node recalculates the total checksum SH(n) to obtain the overall checksum H. z (n), where m is the network node number and n is the block number that generated the check value;

[0033] Step (6): Each network node performs calculations on its own verification value and the overall verification value according to a predetermined calculation relationship to determine the calculation result. Based on the relationship between the calculation results of all network nodes, all network nodes select network nodes as accounting nodes according to predetermined rules. When the countdown ends, the accounting node packages the data it receives and stores into a new block.

[0034] On the other hand, the present invention provides a data storage method, characterized in that the method includes:

[0035] Step (1) Each network node generates or receives data to be recorded, temporarily stores the data to be recorded, and broadcasts the data to be recorded to other network nodes. Each network node generates a data list based on the data it generates and the data it receives.

[0036] Step (2): Set the interval T between adjacent blocks in the blockchain, and perform a block generation countdown based on the interval T;

[0037] Step (3): Set up a true random number generator in each network node, and generate a set of true random numbers of a predetermined size through the true random number generator of each network node for use as proof of randomness, or select a set of random numbers of a second predetermined size from the true random numbers generated by each node for use as proof of randomness.

[0038] Step (4): Each network node m generates a corresponding verification value for its generated true random number, encrypts it with its local private key, and generates a digital signature;

[0039] Step (5): Each network node m synchronizes the verification value and digital signature encrypted with its own private key to other network nodes;

[0040] Step (5): Each network node adds up all the hash values ​​obtained during synchronization to obtain SH(n) = ∑ m H(m,n) is obtained, and each network node recalculates the total checksum SH(n) to obtain the overall checksum H. z (n), where m is the network node number and n is the block number that generated the check value;

[0041] Step (6): Each network node performs calculations on its own verification value and the overall verification value according to a predetermined calculation relationship to determine the calculation result. Based on the relationship between the calculation results of all network nodes, all network nodes select network nodes as accounting nodes according to predetermined rules. When the countdown ends, the accounting node packages the data in its own stored data list to generate a new block.

[0042] In a preferred implementation, the application or method further includes:

[0043] Step (7): The accounting node sends the data of the new block to other network nodes, which then confirm it. After more than a predetermined number of nodes have verified the data, a consensus on the new block is formed.

[0044] In a preferred implementation, the application or method further includes using the time coordinate t(n+1) of the new block generation as the time point when the new block is completed in this round, and the countdown for the next round of block generation starts from this time point.

[0045] In a preferred implementation, step (2) in the application or method includes selecting one or more bytes of random number r from the respective generated true random numbers as the selection number, and selecting random number R(m,n) for use as proof of randomness.

[0046] In a preferred implementation, step (4) in the application or method includes each network node m sending the verification value and digital signature encrypted with its own private key to other network nodes in the form of network broadcast. Other network nodes decrypt the verification value and digital signature using the public key K(m) of the corresponding node and put H(m,n) into the data list.

[0047] In a preferred implementation, the process of selecting accounting nodes in step (6) of the application or method includes: each network node calculating its own verification value and the overall verification value H. Z The difference (n) is used to determine the accounting node. The network node whose difference from the overall check value is ranked in a predetermined position among all network nodes is used as the accounting node. Preferably, the predetermined position includes the difference being ranked first or last.

[0048] In a preferred implementation, the process of selecting the accounting node in step (6) of the application or method includes: first broadcasting the verification value H(m,n) of each network node to other network nodes, and then comparing the verification value H(m,n) of the network node in the current block with the overall verification value H of the previous block. Z (n-1) and the digital signature of the network node are added together to perform a verification operation to obtain a new verification value H'(m,n); the new verification value H'(m,n) is broadcast to each network node, and each network node adds the H'(m,n) received from each other network node to the overall verification value H of the previous block. z Subtract from each of the n-1 values ​​to determine the network node whose value of |H(n-1)-H'(m,n)| is in the predetermined position. This network node then obtains the right to generate a new block and becomes the accounting node.

[0049] In a preferred implementation, in the application or method, each network node synchronizes its own data with other network nodes and confirms the data synchronization status with other nodes every second predetermined time. If data synchronization is complete, the process proceeds to the next step. If data synchronization is incomplete, the process continues to wait. Preferably, this step sets a waiting time limit. If data synchronization is still incomplete after the waiting time limit has been reached, the hash values ​​and digital signatures of those network nodes that have been fully acquired by each network node are selected and added to the data list, while the data of those nodes that have not been fully acquired by each network node are discarded.

[0050] In a preferred implementation, the verification in the application or method is a hash verification, the verification value is a hash value, and the predetermined operation rules in step (6) include subtraction, addition, or multiplication.

[0051] Invention principles and technical effects

[0052] True random numbers are generated by physical systems and are also known as hardware random numbers. Because true random numbers originate from the true randomness of the physical world and are independent of computation, they can resist prediction and cracking by any algorithm, which makes them widely used in the field of information security.

[0053] True random number generator hardware can be divided into two categories based on the principle of randomness generation: classical random number generators (TRNGs) and quantum random number generators (QRNGs). Classical random number generators utilize noise from macroscopic physical quantities, such as thermal noise in circuits, current noise from electronic components, frequency jitter noise from crystal oscillators, and external electromagnetic noise. Because the noise sources of classical random number generators are sensitive to the surrounding environment, and because they are relatively large and consume significant power when implemented as chip devices, they are primarily designed as PCI boards for use in more stable environments, such as servers and desktop computers.

[0054] Most quantum random number generators use quantum noise as the source of random numbers, such as photon path selection shot noise and photon arrival time shot noise. Because quantum random number generators often use weak light systems, the size and power consumption of the chip-based devices are relatively small. Furthermore, the shot noise of photons is insensitive to external temperature and electromagnetic environments, making them suitable for use in mobile terminals such as smartphones, tablets, in-vehicle computers, and laptops. For example, the quantum random number chip designed by SKT-IDQ and manufactured by Samsung is already widely used in Samsung Galaxy Quantum series phones.

[0055] This invention provides real-time truly random numbers to fixed and mobile computer terminals by setting up a truly random number chip device at each network node. After the terminal generates a fixed-length truly random number, it first performs a randomness check based on the international standard for truly random numbers using the installed blockchain software. Only after passing the check does the blockchain system further select a random array of a specific length from the random number for verification operations, such as hash operations, to obtain an immutable verification value H(m,n). This verification value is encrypted using an asymmetric private key and sent to each network node along with a digital signature. Here, m is the network node number, starting from 1; n is the block number that generated the verification value, arranged in chronological order; subsequent verification values ​​are described using hash values ​​as an example.

[0056] When there are few network nodes, and each network node can obtain the hash values ​​of other nodes (i.e., data is completely synchronized), this invention uses a method of arranging all node hash values ​​according to node number and performing a secondary hash operation on each network node to obtain a unified hash value H. z (n), and subtract it from the hash value H(m,n) from each network node to obtain |H z The network node with the minimum value of (n)-H(m,n) wins and gains the right to generate blocks in this round. The transaction data recorded by this node is then included in the newly generated block.

[0057] When there are many network nodes, and some nodes have not all obtained the hash values ​​of other nodes (i.e., the data is not fully synchronized), this invention uses the hash value H(m,n) of each network node to first broadcast to other nodes, and then H(m,n) is compared with the hash value H of the previous block. z The hash value H'(m,n) is obtained by adding (n-1) and the digital signature of the node, and then performing a hash operation. H'(m,n) is then broadcast to all nodes, and each network node combines the received H'(m,n) with H'(m,n) from other nodes. z The network node that obtains the minimum value of |H(n-1)-H'(m,n)| after subtracting (n-1) wins the right to generate blocks in this round if it receives confirmation from more than 51% of the network nodes.

[0058] Technical effect

[0059] The blockchain system of this invention generates verification values ​​based on true random numbers, which can not only obtain tamper-proof verification values ​​H(m,n), but also achieve rapid and regular generation of new blocks. While ensuring data security, it reduces the amount of computation and power consumption, greatly improves the ease of application of blockchain technology, and has great application value. Attached Figure Description

[0060] The accompanying drawings provided below are primarily for illustrative purposes to further understand the present invention and constitute a part of this invention. The illustrative embodiments and descriptions of the present invention are used to explain the invention and do not constitute an improper limitation of the invention. In the drawings:

[0061] Figure 1 This is a schematic diagram of the architecture of the blockchain system of the present invention;

[0062] Figure 2 The process of generating a blockchain using randomness proof in a fully synchronized data state.

[0063] Figure 3 This refers to the process of generating a blockchain using random proof in a state of incomplete data synchronization.

[0064] Figure 4 This refers to the process by which nodes use truly random numbers to encrypt block data for secure communication during the blockchain generation process. Detailed Implementation

[0065] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0066] The specific embodiments of the present invention are mainly provided to facilitate a further understanding of the present invention and constitute a part of the present invention. The illustrative embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation of the present invention.

[0067] Example 1

[0068] like Figure 1 As shown, this embodiment provides a blockchain system, which includes multiple network nodes m. In this embodiment, four nodes are used as an example. The four nodes can be interconnected using a star network or a ring network. Each network node includes a timing device 101, a true random number generator 102, a data storage device 103, a data communication device 104, and a computing device 105. The network nodes communicate and connect with each other through their respective data communication devices to form a blockchain system.

[0069] The timing device 101 is used to perform a block generation countdown based on a preset interval T between adjacent blocks. The timing device 101 can be integrated into the CPU of the computing device or exist independently.

[0070] Each of the true random number generators 102, in response to a countdown start command, such as a system start command issued by the control unit of the blockchain system, generates a set of true random numbers of a predetermined size for use as proof of randomness, or selects a set of random numbers of a second predetermined size from the true random numbers generated by itself for use as proof of randomness.

[0071] Each of the aforementioned computing devices 105 is used to generate a verification value based on a true random number from the corresponding network node, and synchronize it along with the digital signature of that network node to other network nodes. The computing device 105 here can be used solely for computation, or it can also perform control functions; for example, it can be implemented by the CPU of a network node.

[0072] The data storage device 103 is used to store data and verification information generated by itself, as well as data and verification information from other network nodes.

[0073] The computing unit 105 of each network node is also used to add the check values ​​of all network nodes obtained through synchronization, to obtain the sum of check values ​​SH(n) = ∑ m H(m,n) is obtained, and each network node recalculates the total checksum SH(n) to obtain the overall checksum H. z (n), where m is the network node number and n is the block number that generated the check value.

[0074] Each network node's computing device is also used to perform calculations on its own verification value and the overall verification value according to a predetermined calculation relationship to determine the calculation result. Among the calculation results of all network nodes, the network node that meets the predetermined rules is used as the ledger node. The ledger node generates a new block based on the data it has received and stored at the end of the countdown. The ledger node is also used to send the data of the new block to other network nodes for confirmation. After the other network nodes confirm the data, a consensus on the new block is formed when more than a predetermined number of nodes have passed the verification.

[0075] The blockchain system also includes an encryption device, which is used to generate a symmetric key for the corresponding network node based on a true random number, and to encrypt the data sent by itself based on its own symmetric key, and to decrypt the data of other network nodes based on the symmetric keys from other network nodes.

[0076] The timing device 101 is used to take the time coordinate t(n+1) of the new block generation as the time point when the new block is completed in this round, and to start the countdown for the next round of block generation from this time point.

[0077] The true random number generator 102 or the computing device 105 is used to select one or more bytes of random number r from the generated true random numbers as the selection number, and select random number R(m,n) for use as proof of randomness.

[0078] The data communication device 104 of each network node m is used to send the verification value and digital signature of the network node m to other network nodes in the form of network broadcast. The encryption devices of other network nodes decrypt the verification value and digital signature using the public key K(m) of the corresponding node and put the verification value H(m,n) into the data list.

[0079] The computing device 105 of each network node is used to calculate its own checksum and the overall checksum H. Z The difference (n) is used to determine the accounting node. The network node whose difference from the overall check value is ranked in a predetermined position among all network nodes is used as the accounting node. Preferably, the predetermined position includes the difference being ranked first or last.

[0080] When there are too many network nodes to achieve complete synchronization, the communication device of each network node in the blockchain system broadcasts its verification value H(m,n) to other network nodes. The computing device 105 of the network node then compares the verification value H(m,n) of the current block with the overall verification value H of the previous block. ZThe new verification value H'(m,n) is obtained by adding (n-1) and the digital signature of the network node, performing a verification operation; the communication device 104 broadcasts the new verification value H'(m,n) to each network node, and each network node adds the H'(m,n) received from each other network node to the overall verification value H of the previous block. z Subtract from each of the n-1 values ​​to determine the network node whose value of |H(n-1)-H'(m,n)| is in the predetermined position. This network node then obtains the right to generate a new block and becomes the accounting node.

[0081] Each network node in the blockchain system synchronizes its own data with other network nodes in real time, and confirms the data synchronization status with other nodes every second predetermined time. If the data synchronization is completed, the accounting node is selected; if the data synchronization is not completed, the process continues to wait. Preferably, the verification adopts hash verification, the verification value is a hash value, and the predetermined operation rules include subtraction, addition, or multiplication.

[0082] The following details the process by which the blockchain system of this invention generates a blockchain:

[0083] Step 1: New block generation countdown preparation

[0084] In this embodiment, "proof of randomness" is used as the basis for block generation. Using proof of randomness requires first setting the interval T between blocks, i.e., the blockchain generation cycle, which is controlled by a timing device 101. The time interval is typically set between 10 and 30 minutes. Without setting an interval, the blockchain generation speed cannot be controlled, thus making it impossible to prevent "Syllabic attacks." Let T = t(n) - t(n-1), where t(n) is the absolute time coordinate of the nth block's generation, unified by the global computer time system. For example, the (n+1)th block starts its countdown from the time coordinate t(n) of the previous block's generation. The generation time of the first block is then the system startup time.

[0085] After the countdown for new block generation begins, new nodes can join the network. Joining is done using asymmetric cryptography, such as generating a truly random initialization vector G and a private key k using a quantum random number chip, and calculating the public key K using elliptic curve cryptography (ECC). The new node broadcasts its public key K to other network nodes and also encrypts its joining time, node ID, IP address, and other information using its private key k, broadcasting this information to all nodes as well. Other nodes decrypt the new node's information using its public key K, thus completing the new node's authentication.

[0086] In this way, each network node will record the public keys of all other network nodes, and each network node has its own private key. Each network node encrypts the data it generates (here, "generated" refers to the data to be recorded that the node processes or receives but does not come from other network nodes) using its private key, and then broadcasts it. Other nodes decrypt and record the data using their public keys.

[0087] Step 2: Generating True Random Numbers in Network Node Hardware

[0088] Each network node's true random number generator 102 generates a set of 32MB = 256Mb true random numbers. The generator 102 can employ a classical random number source (TRNG) or a quantum random number chip (QRNG). For example, a 1Mb quantum random number chip in a mobile device takes approximately 4.3 minutes to generate random numbers, while a 250kb quantum random number chip takes approximately 17 minutes. Therefore, the blockchain generation cycle T is longer than the true random number generation time of each network node.

[0089] Step 3: Verify true random number generation in network node software

[0090] At each network node m, the true random number generator 102 or the computing device 105 performs a randomness check on the locally generated 256Mb of true random numbers to prevent nodes from cheating using pseudo-random numbers. The check can employ international standards, such as NIST's 16 random number testing methods. Only if all tests pass is the generated random number considered a true random number, and the random number is divided into 256 groups, each 1Mb. The blockchain software then obtains a one-byte random number r from the hardware's true random number generator as the selection number for that network node. From the generated 256Mb random numbers, it selects a random number R(m,n) for randomness proof. For example, when r = 128, the 129th group of 1Mb random numbers is selected for R(m,n).

[0091] Step 4: Network node true random number and digital signature hash algorithm

[0092] The computing device 105 of network node m generates a verification value for its true random number R(m,n) using a preset verification algorithm, such as using the SHA-256 algorithm to calculate a 256-bit hash value H(m,n), and encrypts it using its local private key k(m). Simultaneously, the node uses k(m) to create a digital signature C(m), the content of which can be the generation time information of R(m,n). Asymmetric key methods can be used between network nodes, where each network node m's public key K(m) is sent to other nodes via communication device 104, and the public key K(m) is used to decrypt the content encrypted by the corresponding network node. Alternatively, a quantum key distribution (QKD) scheme can be used between network nodes, where node m's private key k(m) can reach every other network node through a quantum key distribution network for direct decryption.

[0093] Step 5: Network node hash value data synchronization

[0094] Network node m transmits its hash value H(m,n) encrypted with its private key k(m) and digital signature C(m) to other network nodes via network broadcast through communication device 104. Other network nodes decrypt the hash value and digital signature using network node m's public key K(m) and add H(m,n) to their data list. Each network node needs to synchronize its data; that is, each network node obtains the hash values ​​and digital signatures of all network nodes that have completed steps 2 to 4 in this round. Each network node confirms its data synchronization status with other nodes at regular intervals (e.g., 30 seconds). If data synchronization is complete, it proceeds to the next step. If data synchronization is incomplete, it continues to wait. This step can have a waiting time limit, for example, until the countdown ends T / 10. If data synchronization is still incomplete by this time limit, the hash values ​​and digital signatures of those network nodes that have been fully obtained by each network node are added to the data list, while the data of those nodes that have not been fully obtained by each network node are discarded.

[0095] Step 6: Collective Double Hash Algorithm

[0096] With complete data synchronization, each network node possesses the hash values ​​and digital signatures of all network nodes involved in this round of blockchain generation. At this point, the computing device 105 of each network node sums the hash values ​​of all network nodes, obtaining the sum of hash values ​​SH(n) = ∑ m The advantage of this addition method, H(m,n), is that it satisfies the commutative law, meaning that regardless of the arrangement of the data lists of each network node, the same SH(n) will be obtained. Then, each network node performs another round of the SHA-256 algorithm on SH(n) to obtain a unified hash value H. z (n). Nodes mutually confirm that they have obtained the same overall H. z (n).

[0097] Step 7: Hash value comparison to select a new block generation node

[0098] This step is for determining the accounting node. Each network node calculates H. z (n) is the difference between its own hash value and the hash values ​​of other network nodes, i.e., |H z (n)-H(m,n)|, then, compare the differences of all hash values, and the network node corresponding to the smallest difference is selected as the accounting node for this round, or sort all the differences of hash values ​​and set the network node in the predetermined position as the accounting node. Since the hash value and digital signature of each network node are encrypted with its own private key, they are non-repudiable. When a network node's blockchain software obtains its own hash value and the overall hash value H, z The node with the smallest difference (n) becomes the "winning" node, automatically obtains the right to record transactions, packages its stored transaction data into the next block, officially generates a new block, and stores it in the data storage device 103.

[0099] Step 8: Confirm the network node for generating the new block

[0100] The network node that generates the new block sends the block data to other network nodes for confirmation. Once more than 51% of the nodes have verified the data, a consensus for the new block is formed. The time coordinate t(n+1) of the new block generation contained in the new block data is the completion time of this round of new block generation, and the countdown for the next round of block generation also starts from this time. Generally, the actual time coordinate t(n) of the new block generation is slightly earlier than the completion of the countdown period T of this round, and the actual time coordinate is used. In special cases where the network is not smooth, the countdown period T may have expired, but the node consensus may not yet be completed. In this case, the time coordinate of the new block is t(n+1) = t(n) + T, and the countdown for the next round of block generation begins. The consensus of the network nodes on the new block can partially overlap with the time when each node obtains a true random number in the next round, that is, the consensus for the new block is formed before the completion of step 2 in the next round. Each other network node stores the new block in its own data storage device 103.

[0101] Preferably, in data communication, since the nodes are equipped with a true random number generator, the true random number can be used as a symmetric key and transmitted using an asymmetric key to encrypt block data, thereby making data transmission in the blockchain network more secure. The specific method is as follows:

[0102] (1) Taking network nodes a and b as examples, after network node a generates a random number and verifies it, it selects a fixed-length random number from the random numbers used for verification as the symmetric key while proving its randomness. Each network node uses a different random number as the symmetric key for each other node. For example, let k be the symmetric key generated by network node a and network node b. ab .

[0103] (2) Network node a uses the public key K from network node b. b Encryption k ab And send it to network node b.

[0104] (3) Network node b uses its own private key k b Decrypt k ab .

[0105] (4) Network node b uses the symmetric key k of network node a. ab Encrypt the record data that you are preparing to write into the new block and send it to network node a.

[0106] (5) Network node a uses symmetric key k ab Decrypt the recorded data from network node b, and prepare to write it into a new block.

[0107] (6) The network node that wins the randomness proof gets the right to record the new block and writes all the record data from other network nodes that have been decrypted with the symmetric key into the new block.

[0108] Example 2

[0109] When there are many network nodes and complete synchronization cannot be achieved, this embodiment provides another alternative solution.

[0110] This embodiment addresses the scenario of incomplete data synchronization with a large number of network nodes. The specific implementation method for generating the blockchain in this embodiment is the same as steps 1 to 4 in the complete data synchronization scenario with fewer network nodes in Embodiment 1. From step 5 onwards, the following implementation method is adopted:

[0111] Step 5: Broadcasting network node hash values

[0112] For each network node m, it first sends the hash value H(m,n) encrypted with its private key k(m) and the digital signature C(m) to other network nodes via network broadcast. Other nodes decrypt the hash value and digital signature using network node m's public key K(m) and add the hash value H(m,n) to their data list. Since the number of network nodes is relatively large, network node m cannot wait for all other nodes to return confirmation data; therefore, it automatically proceeds to the next step after the data broadcast.

[0113] Step 6: Double hashing algorithm between network node and previous block hash value

[0114] Network node m combines its own 256-byte hash value H(m,n) with the overall 256-byte hash value H of the previous block. z Arrange the blocks in (n-1)-fold order to obtain a 512-bit array SH(m,n). Then perform a SHA-256 operation on this array to obtain a new 256-bit hash value H'(m,n). This hash value is encrypted using the network node m's private key k(m) and broadcast along with the network node m's digital signature C(m) to other network nodes. Other network nodes can then use the overall hash value H' of the previous block. z To verify the consistency between the original hash value H(m,n) and the merged new H'(m,n) using (n-1) steps, the following steps are performed on all network nodes in the same manner as described above: The original 256b hash value H(m,n) of the corresponding network node is compared with the overall 256b hash value H' of the previous block. z Arrange the (n-1) elements in sequence to obtain a 512-bit array SH(m,n). Then perform a SHA-256 operation on this array to obtain a new 256-bit integrated hash value H'(m,n).

[0115] Step 7: Threshold determination and new block generation verification

[0116] When a network node m meets the following conditions: (1) it obtains more than 50% of the original hash values ​​H(m,n) and integrated hash values ​​H'(m,n) of all nodes in the entire blockchain network; (2) after calculation, the network node m's own |H'(m,n)-H(m,n)| is the smallest among all nodes, or it is ranked in a specific position according to the order of data size, then the node automatically exercises the right to record transactions, that is, it packages the transaction data it stores into a new block. Then it sends the new block and the network node m's own digital signature to other network nodes. In the case of network congestion, if no node meets condition (1) when the countdown T for block generation in this round ends, then all network nodes' random numbers and hash values ​​in this round are invalid, each node returns to the beginning of step 1, and the time coordinate of this round of blocks is increased by T accordingly.

[0117] Step 8: Consensus selection to generate new block network nodes

[0118] If multiple nodes in step 7 satisfy conditions (1) and (2), and generate new blocks and send them to multiple network nodes, then there will inevitably be a network node that simultaneously receives messages from multiple nodes defining itself as a ledger node. In this case, the network nodes need to further reach a consensus: multiple blocks satisfying the conditions undergo a PK process on each node, and the node with the smallest |H'(m,n)-H(m,n)| wins, and its newly recorded block becomes the new consensus block. Each node broadcasts confirmation of this block, and after more than 50% of the nodes confirm, a new block consensus is formed. This step can be completed within the time it takes for each node to obtain a truly random number in the next round, meaning that the consensus for this round of new blocks is formed before step 2 in the next round is completed.

[0119] Example 3

[0120] This embodiment provides a system and method for distributed data storage and encrypted communication based on blockchain. Since new block generation only requires a low-power chip to provide hardware random numbers, it eliminates the need for consuming large amounts of power for proof-of-work. The data recorded on the blockchain in this embodiment can be used for storing various types of data. For example, it can effectively and distributedly record various types of fixed asset information, intellectual property information, household registration information, and student registration information, enabling blockchain to better serve society.

[0121] The system in this embodiment uses the system of Embodiment 1, but the system's working process is as follows:

[0122] Step (1) Each network node generates or acquires data to be recorded, temporarily stores the data to be recorded through the data storage device 103, and broadcasts the data to be recorded to other network nodes. Each network node generates a data list based on its own data to be recorded and the data received through broadcast.

[0123] Step (2): The timing device 101 sets the interval time T between adjacent blocks in the blockchain and performs a block generation countdown based on the interval time T.

[0124] Step (3): Each network node's true random number generator 102 generates a set of true random numbers of a predetermined size for use as proof of randomness, or selects a set of random numbers of a second predetermined size from the true random numbers it generates for use as proof of randomness.

[0125] Step (4): Each network node m generates a corresponding verification value for its generated true random number, encrypts it with its local private key, and generates a digital signature;

[0126] Step (5): Each network node m synchronizes the verification value and digital signature encrypted with its own private key to other network nodes;

[0127] Step (5): Each network node adds up all the hash values ​​obtained during synchronization to obtain SH(n) = ∑ m H(m,n) is obtained, and each network node recalculates the total checksum SH(n) to obtain the overall checksum H. z (n), where m is the network node number and n is the block number that generated the check value;

[0128] Step (6): Each network node performs calculations on its own verification value and the overall verification value according to a predetermined calculation relationship to determine the calculation result. Based on the relationship between the calculation results of all network nodes, all network nodes select network nodes as accounting nodes according to predetermined rules. When the countdown ends, the accounting node packages the data in its own stored data list to generate a new block. Preferably, the method also includes the features and steps that further limit the blockchain generation method in Embodiments 1 and 2.

[0129] In other words, regarding data storage, during the generation of truly random numbers, each network node also sends its recorded data to other network nodes for synchronous storage. The node that wins the randomness proof automatically gains the right to record new blocks and generates new blocks from its stored data. To prevent some nodes from tampering with the data, a "credit value" bound to the private key can be introduced into the block; the initial value for newly joined nodes is 0. Each time a node wins the randomness proof, it receives a credit value increase as a reward after the data in its generated block is verified by other nodes. The credit value is bound to each network node.

[0130] When data is tampered with in a block and detected by other nodes, the node that tampered with the data is penalized by having its credit score reduced and being barred from participating in blockchain generation for a corresponding period. If the node that tampered with the data happens to be the winning node in this round, then this round of blockchain generation is invalidated, and the blockchain reverts to the previous block to start generating again. In this case, the node's credit score becomes negative, and it is permanently excluded from the blockchain.

[0131] In data communication, because nodes are equipped with true random number generators, they can use these true random numbers as symmetric keys and transmit them using asymmetric keys to encrypt block data, thus making data transmission in the blockchain network more secure. The specific method is as follows:

[0132] (1) After network node a completes the randomness test, it selects a fixed-length random number from the random numbers used for the test as the symmetric key while proving randomness. A different random number is used as the symmetric key for each of the other nodes. For example, the symmetric key with network node b is denoted as k. ab .

[0133] (2) Network node a uses the public key K from network node b. b Encryption k ab And send it to network node b.

[0134] (3) Network node b uses its own private key k b Decrypt k ab .

[0135] (4) Network node b uses k ab Encrypt the record data that you are preparing to write into the new block and send it to network node a.

[0136] (5) Network node a uses k ab Decrypt the recorded data from network node b, and prepare to write it into a new block.

[0137] (6) The network node that wins the randomness proof gets the right to record the new block and writes all the record data from other network nodes that have been decrypted with the symmetric key into the new block.

[0138] It should be noted that although the devices for performing various functions have been described in the various embodiments of the present invention, those skilled in the art should understand that the devices in the blockchain system of the present invention can perform more functions, or the functions of each device in the system can be performed by other devices, or the timing device 101, data storage device 103 and computing device 105 can be implemented by computer equipment, without setting up separate timing devices 101, data storage devices 103 and computing devices 105.

[0139] Although the principles of the present invention have been described in detail above with reference to preferred embodiments, those skilled in the art should understand that the above embodiments are merely illustrative explanations of the implementation of the present invention and are not intended to limit the scope of the present invention. The details in the embodiments do not constitute a limitation on the scope of the present invention. Any obvious changes, such as equivalent transformations or simple substitutions, based on the technical solutions of the present invention without departing from the spirit and scope of the present invention fall within the protection scope of the present invention.

Claims

1. A blockchain system, characterized in that, The blockchain system includes multiple network nodes m. Each network node m includes a timing device, a true random number generator, a data storage device, a data communication device, and a computing device. The network nodes communicate and connect with each other through their respective data communication devices to form the blockchain system. The timing device is used to perform a block generation countdown based on a preset interval T between adjacent blocks. The timing device uses the time coordinate t(n+1) of the new block generation as the completion time point of the current round of new block generation, and starts the countdown for the next round of block generation from this time point. Each true random number generator, in response to the countdown start command, generates a set of true random numbers of a predetermined size for randomness proof, or selects a set of random numbers of a second predetermined size from its generated true random numbers for randomness proof. Each computing device is used to perform calculations based on the true random numbers of the corresponding network node. The generated verification value, along with the network node's digital signature, is synchronized to other network nodes. The data storage device is used to store the data and verification information generated by the node itself, as well as the data and verification information from other network nodes. Each network node's computing device is also used to calculate the overall verification value based on the synchronized verification values ​​of all network nodes according to a first predetermined computing rule, or to obtain the overall verification value of the previous block. The result of the first predetermined computing rule is independent of the order of operations of each verification value. Furthermore, the node's own verification value and the overall verification value are calculated according to a second predetermined computing relationship to determine the result. Among the results of all network nodes, the network node that satisfies the predetermined rule is used as the ledger node. The ledger node generates a new block based on the data it receives and stores at the end of the countdown. Each network node's computing device is used to calculate its own verification value and the overall verification value H. Z The difference (n) is used to determine the accounting node. The network node whose difference from the overall check value is ranked in a predetermined position among all network nodes is used as the accounting node. The predetermined position includes the difference being ranked first or last.

2. The blockchain system according to claim 1, characterized in that, The computing unit of each network node is also used to add the checksums of all network nodes obtained through synchronization, to obtain the sum of checksums SH(n) = Furthermore, each network node recalculates the sum of the obtained checksums SH(n) to obtain the overall checksum H. z (n), where m is the network node number and n is the block number that generated the check value.

3. The blockchain system according to claim 1 or 2, characterized in that, It also includes an encryption device, which is used to generate a symmetric key for the corresponding network node based on a true random number, and to encrypt its own data based on its own symmetric key, and to decrypt the data of other network nodes based on the symmetric keys from other network nodes.

4. The blockchain system according to claim 1 or 2, characterized in that, The true random number generator or the computing device is used to select one or more bytes of random number r from the generated true random number as the selection number, and select random number R(m,n) for use as proof of randomness.

5. The blockchain system according to claim 1 or 2, characterized in that, The data communication device of each network node m is used to send the verification value and digital signature of the network node m to other network nodes in the form of network broadcast. The encryption devices of other network nodes decrypt the verification value and digital signature using the public key K(m) of the corresponding node and put the verification value H(m,n) into the data list.

6. The blockchain system according to claim 1 or 2, characterized in that, Each network node's communication device is used to broadcast its checksum H(m,n) to other network nodes. The network node's processing device is used to compare the checksum H(m,n) of the current block with the overall checksum H of the previous block. Z The verification value H'(m,n) is obtained by adding (n-1) and the digital signature of the network node, and performing a verification operation. The communication device is also used to broadcast the new verification value H'(m,n) to each network node, and each network node will add the H'(m,n) received from each other network node to the overall verification value H of the previous block. z Subtracting from each of the n-1 values, the network node whose value of |H(n-1)-H'(m,n)| is in the predetermined position is determined, and it obtains the right to generate the new block. It becomes the ledger node, which is used to send the data of the new block to other network nodes for confirmation. After more than a predetermined number of nodes have verified the data, a consensus on the new block is formed.

7. The blockchain system according to claim 1, characterized in that, Each network node synchronizes its own data with other network nodes and confirms the data synchronization status with other nodes every second predetermined time. If the data synchronization is complete, an accounting node is selected; if the data synchronization is not complete, the node continues to wait. Preferably, the verification adopts hash verification, the verification value is a hash value, and the predetermined operation rules include subtraction, addition, or multiplication.

8. A data storage system comprising the blockchain system according to any one of claims 1-7, characterized in that, Each network node includes a data acquisition unit, which generates or acquires data to be recorded, temporarily stores the data to be recorded, and broadcasts the data to be recorded to other network nodes. Each network node generates a data list based on its own data to be recorded and the data received through broadcasting. The blockchain system generates blocks based on the data in the data list.

Citation Information

Patent Citations

  • Consensus system and method based on device-independent quantum random number

    CN114598477A