Message authentication and leader election integrated block chain consensus method and system

By integrating message authentication and leader election in the blockchain consensus protocol using a verifiable random function (VRF), the problems of system complexity and insufficient security in traditional blockchain consensus protocols are solved, and an efficient and secure consensus process is achieved.

CN121173479APending Publication Date: 2025-12-19GREAT WALL SHUAN (SHANDONG) SAFETY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511435647.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

In traditional blockchain consensus protocols, message authentication and leader election are independent and complex, increasing system load and computational overhead, posing a risk of random number manipulation, and making it difficult to uniformly prove the legality of node messages and election qualifications, resulting in insufficient system efficiency and security.

Method used

The Verifiable Random Function (VRF) is used to integrate message authentication and leader election. By calculating random values ​​and their proofs using node private keys and message content, the legitimacy of messages and election results can be uniformly verified, resulting in the election of fair and decentralized leader nodes.

Benefits of technology

It reduces protocol steps and message count, lowers network load and computational overhead, improves consensus efficiency, enhances security and fairness, simplifies system design, strengthens anti-attack capabilities, and ensures consensus consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121173479A_ABST
    Figure CN121173479A_ABST
Patent Text Reader

Abstract

The invention provides a message authentication and leader election integrated block chain consensus method and system, and the method comprises the steps: enabling a node to use a private key and message content as input, and calculating a random value beta outputted by a verifiable random function VRF and a corresponding proof pi; the protocol selects leader nodes fairly and decentrally based on a comparison result of a verifiable random function VRF random value in a whole network consensus round by comparing the random value beta generated by the nodes; and all nodes verify a verifiable random function VRF to prove pi by using a node public key, and confirm the legality of the message and the authenticity of the election result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of blockchain consensus, and particularly relates to a blockchain consensus method and system integrating message authentication and leader election. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.

[0003] Traditional blockchain consensus protocols generally use digital signature technology to authenticate the legitimacy of node messages, ensuring that the messages are indeed sent by the private key holder, thereby preventing message tampering and forgery. At the same time, the election of leaders (Leaders) in the blockchain consensus protocol usually relies on independent random number generation mechanisms, such as centralized random numbers, consensus-built random beacons, or voting rotation mechanisms. This process is independent of message authentication.

[0004] The election of leaders (Leaders) is based on a random number generation mechanism, which has the following main problems: First, the independent election mechanism increases system complexity: the election of leaders requires additional protocol-level random number generation, broadcast, and verification, increasing network load and protocol complexity.

[0005] Second, there is a risk of random number manipulation: external random numbers or election mechanisms are vulnerable to manipulation or prediction, reducing consensus fairness and security.

[0006] In addition, there is an additional computational overhead: independent election mechanisms usually involve additional message signing and verification, causing performance bottlenecks.

[0007] In addition, there is a split between authentication and election: message authentication and leader election are not combined, making it difficult to uniformly prove the legitimacy of node messages and election eligibility.

[0008] Therefore, in the traditional design, "message authentication" and "leader election" are two parallel and relatively independent processes, resulting in insufficient system efficiency and security. SUMMARY

[0009] To overcome the deficiencies of the prior art described above, the present application provides a blockchain consensus method and system integrating message authentication and leader election, which integrates message authentication and leader election based on a verifiable random function, improving the efficiency and security of the system.

[0010] To achieve the above-mentioned purpose, one or more embodiments of the present application provide the following technical solutions: In a first aspect, a blockchain consensus method integrating message authentication and leader election is disclosed, comprising: The node uses a private key and message content as input to calculate a random value beta output by a verifiable random function VRF and a corresponding proof pi; The protocol elects a leader node in a fair and decentralized manner based on the comparison result of the verifiable random function VRF random value within the network consensus round by comparing the size of the random value beta generated by the node. All nodes verify the verifiable random function VRF proof pi using the node public key to confirm the legitimacy of the message and the authenticity of the election result.

[0011] In a second aspect, a blockchain consensus system integrating message authentication and leader election is disclosed, comprising: The verifiable random function calculation module is configured to use a private key and message content as input to calculate a random value beta output by a verifiable random function VRF and a corresponding proof pi. The leader node election module is configured to elect a leader node in a fair and decentralized manner based on the comparison result of the verifiable random function VRF random value within the network consensus round by comparing the size of the random value beta generated by the node. The verification module is configured to verify the verifiable random function VRF proof pi using the node public key to confirm the legitimacy of the message and the authenticity of the election result.

[0012] The above one or more technical solutions have the following beneficial effects: The message authentication and leader election are combined in the technical solution of the present application: the VRF output completes identity authentication and generates a fair random number, reducing the number of protocol steps and messages. Improve consensus efficiency: reduce network load and computing overhead, and improve block generation speed. Improve security and fairness: VRF ensures that the random number is unpredictable and uncontrollable, avoiding tampering or predicting traditional random numbers. Simplify system design: eliminate independent random number generation modules and reduce complexity. Enhance attack resistance: combined with the proof of VRF, it is difficult for nodes to fake or replay leader qualification messages, ensuring consensus consistency.

[0013] The advantages of the additional aspects of the present application will be partially given in the following description, partially will become obvious from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0014] The drawings accompanying the specification of the present application serve to provide a further understanding of the present application, and the illustrative embodiments of the present application and their descriptions serve to explain the present application, and do not constitute an improper limitation of the present application.

[0015] Figure 1 The method flowchart of the embodiment of the present application; Figure 2System architecture diagram of an embodiment of the present application. DETAILED DESCRIPTION

[0016] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0017] It should be noted that the terms used herein are merely for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application.

[0018] In the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. VRF: verifiable random function.

[0019] Embodiment one The present embodiment discloses a blockchain consensus method integrating message authentication and leader election, comprising: Step one: the node calculates the VRF output (β, π) based on the current message content and the private key at the beginning of the consensus round, and broadcasts the result to the network. The current message content is the block of the proposal constructed by the current transaction list. The VRF output (β, π) is calculated by a deterministic VRF algorithm function.

[0020] Step two: after receiving the VRF result broadcasted by other nodes, the node verifies its validity using the corresponding public key.

[0021] The validity is verified by a deterministic VRF algorithm function.

[0022] Step three: according to the verified VRF random value, the network reaches consensus and elects the node with the smallest random value as the leader of this round. The election is performed by sorting the random values in descending order and selecting the first one.

[0023] Step four: the elected leader is responsible for generating the block and continuing to broadcast.

[0024] In the present embodiment, message authentication is completed through a verifiable random function (VRF). When generating a proposal message, the node calculates VRF using its own private key and the current block content to obtain a random value and the corresponding proof. After receiving the message, other nodes verify the proof through the sender's public key. If the verification is passed, it can be confirmed that the message is indeed sent by the node and has not been tampered with. In this way, without additional signature steps, message authentication and leader election are completed in the same process.

[0025] In an embodiment, for example, in a financial consortium chain, each bank node can complete identity authentication and leader election through VRF when submitting a transaction proposal; in an Internet of Things blockchain, device nodes can also use this method to reduce overhead when uploading data to the chain. Through specific scenarios, the value of the present application can be more intuitively embodied, that is, while ensuring security, reducing system complexity and improving efficiency.

[0026] Generating a VRF result: the reason is to obtain authentication information and a random number at the same time; the effect is to reduce independent signature and random number links. Broadcasting messages and proofs: the reason is to enable all network nodes to verify; the effect is to ensure that the subsequent election is based on real and reliable. Verifying proofs and comparing random values: the reason is to fairly select a leader; the effect is to avoid manipulation or prediction. Leader generates a block: driven by the selected node to promote consensus; the effect is to efficiently complete the consistency of the blockchain.

[0027] In this embodiment, all messages and leader election are authenticated through VRF proofs, without additional signature and random number mechanisms.

[0028] The authentication of all messages and the confirmation of the identity of the leader are completed based on the VRF verification process, and the node does not need additional digital signatures.

[0029] Through the verifiable random function VRF proof, the node not only proves that the message is indeed generated by the node holding the corresponding private key, but also simultaneously outputs a verifiable and unpredictable random number β.

[0030] Message authentication and leader election are combined: VRF output not only completes identity authentication, but also generates a fair random number, reducing protocol steps and message quantity.

[0031] Improve consensus efficiency: reduce network load and computing overhead, and improve block generation speed.

[0032] Improve security and fairness: VRF ensures that random numbers are unpredictable and cannot be manipulated, avoiding tampering or prediction of traditional random numbers.

[0033] Simplify system design: eliminate independent random number generation modules and reduce complex dependencies.

[0034] Enhance attack resistance: combined with VRF proof, it is difficult for nodes to fake or replay leader qualification messages, ensuring consensus consistency.

[0035] In a specific embodiment, referring to FIG. 1, a consensus process is shown, which includes: Figure 1 As shown in FIG. 1, it includes: (1) Start of consensus round Round N; (2) Each node (such as A, B, C, D) uses a private key to perform VRF (M, sk) on the current message content M to generate a random number β and a proof π, and outputs (β, π); based on this step, identity authentication and random number generation are completed at the same time, reducing the complexity of the protocol and reducing the steps; (3) All nodes broadcast the message M, the random number β, and the proof π, and the broadcast content is (M, β, π, pk); based on this step, the authentication information and the random number used for election are combined, reducing the communication volume.

[0036] M: message content (proposal block), the block proposal formed by the current transaction set. sk: private key (secret key), the key held by the node, used for calculating VRF. pk: public key (public key), the corresponding public information, used for verifying the proof.

[0037] β: random value output by VRF, used for leader election. π: proof generated by VRF, used for confirming the authenticity of the random value.

[0038] (4) The node receives the broadcast message from other nodes and performs verification on each message. If it is not legal, it rejects the consensus message; if it is legal, it goes to the next step; based on this step, the random fairness is guaranteed, and the random number is avoided to be manipulated, while ensuring the fair and reliable result.

[0039] (5) All nodes compare the β value locally, and select the node with the smallest β value, such as node B, which becomes the leader of this round of consensus; based on this step, the message is authenticated and a fair random number is obtained for electing a new leader Leader, which reduces the double calculation.

[0040] (6) Node B as Leader is responsible for generating a new block and broadcasting it to other nodes to complete all rounds. The consensus process is completed; the effect is to efficiently achieve global consistency. The effect is to eliminate the independent view switching process, improving system efficiency.

[0041] The system architecture is shown in the accompanying Figure 2 The system includes a VRF calculation module, a broadcast module, a verification module, a candidate management and election module, a block generation module, and a key management module.

[0042] When executed, each node first calculates a verifiable random function based on the current proposal and the current round number by the VRF calculation module to obtain a random value and a corresponding proof; Then the proposal, random value, proof, and public key are sent to the network through the broadcast module; the receiving node verifies the proof through the verification module, and the candidate that passes the verification is written into the candidate set; The candidate management module locally sorts the verified random values and selects the leader of the current round according to the minimum value rule; the node selected as the leader generates a new block by the block generation module, and the previously generated random value and the proof are contained in the block header; the other nodes in the network accept the new block by verifying the proof again through the verification module.

[0043] The round information and the proposal summary are contained in the VRF input to avoid replay and bind authentication and election, and in the case of equal random values or leader timeout, a previously agreed verifiable order or alternative mechanism is used to ensure the determinacy and availability of consensus.

[0044] The local beta value is compared, and the node with the minimum beta is selected as the leader of the next round; Leader node: generate and broadcast the block.

[0045] Among them, the message authentication and the selection of the leader are completed by VRF(beta, pi), without additional signature or independent random source.

[0046] Embodiment two The purpose of this embodiment is to provide a computer device, including a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.

[0047] Embodiment three The purpose of this embodiment is to provide a computer readable storage medium.

[0048] A computer readable storage medium having a computer program stored thereon, the program being executable by a processor to perform the steps of the above method.

[0049] Embodiment four The purpose of this embodiment is to provide a blockchain consensus system integrating message authentication and leader election, including: The verifiable random function calculation module is configured to: the node uses a private key and message content as input to calculate the random value beta and its corresponding proof pi of the verifiable random function VRF output; The leader node election module is configured to: the protocol compares the size of the random value beta generated by the node, and elects the leader node based on the comparison result of the verifiable random function VRF random value within the global network consensus round; The verification module is configured to: all nodes verify the verifiable random function VRF proof pi using the node public key to confirm the legitimacy of the message and the authenticity of the election result.

[0050] Embodiment five The purpose of the embodiment is to provide a computer program product containing instructions, which, when running on a computer, causes the computer to perform the method and functions involved in any of the above embodiments. The steps involved in the device of the above embodiment correspond to the method embodiment one, and the specific implementation can refer to the relevant description part of embodiment one. The term "computer readable storage medium" should be understood as including a single medium or multiple media of one or more instruction sets; it should also be understood as including any medium capable of storing, encoding or carrying instruction sets for execution by a processor and causing the processor to perform any of the methods in the present application.

[0051] Those skilled in the art should understand that each module or step of the above-mentioned application can be realized by a general computer device, alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device for execution by a computing device, or they can be respectively made into each integrated circuit module, or a plurality of modules or steps among them can be made into a single integrated circuit module to realize. The present application is not limited to any specific combination of hardware and software.

[0052] Although the specific embodiments of the present application are described above in combination with the drawings, it is not a limitation on the scope of protection of the present application, and those skilled in the art should understand that various modifications or changes made on the basis of the technical solutions of the present application without creative labor are still within the scope of protection of the present application.

Claims

1. A blockchain consensus method integrating message authentication and leader election, characterized by: include: Each node uses its private key and message content as input to calculate the random value β output by the verifiable random function VRF and its corresponding proof π, outputs (β, π) and broadcasts it. When a node receives a broadcast message from another node, it performs verification on each message. By comparing the size of the random value β generated by the node, and based on the comparison result of the VRF random value verifiable within the consensus round of the entire network, a leader node is elected fairly and in a decentralized manner. All nodes use their public keys to verify the VRF (Virtual Random Function) proof of π, confirming the legitimacy of the message and the authenticity of the election results.

2. The blockchain consensus method integrating message authentication and leader election as described in claim 1, characterized in that, The message content is the block of the proposal constructed by the current transaction list.

3. The blockchain consensus method integrating message authentication and leader election as described in claim 1, characterized in that, The VRF output (β, π) is calculated using a deterministic VRF algorithm function.

4. The blockchain consensus method integrating message authentication and leader election as described in claim 1, characterized in that, After each node outputs (β, π), all nodes broadcast the message M, the random number β, and the proof π, with the broadcast content being (M, β, π, pk).

5. The blockchain consensus method integrating message authentication and leader election as described in claim 1, characterized in that, Based on the comparison results of the verifiable random function (VRF) random values ​​within the consensus round across the entire network: all nodes compare their β values ​​locally and select the node with the smallest β value, which becomes the leader of this round of consensus.

6. The blockchain consensus method integrating message authentication and leader election as described in claim 1, characterized in that, The node with the smallest β value is selected as the Leader and is responsible for generating new blocks and broadcasting them to other nodes.

7. A blockchain consensus system integrating message authentication and leader election, characterized by: include: The verifiable random function calculation module is configured such that: the node uses the private key and message content as input to calculate the random value β output by the verifiable random function VRF and its corresponding proof π; The leader node election module is configured such that the protocol elects a leader node fairly and in a decentralized manner by comparing the size of the random value β generated by the nodes and based on the comparison results of the VRF random values ​​verifiable within the consensus round of the entire network. The verification module is configured such that all nodes use their public keys to verify the verifiable random function VRF proof π, confirming the legality of the message and the authenticity of the election results.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method described in any one of claims 1-6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it performs the steps of the method described in any one of claims 1-6 above.