Method and system for avoiding malicious competition of alliance chain resources based on threshold encryption

By employing threshold encryption technology and multi-factor authentication mechanisms in the consortium blockchain, the problem of malicious nodes competing for resources is solved, ensuring the legality of resource operations and the consistency of blockchain data, and preventing malicious competition.

CN116599695BActive Publication Date: 2025-10-28BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310390002.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-12
Publication Date
2025-10-28
Estimated Expiration
2043-04-12

AI Technical Summary

Technical Problem

In consortium blockchains, there is a possibility that master nodes and other nodes may maliciously compete for resource operations, causing the requesting node's resource operations to fail. Furthermore, due to differences in computing power and network transmission quality, malicious nodes may complete resource operation requests for consensus and join the blockchain before the requesting node, leading to malicious competition.

Method used

Threshold encryption technology is adopted, requiring requesting nodes to generate a public key and a number of private key fragments equal to the number of nodes in the consortium blockchain. The consensus protocol ensures that at least a threshold of private key fragments must be combined to form a private key before resource operations can be decrypted. The master node and other nodes perform multiple verifications to prevent malicious competition and ensure the legality and integrity of resource operations.

Benefits of technology

It effectively prevents the competitive behavior of malicious nodes, ensures the legality and integrity of resource operations, guarantees the consistency of blockchain data, and prevents malicious competition from succeeding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116599695B_ABST
    Figure CN116599695B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for avoiding malicious competition for resources in a consortium blockchain based on threshold encryption. The method includes: a requesting node in the consortium blockchain generates a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain, wherein at least a threshold of private key fragments can be combined to form a private key corresponding to the public key; the requesting node encapsulates a resource operation ciphertext encrypted with the public key and different private key fragments into a request message and sends it to all nodes in the consortium blockchain; the master node encapsulates the verified request message into a pre-preparation message and broadcasts it; each node verifies the request message and the pre-preparation message, encapsulates the request information into a preparation message, and broadcasts it; each node verifies the preparation message, combines at least a threshold of private key fragments from the preparation message to form a private key, encapsulates the received request message and the resource operation in the request message decrypted with the private key into a commit message, and broadcasts it; each node verifies at least a threshold of commit messages, adds the resource operation in the received request message to its local blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

(I) Technical Field

[0001] This invention relates to the field of computer network technology, and in particular to a method and system for avoiding malicious competition for resources in a consortium blockchain based on threshold encryption. (II) Background Technology

[0002] A consortium blockchain forms a trustless blockchain network composed of multiple nodes, including those with malicious nodes. Nodes have equal power, and authorized nodes are allowed to join the network. When a requesting node needs to operate on a resource, it sends the resource operation request to the master node. The master node verifies the received resource operation request and then broadcasts it to all nodes. All nodes reach a consensus on the verified resource operation request, and once consensus is achieved, the requesting node's resource operation is added to its local blockchain.

[0003] In consortium blockchains, situations can arise where the master node and other nodes maliciously compete for resource operations requested by a node. For example, if a requesting node's resource operation is registering a new domain name, and another node successfully registers the same domain name, the requesting node will be unable to register it due to the uniqueness of domain names. When the master node maliciously competes for the requesting node's resource operation, it will broadcast to all nodes that it, not the requesting node, will perform the operation. Furthermore, if a malicious node (not the master node) in the consortium blockchain hears the requesting node's resource operation request and wants to maliciously compete for the resource, it will quickly construct an identical resource operation request and send it to the master node. Due to differences in computing power and network transmission quality among nodes in a consortium blockchain, data transmission may experience latency and out-of-order delivery. This malicious node's resource operation request may complete node consensus and join the blockchain before the requesting node's, thus maliciously competing for the resource operation and preventing the requesting node's resource operation from being completed. (III) Summary of the Invention

[0004] To address the aforementioned issues, embodiments of the present invention provide a method for avoiding malicious competition for resources in consortium blockchains based on threshold encryption.

[0005] In a first aspect, embodiments of the present invention provide a method for avoiding malicious competition for resources in a consortium blockchain based on threshold encryption, comprising: a requesting node of the consortium blockchain generating a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain, wherein at least a threshold of private key fragments can be synthesized into a private key corresponding to the public key; the requesting node encapsulating a resource operation ciphertext encrypted with the public key and different private key fragments into request information and sending them to all nodes in the consortium blockchain respectively; the master node encapsulating the verified request information into a pre-preparation message and broadcasting it; each node verifying the request message and the pre-preparation message, encapsulating the request information into a preparation message and broadcasting it; each node verifying the preparation message, synthesizing a private key from at least a threshold of private key fragments in the preparation message, encapsulating the received request message and the resource operation in the request message decrypted with the private key into a commit message and broadcasting it; each node verifying at least a threshold of commit messages, adding the resource operation in the received request message to its local blockchain.

[0006] Furthermore, node verification includes:

[0007] Verify whether the digital signature of the sending node meets the preset signature conditions; if it does not, the verification fails.

[0008] Verify whether the digital signature of the request message in the prepared message meets the preset signature conditions; if it does not meet the conditions, the verification fails.

[0009] Verify whether the digital signature of the request message in the preparation message meets the preset signature conditions; if it does not meet the conditions, the verification fails.

[0010] Verify whether the digital signature of the request message in the submission message meets the preset signature conditions; if it does not meet the conditions, the verification fails.

[0011] Verify whether the data format of the resource operation conforms to the preset data format conditions; if it does not conform, the verification fails.

[0012] Furthermore, the threshold is the consensus threshold of the consortium blockchain.

[0013] Secondly, embodiments of the present invention provide a threshold encryption-based consortium blockchain resource malicious competition avoidance system, comprising: a threshold encryption module, used to generate a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain, wherein at least a threshold value of the private key fragments can be synthesized into a private key corresponding to the public key; a master node module, used to encapsulate verified request information into a pre-preparation message for broadcast; a pre-verification module, used to verify the request message and the pre-preparation message, encapsulate the request information into a preparation message for broadcast; a preparation verification module, used to verify the preparation message, synthesize a private key from at least a threshold value of the private key fragments in the preparation message, encapsulate the received request message and the resource operation in the request message decrypted with the private key into a submission message for broadcast; and a submission verification module, used to verify that at least a threshold value of the submission message passes, add the resource operation in the received request message to the local blockchain.

[0014] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the first aspect of the present invention: a method for avoiding malicious competition for consortium blockchain resources based on threshold encryption.

[0015] Fourthly, embodiments of the present invention provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the first aspect of the present invention: a method for avoiding malicious competition for consortium blockchain resources based on threshold encryption. (iv) Description of the attached drawings

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 Flowchart of a method for avoiding malicious competition for resources in a consortium blockchain based on threshold encryption, provided in an embodiment of the present invention;

[0018] Figure 2 A system architecture diagram for preventing malicious competition for resources in a consortium blockchain based on threshold encryption, provided in this embodiment of the invention;

[0019] Figure 3 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. (V) Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Because nodes in a consortium blockchain operate on a trustless basis, situations can arise where the master node and other nodes maliciously compete for resource operations. When a master node maliciously competes for a requesting node's resource operation, it will broadcast to all nodes that it is the master node, not the requesting node, that will perform the operation. Furthermore, if a malicious node (not the master node) in the consortium blockchain hears the requesting node's resource operation request and intends to maliciously compete for that resource, it will quickly construct an identical resource operation request and send it to the master node. Due to differences in computing power, network transmission quality, and data transmission latency among nodes in the consortium blockchain, there is a possibility that a malicious node can complete the consensus on the resource operation request and join the blockchain before the requesting node, thus completing the malicious competition for the resource operation and preventing the requesting node from completing its request.

[0022] This invention provides a threshold encryption-based method for avoiding malicious competition for resources in consortium blockchains, in order to solve the problem of malicious competition for resources in consortium blockchains.

[0023] Figure 1 A flowchart of a method for avoiding malicious competition for resources in a consortium blockchain based on threshold encryption, as provided in an embodiment of the present invention, is shown below. Figure 1 As shown, this embodiment of the invention provides a method for avoiding malicious competition for resources in a consortium blockchain based on threshold encryption, including:

[0024] 101. The requesting node of the consortium blockchain generates a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain. Among them, no less than the threshold private key fragments can be combined to form a private key corresponding to the public key. The requesting node encapsulates the resource operation ciphertext encrypted with the public key and the different private key fragments into a request message and sends them to all nodes of the consortium blockchain respectively.

[0025] In a consortium blockchain, requesting nodes generate a public key for encrypting resource operations and a number of private key fragments equal to the number of nodes in the consortium blockchain using threshold encryption. At least a threshold number of these private key fragments are sufficient to synthesize a private key corresponding to the public key for decrypting resource operations. Each requesting node encapsulates different private key fragments and the encrypted resource operation ciphertext (encrypted with the public key) into a request message equal to the number of nodes in the consortium blockchain. This request message is then sent to all nodes in the consortium blockchain, ensuring that each node receives both the encrypted resource operation ciphertext and a set of key fragments.

[0026] 102. The master node encapsulates the verified request information into a pre-prepared message and broadcasts it.

[0027] The master node in the consortium blockchain verifies the received request information. Once the verification is successful, the request message is encapsulated into a pre-prepared message and broadcast to all nodes in the consortium blockchain.

[0028] 103. After each node verifies the request message and the preparation message, it encapsulates the request information into a preparation message and broadcasts it.

[0029] Each node verifies the request message sent by the requesting node and the pre-preparation message sent by the master node. After successful verification, the node encapsulates the received request message into a preparation message and broadcasts it to all nodes in the blockchain.

[0030] 104. After each node verifies the preparation message, it combines private key fragments from the preparation message (not less than the threshold threshold) into a private key, encapsulates the received request message and the resource operations in the request message (decrypted with the private key) into a commit message, and then broadcasts it.

[0031] Each node verifies each received preparation message and extracts a private key fragment from the preparation message. When the number of extracted private key fragments is not less than a threshold, the extracted private key fragments are combined into a private key. The private key is then used to decrypt the ciphertext of the resource operation in the received request message. The decrypted resource operation and request message are then encapsulated into a commit message and broadcast to all nodes in the blockchain.

[0032] 105. After each node verifies and passes at least a threshold number of submission messages, it adds the resource operations in the received request messages to its local blockchain.

[0033] Each node verifies every submitted message it receives. When the number of verified submitted messages is not less than a threshold, the node adds the resource operation in the received request message to the local blockchain.

[0034] Based on the above embodiments, as an optional embodiment, the node verification includes:

[0035] Verify whether the digital signature of the sending node meets the preset signature conditions; if it does not, the verification fails.

[0036] Verify whether the digital signature of the request message in the prepared message meets the preset signature conditions; if it does not meet the conditions, the verification fails.

[0037] Verify whether the digital signature of the request message in the preparation message meets the preset signature conditions; if it does not meet the conditions, the verification fails.

[0038] Verify whether the digital signature of the request message in the submission message meets the preset signature conditions; if it does not meet the conditions, the verification fails.

[0039] Verify whether the data format of the resource operation conforms to the preset data format conditions; if it does not conform, the verification fails.

[0040] The threshold-based encryption-based consortium blockchain resource malicious competition avoidance method involves messages such as request messages sent by requesting nodes, pre-preparation messages sent by the master node, preparation messages and commit messages sent by each node. Each node verifies the above messages it receives to prevent malicious nodes from impersonating nodes to send the above messages and carry out malicious competition for resource operations.

[0041] The request message sent by the requesting node is encapsulated in the pre-preparation message, preparation message, and submission message. The encapsulated request message is verified to prevent malicious nodes from tampering with the request message and engaging in malicious competition for resource operations.

[0042] Each node verifies whether the data format of the decrypted resource operation in the request message conforms to the preset data format conditions to prevent the requesting node from performing non-compliant resource operation behavior.

[0043] Based on the above embodiments, as an optional embodiment, the threshold is the consensus threshold of the consortium blockchain.

[0044] In a consortium blockchain, all nodes jointly participate in maintaining the blockchain data. In the event of malicious nodes, a consensus protocol ensures that after each node adds the resource operations from received request messages to its local blockchain, the local blockchain data of all nodes is consistent. Different consensus protocols set a consensus threshold, which is the number of honest (non-malicious) nodes in the consortium blockchain. For example, in a Byzantine fault-tolerant consensus protocol, if the number of malicious nodes is set to f, the consensus threshold is 2f+1, and the total number of nodes is 3f+1. Different consensus protocols set different consensus thresholds. In this embodiment, a Byzantine fault-tolerant consensus protocol is used as an example, but in other embodiments of this method, other values ​​may be used, such as f+1, etc. This invention does not impose specific limitations on this.

[0045] Figure 2 The system architecture diagram for preventing malicious competition for resources in a consortium blockchain based on threshold encryption, as provided in the embodiments of the present invention, is as follows: Figure 2 As shown, the threshold encryption-based consortium blockchain resource malicious competition avoidance system includes: a threshold encryption module 201, a master node module 202, a pre-verification module 203, a preparation verification module 204, and a submission verification module 205. Specifically, the threshold encryption module 201 generates a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain, wherein at least a threshold of private key fragments can be combined to form a private key corresponding to the public key; the master node module 202 encapsulates the verified request information into a pre-preparation message and broadcasts it; the pre-verification module 203 verifies the request message and the pre-preparation message, then encapsulates the request information into a preparation message and broadcasts it; the preparation verification module 204 verifies the preparation message, combines at least a threshold of private key fragments from the preparation message to form a private key, encapsulates the received request message and the resource operations in the request message decrypted with the private key into a submission message, and broadcasts it; the submission verification module 205 verifies that at least a threshold of submission messages have passed, then adds the resource operations in the received request message to the local blockchain.

[0046] The system embodiments provided in this invention are for implementing the above-described method embodiments. For specific processes and details, please refer to the above-described method embodiments, which will not be repeated here.

[0047] The threshold encryption-based consortium blockchain resource malicious competition prevention system provided in this invention involves a requesting node generating a threshold-encrypted public key and a number of private key fragments equal to the number of consortium blockchain nodes. After encrypting the resource operation using the public key, the ciphertext of the resource operation is encapsulated within a request message. Before synthesizing the private key to decrypt the ciphertext of the resource operation, other blockchain nodes cannot know the content of the resource operation in the request message and cannot maliciously compete for the requested resource operation. Only when a node extracts at least a threshold number of private key fragments from the received preparation message can it synthesize the private key to decrypt the ciphertext of the resource operation, at which point it can know the content of the requesting node's resource operation. At this point, at least a number of consortium blockchain nodes have already obtained the resource operation content of the requesting node, preventing malicious nodes from completing the resource operation request consensus and joining the blockchain before the requesting node, and thus preventing them from successfully maliciously competing for the resource operation.

[0048] Figure 3 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3As shown, the electronic device may include a processor 301, a communication interface 302, a memory 303, and a bus 304. The processor 301, communication interface 302, and memory 303 communicate with each other via the bus 304. The communication interface 302 can be used for information transmission within the electronic device. Processor 301 can call logical instructions in memory 303 to execute the following method: A requesting node in the consortium blockchain generates a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain, wherein at least a threshold number of private key fragments can be combined to form a private key corresponding to the public key; the requesting node encapsulates the resource operation ciphertext encrypted with the public key and different private key fragments into a request message and sends it to all nodes in the consortium blockchain; the master node encapsulates the verified request message into a pre-preparation message and broadcasts it; each node verifies the request message and the pre-preparation message, encapsulates the request information into a preparation message, and broadcasts it; each node verifies the preparation message, combines at least a threshold number of private key fragments in the preparation message into a private key, encapsulates the received request message and the resource operation in the request message decrypted with the private key into a commit message, and broadcasts it; each node verifies at least a threshold number of commit messages and adds the resource operation in the received request message to its local blockchain.

[0049] Furthermore, the logical instructions in the aforementioned memory 303 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the above-described method embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0050] On the other hand, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the transmission methods provided in the above embodiments, including, for example,: a requesting node of a consortium blockchain generates a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain, wherein at least a threshold of private key fragments can be combined to form a private key corresponding to the public key; the requesting node encapsulates a resource operation ciphertext encrypted with the public key and different private key fragments into request information and sends them to all nodes in the consortium blockchain respectively; the master node encapsulates the verified request information into a pre-preparation message and broadcasts it; after each node verifies the request message and the pre-preparation message, it encapsulates the request information into a preparation message and broadcasts it; after each node verifies the preparation message, it combines at least a threshold of private key fragments in the preparation message into a private key, encapsulates the received request message and the resource operation in the request message decrypted with the private key into a submission message and broadcasts it; after each node verifies a submission message at least a threshold of the submission message, it adds the resource operation in the received request message to its local blockchain.

[0051] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0052] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for avoiding malicious competition for resources in a consortium blockchain based on threshold encryption, characterized in that, include: The requesting node of the consortium blockchain generates a threshold-encrypted public key and a number of private key fragments equal to the number of nodes in the consortium blockchain. Among them, no less than the threshold private key fragments can be combined to form a private key corresponding to the public key. The requesting node encapsulates the resource operation ciphertext encrypted with the public key and the different private key fragments into a request message and sends it to all nodes in the consortium blockchain. The master node encapsulates the verified request message into a pre-prepared message and broadcasts it. After each node verifies the request message and the preparation message, it encapsulates the request message into a preparation message and then broadcasts it. After each node verifies the preparation message, it combines private key fragments from the preparation message (not less than a threshold threshold) into a private key, encapsulates the received request message and the resource operations in the request message (decrypted with the private key) into a commit message, and then broadcasts it. After each node verifies and accepts submission messages that meet or exceed the threshold, it adds the resource operations in the received request messages to its local blockchain.

2. The method for avoiding malicious competition for consortium blockchain resources based on threshold encryption according to claim 1, characterized in that, Node verification includes: Verify whether the digital signature of the sending node meets the preset signature conditions; if it does not, the verification fails. Verify whether the digital signature of the request message in the prepared message meets the preset signature conditions; if it does not meet the conditions, the verification fails. Verify whether the digital signature of the request message in the preparation message meets the preset signature conditions; if it does not meet the conditions, the verification fails. Verify whether the digital signature of the request message in the submission message meets the preset signature conditions; if it does not meet the conditions, the verification fails. Verify whether the data format of the resource operation conforms to the preset data format conditions; if it does not conform, the verification fails.

3. The method for avoiding malicious competition for consortium blockchain resources based on threshold encryption according to claim 1, characterized in that, The threshold is the consensus threshold of the consortium blockchain.

4. A system for preventing malicious competition for resources in a consortium blockchain based on threshold encryption, characterized in that, include: A threshold encryption module is used to generate a public key for threshold encryption and a number of private key fragments equal to the number of nodes in the consortium blockchain, wherein at least a number of private key fragments exceeding the threshold can be used to synthesize a private key corresponding to the public key. The master node module is used to encapsulate the verified request message into a pre-prepared message for broadcast. The pre-verification module is used to verify the request message and the pre-preparation message, encapsulate the request message into a preparation message, and then broadcast it. The preparation and verification module is used to verify the preparation message, synthesize a private key by combining private key fragments in the preparation message that are not less than a threshold threshold, encapsulate the received request message and the resource operation in the request message decrypted with the private key into a submission message and broadcast it. The submission verification module is used to add the resource operations in the received request message to the local blockchain after verifying that the submission message has passed at least a threshold threshold.

5. An electronic 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 for avoiding malicious competition for consortium blockchain resources based on threshold encryption as described in any one of claims 1 to 3.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the threshold encryption-based consortium blockchain resource malicious competition avoidance method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Node consensus verification method under league chain network through asynchronous mode

    CN106529951A

  • Data processing method and device based on block chain, computer equipment and medium

    CN112217636A