Byzantine error-resistant node consensus method based on threshold signature
By introducing threshold signature and trust value calculation technology into the distributed storage system, the problem of Byzantine malicious node attacks in the public chain blockchain system is solved, the security and efficiency of the consensus are improved, the communication complexity is reduced, and a more complete solution is achieved. High system reliability and attack resistance.
Patent Information
- Application Number
- CN202211623691.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-12-16
AI Technical Summary
Existing technologies cannot effectively resist attacks by Byzantine malicious nodes in distributed storage systems, leading to security risks and low consensus efficiency. Especially in public chain blockchain systems, traditional consensus methods such as PBFT are vulnerable to DDoS attacks and Witch attack.
Adopt a Byzantine fault-resistant node consensus method based on threshold signatures, improve the credibility and security of elections through trust value calculation and threshold signature technology, and reduce communication complexity through bilinear mapping to ensure trust values and signatures between nodes Verification process.
It effectively avoids the security risks caused by Byzantine malicious nodes becoming leader nodes, improves the consensus efficiency and security of on-chain transactions, reduces communication complexity, and improves the system's anti-attack capabilities.
Smart Images

Figure CN116015674B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and further relates to a Byzantine error-resistant node consensus method, which can be applied to the transaction process on the blockchain. Background Art
[0002] With the continuous development of Internet technology, people's work and life are closely related to the Internet. With the surge in the number of users, the number of requests per unit time and the amount of data processed per unit time are beyond the capacity of traditional single-machine systems. For this reason, distributed storage came into being. Distributed storage achieves data consistency by distributing data on multiple independent devices and coordinating operations between each device. In recent years, with the popularity of blockchain technology, the issue of how to ensure data consistency between nodes in the cluster under distributed storage has become a focus of attention.
[0003] The existing technology that ensures the consistency of data copies maintained by all nodes in a distributed storage system mainly adopts consensus methods. During the operation of the consensus method, the main focus is on the performance of the consensus method in terms of security, activity, and efficiency. Among them, security requires that there will be no data inconsistency between the nodes of the cluster; activity requires that the cluster can continue to provide services to the outside world when some nodes are down; efficiency requires that the time it takes for cluster nodes to reach consensus on a piece of data cannot be too long. Since distributed storage has very high requirements for security and efficiency, it is of great significance to design a consensus method with high security, high activity, and high efficiency.
[0004] Diego Ongaro et al. proposed a concise and easy-to-understand leader election and log replication consensus method in their paper "In search of an understandable consensus algorithm". This method is a non-Byzantine fault-tolerant CFT consensus method, that is, the nodes participating in the consensus will not tamper with the transaction information and log content. The specific process is: the system randomly selects a node as the leader node according to the timeout period, and the leader node sends the transaction information it receives to other nodes in the system. Other nodes respond by voting. When the majority of nodes in the system recognize the transaction, it is considered that the transaction has reached a consensus in the entire system. Since this method is mainly aimed at distributed databases and blockchain systems with node verification functions, it will not be applicable to some open applications, such as public blockchain systems where nodes can join at will, where the nodes participating in the consensus may be Byzantine malicious nodes.
[0005] In their paper "Practical Byzantine Fault Tolerance and Proactive Recovery", Barbara Liskov et al. proposed the first Byzantine fault tolerance method applied to engineering. It adopts a three-stage communication interaction process. Through mutual confirmation between nodes, the communication complexity of the original Byzantine fault tolerance method is reduced from O(n 3 ) is reduced to O(n 2 ). In this method, since the master node is selected in turn according to the number, this selection method is vulnerable to DDoS attacks and witch attacks in the P2P network, which has security risks; and since it adopts three-stage broadcasting, it needs to forward the entire network twice with extremely high communication overhead, which seriously affects the efficiency of consensus. Summary of the invention
[0006] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose a consensus method based on threshold signatures that is resistant to Byzantine error nodes, so as to avoid the security risks posed by Byzantine malicious nodes becoming leader nodes to the system and improve the consensus efficiency of on-chain transactions.
[0007] The technical solution of the present invention is: by combining the threshold signature technology in cryptography theory and the trust value of the calculation node, the problem that the CFT consensus method cannot be applied to the public chain blockchain system with Byzantine malicious nodes, and the problem that the PBFT method selects the leader node in sequence according to the number, causing the malicious leader node to cause DDoS attacks and Sybil attacks and other security risks, thereby improving the consensus efficiency of on-chain transactions. The implementation steps include the following:
[0008] (1) System initialization;
[0009] (1a) In the key initialization phase, a trusted third-party institution TTP assists the blockchain system in generating a public-private key pair (x, y), and makes the public key y public. The private key x is divided into N parts and provided to N nodes for sharing. Each node holds part of the private key x. i The third-party institution TTP generates a random number matrix XX for the signer's private use and its corresponding random number public key matrix YY, and distributes it to N nodes in the system;
[0010] (1b) When the system is initialized and grouped, the nodes are divided into four groups according to the analysis of the communication volume, and a trust value threshold TV is set. An initial trust value TV0 higher than the threshold is set for each node. i ;
[0011] (1c) When the system initializes the leader election, each group independently elects TV0 in its group. i The node with the highest value becomes the leader node;
[0012] (2) The client sends a Request message containing the transaction content m, client information c, and the client request sequence timestamp t to the leader node of each group. <Request<m,t,c> >
[0013] (3) The leader node assigns a sequence number n to the received transaction information, and sends the message content m, transaction sequence number n, view number v, and message summary d through the message <<AppendEntries,v,n,d> ,m>Send to other nodes in the group for inspection:
[0014] If the check passes, the node enters the signature response phase and executes step (4);
[0015] Otherwise, jump to step (8) to change the view;
[0016] (4) The node entering the signature response phase uses the private key x assigned to it by the TTP in step (1) i and random number matrix XX, YY to sign the transaction information it receives, and the signature σ i , private key x i The corresponding public key y i And the information used to verify the signature w i By Message<<AppendEntriesReponse,v,n,i> ,y i ,w i ,σ i >Broadcast to all nodes in the group except itself, where v is the current view number and i is the node number;
[0017] (5) After the leader node receives at least t+1 AppendEntriesReponse messages, it sends the signature information σ i By confirming the message <<Commit,v,n,i> ,y i ,w i ,σ i >Send to all leader nodes except itself;
[0018] (6) After any leader node receives more than t+1 Commit messages, it aggregates them and verifies the aggregate signature σ:
[0019] If the verification is successful, execute step (7);
[0020] Otherwise, verify the partial signatures σ received i , and for σ i Node i that fails the verification executes step (8);
[0021] (7) Any leader node enters the reply phase and sends a message <<Reply,v,t,c,i> ,w,σ> broadcast to the client;
[0022] (8) Change the view of the signature that fails verification:
[0023] (8a) Any node in the system that needs to initiate a view change will include its own signature information σ i , verification information w i , part of the public key y i View change request <Viewchange<h,v-1,i,v,m> y i ,w i ,σ i >Sent to other nodes in the same group, where v is the new view number and h is the summary information;
[0024] (8b) Any node that receives at least t+1 view change requests aggregates the signature information and verifies it:
[0025] If the verification is successful, proceed to step (8c);
[0026] Otherwise, return to step (8a) and re-initiate the view change request;
[0027] (8c) Node sends <Viewchange-ack,<h,i,v> ,y,w,σ> message to other different leader nodes in the system; other leader nodes clear the consistency request before the view change, and the nodes in the system will also be regrouped and execute step (9);
[0028] (9) The leadership selection process;
[0029] (9a) The node that receives the leader election signal calculates its TV under view v v i Value, TV in each group v i The node with the highest value will send the message <RequestVote,v,t,TV v i >To other nodes in the group;
[0030] (9b) After receiving the RequestVote message, other nodes in the group check it;
[0031] If the check passes, the leader node sends a message containing y to other nodes in the group. i ,w i ,σ iNews <RequestVoteResponse,v,t,TV v i >y i ,w i ,σ i >
[0032] Otherwise, return to step (8a) and re-initiate the view change request;
[0033] (9c) After receiving more than t+1 RequestVoteResponse requests, the node synthesizes them into an aggregate signature and verifies the signature;
[0034] If the verification is successful, the node will elect itself as the leader.<Validate,v,t,i> y,w,σ> is sent to the client and other group leader nodes to complete the leader election;
[0035] Otherwise, return to step (8).
[0036] Compared with the prior art, the present invention has the following advantages:
[0037] 1) The present invention introduces a trust value calculation method, that is, assigning different trust values to each node according to the behavior of each node in the consensus process and the communication delay with other nodes, which can improve the credibility of the election, so that the node with higher consensus efficiency becomes the leader node, and effectively solves the security risks caused by the nodes being elected as the leader node in turn in the existing consensus technology, and effectively avoids the "rich-poor gap" problem caused by a single node becoming the leader node multiple times.
[0038] 2) The present invention introduces the threshold signature technology. Since the threshold signature technology requires any number of nodes greater than the threshold to unite, the system private key can be recovered. Otherwise, the system private key cannot be recovered. Therefore, even if the number of malicious nodes less than the threshold is united, the system private key cannot be recovered. This ensures that the system can resist Byzantine malicious nodes and improves the security of consensus.
[0039] 3) Due to the introduction of bilinear mapping technology, the present invention can reduce the communication complexity of the existing anti-Byzantine error consensus technology while ensuring the same security and improve the consensus efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart for realizing the present invention;
[0041] Figure 2 It is the overall node interaction diagram of the consensus transaction part in the present invention;
[0042] Figure 3 It is the overall node interaction diagram of the view conversion part in the present invention;
[0043] Figure 4 This is the overall node interaction diagram of the leader election part in the present invention. DETAILED DESCRIPTION
[0044] The implementation of the present invention is further described below in conjunction with the accompanying drawings.
[0045] Reference Figure 1 , the implementation steps of this example are as follows:
[0046] Step 1: System initialization
[0047] Before starting the transaction consensus, the system is initialized, including the initialization of the key, the initialization of the node grouping, and the initialization of the leader node election for each group. The specific implementation is as follows:
[0048] 1.1) Initialize the key:
[0049] 1.1.1) Through a trusted third-party organization TTP, the blockchain system generates a public-private key pair (x, y), and divides the private key x into N parts and provides them to N nodes for sharing. Each node holds part of the private key x. i ;
[0050] 1.1.2) The third-party institution TTP generates a random number matrix XX and its corresponding random number public key matrix YY for the signer's private use:
[0051] First, define G1 and G2 as two multiplicative groups, g1 and g2 as generators, p as the order of group G1, e as the bilinear map from G1×G1→G2, and define the hash function H:{0,1} * →G1, public key Public system parameters params = {G1, G2, e, y, H};
[0052] Next, the third-party organization TTP generates a random number matrix XX for the signer’s private use:
[0053]
[0054] Then, the third-party agency TTP calculates the public key according to the formula Calculate the corresponding public random number matrix YY:
[0055]
[0056] Among them xx jk is a random element in the jth row and kth column of the private random number matrix, where j ranges from 1 to u and k ranges from 1 to v; is an element in the jth row and kth column of the public random number matrix, and mod p is the modulus of each element in the matrix;
[0057] 1.1.3) The third-party organization TTP generates a private random number matrix XX for each node i i and the public random number matrix YY i :
[0058] First, each element in the random number matrix XX is divided into N parts according to the secret sharing scheme, and a private random number matrix XX is generated for each node i. i :
[0059]
[0060] Then, according to the calculation formula of the public key Calculate the public random number matrix YY corresponding to each node i i :
[0061]
[0062] Where (xx jk ) i is a random element in the jth row and kth column of the private random number matrix of node i. is an element in the jth row and kth column of the public random number matrix of node i, and mod p is the modulus of each element in the matrix;
[0063] 1.2) Initialization of node grouping: Nodes are divided into four groups based on the analysis of communication volume, and the mutual communication of some nodes is used instead of the mutual communication of all nodes to reduce the complexity of communication and improve the efficiency of consensus;
[0064] 1.3) Initialize leader election: Set an initial trust value TV0 for each node i i , select TV0 in each group i The node with the highest value becomes the leader node.
[0065] The following combination Figure 2 Describe the consensus transaction part:
[0066] Step 2: The client sends transaction information.
[0067] The client sends a Request message containing the transaction content m, client information c, and the client request sequence timestamp t to the leader node of each group. <Request<m,t,c> >
[0068] Step 3: The leader node sends transaction information to the nodes in the group, and other nodes verify it.
[0069] 3.1) The leader node sends the information including message content m, transaction sequence number n, view number v and message digest d to other nodes in the group;
[0070] 3.2) Other nodes check the received information, and the check includes three aspects:
[0071] First, check whether the summary information of m is consistent with that of d.
[0072] The second is to check whether the view number v is consistent with the view number you know.
[0073] The third is to check whether the message number n is a valid number;
[0074] 3.3) Determine the follow-up actions based on the inspection results:
[0075] If all the inspection contents are passed, run step 4.
[0076] Otherwise, run step 8.
[0077] Step 4: Broadcast signature information among nodes in the group.
[0078] 4.1) Nodes in the group use the private key x assigned to them by a third-party organization i And the private key random number matrix XX, the public key random number matrix YY are used to sign the received transaction information:
[0079] 4.1.1) The node calculates the random row number R according to its node number i and message m z :
[0080] R z =h(m)mod i
[0081] Where h(m) is the hash result of the transaction message;
[0082] 4.1.2) Take out the random number matrix XX in turn i In the zth column, the Rth z The random numbers of the rows are summed to obtain the random number R selected by node i i :
[0083]
[0084] in is the random number matrix XX i In the zth column, the Rth z The random number of the row, mod p is the remainder of the sum;
[0085] 4.1.3) The node calculates the signature information σ of the message i , verify the signature information wi , public key information y i :
[0086]
[0087] where x i is the partial private key corresponding to node i, y i is the partial public key corresponding to node i, g1 is the generator of the first multiplicative group G1;
[0088] 4.2) The nodes in the group that have completed the signature will sign σ i , private key x i The corresponding public key y i And the information used to verify the signature w i Broadcast to all nodes in the group except itself.
[0089] Step 5: The leader node sends signature information to other group leader nodes.
[0090] When the leader node receives signature information from more than t+1 nodes, it will send the signature information it received to all leader nodes except itself through confirmation information.
[0091] Step 6: The leader node aggregates and verifies the signatures.
[0092] 6.1) The leader node receives more than t+1 signature information. According to the received signature information {σ1,σ2,...,σ t}, calculate the aggregate signature σ, and verify the signature information w and public key information y:
[0093]
[0094]
[0095] Among them, x i is the node’s partial private key, R i is the random number selected by node i, R is the random number finally selected by the signer, x is the system private key, h(m) is the hash result of the transaction information, g1 is the generator of the first multiplication group G1, λ i is the Lagrange coefficient;
[0096] 6.2) The leader node verifies the aggregate signature result σ:
[0097] e(σ,g1)=e(h(m),yw)
[0098] Where e is the specified bilinear mapping; if the results on the left side of the equation are equal to those on the right side of the equation, the test passes;
[0099] 6.3) Determine the follow-up actions based on the inspection results:
[0100] If the aggregate signature σ passes the check, run step 7;
[0101] Otherwise, verify the received signature σ respectively i ;
[0102] 6.4) The leader node signs each part σ i To test:
[0103] e(σ i ,g1)=e(w i y i ,h(m))
[0104] where σ i is the signature received from node i, g1 is the generator of the first multiplicative group G1, if the results on the left side of the equation are equal to those on the right side of the equation, the test passes;
[0105] 6.5) Determine the follow-up actions based on the inspection results:
[0106] If the signature σ i If the check fails, run step 8;
[0107] Otherwise, check the next signature σ received i ;
[0108] Step 7: The leader node sends the message <<Reply,v,t,c,i> ,w,σ> is broadcast to the client.
[0109] Step 8: The node changes the view of the signature that fails verification.
[0110] Reference Figure 3 , the specific implementation of this step is as follows:
[0111] 8.1) There are three situations in which a node initiates a view change:
[0112] The slave node did not receive the leader node message within the timeout period;
[0113] Leader node message signature verification failed;
[0114] Receive more than f+1 error feedback messages from the node;
[0115] 8.2) The node that considers it necessary to initiate a view change request sends a signed message to other nodes in the group.
[0116] The node that needs to initiate a view change request signs the message. The specific process is the same as the signing method described in step 4.1); then the node will include its own signature information σ i , verification information w i , part of the public key y i The view change request is sent to other nodes in the same group;
[0117] 8.3) After receiving more than t+1 signature messages, other nodes in the group send these t+1 signature messages σ i Aggregate into a signature σ, the specific process is the same as the aggregation method described in step 6.1);
[0118] 8.4) The node that completes the aggregate signature verifies the aggregate result σ, and the specific implementation process is the same as the verification method described in step 6.2);
[0119] 8.5) Determine the follow-up actions based on the inspection results:
[0120] If the verification is successful, proceed to step 8.6);
[0121] Otherwise, return to step 8 to re-initiate the view change request;
[0122] 8.6) The node that completes the aggregate signature sends a message containing the aggregate signature to other different leader nodes in the system. After receiving the message, other leader nodes clear the consistency request before the view change and regroup the nodes in the system.
[0123] Step 9: The nodes elect a leader for the group.
[0124] Reference Figure 4 , the specific implementation of this step is as follows:
[0125] 9.1) The node that receives the leader election signal calculates its TV under view v v i value:
[0126]
[0127] Where a, b, and c are three adjustment factors with different values. isLeader is a 0 / 1 variable used to indicate whether the node is the leader node in view v-1. feekmessage indicates the number of error feedback messages received by the node in view v-1. Indicates the average time it takes for the node to communicate and provide feedback to other nodes;
[0128] 9.2) TV in the group v iThe node with the highest value sends the message <RequestVote,v,t,TV v i >Send to other nodes in the group;
[0129] 9.3) Other nodes check the received information:
[0130] 9.3.1) Determine the TV of the node that sends the RequestVote message v i Whether the value is greater than its own;
[0131] If yes, the check is passed and go to step 9.3.2);
[0132] Otherwise, no information is sent;
[0133] 9.3.2) Determine whether the view number contained in the RequestVote message is consistent with the view number you think;
[0134] If they are consistent, the check passes and step 9.4 is executed;
[0135] Otherwise, no information is sent.
[0136] 9.4) The node that passes the verification sends a message containing y to other nodes in the group. i ,w i ,σ i The specific process is the same as the signature method described in step 4.1);
[0137] 9.5) After receiving more than t+1 signature messages, other nodes in the group send these t+1 signature messages σ i Aggregate into a signature σ, the specific process is the same as the aggregation method described in step 6.1);
[0138] 9.6) The node that completes the aggregate signature verifies the aggregate result σ: the specific implementation process is the same as the verification method described in step 6.2);
[0139] 9.7) Determine the follow-up actions based on the test results:
[0140] If the verification is successful, the node will send the message of being elected as the leader to the client and other group leader nodes to complete the consensus transaction process;
[0141] Otherwise, return to step 8 to re-initiate the view change request.
[0142] The above description is only a specific example of the present invention and does not constitute any limitation to the present invention. It is obvious that for professionals in this field, after understanding the content and principles of the present invention, it is possible to make various modifications and changes in form and details without departing from the principles and structures of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.
Claims
1. A Byzantine error-resistant node consensus method based on threshold signatures, It is characterized in that The steps include: (1) System initialization; (1a) In the key initialization phase, a trusted third-party institution, TTP, assists the blockchain system in generating a public-private key pair (x, y), and makes the public key y public. The private key x is divided into N parts and provided to N nodes for sharing. Each node holds part of the private key x. i The third-party institution TTP generates a random number matrix XX for the signer's private use and its corresponding random number public key matrix YY, and distributes it to N nodes in the system; (1b) When the system is initialized, the nodes are divided into four groups according to the analysis of the communication volume, and a trust value threshold TV is set. An initial trust value TV higher than the threshold is set for each node. 0 i ; (1c) When the system initializes the leader election, each group independently elects the TV 0 i The node with the highest value becomes the leader node; (2) The client sends a Request message containing the transaction content m, client information c, and the client request sequence timestamp t to the leader node of each group. <Request<m,t,c> > (3) The leader node assigns a sequence number n to the received transaction information, and sends the message content m, transaction sequence number n, view number v, and message summary d through the message <<AppendEntries,v,n,d> ,m>Send to other nodes in the group for inspection: If the check passes, the node enters the signature response phase and executes step (4); Otherwise, jump to step (8) to change the view; (4) The node entering the signature response phase uses the private key x assigned to it by the TTP in step (1) i and random number matrix XX, YY to sign the transaction information it receives, and the signature σ i , private key x i The corresponding public key y i And the information used to verify the signature w i By Message<<AppendEntriesReponse,v,n,i> ,y i ,w i ,σ i >Broadcast to all nodes in the group except itself, where v is the current view number and i is the node number; the signature σ is calculated i , public key y i And the information used to verify the signature w i , implemented as follows: (4a) The node calculates the random row number R based on its node number i and message m. z : R z =h(m)mod i Where h(m) is the hash result of the transaction message; (4b) Take out the random number matrix XX in sequence i In the zth column, the Rth z The random numbers of the rows are summed to obtain the random number R selected by node i i : in is the random number matrix XX i In the zth column, the Rth z The random number of the row, mod p is the remainder of the sum; (4c) The node calculates the signature information σ of the message i , verify the signature information w i , public key information y i : where x i is the partial private key corresponding to node i, y i is the partial public key corresponding to node i, g 1 is the first multiplicative group G 1 The generator of (5) After the leader node receives at least t+1 AppendEntriesReponse messages, it sends the signature information σ i By confirming the message <<Commit,v,n,i> ,y i ,w i ,σ i >Send to all leader nodes except itself; (6) After any leader node receives more than t+1 Commit messages, it aggregates them and verifies the aggregate signature σ. The implementation process is as follows: (6a) The leader node receives the signature information {σ 1 ,σ 2 ,...,σ t }, calculate the aggregate signature σ, and the information w,y used to verify the signature: Among them, x i is the node’s partial private key, R i is the random number selected by node i, R is the random number finally selected by the signer, x is the system private key, h(m) is the hash result of the transaction information, g 1 is the first multiplicative group G 1 The generator of λ i is the Lagrange coefficient; (6b) The leader node verifies the aggregate signature result σ: e(σ, g 1 )=e(h(m),is) Where e is the specified bilinear mapping; if the results on the left side of the equation are equal to those on the right side of the equation, the test passes; (6c) The leader node signs each part σ i To test: e(σ i ,g 1 )and(w i y i ,h(m)) where σ i is the signature received from node i, g 1 is the first multiplicative group G 1 If the left side of the equation is equal to the right side of the equation, the test passes; If the verification is successful, execute step (7); Otherwise, verify the partial signatures σ received i , and for σ i Node i that fails the verification executes step (8); (7) Any leader node enters the reply phase and sends a message <<Reply,v,t,c,i> ,w,σ> broadcast to the client; (8) Change the view of the signature that fails verification: (8a) Any node in the system that needs to initiate a view change will include its own signature information σ i , verification information w i , part of the public key y i View change request <Viewchange<h,v-1,i,v,m> y i ,w i ,σ i >Sent to other nodes in the same group, where v is the new view number and h is the summary information; the node that needs to initiate the view change request calculates the signature σ i , public key y i And the information used to verify the signature w i , implemented as follows: (8a1) The node calculates the random row number R according to its node number i and message m. z : R z =h(m)mod i Where h(m) is the hash result of the transaction message; (8a2) Take out the random number matrix XX in sequence i In the zth column, the Rth z The random numbers of the rows are summed to obtain the random number R selected by node i i : in is the random number matrix XX i In the zth column, the Rth z The random number of the row, mod p is the remainder of the sum; (8a3) The node calculates the signature information σ of the message i , verify the signature information w i , public key information y i : where x i is the partial private key corresponding to node i, y i is the partial public key corresponding to node i, g 1 is the first multiplicative group G 1 The generator of (8b) Any node that receives at least t+1 view change requests aggregates the signature information and verifies it. The process is as follows: (8b1) The node receives the signature information {σ 1 ,σ 2 ,...,σ t }, calculate the aggregate signature σ, and the information w,y used to verify the signature: Among them, x i is the node’s partial private key, R i is the random number selected by node i, R is the random number finally selected by the signer, x is the system private key, h(m) is the hash result of the transaction information, g 1 is the first multiplicative group G 1 The generator of λ i is the Lagrange coefficient; (8b2) The node verifies the aggregate signature result σ: e(σ, g 1 )=e(h(m),is) Where e is the specified bilinear mapping; if the results on the left side of the equation are equal to those on the right side of the equation, the test passes; If the verification is successful, proceed to step (8c); Otherwise, return to step (8a) and re-initiate the view change request; (8c) Node sends <Viewchange-ack,<h,i,v> ,y,w,σ> message to other different leader nodes in the system; other leader nodes clear the consistency request before the view change, and the nodes in the system will also be regrouped and execute step (9); (9) The leadership selection process; (9a) The node that receives the leader election signal calculates its TV under view v v i Value, TV in each group v i The node with the highest value will send the message <RequestVote,v,t,TV v i >To other nodes in the group; (9b) After receiving the RequestVote message, other nodes in the group check it. The check content is as follows: (9b1) Determine the TV of the node that sends the RequestVote message v i Is the value greater than its own: If yes, then the check passes and step (9b2) is executed; Otherwise, no information is sent; (9b2) Determine whether the view number contained in the RequestVote message is consistent with the view number you think: If they are consistent, the check passes and a RequestVoteResponse message is sent to the leader node and other nodes in the group; Otherwise, no information is sent; If the check passes, the leader node sends a message containing y to other nodes in the group. i ,w i ,σ i News <RequestVoteResponse,v,t,TV v i >y i ,w i ,σ i > Otherwise, return to step (8a) and re-initiate the view change request; (9c) After receiving more than t+1 RequestVoteResponse requests, the node synthesizes them into an aggregate signature and verifies the signature; If the verification is successful, the node will elect itself as the leader.<Validate,v,t,i> y,w,σ> is sent to the client and other group leader nodes to complete the leader election; Otherwise, return to step (8).
2. The method according to claim 1, It is characterized in that In step (1), the third-party institution TTP generates a private random number matrix XX and its corresponding public key random number matrix YY, which is implemented as follows: (1a) System establishment: Definition G 1 ,G 2 are two multiplication groups, g 1 ,g 2 is the generator, p is the group G 1 The order of G 1 ×G 1 →G 2 Bilinear map, define hash function H:{0,1} * →G 1 , public key Public system parameters params = {G 1 ,G 2 ,e,y,H}; (1b) TTP generates a random number matrix XX for the signer’s private use, and calculates the corresponding public random number matrix YY according to the calculation formula of the public key in 1(a), the structure of which is as follows: Among them xx jk is a random element in the jth row and kth column of the private random number matrix, where j ranges from 1 to u and k ranges from 1 to v; is an element in the j-th row and k-th column of the public random number matrix, and mod p is the modulus of each element in the matrix.
3. The method according to claim 1, It is characterized in that In step (1), the third-party organization TTP sends the private random number matrix XX and the public random number matrix YY to N nodes in the system. According to the secret sharing scheme, each element in the random number matrix XX, YY is divided into N parts, and they are secretly distributed to each node in the network. The private random number matrix XX obtained by each node i is i and the public random number matrix YY i , respectively expressed as follows: Where (xx jk ) i is a random element in the jth row and kth column of the private random number matrix of node i. is an element in the j-th row and k-th column of the public random number matrix of node i, and mod p is the modulus of each element in the matrix.
4. The method according to claim 1, It is characterized in that In step (3), other nodes in the group respond to the message <<AppendEntries,v,n,d> ,m> performs checks, including: checking whether the summary information of m is consistent with d; checking whether the view number v is consistent with the view number known to itself; and checking whether the message number n is a valid number.
5. The method according to claim 1, It is characterized in that The node that receives the leader election signal in step (9a) calculates its TV under view v v i The value is as follows: Where a, b, and c are three adjustment factors with different values. isLeader is a 0 / 1 variable used to indicate whether the node is the leader node in view v-1. feekmessage indicates the number of error feedback messages received by the node in view v-1. Indicates the average time it takes for this node to communicate with other nodes.
