CN115664714A - TEE-based anonymous selection committee method, system and medium on block chain - Google Patents

TEE-based anonymous selection committee method, system and medium on block chain Download PDF

Info

Publication number
CN115664714A
CN115664714A CN202211158843.5A CN202211158843A CN115664714A CN 115664714 A CN115664714 A CN 115664714A CN 202211158843 A CN202211158843 A CN 202211158843A CN 115664714 A CN115664714 A CN 115664714A
Authority
CN
China
Prior art keywords
node
block
committee
anonymous
tee
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211158843.5A
Other languages
Chinese (zh)
Inventor
丁滟
冯了了
谭郁松
傅翔
黄辰林
董攀
谭霜
常俊胜
高珑
王闯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202211158843.5A priority Critical patent/CN115664714A/en
Publication of CN115664714A publication Critical patent/CN115664714A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a TEE-based anonymous committee selection method, system and medium on a block chain, which comprises the steps of generating credible anonymous numbers for all nodes through a numbering module in a TEE environment of a main node, packaging mapping relations between original numbers of the nodes and the credible anonymous numbers into numbered blocks and chaining the numbered blocks, and determining the credible anonymous numbers of the nodes according to the numbered blocks after chaining by the nodes; when the block chain needs to execute a consensus selection committee, each node generates the same pseudorandom sequence based on the same parameter and the same pseudorandom algorithm to represent a committee list; each node compares the pseudo-random sequence with the credible anonymous number of the node to judge whether the node is a committee node or not. The invention combines the TEE security mechanism of the computer with the existing Byzantine fault-tolerant consensus method, and has the advantages of safety, reliability, good portability and dynamic expansion.

Description

TEE-based anonymous selection committee method, system and medium on block chain
Technical Field
The invention relates to a block chain technology in the field of computers, in particular to a TEE-based anonymous committee selection method, system and medium on a block chain.
Background
In the large environment of increasing popularity of internet + applications, a large number of applications need to record the events, behaviors and states that occur persistently for later queries, and at the same time, complete trust relationships do not exist between parties involved in transactions, a typical application scenario is electronic money. However, the traditional payment and billing method has two difficulties: there is a significant risk of funds exposure to the third party payment institution upon which payment is relied upon; the centralized accounting node has huge attacked risk and divergence, and the risk cannot be effectively eliminated. The block chain is used as a distributed network protocol for constructing a deterministic trust relationship on the premise of uncertainty, has the basic characteristics of openness, cooperation, sharing, tamper resistance, traceability and the like, and is very likely to remold the payment paradigm of the whole digital space.
The consensus algorithm is the key to the blockchain technique. Compared with the traditional money transaction system VISA which can process tens of thousands of transactions per second, the throughput rate of 7TPS and the confirmation delay of 6 blocks brought by the bit currency POW consensus algorithm can not meet the business-level requirements far. To address the performance of blockchain consensus algorithms, a large number of related efforts attempt the election committee to scale down consensus and obtain more efficient consensus. But the committee election mechanism also introduces security issues, as the act of election violates the desire to decentralize the block chain itself, and also narrows down the target of attack for the attacker. Therefore, how to ensure that the committee is unpredictable at random and protect the anonymity of the committee from attack becomes a problem to be solved urgently.
Disclosure of Invention
The current emerging TEE technology utilizes the hardware support of the bottom layer of a computer to provide strong-isolation trusted execution environments such as a CPU, a memory, a Cache and the like for upper-layer software, the CPU has higher operation level, and a trust foundation is provided for the upper-layer software to construct a safe and trusted computing environment. Currently, there is a breakthrough in security technology in the aspects of TEE-based operating system monitoring, trusted computing, and the like, and with the advance of technical research, more and more operating system services and applications are enhanced in security by relying on TEE. Therefore, the realization of the credibility enhancement of the block chain consensus algorithm based on the TEE technology has a good application prospect, and is a key technical problem to be researched urgently. The technical problems to be solved by the invention are as follows: combining TEE and block chain technology, providing an anonymous committee selection method, system and medium based on TEE on a block chain, combining the TEE security mechanism of a computer with the existing Byzantine fault-tolerant consensus method, and having the advantages of safety, reliability, good portability and dynamic expansion.
In order to solve the technical problems, the invention adopts the technical scheme that:
a TEE-based anonymous election committee method on blockchains, comprising:
s101, generating credible anonymous numbers for all nodes through a numbering module in a TEE environment of a main node, packaging mapping relations between original numbers of the nodes and the credible anonymous numbers into a numbering block, directly chaining the numbering block if the numbering block is a creation block, otherwise, performing chain chaining after common identification on the numbering block, and determining the credible anonymous numbers of the nodes according to the numbering block after chain chaining;
s102, when a block chain needs to execute a consensus selection committee, each node generates the same pseudorandom sequence based on the same parameters and the same pseudorandom algorithm, the value range of elements in the pseudorandom sequence is consistent with the value range of credible anonymous numbers of the nodes, and the number of the elements is equal to the number of the committee, so that the pseudorandom sequence is represented as a committee list; and each node respectively compares the pseudo-random sequence with the credible anonymous number of the node, and if the pseudo-random sequence is matched with the elements in the pseudo-random sequence, the node is judged to be a committee node.
Optionally, the range of values of the elements in the pseudorandom sequence is [0 to the number of nodes in the system ].
Optionally, when each node generates the same pseudorandom sequence based on the same parameter, the same parameter includes a comprehensive character string obtained by connecting the hash value, the round number, and the consensus stage of the previous block, and three parameters of the maximum node number and the committee number, and the step of generating the same pseudorandom sequence includes:
s201, initializing a pseudo-random sequence List to be null;
s202, connecting the hash value, the round number and the consensus stage of the previous block to obtain a comprehensive character string, taking the comprehensive character string as a seed of a Messen rotation algorithm, generating a random number R by using the Messen rotation algorithm, performing modular operation on the node maximum number N by using the random number R to obtain a modular operation result R, wherein the value range of the modular operation result R is 0-N-1, so that the random number R is mapped to a certain node number in the system through the modular operation, if the modular operation result R appears in a pseudo-random sequence List, repeating the step S202, otherwise, adding the pseudo-random sequence R into the pseudo-random sequence List;
s203, if the size of the pseudo-random sequence List is equal to the number of committees, ending and outputting the pseudo-random sequence List; otherwise, jumping to step 2 to continue generating the pseudo-random sequence List.
Optionally, the execution condition for generating the trusted anonymous number for all nodes through the numbering module in the TEE environment of the master node in step S1 is when the system is initialized and x data blocks are designated for every uplink.
Optionally, the functional expression of the mapping relationship between the original number of the node and the trusted anonymous number thereof in step S1 is:
h a ,h b ,i->indexi
wherein h is a And h b Respectively representing the heights of blocks in the block chain, i->indexi indicates that the credible anonymous number corresponding to the ith node is indexi, and the functional expression indicates that the credible anonymous number corresponding to the ith node in x data blocks with the heights between a and b in the block chain is indexi.
Optionally, when the mapping relationship between the original number of the node and the trusted anonymous number thereof is packed into the number block in step S1, for any ith node, calculating a hash value from the mapping relationship between the original number of the ith node and the trusted anonymous number thereof, encrypting the mapping relationship by using the TEE public key of the ith node, and packing the number block by adding the corresponding hash value to the encrypted mapping relationship of all current nodes of the system, including signing the entire number block by using the TEE private key of the master node.
Optionally, the step of performing the common identification of the uplink after the numbering blocks are performed in step S101 and the step of performing the common identification of the block chains in step S102 includes:
s401, each node locally executes selection committee operation of an offer stage and a voting stage to judge whether the node is selected as a main node of the offer stage or a committee node of the voting stage, each node calls a selection committee module to obtain a consistent pseudo-random sequence, a node corresponding to a first credible number in the pseudo-random sequence is the main node, and the rest nodes are committee nodes; the main node packs the transaction from the transaction pool into a new block, or acquires the block from a locally locked block which does not reach a consensus to obtain a block v which needs to execute the consensus in the current round, wherein the block v is a transaction block or a number block, and the main node generates an offer message according to the block v, attaches a trusted anonymous number of the main node and broadcasts the offer message; each committee node judges whether an offer message is received or not based on a set overtime period, if the valid offer message is not received overtime, the offer message is voted, and otherwise, a null ticket is cast; attaching a credible anonymous number of the voting message to the voting message and broadcasting the voting message;
s402, locally executing selection committee operation of a pre-submission stage by each node, judging whether voting messages are received or not by each committee node of the pre-submission stage based on a set overtime period, if the number of legal voting messages which are not received overtime exceeds a set proportion, generating and broadcasting the pre-submission messages, and if not, generating and broadcasting pre-submission empty tickets; the legal voting message refers to the passing of signature check of the voting message and the passing of validity check of a credible anonymous number attached to the voting message;
and S403, all nodes judge whether a pre-submitted message is received or not based on a set overtime period, if the number of valid pre-submitted messages which are not received overtime exceeds a set proportion, the block v is submitted to an uplink, otherwise, the block v is judged to have a round of consensus failure, and the valid pre-submitted messages refer to the signature check passing of the pre-submitted messages and the validity check passing of the credible anonymous numbers attached to the pre-submitted messages.
Optionally, the step S101 of determining, by each node, the trusted anonymous number according to the numbered block after uplink includes: after each node links the chain in the numbering block, the numbering block of the chain is verified by using the TEE public key corresponding to the main node, and the transaction in the numbering block is taken out and decrypted by using the TEE private key of the node to obtain the credible anonymous number of the node; when any committee needs to vote, attaching the credible anonymous number of the committee node to the original consensus voting message and broadcasting the message together, after other nodes receive the message, checking the legality of the credible anonymous number of the committee node through the numbered block, counting votes which pass the check, and otherwise discarding the votes; after any node i receives the voting message from another any node j, the node i performs validity check on the credible anonymous number attached to the voting message, and the validity check comprises the following steps: and the node i analyzes the credible anonymous number added in the message, constructs a mapping relation between the original number of the node j and the credible anonymous number by using the number, calculates a hash value of the mapping relation, compares the hash value with the hash value corresponding to the node j on the block with the latest number, and if the comparison result is consistent, the committee identity of the node j is verified by the node i, and the voting is legal.
In addition, the invention also provides a TEE-based anonymous selection committee system on a blockchain, which comprises a microprocessor and a memory which are connected with each other, wherein the microprocessor is programmed or configured to execute the steps of the TEE-based anonymous selection committee method on the blockchain.
Furthermore, the present invention also provides a computer readable storage medium having stored therein a computer program for being programmed or configured by a microprocessor to perform the steps of the TEE-based anonymous election committee method on the blockchain.
Compared with the prior art, the invention mainly has the following advantages: generating credible anonymous numbers for all nodes through a numbering module in a TEE environment of a main node, packaging mapping relations between original numbers of the nodes and the credible anonymous numbers into a number block and chaining, and determining the credible anonymous numbers of the nodes according to the numbered block after chaining by each node; when the block chain needs to execute a consensus selection committee, each node generates the same pseudorandom sequence based on the same parameter and the same pseudorandom algorithm to represent a committee list; each node compares the pseudo-random sequence with the credible anonymous number of the node to judge whether the node is a committee node or not. The invention can realize the selection of the committee with fixed number by combining the TEE safety mechanism of the computer with the existing Byzantine fault-tolerant consensus method, and can reduce the message complexity to the original m/n by combining a plurality of BFT type consensus algorithms, wherein m is the number of the committee and n is the number of system nodes, thereby having the advantages of safety, reliability, good portability, dynamic expansion and high performance.
Drawings
FIG. 1 is a schematic diagram of a basic flow of a method according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a data format of a numbered block according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating an embodiment of the present invention in which each node updates its anonymous number after uplink is performed on the numbered blocks.
FIG. 4 is a diagram illustrating a process for performing consensus in an embodiment of the present invention.
Detailed Description
As shown in fig. 1, the anonymous committee selection method based on TEE on the blockchain in this embodiment includes:
s101, generating credible anonymous numbers for all nodes through a numbering module in a TEE environment of a main node, packaging mapping relations between original numbers of the nodes and the credible anonymous numbers into a numbering block, directly chaining the numbering block if the numbering block is a creation block, otherwise, performing chain chaining after common identification on the numbering block, and determining the credible anonymous numbers of the nodes according to the numbering block after chain chaining;
s102, when a block chain needs to execute a consensus selection committee, each node generates the same pseudorandom sequence based on the same parameters and the same pseudorandom algorithm, the value range of elements in the pseudorandom sequence is consistent with the value range of credible anonymous numbers of the nodes, and the number of the elements is equal to the number of the committee, so that the pseudorandom sequence is represented as a committee list; and each node respectively compares the pseudo-random sequence with the credible anonymous number of the node, and if the pseudo-random sequence is matched with the elements in the pseudo-random sequence, the node is judged to be a committee node.
In this embodiment, the range of values of the elements in the pseudorandom sequence is [0 to the number of nodes in the system ]. In addition, the upper boundary of the value range may be smaller than the number of nodes in the system, as long as the minimum number required for the block chain consensus is satisfied.
In step S101, the master node and the other nodes are all nodes of a blockchain, the master node may be manually designated or may be determined by using a blockchain consensus algorithm, and the specific determination method is not discussed in this embodiment. In order to enhance the security of the blockchain, before the nodes of the blockchain join the blockchain system, identity authentication needs to be performed to a CA (authentication center), and each node in the system is divided into TEE and REE environments. The TEE of a node is issued by the CA a public-private key pair, the public key being included in the certificate issued by the CA to the TEE, and the TEE of the node holds its private key privately.
In this embodiment, when each node generates the same pseudorandom sequence based on the same parameter, the same parameter includes a comprehensive character string obtained by connecting the hash value, the round number, and the consensus phase of the previous block, and three parameters of the maximum node number and the committee number, and the step of generating the same pseudorandom sequence includes:
s201, initializing a pseudo-random sequence List to be null;
s202, connecting the hash value, the round number and the consensus stage of the previous block to obtain a comprehensive character string, taking the comprehensive character string as a seed of a Messen rotation algorithm, generating a random number R by using the Messen rotation algorithm, performing modular operation on the node maximum number N by using the random number R to obtain a modular operation result R, wherein the value range of the modular operation result R is 0-N-1, so that the random number R is mapped to a certain node number in the system through the modular operation, if the modular operation result R appears in a pseudo-random sequence List, repeating the step S202, otherwise, adding the pseudo-random sequence R into the pseudo-random sequence List; it should be noted that, the generation of the random number r based on the seed mersene rotation algorithm (Mersenne twister) is the existing method, and the specific implementation thereof is not described in detail herein;
s203, if the size of the pseudo-random sequence List is equal to the number of committees, ending and outputting the pseudo-random sequence List; otherwise, jumping to step 2 to continue generating the pseudo-random sequence List.
In this embodiment, in step S1, when the execution condition for generating the trusted anonymous number for all nodes by the numbering module in the TEE environment of the master node is system initialization and x data blocks designated per uplink, the value of x may be dynamically set, so that the system implementation is more flexible.
The embodiment designs a numbering block which is different from a common transaction data block (data block) and is used for storing anonymous numbering information. Fig. 2 is a diagram illustrating a data format of a numbered block in the present embodiment. The fields { h1, h2, i->indexi is expressed at consensus height h 1 To h 2 And when the number of the node i is indexi, in order to ensure the anonymity of the number, the main node encrypts the field and the signature by using the TEE public key Pk _ i of the node i, then generates a hash value of the field, and finally packs the hash value and the encrypted field into the ith transaction of the numbered block. The first numbered block is a created block, and is directly linked by the main node without common identification; after the subsequent numbered blocks are constructed, the same data blocks need to be usedAnd (4) a consensus algorithm. The TEE of the main node takes the numbering block as an proposal needing consensus, receives the TEE signature of the main node of a node i checking block of the numbering block, checks the ith transaction by using a private key of the node to obtain a numbering evidence { h } 1 ,h 2 ,i->indexi} Sk_i And decrypting the mapping relation of the numbers by using a private key of the TEE of the node, agreeing to the ticket if the verification is passed, and updating the anonymous numbers of the node by each node after the chain is linked in the number block, as shown in FIG. 3. In this embodiment, the functional expression of the mapping relationship between the original number of the node and the anonymous number trusted by the node in step S1 is:
h a ,h b ,i->indexi
wherein h is a And h b Respectively representing the heights of blocks in the block chain, i->indexi indicates that the credible anonymous number corresponding to the ith node is indexi, and the functional expression indicates that the credible anonymous number corresponding to the ith node in x data blocks with the heights between a and b in the block chain is indexi.
In this embodiment, when the mapping relationship between the original number of the node and the trusted anonymous number thereof is packed into the number block in step S1, for any ith node, calculating a hash value from the mapping relationship between the original number of the ith node and the trusted anonymous number thereof, encrypting the mapping relationship by using the TEE public key of the ith node, and packing the number block by adding the corresponding hash value to the encrypted mapping relationship of all the current nodes of the system, including signing the entire number block by using the TEE private key of the master node.
In this embodiment, the step of performing the common identification on the uplink after the numbering block is performed in step S101 and the step of performing the common identification on the block chain in step S102 includes:
s401, each node locally executes selection committee operation of an PROPOSAL phase (PROPOSAL) and a voting Phase (PREVOTE) to judge whether the node is selected as a main node of the PROPOSAL phase or a committee node of the voting phase, each node calls a selection committee module to obtain a consistent pseudorandom sequence, a node corresponding to a first credible number in the pseudorandom sequence is the main node, and the rest nodes are committee nodes; the main node packs the transaction from the transaction pool into a new block, or acquires the block from a locally locked block which does not reach a consensus to obtain a block v which needs to execute the consensus in the current round, wherein the block v is a transaction block or a number block, and the main node generates an offer message according to the block v, attaches a trusted anonymous number of the main node and broadcasts the offer message; each committee node judges whether an offer message is received or not based on a set overtime period, if the valid offer message is not received overtime, the offer message is voted, and otherwise, a null ticket is cast; attaching a credible anonymous number of the voting message to the voting message and broadcasting the voting message;
s402, each node locally executes the operation of a selection committee in a pre-submission stage (PRECOMMIT), then each committee node in the pre-submission stage judges whether a voting message is received or not based on a set overtime period, if the number of valid voting messages which are not received overtime exceeds a set proportion, a pre-submission message is generated and broadcasted, otherwise, a pre-submission empty ticket is generated and broadcasted; the legal voting message refers to the signature check passing of the voting message and the validity check passing of the credible anonymous number attached to the voting message;
and S403, all nodes judge whether a pre-submitted message is received or not based on a set overtime period, if the number of valid pre-submitted messages which are not received overtime exceeds a set proportion, the block v is submitted to an uplink, otherwise, the block v is judged to have a round of consensus failure, and the valid pre-submitted messages refer to the signature check passing of the pre-submitted messages and the validity check passing of the credible anonymous numbers attached to the pre-submitted messages.
Different committees need to be elected at different stages of the consensus algorithm. On the basis of anonymous numbering, each node is locally and pre-installed with a consistent pseudo-random function. Each node generates a committee list by using character strings connected by the hash value of the previous block, the round number and the step number as input of the committee selection module. When indexi hits the committee, no third node knows this message, except node i itself and the TEE environment of the numbering node, thereby ensuring anonymity of the numbering. When voting, the node i obscures the self voting (PROPOSAL/PREVOTE/PRECOMMIT) and the anonymous number as { h } 1 ,h 2 ,i->indexi is broadcast together. Other nodesReceiving the voting (PROPOSAL/PREVOTE/PRECOMMIT) sent by the node i and the mapping relation of anonymous number { h 1 ,h 2 ,i->indexi, verifying that the node i really has the anonymous number indexi at this time by the mapping relation and the corresponding hash value on the chain, and verifying the committee identity of the node i by looking up the local committee list, namely, indexi is in the committee list. And if the voting message passes the verification, adding the voting message into the message pool of the user. As shown in fig. 4, the step of combining the anonymous committee selection scheme based on TrustZone with Tendermint in this embodiment includes: each node in the system is provided with a TEE environment, and a numbering module is constructed in the TEE and used for giving a credible number to each node in the system. Nodes can join the system through CA authentication at any time. When a system is initially deployed or a plurality of blocks are generated after consensus operation, the current master node regenerates the credible anonymous number for all nodes in the current system, and the node newly added into the system acquires the credible anonymous number at the latest numbering opportunity, so that the dynamic expandability of the system is ensured. Before the PROPOSAL step of the consensus algorithm is started, each node calls a local selection committee module by taking the 'hash value of the previous block', 'round number' and 'PROPOSAL' as parameters, and at the moment, the selection committee module generates a committee 1 and returns the first number, namely the number of the main node. And checking whether the host node is hit by the host node, wherein the hit node runs the code of the host node. Before the PREVOTE step of the consensus algorithm begins, each node calls a local committee selection module by taking the 'hash value of the previous block', 'round number' and 'PREVOTE' as parameters, and at the moment, the committee selection module returns to the committee 1 to remove the number of the rest of the nodes of the main node. It is checked whether it hits committee 1 and the hitting node generates and broadcasts its PREVOTE message. Before the beginning of the preamble step of the consensus algorithm, each node calls a local committee selection module with "hash value of the previous block", "round number" and "preamble" as parameters, and at this time, the committee selection module generates and returns the total number of committee 2. It is checked whether it hits committee 2 and the hitting node generates and broadcasts its preconmit message. In the preceding step, the node receiving the message needs to check the messageWhether from the corresponding committee, only messages sent by the legal committee will be recorded in the message pool, and at the same time, one of the conditions that triggers the state machine "two thirds more consistent messages received in the message pool than nodes" changes to "two thirds more consistent messages received in the message pool".
In this embodiment, the step S101 of determining, by each node, the trusted anonymous number according to the numbered block after uplink includes: after each node uplinks the number block, verifying the number block of the uplink by using the TEE public key corresponding to the main node, and taking out the transaction in the number block and decrypting by using the TEE private key of the transaction to obtain the credible anonymous number of the transaction; when any committee needs to vote, attaching the credible anonymous number of the committee to an original consensus voting message and broadcasting the agreement voting message, and after other nodes receive the agreement, checking the legality of the credible anonymous number of the committee node through the number block, counting votes passing the check, and otherwise, discarding the votes; after any node i receives the voting message from another any node j, the node i performs validity check on the credible anonymous number attached to the voting message, and the validity check comprises the following steps: and the node i analyzes the credible anonymous number attached to the message, constructs a mapping relation between the original number of the node j and the credible anonymous number by using the number, calculates a hash value of the mapping relation, compares the hash value with the hash value corresponding to the node j on the block with the latest number, and if the comparison result is consistent, the committee identity of the node j is verified by the node i, and the voting is legal.
In addition, the embodiment also provides a TEE-based anonymous committee selection system on a blockchain, which comprises a microprocessor and a memory which are connected with each other, wherein the microprocessor is programmed or configured to execute the steps of the TEE-based anonymous committee selection method on the blockchain. Furthermore, the present embodiments also provide a computer-readable storage medium having stored therein a computer program for being programmed or configured by a microprocessor to perform the steps of the TEE-based anonymous election committee method on the aforementioned block chain.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may occur to those skilled in the art without departing from the principle of the invention, and are considered to be within the scope of the invention.

Claims (10)

1. An anonymous committee selection method based on TEE on a blockchain, comprising:
s101, generating credible anonymous numbers for all nodes through a numbering module in a TEE environment of a main node, packaging mapping relations between original numbers of the nodes and the credible anonymous numbers into a numbering block, directly chaining the numbering block if the numbering block is a creation block, otherwise, performing chain chaining after common identification on the numbering block, and determining the credible anonymous numbers of the nodes according to the numbering block after chain chaining;
s102, when a block chain needs to execute consensus selection committee, each node generates the same pseudo-random sequence based on the same parameters and the same pseudo-random algorithm, the value range of elements in the pseudo-random sequence is consistent with the value range of the credible anonymous numbers of the nodes, and the number of the elements is equal to the number of the committee, so that the pseudo-random sequence is expressed as a committee list; and each node respectively compares the pseudo-random sequence with the credible anonymous number of the node, and if the pseudo-random sequence is matched with the elements in the pseudo-random sequence, the node is judged to be a committee node.
2. The TEE-based anonymous election committee on block chains according to claim 1, wherein elements in the pseudo-random sequence range from [0 ] to the number of nodes in the system ].
3. The TEE-based anonymous committee selection method for blockchains according to claim 1, wherein when each node generates the same pseudo-random sequence based on the same parameters, the same parameters include three parameters of a comprehensive character string obtained by connecting the hash value, the round number and the consensus stage of the previous block, the maximum node number and the number of committees, and the step of generating the same pseudo-random sequence includes:
s201, initializing a pseudo-random sequence List to be null;
s202, connecting the hash value, the round number and the consensus stage of the previous block to obtain a comprehensive character string, taking the comprehensive character string as a seed of a Messen rotation algorithm, generating a random number R by using the Messen rotation algorithm, performing modular operation on the node maximum number N by using the random number R to obtain a modular operation result R, wherein the value range of the modular operation result R is 0-N-1, so that the random number R is mapped to a certain node number in the system through the modular operation, if the modular operation result R appears in a pseudo-random sequence List, repeating the step S202, otherwise, adding the pseudo-random sequence R into the pseudo-random sequence List;
s203, if the size of the pseudo-random sequence List is equal to the number of committees, ending and outputting the pseudo-random sequence List; otherwise, jumping to step 2 to continue generating the pseudo-random sequence List.
4. The TEE-based anonymous election committee on a block chain of claim 1, wherein the execution conditions for generating the trusted anonymous number for all nodes through the numbering module in the TEE environment of the master node in step S1 are system initialization and x data blocks designated per uplink.
5. The TEE-based anonymous election committee on block chains according to claim 4, wherein the functional expression of the mapping relationship between the original number of the node and its authentic anonymous number in step S1 is:
h a ,h b ,i->indexi
wherein h is a And h b Respectively representing the heights of blocks in the block chain, i->indexi indicates that the credible anonymous number corresponding to the ith node is indexi, and the functional expression indicates that the credible anonymous number corresponding to the ith node in x data blocks with the heights between a and b in the block chain is indexi.
6. The TEE-based anonymous selection committee method on the block chain according to claim 1, wherein when the mapping relationship between the original number of the node and the credible anonymous number thereof is packed into the number block in step S1, for any ith node, the method comprises the steps of calculating a hash value from the mapping relationship between the original number of the ith node and the credible anonymous number thereof, encrypting the mapping relationship by using the TEE public key of the ith node, and packing the encrypted mapping relationship of all the current nodes of the system with the corresponding hash value into the number block, wherein the step comprises the step of signing the whole number block by using the TEE private key of the master node.
7. The TEE-based anonymous selection committee method on block chains according to claim 1, wherein the step of performing the uplink after the consensus on the numbered blocks in step S101 and the step of performing the consensus on the block chains in step S102 comprises:
s401, each node locally executes selection committee operation of an proposing stage and a voting stage to judge whether the node is selected as a main node of the proposing stage or a committee node of the voting stage, each node calls a selection committee module to obtain a consistent pseudorandom sequence, a node corresponding to a first credible number in the pseudorandom sequence is the main node, and the rest nodes are committee nodes; the main node packs the transaction from the transaction pool into a new block, or acquires the block from a locally locked block which does not reach a consensus to obtain a block v which needs to execute the consensus in the current round, wherein the block v is a transaction block or a number block, and the main node generates an offer message according to the block v, attaches a trusted anonymous number of the main node and broadcasts the offer message; each committee node judges whether an offer message is received or not based on a set overtime period, if the valid offer message is not received overtime, the offer message is voted, and otherwise, a null ticket is cast; attaching a credible anonymous number of the voting message to the voting message and broadcasting the voting message;
s402, locally executing selection committee operation of a pre-submission stage by each node, judging whether voting messages are received or not by each committee node of the pre-submission stage based on a set overtime period, if the number of legal voting messages which are not received overtime exceeds a set proportion, generating and broadcasting the pre-submission messages, and if not, generating and broadcasting pre-submission empty tickets; the legal voting message refers to the signature check passing of the voting message and the validity check passing of the credible anonymous number attached to the voting message;
and S403, all nodes judge whether a pre-submitted message is received or not based on a set overtime period, if the number of valid pre-submitted messages which are not received overtime exceeds a set proportion, the block v is submitted to an uplink, otherwise, the block v is judged to have a round of consensus failure, and the valid pre-submitted messages refer to the signature check passing of the pre-submitted messages and the validity check passing of the credible anonymous numbers attached to the pre-submitted messages.
8. The TEE-based anonymous election committee on a block chain of claim 7, wherein the step S101 for each node to determine its trusted anonymous number according to the numbered blocks after uplink comprises: after each node links the chain in the numbering block, the numbering block of the chain is verified by using the TEE public key corresponding to the main node, and the transaction in the numbering block is taken out and decrypted by using the TEE private key of the node to obtain the credible anonymous number of the node; when any committee needs to vote, attaching the credible anonymous number of the committee node to the original consensus voting message and broadcasting the message together, after other nodes receive the message, checking the legality of the credible anonymous number of the committee node through the numbered block, counting votes which pass the check, and otherwise discarding the votes; after any node i receives the voting message from another any node j, the node i performs validity check on the credible anonymous number attached to the voting message, wherein the validity check comprises the following steps: and the node i analyzes the credible anonymous number added in the message, constructs a mapping relation between the original number of the node j and the credible anonymous number by using the number, calculates a hash value of the mapping relation, compares the hash value with the hash value corresponding to the node j on the block with the latest number, and if the comparison result is consistent, the committee identity of the node j is verified by the node i, and the voting is legal.
9. A TEE-based anonymous election committee system on blockchain comprising a microprocessor and a memory connected to each other, characterized in that the microprocessor is programmed or configured to perform the steps of the TEE-based anonymous election committee method on blockchain according to any one of claims 1 to 8.
10. A computer readable storage medium having stored thereon a computer program for being programmed or configured by a microprocessor to perform the steps of the TEE-based anonymous election committee method on a blockchain according to any one of claims 1 to 8.
CN202211158843.5A 2022-09-22 2022-09-22 TEE-based anonymous selection committee method, system and medium on block chain Pending CN115664714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211158843.5A CN115664714A (en) 2022-09-22 2022-09-22 TEE-based anonymous selection committee method, system and medium on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211158843.5A CN115664714A (en) 2022-09-22 2022-09-22 TEE-based anonymous selection committee method, system and medium on block chain

Publications (1)

Publication Number Publication Date
CN115664714A true CN115664714A (en) 2023-01-31

Family

ID=84985813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211158843.5A Pending CN115664714A (en) 2022-09-22 2022-09-22 TEE-based anonymous selection committee method, system and medium on block chain

Country Status (1)

Country Link
CN (1) CN115664714A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487468A (en) * 2020-12-21 2021-03-12 暨南大学 Traceable complete anonymous electronic voting method and system based on block chain
US11100743B1 (en) * 2017-12-30 2021-08-24 S&S Crypto Technologies Blockchain-based election system
CN113691512A (en) * 2021-08-13 2021-11-23 北京理工大学 Data hiding transmission system and method combining block chain and onion network
WO2022027531A1 (en) * 2020-08-03 2022-02-10 西安电子科技大学 Blockchain construction method and system, and storage medium, computer device and application
CN114422146A (en) * 2022-01-25 2022-04-29 北京航空航天大学 Anonymous sorting method for block chain main nodes
CN114528565A (en) * 2022-01-21 2022-05-24 广东海洋大学 Efficient sensitive data uplink algorithm based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11100743B1 (en) * 2017-12-30 2021-08-24 S&S Crypto Technologies Blockchain-based election system
WO2022027531A1 (en) * 2020-08-03 2022-02-10 西安电子科技大学 Blockchain construction method and system, and storage medium, computer device and application
CN112487468A (en) * 2020-12-21 2021-03-12 暨南大学 Traceable complete anonymous electronic voting method and system based on block chain
CN113691512A (en) * 2021-08-13 2021-11-23 北京理工大学 Data hiding transmission system and method combining block chain and onion network
CN114528565A (en) * 2022-01-21 2022-05-24 广东海洋大学 Efficient sensitive data uplink algorithm based on block chain
CN114422146A (en) * 2022-01-25 2022-04-29 北京航空航天大学 Anonymous sorting method for block chain main nodes

Non-Patent Citations (9)

* Cited by examiner, † Cited by third party
Title
BATNYAM ENKHTAIVAN: "A Fair Anonymous Auction Scheme Utilizing Trusted Hardware and Blockchain", 《2019 17TH INTERNATIONAL CONFERENCE ON PRIVACY, SECURITY AND TRUST (PST)》, 6 January 2020 (2020-01-06) *
BINGYU LIU: "Privacy preserving divisible double auction with a hybridized TEE-blockchain system", 《CYBERSECURITY》, 1 December 2021 (2021-12-01) *
YAN DING: "Blockchain-based Access Control Mechanism of Federated Data Sharing System", 《2020 IEEE INTL CONF ON PARALLEL & DISTRIBUTED PROCESSING WITH APPLICATIONS, BIG DATA & CLOUD COMPUTING, SUSTAINABLE COMPUTING & COMMUNICATIONS, SOCIAL COMPUTING & NETWORKING》, 4 June 2021 (2021-06-04) *
冯了了: "区块链BFT共识算法研究进展", 《计算机科学》, 3 April 2022 (2022-04-03) *
周启扬;李飞;章嘉彦;李亚林;宋佳琦;: "基于区块链技术的车联网匿名身份认证技术研究", 汽车技术, no. 10, 31 October 2020 (2020-10-31) *
孙萌;王昀飚;: "基于区块链的可追踪匿名电子投票方案", 网络空间安全, no. 09, 25 September 2019 (2019-09-25) *
曾萍: "基于区块链的IoV隐私保护认证方案设计", 《计算机应用研究》, 22 June 2021 (2021-06-22) *
陈志娟: "基于区块链的IoV隐私保护认证方案研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 15 April 2022 (2022-04-15) *
陈葳葳;曹利;邵长虹;: "基于区块链技术的车联网高效匿名认证方案", 计算机应用, no. 10, 31 October 2020 (2020-10-31) *

Similar Documents

Publication Publication Date Title
US11818269B2 (en) Computer-implemented system and method providing a decentralised protocol for the recovery of cryptographic assets
Zhang et al. Research on a covert communication model realized by using smart contracts in blockchain environment
CN108833081B (en) Block chain-based equipment networking authentication method
US11212081B2 (en) Method for signing a new block in a decentralized blockchain consensus network
CN109889497B (en) Distrust-removing data integrity verification method
Shu et al. Blockchain-based decentralized public auditing for cloud storage
CN111476573B (en) Account data processing method, device, equipment and storage medium
KR20050056204A (en) System and method for guaranteeing software integrity
CN110213228A (en) A kind of method, apparatus, storage medium and the computer equipment of certification communication
CN113939821A (en) System and method for non-parallel mining on a workload justification blockchain network
JP2002529778A (en) Incorporating shared randomness into distributed encryption
Liu et al. Data integrity audit scheme based on blockchain expansion technology
KR101120059B1 (en) Billing verifying apparatus, billing apparatus and method for cloud computing environment
JP2023530594A (en) Permitted Event Processing in Distributed Databases
CN111770163A (en) Block chain technique for digital currency encryption algorithm
CN115664714A (en) TEE-based anonymous selection committee method, system and medium on block chain
Li et al. A noninteractive multireplica provable data possession scheme based on smart contract
CN111651740B (en) Trusted platform sharing system for distributed intelligent embedded system
CN113542251B (en) Data reporting method and device
Chen et al. Towards reliable utilization of AIGC: blockchain-empowered ownership verification mechanism
Tian et al. Blockchain-Based Incentive and Arbitrable Data Auditing Scheme
Cooper et al. Cyber Security in Blockchain
Wu et al. Enhancing Cloud Data Integrity Verification Scheme with User Legitimacy Check
CN117916735A (en) Security element, method for registering a token and token reference register
CN117978395A (en) Block chain generation method based on true random numbers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination