Quantum random number common chain consensus method based on Q-Alternand
By introducing quantum random numbers and public key cryptography protection into the Algorand blockchain consensus mechanism, the problem of random numbers being susceptible to attack and network congestion is solved, and higher security and efficiency are achieved.
Patent Information
- Application Number
- CN202411433944.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing Algorand blockchain consensus mechanism, random number seed remains unchanged in a round of consensus, which is easily controlled by attackers, affecting the security of the lottery algorithm; at the same time, the gossip protocol transmits large blocks of data, resulting in network congestion.
Quantum random number generation and transmission are adopted to protect the authenticity of random numbers through public key cryptography, and improve the security of the consensus mechanism; in block transmission, gossip protocol is used and private key signatures are used to ensure the authenticity of transaction information, reducing the network congestion.
Through the unpredictability of quantum random numbers, the randomness and security of the consensus process can be enhanced to effectively resist DDOS attacks; at the same time, network congestion is reduced and the efficiency of blockchain network is improved.
Smart Images

Figure CN119420474A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a quantum random number shared chain consensus method based on Q-Algorand, belonging to the field of blockchain. Background Art
[0002] The Algorand blockchain consensus mechanism was proposed by Professor Silvio Micali, a Turing Award winner. It is a blockchain consensus mechanism that uses POS and has the advantages of low energy consumption and high efficiency. Since Algorand uses a verifiable random function (VRF) lottery algorithm with zero knowledge, all nodes can determine whether they are selected to participate in the consensus without interaction, thereby improving security and fairness. The Byzantine Agreement (BA★) in Algorand uses the Reduction algorithm in the first step, so that the input of the node initBA will be reduced to the highest priority block or empty block. The Algorand mechanism proposes strong synchronization and weak synchronization to ensure the efficiency and security of the algorithm.
[0003] However, the random number seed used by the lottery algorithm remains unchanged in a round of consensus. Attackers can control the VRF value by trying different private keys and thus affect the lottery algorithm. Although Algorand uses pre-selected keys to resist attacks, it cannot completely prevent attackers from using the above method to control the VRF value. Moreover, in Algorand, the gossip protocol transmits blocks larger than 1MB in size. A large number of blocks are proposed by block proposers and propagated through the gossip protocol, which will cause network congestion. Especially when there are a large number of users, network congestion will become particularly prominent. Summary of the invention
[0004] Purpose of the invention: In order to overcome the deficiencies in the prior art, the present invention provides a quantum random number shared chain consensus method based on Q-Algorand. The generation and transmission of quantum random numbers will be protected by public key cryptography to ensure the authenticity of the random numbers, thereby improving the security of the consensus mechanism.
[0005] Technical solution: To solve the above technical problems, the present invention provides a quantum random number shared chain consensus method based on Q-Algorand, comprising the following steps:
[0006] (1) The quantum random number generator generates a quantum random number. The nodes participating in the consensus receive the random number and signature, verify the signature, and use the random number as the random number used by the lottery algorithm;
[0007] (2) Q-Algorand block generation and broadcasting;
[0008] (3) Obtain the quantum random number participating in the consensus step from the super node. The node executes the secret lottery algorithm to check whether it is a witness committee member. If so, it executes the Reduction algorithm to vote on which block has the highest priority in the entire network and reach a consensus. N potential blocks are converged to at most one non-empty block. The BinaryBA* algorithm is executed to vote multiple times on the blocks converged by the Reduction process. If the network condition is good, the FINAL consensus can be reached in the first step.
[0009] Preferably, the step 1) comprises the following steps:
[0010] (1-1) The quantum random number generator is deployed inside the super node;
[0011] (1-2) The super node uses elliptic curve cryptography to generate a public-private key pair, where the private key SK is stored locally and the public key PK is stored in all other nodes in the super node group. Each super node stores the public keys of other super nodes.
[0012] (1-3) Randomly select a super node in the super node group to generate a quantum random number QR. The super node then uses the verifiable random function VRF to generate a zero-knowledge proof proof and value for the generated random number QR, where (proof, value) = VRF (SK, QR)), and then broadcasts proof and value, where proof and value are the output values of the VRF function;
[0013] (1-4) After receiving proof, value and QR, the other super nodes use the verification function verify to determine whether the quantum random number is generated by the selected super node. The verification format is: value'=verify(proof, PK, QR). It determines whether value is equal to value'. If they are equal, the authenticity of the quantum random number is recognized. If the verification fails, the authenticity of the quantum random number is not recognized (the relevant data proof, value, QR are discarded).
[0014] (1-5) After the quantum random number generated by the selected super node is verified, the random number is signed using the ring signature technology;
[0015] (1-6) The nodes participating in the consensus receive the random number and signature. Once the signature is verified, the random number is used as the random number for the lottery algorithm.
[0016] Preferably, the steps (1-5) comprise the following steps:
[0017] (1-5-0) Select an elliptic curve. There are many algorithms for selecting an elliptic curve. The most widely used and simplest one is the random selection method, and publish the elliptic curve generator G;
[0018] (1-5-1) Assume that the number of super nodes is n, and the super node Ri generates n-1 random numbers, i = i, 2…n, and the random number set R′ = [r1, r2, r3, r i-1 , r i+1 , ..., r n ], where the random number corresponds to the public key one by one, r i The corresponding signer’s random number, let R = R′∪r i ;
[0019] (1-5-2) Public key set PK = [P1, P2, ..., P i , ..., P n ], signed with n public keys, P i is the signer's public key;
[0020] (1-5-3) Super Node R i Generate a random number k, there exists a scalar c i , satisfying k*G=r i G+c i *P i , for a known G and public key P i , if we know c i and k, we can calculate r i , and calculate k*G;c i and k are known to the generator but unknown to others.
[0021] (1-5-4) According to the recursive formula c x =Hash(m, r x-1 *G+C x-1 *P x-1 ) Calculate c x , x∈[1,n], thus c is calculated i and r i , m is the message; x0, C0 and P0 are system defined and are initial parameters;
[0022] (1-5-5) The signer broadcasts the information {c1, PK, R};
[0023] (1-5-6) The verifier calculates c based on the message m and {c2,PK,R} x =Hash(m, r x-1 *G+C x-1 *P x-1 ), find c2, c3, ..., c in sequencen Finally, calculate c1', and then determine whether c1 is equal to c1'. If they are equal, the signature is valid. c1' is calculated by the verifier, and c1 is broadcast. The verifier determines whether the message has been modified during the propagation process by whether c1 is equal to c1'.
[0024] Preferably, the step 2) comprises the following steps:
[0025] (2-1) The transaction information generated by each node is broadcast through the gossip protocol. The transaction information is signed by the node private key. When a node receives a transaction, it first checks whether it has been forwarded. If it has been forwarded, it discards the message; otherwise, it forwards the transaction information.
[0026] (2-2) The node executes the secret lottery algorithm to check whether it is selected as the block proposer. The block proposer packages the transaction information in its own transaction pool to generate a block, writes the quantum random number participating in the consensus in this step into the block header, and calculates the seed_root field of this round of blocks based on the seed_root field in the block header of the block generated in the previous round of consensus. First, the generated block is uploaded to ipfs, and ipfs returns the hash value cid of the block. The block proposer broadcasts the lottery information and cid.
[0027] In the present invention, the quantum random number generator super node generates random numbers for each round of consensus and broadcasts them to the global consensus nodes. Randomness is an intrinsic property of quantum. The state of a quantum (which can be a certain material particle) after a period of evolution cannot be accurately predicted and has nothing to do with any external factors. The state of the particle is random, such as magnetic quantum number, spin, and principal quantum number. Each state is calibrated in advance to correspond to a number, and then measured to obtain a string of true random numbers. Quantum random numbers are generated by the built-in quantum random number generator of the super node and used in the Q-Algorand consensus process. Due to the unpredictable nature of quantum random numbers, the randomness of the consensus process can be guaranteed, thereby preventing attackers from controlling the generation of voting users in the Q-Algorand consensus round. The quantum random number is transmitted from the super node to the nodes participating in the consensus, and public key cryptography needs to be used for signature authentication to prevent false or even malicious nodes from forging random numbers and then destroying the consensus. The super node stores the public keys of all other super nodes, and the private key of the super node is only saved locally. Before each round of consensus, the super node will use the quantum random number generator to generate a true random number, and use the public key list stored in the super node and its own private key to generate a signature for the random number. The signature uses the ring signature technology, and the outside world cannot know which super node generated the random number. Only signatures are used here because random numbers are used globally and there is no confidentiality requirement, but there are quite high requirements for authenticity.
[0028] In the present invention, the consensus node receives a random number from a supernode, and first verifies the received signature according to the supernode public key list to avoid man-in-the-middle attacks. After the signature verification is passed, the random number will be used for consensus, and the random number will be used for the verifiable random function (VRF) in the cryptographic lottery in the consensus mechanism. The supernode group will use the trusted execution environment (TEE) and the verifiable random function (VRF) to resist malicious behaviors such as attackers impersonating and modifying a supernode. Each supernode will generate a quantum random number QR, and then broadcast vrf, Proof (vrf, Proof = VRF (sk, QR)) to the supernode group. After receiving the broadcast, the remaining supernodes will use vrf' = verify (proof, pk, QR) and determine whether vrf and vrf' are equal to determine whether the supernode is legal.
[0029] In the present invention, the blockchain network broadcasts messages through the gossip protocol, and the transactions generated by the nodes should be signed with private keys to ensure authenticity and integrity. The transaction information generated by each node is broadcast through the gossip protocol, and the transaction information is signed by the node private key to ensure the authenticity and integrity of the transaction. When the node receives the transaction, it first checks whether it has been forwarded. If it has been forwarded, the message is discarded; otherwise, the transaction information is forwarded. The node executes the secret lottery algorithm to check whether it has been selected as a block proposer. The block proposer packages the transaction information in its own transaction pool to generate a block, writes the quantum random number participating in the consensus in this step into the block header, and calculates the seed_root field of the current round of blocks based on the seed_root field of the block header in the block generated by the previous round of consensus. The generation process is as follows: Figure 1 . In order to reduce the congestion in the blockchain network, the generated block is first uploaded to dfs, dfs returns the hash value dfid of the block, and the block proposer broadcasts the lottery information and dfid. seed: quantum randomness used in this round of consensus, seed_root: except for the bottom seed_root, the rest of the seed_root=hash(hash(seed)+hash(seed_root))).
[0030] In the present invention, the quantum random number participating in the consensus step is obtained from the super node. The node executes the secret lottery algorithm to check whether it is a committee member. If so, the Reduction algorithm is executed to vote on which block has the highest priority in the entire network and reach a consensus, converging N potential blocks into at most one non-empty block. The BinaryBA* algorithm is executed to vote multiple times on the blocks converged in the Reduction process, and the FINAL consensus can be reached in the first step when the network condition is good.
[0031] Beneficial effect: The quantum random number shared chain consensus method based on Q-Algorand of the present invention uses public key cryptography to protect the generation and transmission of quantum random numbers to ensure the authenticity of random numbers, thereby improving the security of the consensus mechanism. By combining quantum random numbers, the Algorand algorithm can be made more secure and random, and can effectively resist DDOS attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 Generates a schematic diagram for the block header.
[0033] Figure 2 It is a schematic diagram of the process of the present invention.
[0034] Figure 3 Schematic diagram of quantum random number generation and ring signature. DETAILED DESCRIPTION
[0035] The present invention will be further described below in conjunction with the accompanying drawings.
[0036] like Figures 1 to 3 As shown, the quantum random number shared chain consensus method based on Q-Algorand of the present invention comprises the following steps:
[0037] (1) The quantum random number generator generates a quantum random number. The nodes participating in the consensus receive the random number and signature, verify the signature, and use the random number as the random number used by the lottery algorithm. This step specifically includes the following steps:
[0038] (1-1) The quantum random number generator is deployed inside the super node;
[0039] (1-2) The super node uses elliptic curve cryptography to generate a public-private key pair, where the private key SK is stored locally and the public key PK is stored in all other nodes in the super node group. Each super node stores the public keys of other super nodes.
[0040] (1-3) Randomly select a super node in the super node group to generate a quantum random number QR. The super node then uses the verifiable random function VRF to generate a zero-knowledge proof proof and value for the generated random number QR, where (proof, value = VRF (SK, QR)), and then broadcasts proof and value;
[0041] (1-4) After receiving proof, value and QR, the other super nodes use the verification function verify to determine whether the quantum random number is generated by the selected super node. The verification format is: value'=verify(proof, PK, QR). Determine whether value is equal to value'. If they are equal, the authenticity of the quantum random number is recognized. If the verification fails, repeat steps 1-3 and 1-4;
[0042] (1-5) After the quantum random number generated by the selected super node is verified, the random number is signed using the ring signature technology. The step (1-5) includes the following steps:
[0043] (1-5-0) Select an elliptic curve and publish the elliptic curve generator G;
[0044] (1-5-1) Assume that the number of super nodes is n, and the super node R i Generate n-1 random numbers, the random number set R′=[r1,r2,r3,r i-1 , r i+1 , ..., r n ], where the random number corresponds to the public key one by one, r i The corresponding signer’s random number, let R = R′∪r i ;
[0045] (1-5-2) Public key set PK = [P1, P2, ..., P i , ..., P n ], signed with n public keys, P i is the signer's public key;
[0046] (1-5-3) Super Node R i Generate a random number k, there exists a scalar c i , satisfying k*G=r i G+c i *P i , for a known G and public key P i , if we know c i and k, we can calculate r i , and calculate k*G;
[0047] (1-5-4) According to the recursive formula c x =Hash(m, r x-1 *G+c x-1 *P x-1 ) Calculate c x , x∈[1,n], thus c is calculated i and r i ;
[0048] (1-5-5) The signer broadcasts the information {c1, PK, R};
[0049] (1-5-6) The verifier calculates c based on the message m and {c2,PK,R} x =Hash(m, r x-1 *G+c x-1 *P x-1 ), find c2, c3, ..., c in sequence n , finally calculate c1', and then determine whether c1 is equal to c1'. If they are equal, the signature is valid;
[0050] (1-6) The nodes participating in the consensus receive the random number and signature. Once the signature is verified, the random number is used as the random number for the lottery algorithm.
[0051] (2) Q-Algorand block generation and broadcasting, including:
[0052] (2-1) The transaction information generated by each node is broadcast through the gossip protocol. The transaction information is signed by the node private key. When a node receives a transaction, it first checks whether it has been forwarded. If it has been forwarded, it discards the message; otherwise, it forwards the transaction information.
[0053] (2-2) The node executes the secret lottery algorithm to check whether it is selected as the block proposer. The block proposer packages the transaction information in its own transaction pool to generate a block, writes the quantum random number participating in the consensus in this step into the block header, and calculates the seed_root field of this round of blocks based on the seed_root field in the block header of the block generated in the previous round of consensus. First, the generated block is uploaded to ipfs, and ipfs returns the hash value cid of the block. The block proposer broadcasts the lottery information and cid.
[0054] (3) Obtain the quantum random number participating in the consensus step from the super node, and the node executes the secret lottery algorithm to check whether it is the committe e member, if yes, then execute the Reduction algorithm to vote on which block has the highest priority in the entire network and reach a consensus, converge N potential blocks into at most 1 non-empty block, execute the BinaryBA* algorithm to vote multiple times on the blocks converged by the Reduction process, and reach a FINAL consensus in the first step if the network is in good condition.
[0055] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A quantum random number shared chain consensus method based on Q-Algorand, characterized in that: The following steps are involved: (1) The quantum random number generator generates a quantum random number. The nodes participating in the consensus receive the random number and signature, verify the signature, and use the random number as the random number used by the lottery algorithm; (2) Q-Algorand block generation and broadcasting; (3) Obtain the quantum random number participating in the consensus step from the super node. The node executes the secret lottery algorithm to check whether it is a witness committee. If so, it executes the Reduction algorithm to vote on which block has the highest priority in the entire network and reach a consensus. The N potential blocks are converged to at most one non-empty block. The BinaryBA* algorithm is executed to vote multiple times on the blocks converged by the Reduction process. If the network condition is good, the FINAL consensus can be reached in the first step.
2. The quantum random number shared chain consensus method based on Q-Algorand according to claim 1, characterized in that: The step 1) comprises the following steps: (1-1) The quantum random number generator is deployed inside the super node; (1-2) The super node uses elliptic curve cryptography to generate a public-private key pair, where the private key SK is stored locally and the public key PK is stored in all other nodes in the super node group. Each super node stores the public keys of other super nodes. (1-3) Randomly select a super node in the super node group to generate a quantum random number QR. The super node then uses the verifiable random function VRF to generate a zero-knowledge proof proof and value for the generated random number QR, where (proof, value) = VRF (SK, QR)), and then broadcasts the proof and value. (1-4) After receiving proof, value and QR, the other super nodes use the verification function verify to determine whether the quantum random number is generated by the selected super node. The verification form is: value'=verify(proof,PK,QR), to determine whether value is equal to value'. If they are equal, the authenticity of the quantum random number is recognized. If the verification fails, the authenticity of the quantum random number is not recognized, and the relevant data proof, value, QR are discarded; (1-5) After the quantum random number generated by the selected super node is verified, the random number is signed using the ring signature technology; (1-6) The nodes participating in the consensus receive the random number and signature. Once the signature is verified, the random number is used as the random number for the lottery algorithm.
3. The quantum random number shared chain consensus method based on Q-Algorand according to claim 2 is characterized in that: The steps (1-5) include the following steps: (1-5-0) Select an elliptic curve and publish the elliptic curve generator G; (1-5-1) Assume that the number of super nodes is n, and the super node R i Generate n-1 random numbers, i = i, 2...n, random number set R' = [r1, r2, r3, r i-1 ,r i+1 ,...,r n ], where the random number corresponds to the public key one by one, r i The corresponding signer’s random number, let R = R'∪r i ; (1-5-2) Public key set PK = [P1, P2, ..., P i ,...,P n ], signed with n public keys, P i is the signer's public key; (1-5-3) Super Node R i Generate a random number k, there exists a scalar c i , satisfying k*G=r i G+c i *P i , for a known G and public key P i , if we know c i and k, we can calculate r i , and calculate k*G; (1-5-4) According to the recursive formula c x =Hash(m,r x-1 *G+c x-1 *P x-1 ) Calculate c x ,x∈[1,n], and thus c is calculated i and r i , x0, c0 and P0 are system definitions, are initial parameters, and m is the message; (1-5-5) The signer broadcasts the information {c1,PK,R}; (1-5-6) The verifier calculates c based on the message m and {c1,PK,R} x '=Hash(m,r x-1 *G+c x-1 *P x-1 ), find c'2, c'3, ..., c' in sequence n , and finally calculate c1', and then determine whether c1 is equal to c1'. If they are equal, the signature is valid.
4. The quantum random number shared chain consensus method based on Q-Algorand according to claim 1, characterized in that: The step 2) comprises the following steps: (2-1) The transaction information generated by each node is broadcast through the gossip protocol. The transaction information is signed by the node private key. When a node receives a transaction, it first checks whether it has been forwarded. If it has been forwarded, the message is discarded. Otherwise, forward the transaction information; (2-2) The node executes the secret lottery algorithm to check whether it is selected as the block proposer. The block proposer packages the transaction information in its own transaction pool to generate a block, writes the quantum random number participating in the consensus in this step into the block header, and calculates the seed_root field of this round of blocks based on the seed_root field in the block header of the block generated in the previous round of consensus. First, the generated block is uploaded to ipfs, and ipfs returns the hash value cid of the block. The block proposer broadcasts the lottery information and cid.
Citation Information
Patent Citations
Consensus method based on verifiable quantum random number
CN113079000A
Consensus system and method based on device-independent quantum random number
CN114598477A
Vacuum adiabatic body
KR1020220059323A