An efficient and secure trust consensus method based on blockchain
By executing trust assessment tasks in parallel on the blockchain and employing random sharding and multi-round consensus mechanisms, the efficiency and security issues of trust consensus under the zero-trust model are solved, achieving efficient and secure trust assessment and verification, and preventing attacks and centralization risks.
Patent Information
- Application Number
- CN202211234726.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-10-10
AI Technical Summary
Under the zero-trust model, existing technologies struggle to achieve trust consensus efficiently and securely, especially in blockchain application scenarios. Traditional centralized trust management systems are unsuitable, and distributed trust management methods lack consensus in trust assessment and public verification.
By designing a trust consensus method on the blockchain, including parallel execution of trust assessment tasks, trust assessment is performed off-chain using a trusted operating environment, and the correctness and security of trust assessment results are ensured through random sharding and multi-round consensus mechanisms. A verifiable random function is used to generate random number seeds for cross-shard verification.
It achieves efficient and secure trust consensus, avoids forks and DDoS attacks, improves the security and efficiency of the blockchain system, and ensures the accuracy and reliability of trust assessment results.
Smart Images

Figure CN115712920B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of blockchains, and particularly relates to an efficient and secure trust consensus method based on a blockchain. BACKGROUND
[0002] Trust management has been widely applied in various fields such as cloud computing, social networks, multi-agent systems, mobile networks, wireless communications, etc. through iterative processes of trust evaluation, establishment, control, enhancement and guarantee of collected useful data, can maintain the trust relationship between system entities, provide support for decision-making, enhance the security of the system, and is one of the effective methods to protect the security of network systems. The zero trust model is proposed to deal with various security threats, especially internal attacks. Its basic concept is that the system has no security boundary and does not guarantee the existence of any trusted party. The security of the system is guaranteed by strict authentication, access control and other reliable technologies. At present, the research on security and trust under the zero trust model has become a research hotspot in this field, and no system entity can be fully trusted.
[0003] The research on trust management has lasted for decades, and many previous researches are not based on the zero trust model. These methods cannot be directly applied to modern distributed network systems such as heterogeneous integrated networks, crowdsourcing / crowdsourcing perception, Internet of Things, etc. In these systems, no entity can be fully trusted. Traditional centralized trust management systems rely on trusted entities to perform the tasks of collecting data, evaluating trust and managing trust, and therefore are not applicable under the zero trust model. Distributed trust management methods are highly expected, but existing distributed trust management methods lack consensus in trust evaluation and public verification.
[0004] Blockchain is a key technology to realize decentralization, which is based on cryptography, game theory and peer-to-peer network communication, and has the characteristics of openness, tamper resistance, information consistency and transparency. In the blockchain, multiple nodes cooperate with each other through a unified consensus mechanism to manage the entire network in a self-organizing manner, thereby breaking the dependence on a single node. However, in many application scenarios of blockchain, security becomes the main consideration of trust consensus, which brings great challenges to distributed trust management.
[0005] In the prior art, Yang et al. proposed a distributed vehicle network trust management system supporting vehicle trust query to evaluate the trust value of received information, and a consensus mechanism combining PoW and PoS was used to elect suitable miners to reduce the calculation cost of consensus, but the method did not analyze the security and applicability thereof. Mao et al. introduced a blockchain-based reputation system to improve the effectiveness of supply chain management and supervision, and deep learning was used to evaluate trust, and the evaluation results were divided into trust and distrust, but the above method did not use distributed trust evaluation and consensus, and its efficiency and security were not mentioned.
[0006] Therefore, how to efficiently and securely reach trust consensus under the zero trust model has become a technical problem to be solved by those skilled in the art. SUMMARY
[0007] In order to solve the above problems existing in the prior art, the present application provides an efficient and secure trust consensus method based on blockchain. The technical problem to be solved by the present application is solved by the following technical scheme:
[0008] The present application provides an efficient and secure trust consensus method based on blockchain, comprising:
[0009] The request direction initiates a trust evaluation request to the trust evaluation party;
[0010] In response to the trust evaluation request, the trust evaluation party determines an entity corresponding to the data stored in the cloud server as a to-be-evaluated entity, and each cloud server processes the trust evaluation task in parallel to generate a trust evaluation result and a verification tag of the to-be-evaluated entity; the verification tag comprises a public key and a signature of the to-be-evaluated entity;
[0011] The blockchain obtains the trust values of all consensus nodes, and performs randomness slicing on all consensus nodes according to a first preset threshold and the trust values;
[0012] The request direction initiates a trust evaluation verification request to all consensus nodes in the blockchain, and determines the first round of consensus nodes from all consensus nodes, and the first round of consensus nodes verifies the correctness of the trust evaluation result according to the verification tag;
[0013] When the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs the trust evaluation result and the verification tag after the verification thereof, and publishes the signature, the trust evaluation result and the verification tag, so that other consensus nodes on the same slice as the first round of consensus nodes perform approval and reach the first round of consensus;
[0014] The requestor generates a random seed by using a verifiable random function, sends the random seed to all shards of the blockchain, and determines second-round consensus nodes from each shard;
[0015] The second-round consensus nodes verify the correctness of the trust evaluation result according to the verification label, and generate a new block to publish the verified trust evaluation result after reaching the second-round consensus.
[0016] In an embodiment of the present application, the blockchain obtains trust values of all consensus nodes, and performs the step of random sharding on all consensus nodes according to a first preset threshold and the trust values, which includes:
[0017] Determine the number N of shards of all consensus nodes in the blockchain consensus system;
[0018] Divide the trust value range [0, 1] into Q regions;
[0019] According to the trust value range corresponding to the Q regions, divide the plurality of consensus nodes in the blockchain consensus system into Q groups;
[0020] Generate a random seed and use the random seed to sort the Q groups of consensus nodes respectively;
[0021] For the qth group of consensus nodes, if the number of consensus nodes in the group is less than N, skip the group of consensus nodes, otherwise, select consensus nodes from the group and divide them into N shards; wherein the sum of the trust values of the consensus nodes in each shard is greater than or equal to the first preset threshold, |Q q | represents the number of nodes in the qth group of consensus nodes, represents the floor function.
[0022] In an embodiment of the present application, wherein TV k represents the trust value of the kth consensus node, TV represents the sum of the trust values of the K consensus nodes, and tv0 represents the first preset threshold.
[0023] In an embodiment of the present application, after the requestor initiates a trust evaluation verification request to all consensus nodes in the blockchain and determines the first-round consensus nodes that meet the first preset condition from each shard, the step in which the first-round consensus nodes verify the correctness of the trust evaluation result according to the verification label includes:
[0024] The requestor initiates a trust evaluation verification request to all consensus nodes in the blockchain, and determines the first-round consensus nodes that meet the first preset condition from all consensus nodes;
[0025] The first round of consensus nodes grant the access right of the trust evaluation result and the verification label to the requestor;
[0026] The first round of consensus nodes request the trust evaluation result and the verification label from the trust evaluation party, and verify the correctness of the trust evaluation result according to the verification label.
[0027] In an embodiment of the present application, when the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs the trust evaluation result and the verification label after the verification of the first round of consensus nodes, and publishes the signature, the trust evaluation result and the verification label, so that other consensus nodes on the shard where the first round of consensus nodes are located can be approved, and the first round of consensus is reached.
[0028] When the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs the trust evaluation result and the verification label after the verification of the first round of consensus nodes, and publishes the signature, the trust evaluation result and the verification label.
[0029] The other consensus nodes of the shard where the first round of consensus nodes are located use the verification label to approve the trust evaluation result.
[0030] If the trust evaluation result passes the correctness verification of more than the first preset number of other consensus nodes, and the sum of the trust values of the other consensus nodes is greater than or equal to the second preset threshold, the first round of consensus is reached.
[0031] In an embodiment of the present application, If Thr k ≥ K, then Thr k = K-1, where, Z is a set of positive integers, and Thr k represents the first preset number.
[0032]
[0033] wherein, Thr T represents the second preset threshold.
[0034] In an embodiment of the present application, the requestor generates a random number seed using a verifiable random function, sends the random number seed to all shards of the blockchain, and determines the second round of consensus nodes from each shard.
[0035] The requestor generates a random number seed using a verifiable random function, and sends it to each shard of the blockchain;
[0036] Select A second round consensus node.
[0037] In an embodiment of the present application, when there are multiple second round consensus nodes to verify the correctness of the trust evaluation results of the same entity to be evaluated, the result of the verification of the correctness with the latest time stamp is taken as the standard for aggregation.
[0038] In an embodiment of the present application, a trusted operating environment is deployed in each of the cloud servers.
[0039] Compared with the prior art, the present application has the following beneficial effects:
[0040] The present application provides an efficient and secure trust consensus method based on a blockchain, which performs trust evaluation tasks in parallel off-chain, verifies the correctness of the trust evaluation results of the entity to be evaluated in parallel after sharding, and then reaches a first round of consensus within the shard where the first round consensus node is located and reaches a second round of consensus across shards between the second round consensus nodes, which is efficient. Secondly, the sharding process of the present application has randomness, which can avoid the unique block generation of forking and the profit equalization of centralization, thereby preventing DDoS attacks and intrusion of certain specific nodes, and is secure.
[0041] The present application will be further described in detail below in combination with the drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 is a schematic diagram of the efficient and secure trust consensus method based on a blockchain provided by the embodiments of the present application;
[0043] Figure 2 is a flowchart of the efficient and secure trust consensus method based on a blockchain provided by the embodiments of the present application.
[0044] Figure 3 is an interaction schematic diagram of the efficient and secure trust consensus method based on a blockchain provided by the embodiments of the present application.
[0045] Figure 4 is a calculation schematic diagram of the conversion of a polynomial into an arithmetic circuit provided by the embodiments of the present application. DETAILED DESCRIPTION
[0046] The present application will be further described in detail below in combination with the drawings and embodiments.
[0047] Figure 1 is a schematic diagram of the efficient and secure trust consensus method based on a blockchain provided by the embodiments of the present application, Figure 2 is a flowchart of the efficient and secure trust consensus method based on a blockchain provided by the embodiments of the present application. Figure 1The method comprises the following steps: Figures 1-2 The embodiment of the present application provides a high-efficiency and safe trust consensus method based on a blockchain, which comprises the following steps:
[0048] S1, a trust evaluation request is initiated by a requestor to a trust evaluation party;
[0049] S2, in response to the trust evaluation request, the trust evaluation party determines an entity corresponding to the data stored in the cloud server as a to-be-evaluated entity, and processes the trust evaluation task in parallel by each server to generate a trust evaluation result and a verification tag of the to-be-evaluated entity; the verification tag comprises a public key and a signature of the to-be-evaluated entity;
[0050] S3, the blockchain acquires trust values of all consensus nodes, and performs randomness sharding on all consensus nodes according to a first preset threshold and the trust values;
[0051] S4, the requestor initiates a trust evaluation verification request to all consensus nodes in the blockchain, and determines first-round consensus nodes from all consensus nodes, and the first-round consensus nodes perform correctness verification on the trust evaluation result according to the verification tag;
[0052] S5, when the trust evaluation result passes the correctness verification of the first-round consensus nodes, the first-round consensus nodes sign the trust evaluation result and the verification tag after the correctness verification, and publish the signature, the trust evaluation result and the verification tag, so that other consensus nodes on the same shard as the first-round consensus nodes perform approval and reach a first-round consensus;
[0053] S6, the requestor generates a random number seed by using a verifiable random function, sends the random number seed to all shards of the blockchain, and determines second-round consensus nodes from each shard;
[0054] S7, the second-round consensus nodes perform correctness verification on the trust evaluation result according to the verification tag, and generate a new block to publish the verified trust evaluation result after reaching a second-round consensus.
[0055] In the embodiment, in order to reduce the workload of the blockchain, the trust evaluation task can be executed in parallel on the cloud server off-chain according to the trust evaluation request of the requestor; specifically, a trusted execution environment is deployed in each cloud server to protect privacy, for example, Intel SGX enclave, and the process of off-chain trust evaluation is as follows:
[0056] (1) Key initialization:
[0057] A public parameter (e, p, G1, G2, g, h, H) is generated, where e represents a bilinear mapping: G1xG1→G2, G1, G2 represent two cyclic groups of order p, g, h represent generators of G1, H: {0, 1} * →Z p is a one-way hash function that maps any string to Z p ;
[0058] The requester R and the trust evaluation party TE j generate a public-private key pair (pk R , sk R ) and a public-private key pair (pk TE j deployed Enclave E j generate a public-private key pair (pk Consensus node CN k generate a public-private key pair (pk
[0059] R selects a random number y j , calculates Y j as the public parameter of the blockchain consensus system, and then R verifies whether E j is correctly deployed and whether the related function code deployed in the enclave is correctly loaded through remote attestation of SGX, and after successful verification, R and E j establish a dedicated communication channel, encrypt y j after E j 's public key and send it to E j , and E j decrypts y j with the private key after receiving it;
[0060] Each entity to be evaluated i generates a symmetric key symK i,j to encrypt the trust data uploaded to TE j , selects random numbers d i,j , a i and k i,j , and each entity to be evaluated i generates its own public-private key pair
[0061] (2) Data collection:
[0062] Before each round of trust evaluation task execution, TE j has collected an encrypted trust data set ED i,j from the entity to be evaluated i, where the set EDi,j ={X i,j ,eid i,j C i,j ,C′ i,j ,δ i,j Includes: Uploading to TE j Using symmetric key symK i,j Encrypted Trust Data X i,j =Enc(symK i,j ,TD i ), X i,j =Enc(symK i,j ,TD i ) for uploading to TE j Using symmetric key symK i,j Encrypted TD i Trust data afterwards For E j Decrypting X i,j δ i,j =(pk i ,σ i,j ) represents the verification label used to verify the trust assessment results, pk i Let i be the public key of the entity to be evaluated. This indicates that the entity i to be evaluated trusts the data TD. i Message signatures based on ElGamal.
[0063] (3) Update access control policy:
[0064] Before each round of trust assessment, R obtains {eid} from the blockchain. i,j} is used to identify each X i,j The corresponding trust assessment results, and the consensus nodes CN that participated in verifying the trust assessment results. k public key Perform hash calculation to obtain uid k Used to identify CN k Then, R is E j Generate access control policy poll j ,pol j Each UID is specified k The corresponding consensus node CN k Accessible EID ij The corresponding trust assessment results, R transmits to pol via a remote dedicated communication channel. j Send to E j .
[0065] (4) Trust assessment:
[0066] R-direction TEj Initiate a trust assessment request and send the trust assessment request message Req. TE and the corresponding signature Send to TE j TE j After receiving the request message, use R's public key to pk. R For signature Verification is performed; once the signature verification is successful, TE... j The encrypted trust dataset it stores {ED i,j}Sent to E j And perform trust assessment tasks;
[0067] E j Get {ED i,j Before conducting a trust assessment task, it is necessary to go through... Obtain the symmetric key symK i,j Then use symK i,j Decryption yields trusted data TD i =Dec(symK) i,j ,X i,j E j PK is required i Verify signature σ i,j To prevent TE j The uploaded trust data was tampered with and verified. in,
[0068] Furthermore, if the verification passes, E j Trust assessment can transform computational tasks into polynomial functions. It then uses arithmetic circuits to calculate and output the trust assessment result Res. i,j = f(TD1,TD2,…,TD) i ) and proof information P i,j =(ρ i,j ,δ′ i,j ).
[0069] Figure 3 This is an interactive schematic diagram of an efficient and secure trust consensus method based on blockchain provided in an embodiment of the present invention. Please refer to... Figures 1-3 In step S3 above, the step of obtaining the trust values of all consensus nodes and randomly sharding all consensus nodes according to the first preset threshold and the trust values includes:
[0070] S301. Determine the number N of shards for all consensus nodes in the blockchain consensus system;
[0071] S302, divide the trust value range [0, 1] into Q regions;
[0072] S303, according to the trust value range corresponding to the Q regions, divide the plurality of consensus nodes in the blockchain consensus system into Q groups;
[0073] S304, generate a random number seed, and sort the Q groups of consensus nodes respectively using the random number seed;
[0074] S305, for the qth group of consensus nodes, if the number of consensus nodes in it is less than N, skip this group of consensus nodes, otherwise, select consensus nodes from the group and divide them into N shards; wherein the sum of the trust values of the consensus nodes in each shard is greater than or equal to a first preset threshold, |Q q | represents the number of nodes in the qth group of consensus nodes, represents the floor.
[0075] In this embodiment, the number of shards wherein, TV k represents the trust value of the kth consensus node, TV represents the sum of the trust values of the K consensus nodes, and tv0 represents the first preset threshold.
[0076] It should be noted that in the above step S305, if the number of nodes in the qth group of consensus nodes is greater than or equal to N, select consensus nodes from it and sort them according to the size of the trust value, and then divide these consensus nodes into N shards according to a preset rule, and the trust ability of the N shards is balanced, that is, the sum of the trust values of each shard is approximately equal, and the sum of the trust values of two shards is: then For example: the number of nodes in the qth group of consensus nodes is greater than or equal to N, 12 consensus nodes are taken out from the qth group of consensus nodes, and the trust values are arranged in descending order as 4.9, 4.8, 4.7, 4.6, 4.5, 4.4, 4.3, 4.0, 3.9, 3.7, 3.5 and 3.3, N = 3, then the first shard contains {4.9, 4.4, 4.3, 3.3}, the second shard contains {4.8, 4.5, 4.0, 3.5}, and the third shard contains {4.7, 4.6, 3.9, 3.7}. Obviously, the trust values of the three shards are evenly distributed, and the sums are 16.9, 16.8 and 16.9 respectively.
[0077] Optionally, after the step S4, the request direction blockchain all consensus nodes to initiate trust evaluation verification request, and determine the first round of consensus nodes meeting the first preset condition from each shard, the step that the first round of consensus nodes verifies the correctness of the trust evaluation result according to the verification label comprises:
[0078] S401, a request direction all consensus nodes in the blockchain to initiate a trust evaluation verification request, and determine from all consensus nodes a first round of consensus nodes meeting a first preset condition;
[0079] S402, the request party grants the first round of consensus nodes access to the trust evaluation result and the verification label;
[0080] S403, the first round of consensus nodes request the trust evaluation party to obtain the trust evaluation result and the verification label, and verify the correctness of the trust evaluation result according to the verification label.
[0081] In order to quickly reach a consensus, the embodiment uses multiple shards to verify the trust evaluation result in parallel. Specifically, the request party gives each shard the first round of consensus nodes meeting the preset condition the access right to the trust evaluation result and the verification label, and through an access control strategy, the first round of consensus nodes in each shard can only access the trust evaluation result and the verification label assigned to itself. Alternatively, the preset condition is that the consensus nodes with a trust value higher than a preset trust threshold in each shard are the first round of consensus nodes.
[0082] When the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs the trust evaluation result and the verification label that have passed the verification, and publishes the signature, the trust evaluation result and the verification label, so that other consensus nodes on the shard where the first round of consensus nodes are located can perform approval and reach the first round of consensus.
[0083] When the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs the trust evaluation result and the verification label that have passed the verification, and publishes the signature, the trust evaluation result and the verification label;
[0084] The other consensus nodes of the shard where the first round of consensus nodes are located use the verification label to approve the trust evaluation result;
[0085] If the trust evaluation result passes the correctness verification of more than a first preset number of other consensus nodes, and the sum of the trust values of the other consensus nodes is greater than or equal to a second preset threshold, the first round of consensus is reached.
[0086] Specifically, when the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs and publishes the trust evaluation result after verification. After publication, the other consensus nodes in the shard continue to approve it. If it passes a first preset number Thr K the verification of the above other consensus nodes, and the sum of the trust values of the other consensus nodes is greater than or equal to a second preset threshold Thr TIf Thr
[0087] In this embodiment, the first preset number Thr K and the second preset threshold Thr T are determined according to the following formula:
[0088]
[0089] If Thr k ≥ K, then Thr k = K-1, wherein K is an integer greater than or equal to 1. Z is a set of positive integers, and Thr k represents the first preset number.
[0090]
[0091] Thr T represents the second preset threshold.
[0092] Optionally, in the step S6, the requestor generates a random seed using a verifiable random function, sends the random seed to all shards of the blockchain, and determines the second round consensus nodes from each shard, including:
[0093] The requestor generates a random seed using a verifiable random function and sends it to each shard of the blockchain;
[0094] Selects K second round consensus nodes from each shard. In this embodiment, the requestor uses a verifiable random function VRF to generate a random seed and sends it to each shard. Each shard selects K second round consensus nodes that meet the preset conditions to participate in the second round consensus. Since the process of the second round consensus is similar to that of the first round, it is not described here.
[0095] Optionally, when there are multiple second round consensus nodes verifying the correctness of the trust evaluation results of the same entity to be evaluated, the correctness verification result with the latest timestamp is used for aggregation.
[0096] To enhance security, if different second round consensus nodes verify the trust evaluation results of the same entity to be evaluated, each shard will use the correctness verification result with the latest timestamp to perform trust aggregation, and then confirm the consensus results of all shards. After the second round of consensus is reached, a new block is generated, and profit tokens are issued to all contributors, i.e., trust evaluators and consensus nodes.
[0097] To enhance security, if different second round consensus nodes verify the trust evaluation results of the same entity to be evaluated, each shard will use the correctness verification result with the latest timestamp to perform trust aggregation, and then confirm the consensus results of all shards. After the second round of consensus is reached, a new block is generated, and profit tokens are issued to all contributors, i.e., trust evaluators and consensus nodes.
[0098] The requester determines the minimum number of consensus nodes of each shard for the first round of consensus and the second round of consensus across shards according to the trust value of the node, as shown in Algorithm 2. Algorithm 2 gives a method to determine the sum of trust values Thr of the expected approval nodes T and the minimum number of approval nodes Thr K . The higher the sum of trust values of the consensus nodes, the fewer the required number of approval nodes. The second round of consensus generates a new block approved by the consensus nodes elected by the second round of consensus.
[0099] It should be noted that the consensus method provided by the present application performs the first round of consensus in the shard and the second round of consensus across the shards, which can ensure the consensus safety within the shard and across the shards, and is also conducive to reducing the communication overhead of the blockchain.
[0100] Figure 4 is a calculation schematic diagram of the polynomial conversion into an arithmetic circuit provided by the present embodiment. Next, the calculation process of the arithmetic circuit will be described in combination with Figure 4 the circuit.
[0101] Specifically, the arithmetic circuit is composed of edges and vertices, and the vertices are referred to as gates, which generally include addition gates and multiplication gates. The multiplication gate is used to calculate the product of inputs, and the addition gate is used to calculate the sum of inputs. The priority of the addition gate is generally lower than that of the multiplication gate. The edges are the inputs and outputs of each gate. Each gate has two inputs, which can be a constant coefficient c or a variable x i (that is, the trust data TD i or eid i,j ), or the output of other gates, but cannot be two constants.
[0102] Exemplarily, the arithmetic circuit is executed in a gate-by-gate manner, and finally outputs the calculation result of the polynomial and the proof information. Figure 3 is a circuit including only multiplication gates. The circuit calculates the product of a constant coefficient c and a variable x1, and the calculation result is f(x1, c) = c x1. The verification tag is also constantly converted with the execution of each gate operation of the arithmetic circuit, and in Figure 3 the circuit shown in the figure, δ 1,j is converted into δ′ 1,j , and the eid 1,j corresponding to x1 is input into the arithmetic circuit for calculation: ρ 1,j = c eid 1,j . Finally, the calculation result Res 1,j = c x1 and the proof information P 1,j = (ρ 1,j , δ′ 1, ) are output.
[0103] In this embodiment, the consensus node verifies the trust assessment result as follows:
[0104] R to CN k Initiate a trust assessment result verification request and send the trust assessment result verification request message Req. TEV and the corresponding signature Send to CN k CN k Upon receiving the request message, first use R's public key to pk. R For signature Verification is performed; once the signature verification is successful, CN... k To TE j To request the trust assessment result, send a request message Req. res and the corresponding signature Send to TE j ;TE j After receiving the request message, use CN k public key For signature Verification will be performed. If the signature verification passes, TE will... j The request message Req res Forward to E j and call E j The ECALL function executes access policy control.
[0105] Furthermore, E j CN based on the request result k Get the corresponding UID k Then according to TE j Access Control List (PCL) j Return uid k Accessible TD i Trust assessment results and corresponding supporting information: {Res i,j ,P i,j}, and use E j private key For the returned {Res i,j ,P i,j}sign: Finally, {Res i,j ,P i,j} and σ i,j Return to TE j TE j {Res i,j ,P i,j} and σ i,j Forwarded to Cn k CN k Use public key Verify σi,j ; exemplary if σ i,j is verified, it means that TE j has not tampered with {Res i,j , P i,j}, CN k verifies the correctness of the trust evaluation result Res i,j through the proof information P i,j .
[0106] The specific verification process is as follows:
[0107] First, the verification label δ i,j = (pk i , σ i,j ) is divided into a first-order verification label and a second-order verification label, and the first-order verification label can be converted into the second-order verification label through an addition gate. Since the trust data required to evaluate the trust value of an entity can come from multiple trust entities i, the second-order label is set to support multiple data sources. It should be understood that the first-order verification label includes the verification label of the original trust data; the verification label output after each multiplication gate; if the public keys of the two inputs of an addition gate are the same (i.e., the trust data uploaded by the same entity i to be evaluated), then the verification label output after the addition gate is also a first-order verification label, if the public keys of the two inputs of an addition gate are different (i.e., the trust data uploaded by different trust evaluation entities i), then the verification label output by the addition gate is a second-order verification label,
[0108] During the gate operation process, the verification label can be converted while verifying the operation trust evaluation result. Specifically, the first-order label is converted into a first-order label:
[0109] For multiplication gate 1, the input is: δ i,j = (pk i , σ i,j = (r i,j , s i,j )) output: Res i,j = c × x i , ρ i,j = f(c, eid i,j ) = c × eid i,j , pk′ i = pk i , For multiplication gate 2, the input is: x1, x2 ∈ TD i , eid 1,j , δ 1,j = (pk1, σ1,j =(r 1,j ,s 1,j )),eid 2,j ,δ 2,j =(pk2,σ 2,j =(r 2,j ,s 2,j Assuming x1 is the main input, the output is: Res 1,j =x1·x2,ρ 1,j =f(eid) 1,j ,eid 2,j ) = eid 1,j ×eid 2,j Select For addition gate 1, the input is: x1, x2 ∈ TD i eid 1,j ,δ 1,j =(pk1,σ 1,j =(r 1,j ,s 1,j )),eid 2,j ,δ 2,j =(pk2,σ 2,j =(r 2,j ,s 2,j ), pk1 = pk2, the output is: Res 1,j =Res 2,j =x1+x2,ρ 1,j =ρ 2,j =f(eid) 1,j ,eid 2,j ) = eid 1,j +eid 2,j ,
[0110] Furthermore, the first-order labels are transformed into second-order labels. For the input of addition gate 2, x1, x2 ∈ TD. i δ 1,j =(pk1,σ 1,j =(r 1,j ,s 1,j )),eid 2,j ,δ 2,j =(pk2,σ 2,j =(r 2,j ,s 2,j ), pk1≠pk2, Output: Res 1,j =Res 2,j =x1+x2,ρ 1,j =ρ 2,j =f(eid) 1,j ,eid2,j ) = eid 1,j + eid 2,j , pick For addition gate 3 input: Output: Res i,j = c + x i , p i,j = f(c, eid i,j ) = H(c) + eid i,j ,
[0111] Next, the second-order label is converted to the second-order label, and for addition gate 4, the input is: Output: Res i,j = c + x i , p i,j = f(c, eid i,j ) = H(c) + eid i,j , pk' i = pk i , For addition gate 5, the input is: xi, x2 e TD i , eid 1,j , eid 2,j , pk1 = pk2, output: Res 1,j = Res 2,j = xi + x2, p 1,j = p 2,j = eid 1,j + eid 2,j , For addition gate 6 input: xi, x2 e TD i , eid 1,j , eid 2,j , Output: Res 1,j = Res 2,j = xi + x2, p 1,j = p 2,j = eid 1,j + eid 2,j , For addition gate 7, the input is: xi, x2 e TD i , eid 1,j , eid 2,j , pk1=pk2, output: Res 1,j = Res 2,j = x1+x2, p 1,j = p 2,j = eid 1,j + eid 2,j , For the addition gate 8, the input is: x1, x2 e TD i , eid 1,j , eid 2,j , pk1≠pk2, output: Res 1,j = Res 2,j = x1+x2, p 1,j = p 2,j = eid 1,j + eid 2,j ,
[0112] The verification process includes verification of the first-order label and verification of the second-order label, and examples are, respectively, according to the formula and The first-order label and the second-order label are verified.
[0113] From the above embodiments, the beneficial effects of the present application are as follows:
[0114] The present application provides an efficient and secure consensus method based on a block chain, which performs trust evaluation tasks in parallel off-chain, and verifies the correctness of the trust evaluation results of the to-be-evaluated entities after sharding, and then reaches the first round of consensus within the shard where the first type of consensus node is located, and reaches the second round of consensus across shards between the second type of consensus nodes, which is efficient. Secondly, the sharding process of the present application has randomness, which can avoid the unique block generation of forking and the centralized profit balance, thereby preventing DDoS attacks and intrusion of certain specific nodes, and is secure.
[0115] In the description of the present application, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.
[0116] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate different embodiments or examples described in the specification.
[0117] Although the present application is described herein in conjunction with various embodiments, it is understood that other variations of the disclosed embodiments can be understood and implemented by those skilled in the art upon review of the drawings, specification, and claims appended hereto.
[0118] The above is a further detailed description of the present application in conjunction with specific preferred embodiments, and the specific implementation of the present application cannot be limited to these descriptions. For those skilled in the art, without departing from the concept of the present application, a number of simple deductions or substitutions can be made, which should be considered as falling within the scope of protection of the present application.
Claims
1. An efficient and secure trust consensus method based on blockchain, characterized in that, The method comprises the steps of: The requestor initiates a trust evaluation request to the trust evaluation party; In response to the trust evaluation request, the trust evaluation party determines an entity corresponding to the data stored in the cloud server as an entity to be evaluated, and processes the trust evaluation task in parallel by each cloud server to generate the trust evaluation result and a verification tag of the entity to be evaluated; the verification tag comprises a public key and a signature of the entity to be evaluated; The blockchain obtains trust values of all consensus nodes, and randomly shards all consensus nodes according to a first preset threshold and the trust values; The requestor initiates a trust evaluation verification request to all consensus nodes in the blockchain, and determines first-round consensus nodes from all consensus nodes, and the first-round consensus nodes verify the trust evaluation result according to the verification tag; When the trust evaluation result passes the correctness verification of the first-round consensus nodes, the first-round consensus nodes sign the trust evaluation result and the verification tag after the correctness verification, and publish the signature, the trust evaluation result and the verification tag, so that other consensus nodes on the shard where the first-round consensus nodes are located perform approval and reach a first-round consensus; The requestor generates a random number seed by using a verifiable random function, sends the random number seed to all shards of the blockchain, and determines second-round consensus nodes from each shard; The second-round consensus nodes verify the trust evaluation result according to the verification tag, and generate a new block to publish the verified trust evaluation result after reaching a second-round consensus.
2. The blockchain-based efficient secure trust consensus method of claim 1, wherein, The blockchain obtains trust values of all consensus nodes, and randomly shards all consensus nodes according to a first preset threshold and the trust values, comprising the steps of: Determining the number N of shards of all consensus nodes in the blockchain consensus system; Dividing the trust value range [0, 1] into Q regions; According to the trust value range corresponding to the Q regions, the plurality of consensus nodes in the blockchain consensus system are divided into Q groups; Generating a random number seed and sorting the Q groups of consensus nodes by using the random number seed; For the qth group of consensus nodes, if the number of consensus nodes in the group is less than N, the group of consensus nodes is skipped, otherwise, consensus nodes are selected from the group and divided into N shards; wherein the sum of the trust values of the consensus nodes in each shard is greater than or equal to the first preset threshold, |Q q | represents the number of nodes in the qth group of consensus nodes, represents rounding down. 3.The blockchain-based efficient and secure trust consensus method of claim 2, wherein, wherein TV k TV represents the sum of the trust values of the K consensus nodes, and tv0 represents a first preset threshold value. 4.The blockchain-based efficient and secure trust consensus method of claim 3, wherein, The requestor initiates a trust evaluation verification request to all consensus nodes in the blockchain, and determines first-round consensus nodes meeting a first preset condition from each shard, and the first-round consensus nodes verify the trust evaluation result according to the verification tag, comprising the steps of: The requestor initiates a trust evaluation verification request to all consensus nodes in the blockchain, and determines first-round consensus nodes meeting a first preset condition from all consensus nodes; The requestor grants the first-round consensus nodes the permission to access the trust evaluation result and the verification tag; The first-round consensus nodes request the trust evaluation result and the verification tag from the trust evaluation party, and verify the trust evaluation result according to the verification tag. 5.The blockchain-based efficient and secure trust consensus method of claim 3, wherein, When the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs the trust evaluation result and the verification label that have passed the verification of the first round of consensus nodes, and publishes the signature, the trust evaluation result and the verification label, so that other consensus nodes on the same shard as the first round of consensus nodes perform approval and reach the first round of consensus. When the trust evaluation result passes the correctness verification of the first round of consensus nodes, the first round of consensus nodes signs the trust evaluation result and the verification label that have passed the verification of the first round of consensus nodes, and publishes the signature, the trust evaluation result and the verification label. Other consensus nodes on the shard where the first round of consensus nodes are located use the verification label to approve the trust evaluation result. If the trust evaluation result passes the correctness verification of more than the first preset number of other consensus nodes, and the sum of the trust values of the other consensus nodes is greater than or equal to the second preset threshold, the first round of consensus is reached.
6. The efficient and secure trust consensus method based on the blockchain according to claim 5, characterized in that: Thr k ≥ K, then Thr k = K-1, wherein, Z is a set of positive integers, Thr k represents a first preset number; wherein Thr T represents a second preset threshold value. 7.The blockchain-based efficient and secure trust consensus method of claim 6, wherein, The requestor generates a random number seed using a verifiable random function, sends the random number seed to all shards of the blockchain, and determines the second round of consensus nodes from each shard, and the steps include: The requestor generates a random number seed using a verifiable random function, and sends it to each shard of the blockchain. Select from each slice The second round of consensus nodes. 8.The blockchain-based efficient and secure trust consensus method of claim 1, wherein, When there are multiple second round of consensus nodes that correctly verify the trust evaluation result of the same entity to be evaluated, the correctness verification result with the latest timestamp is used for aggregation.
9. The efficient and secure trust consensus method of claim 1, wherein, Each of the cloud servers is deployed with a trusted operating environment.
Citation Information
Patent Citations
A block chain consensus method based on credibility evaluation
CN109949034A
Anonymous authentication method and system for trust in decentralized mobile crowdsourcing
CN112187712A