WO2020216065A1 - 一种区块链中的投票方法及装置 - Google Patents
一种区块链中的投票方法及装置 Download PDFInfo
- Publication number
- WO2020216065A1 WO2020216065A1 PCT/CN2020/083842 CN2020083842W WO2020216065A1 WO 2020216065 A1 WO2020216065 A1 WO 2020216065A1 CN 2020083842 W CN2020083842 W CN 2020083842W WO 2020216065 A1 WO2020216065 A1 WO 2020216065A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- voting
- private key
- alliance chain
- service unit
- group
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C13/00—Voting apparatus
Definitions
- the present invention relates to the field of financial technology (Fintech), in particular to a voting method and device in a blockchain.
- the governance, maintenance, access, and authority control of the alliance chain are all completed by the alliance chain committee.
- the alliance chain committee can perform operations such as initializing the blockchain, accessing nodes, and changing the state of the chain. It is the most powerful subject in the alliance chain. Therefore, how to equalize the status of the alliance chain committee members while ensuring the robust and stable operation of the entire chain is an important principle that needs to be considered in the alliance chain committee election system.
- the alliance chain committee is generally formed by the members of the alliance chain through voting. Once the consortium chain committee is determined, each committee member of the consortium chain committee has the management private key of the entire chain. Every time the alliance chain committee needs to vote for the management and maintenance of the alliance chain, the traditional anonymous voting method of the alliance chain is adopted, and there will be a centralized group management, that is, some alliance chain committee members are required to collect and collect information as the managers of the entire voting process. Count the votes of all committee members, which cannot meet the requirement of equal status of alliance chain committee members. At the same time, the voting process is non-anonymous and cannot guarantee the privacy appeal of each consortium chain member.
- This application provides a voting method and device in the blockchain to improve the equality and credibility of voting in the alliance chain, and at the same time provide privacy protection for the identity of the voter.
- a voting method in a blockchain provided by an embodiment of the present invention includes:
- the group service unit receives voting requests from N consortium chain members, and any one of the voting requests contains a cryptographic commitment of a consortium chain committee member;
- the group service unit determines the voting parameters of a consortium chain member according to the cryptographic commitment
- the group service unit inputs N voting parameters into the voting algorithm for calculation, and compares the calculated result to be verified with the pre-stored group management private key, if the result to be verified is the same as the group management private key , It is determined that the voting content is passed; when the voting algorithm is set to input correct voting parameters greater than the first threshold, the calculated result to be verified is the same as the group management private key.
- the method before the group service unit receives voting requests from N alliance chain members, the method further includes:
- the group service unit receives an activation request sent by M consortium chain members, and any activation request includes a consortium chain member’s activation result calculated by using the voting algorithm on the local private key of the consortium chain member;
- the group service unit verifies the M activation results by using the value of the prestored common function, and if the number of activation results passed by the verification is greater than the second threshold, the group service unit is activated.
- the method before the group service unit receives voting requests from N alliance chain members, the method further includes:
- the group service unit receives an initialization request sent by any alliance chain member, and the initialization request includes the initialization parameters of all alliance chain members;
- the group service unit uses a group signature algorithm to generate the group management private key and the corresponding group management public key according to the initialization parameters of all alliance chain members;
- the group service unit generates a private key fragment for each alliance chain member according to the group management private key, and sends the private key fragment to the corresponding alliance chain member; the private key fragment is used for the
- the consortium chain member sends a voting request to the group service unit, it generates a cryptographic commitment as a voting parameter to indicate agreement to the voting content;
- the group service unit generates the mapping relationship between the group management public key and the identity of each alliance chain member, and records all the mapping relationships in the committee management contract of the blockchain;
- the group service unit stores the local public key corresponding to the local private key of each alliance chain member on the blockchain.
- the method further includes:
- the group service unit uses the group management private key and the group management public key to generate a low-rights management private key for each alliance chain member;
- the group service unit sends the low-rights management private key to the corresponding alliance chain committee member.
- the method further includes:
- the group service unit receives a member withdrawal message, and the member withdrawal message contains the identity of the member of the alliance chain who withdrew;
- the group service unit searches for the mapping relationship of the alliance chain committee members from the committee management contract according to the identity of the alliance chain committee members, and finds out the alliance chain committee members’ information from the blockchain.
- Local public key
- the group service unit invalidates the mapping relationship of the alliance chain members and the local public key of the alliance chain members.
- the voting request further includes a digital certificate generated by the consortium chain committee member using a local private key
- the group service unit determines the voting parameters of a consortium chain committee member according to the password commitment, including:
- the group service unit verifies the digital certificate by using the local public key of the consortium chain member
- the group service unit parses the cryptographic commitment to obtain voting parameters of the alliance chain members.
- it further includes:
- the group service unit receives a member tracking request, and the member tracking request includes the group management private key and the signature of the member to be tracked;
- the group service unit After passing the verification of the group management private key, the group service unit searches for the identity of the member to be tracked from the committee management contract based on the signature of the member to be tracked.
- it further includes:
- the group service unit sends the group management private key and the corresponding group management public key to a regulatory agency, so that the regulatory agency can supervise and trace the information of all alliance chain members.
- an embodiment of the present invention provides a voting device in a blockchain, including:
- the transceiver module is used to receive voting requests from N consortium chain members, and any one of the voting requests contains a cryptographic commitment from a consortium chain committee member;
- the determining module is used for determining a voting parameter of a consortium chain committee member according to the password promise for a password promise;
- the verification module is used to input N voting parameters into the voting algorithm for calculation, and compare the calculated result to be verified with the pre-stored group management private key. If the result to be verified is the same as the group management private key, Then it is determined that the voting content is passed; the voting algorithm is set so that when the number of input correct voting parameters is greater than the first threshold, the calculated result to be verified is the same as the group management private key.
- the transceiver module is further configured to receive activation requests sent by M consortium chain members, and any activation request includes a consortium chain committee member using the voting algorithm to The startup result calculated by the local private key;
- the verification module is further configured to verify the M startup results by using the value of the prestored common function, and if the number of the startup results that have passed the verification is greater than a second threshold, the group service unit is started.
- the transceiver module is further configured to receive an initialization request sent by any alliance chain member, and the initialization request includes the initialization parameters of all alliance chain members;
- It also includes a generating module for generating the group management private key and the corresponding group management public key according to the initialization parameters of all alliance chain members by using the group signature algorithm; and generating one for each alliance chain member according to the group management private key
- the private key is fragmented to generate a mapping relationship between the group management public key and the identity of each consortium chain member;
- the transceiver module is also used to send private key fragments to the corresponding alliance chain members; the private key fragments are used to generate voting parameters when the alliance chain members send voting requests to the group service unit Password promise to indicate agreement to vote content;
- It also includes a recording module, which is used to record all mapping relationships in the committee management contract of the blockchain; and store the local public key corresponding to the local private key of each consortium chain committee member on the blockchain.
- the generating module is further configured to use the group management private key and the group management public key to generate a low-rights management private key for each consortium chain member;
- the transceiver module is also used to send the low-rights management private key to the corresponding alliance chain committee member.
- the transceiver module is further configured to receive a member exit message, and the member exit message contains the identity of the member of the alliance chain who withdrew;
- the recording module is also used to find the mapping relationship of the alliance chain committee members from the committee management contract according to the identity of the alliance chain committee members, and find out the alliance chain from the blockchain
- the local public key of the committee member; the mapping relationship of the alliance chain committee member and the local public key of the alliance chain committee member are set to be invalid.
- the voting request further includes a digital certificate generated by the consortium chain committee member using a local private key
- the determining module is specifically used for:
- the cryptographic commitment is parsed to obtain the voting parameters of the alliance chain members.
- the transceiver module is further configured to receive a member tracking request, and the member tracking request includes the group management private key and the signature of the member to be tracked;
- the recording module is further used to find the identity of the member to be tracked from the committee management contract after the verification of the group management private key is passed, based on the signature of the member to be tracked.
- the transceiver module is further used for:
- the group management private key and the corresponding group management public key are sent to the regulatory agency, so that the regulatory agency can supervise and trace the information of all alliance chain members.
- an embodiment of the present invention also provides an electronic device, including:
- At least one processor and,
- a memory communicatively connected with the at least one processor; wherein,
- the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described above.
- an embodiment of the present invention also provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to make the computer execute the above method.
- the embodiments of the present invention also provide a computer program product, the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions When executed by a computer, the computer is caused to execute the method described above.
- the alliance chain committee jointly activates the group service unit.
- the group service unit receives voting requests sent by the alliance chain members.
- Each voting request includes a password commitment of the alliance chain member.
- the group service unit can determine the voting parameters of the alliance chain member according to the password promise.
- the group service unit inputs all voting parameters into the voting algorithm for calculation, and compares the calculated result to be verified with the group management private key. If the result to be verified is the same as the group management private key, the voting content is determined to pass.
- the voting algorithm here is set so that when the number of input correct voting parameters is greater than the first threshold, the calculated result to be verified is the same as the group management private key.
- the group service unit collects the votes of the members of the alliance chain, and uses the voting algorithm to count the voting results.
- the correct voting parameters are sent to the group service unit, and when they do not agree with the voting content , Send the wrong voting parameters to the group service unit.
- the group service unit does not need to know the specific information of the consortium chain members during the statistical process, nor does it know whether each consortium chain member agrees to the voting content. It only needs to input all voting parameters into the voting algorithm.
- the threshold When the number of correct voting parameters is greater than the first When the threshold is set, it means that the number of alliance chain members exceeding the first threshold agrees with the voting content, and the voting content is determined to be passed, so that in the voting process of the alliance chain committee, the status of each alliance chain is equal; and the alliance chain
- the operation of the committee members is anonymous, which ensures the privacy of the operation and identity of the members of the alliance chain.
- Figure 1 is a schematic structural diagram of a possible system architecture provided by an embodiment of the present invention.
- FIG. 2 is a schematic flowchart of a voting method in a blockchain according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of the initialization process of the alliance chain committee provided by the specific embodiment of the present invention.
- FIG. 4 is a schematic diagram of the process of joining the alliance chain members according to the second embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of a voting device in a blockchain provided by an embodiment of the present invention.
- Fig. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
- a system architecture to which the embodiment of the present invention is applicable includes a consortium chain member 101, a consortium chain member 102, and a member 103 to be admitted.
- a regulatory agency 104 may also be included.
- the consortium chain committee member 101 jointly maintains the consortium chain committee, and the consortium chain committee 101 completes the operation of the consortium chain committee and the members of the consortium chain by voting.
- Each consortium chain committee member has its own low-privilege management private key and its own identity.
- the alliance chain committee receives the joining request of the alliance chain members, and the alliance chain committee members jointly initiate the group service unit to vote, and decide whether to join the alliance chain committee through the alliance chain members, and the alliance chain committee members are removed from the alliance chain committee.
- the group service unit performs read and write operations on the committee management contract on the blockchain.
- the alliance chain member 102 is a node that has been approved by the alliance chain committee member to join the alliance chain.
- the consortium chain member 102 has a node certificate and private key for communicating with other nodes, and can normally communicate with other consortium chain members on the network.
- the consortium chain member 102 has no voting rights, but can become a consortium chain committee member with voting rights by sending a join request.
- the member 103 to be admitted is a subject who has submitted a request to join but has not yet joined the alliance chain.
- the member 103 to be admitted can use the local private key to generate a certificate request file and send it to the consortium chain committee member 101. After the consortium chain committee member 101 agrees, it becomes the consortium chain member 102 and writes its certificate to the consortium chain member on the blockchain In contract.
- the supervisory authority 104 stores the group management private key of the alliance chain committee, and can open the contract on the blockchain at the time of supervision and view the information of the alliance chain committee or alliance chain member in the contract.
- the regulatory agency 104 is passive and will not interfere with the operation and governance of the alliance chain.
- Blockchain A chain composed of a series of blocks. In addition to recording the data of the block, each block also records the Hash value of the previous block. In this way, a chain is formed.
- a block consists of a block header and a block body.
- the block header definition includes important fields such as the block height h, the hash value prevHash of the previous block, and the block body mainly stores transaction data.
- Alliance Chain Committee The entire access mechanism of the Alliance Chain is managed by the Alliance Chain Committee.
- the consortium chain committee is responsible for reviewing, modifying, and deleting information about nodes and accounts on the consortium chain. For example, setting the information of a certain alliance chain and initial deployment, organizing various institutions to join the alliance chain, assigning corresponding institutional administrators and traders permissions to each institution, and managing the life cycle of applications on the chain.
- an embodiment of the present invention provides a voting method in a blockchain. As shown in FIG. 2, the voting method in the blockchain provided by the embodiment of the present invention The voting method includes the following steps:
- Step 201 The group service unit receives voting requests from N consortium chain members, and any one of the voting requests includes a cryptographic commitment of a consortium chain committee member.
- the cryptographic commitment in the above steps is generated by the members of the alliance chain performing certain calculations on the voting parameters. If the members of the alliance chain agree with the voting content, the correct voting parameters are used to obtain the password promise; if the alliance chain members do not agree with the voting content, the incorrect voting parameters are used to obtain the password promise.
- Step 202 For a password commitment, the group service unit determines a voting parameter of a consortium chain member according to the password commitment.
- the group service unit After the group service unit receives N password promises, it determines a voting parameter based on one password promise, but the group service unit does not know whether the voting parameter is correct. Therefore, the group service unit cannot know each Whether the members of the alliance chain agree with the opinions of the voting content, thus ensuring the anonymity and privacy of the voting.
- Step 203 The group service unit inputs N voting parameters into the voting algorithm for calculation, and compares the calculated result to be verified with the pre-stored group management private key. If the result to be verified is compared with the group management If the private key is the same, the voting content is determined to pass.
- the voting algorithm is set such that when the number of input correct voting parameters is greater than the first threshold, the calculated result to be verified is the same as the group management private key.
- the result to be verified is the same as the group management private key. At this time, it indicates that there are more than the first threshold among the N alliance chain members. The committee members agreed with the content of the vote, and therefore confirmed that the content of the vote was passed.
- the result to be verified is different from the group management private key. At this time, it indicates that a larger number of the N alliance chain members disagree The voting content, therefore, it is determined that the voting content is not approved.
- the group service unit collects the votes of the members of the alliance chain, and uses the voting algorithm to count the voting results.
- the correct voting parameters are sent to the group service unit, and when they do not agree with the voting content , Send the wrong voting parameters to the group service unit.
- the group service unit does not need to know the specific information of the consortium chain members during the statistical process, nor does it know whether each consortium chain member agrees to the voting content. It only needs to input all voting parameters into the voting algorithm.
- the threshold When the number of correct voting parameters is greater than the first When the threshold is set, it means that the number of alliance chain members exceeding the first threshold agrees with the voting content, and the voting content is determined to be passed, so that in the voting process of the alliance chain committee, the status of each alliance chain is equal; and the alliance chain
- the operation of the committee members is anonymous, which ensures the privacy of the operation and identity of the members of the alliance chain.
- the voting request also includes a digital certificate generated by the consortium chain committee member using the local private key;
- the group service unit determines the voting parameters of a consortium chain committee member according to the password commitment, including:
- the group service unit verifies the digital certificate by using the local public key of the consortium chain member
- the group service unit parses the cryptographic commitment to obtain voting parameters of the alliance chain members.
- consortium chain members also use the local private key to sign the cryptographic commitment and obtain a digital certificate.
- the group service unit uses the local public key corresponding to the local private key of the consortium chain member to verify the digital certificate. Since only the consortium chain committee members have the right to vote, only if the verification is passed and the cryptographic commitment is generated by the consortium chain committee members, the group service unit will analyze the password commitment and obtain the voting parameters of the consortium chain committee members. Thereby ensuring the safety and effectiveness of voting.
- the group service unit Before voting in the embodiment of the present invention, the group service unit needs to be activated and the voting parameters of the alliance chain committee are generated.
- the voting parameters here may include the group management private key, the group management public key, and the private key fragmentation.
- the group service unit receives voting requests from N alliance chain members, it further includes:
- the group service unit receives an activation request sent by M consortium chain members, and any activation request includes a consortium chain member’s activation result calculated by using the voting algorithm on the local private key of the consortium chain member;
- the group service unit verifies the M activation results by using the value of the prestored common function, and if the number of activation results passed by the verification is greater than the second threshold, the group service unit is activated.
- the startup of the group service unit requires a sufficient number of alliance chain members to jointly initiate.
- the members of the alliance chain use the agreed voting algorithm to calculate the local private key to obtain the activation result and send it to the group service unit.
- the group service unit uses the prestored public function value to verify the activation result.
- the startup result equal to the value of the public function is verification passed. If the number of verified activation results is greater than the second threshold, it indicates that a member of the alliance chain that exceeds the second threshold sends an activation request to the group service unit, and the group service unit is activated.
- voting parameters are distributed to the members of the alliance chain. Before the group service unit receives voting requests from N alliance chain members, it further includes:
- the group service unit receives an initialization request sent by any alliance chain member, and the initialization request includes the initialization parameters of all alliance chain members;
- the group service unit uses a group signature algorithm to generate the group management private key and the corresponding group management public key according to the initialization parameters of all alliance chain members;
- the group service unit generates a private key fragment for each alliance chain member according to the group management private key, and sends the private key fragment to the corresponding alliance chain member; the private key fragment is used for the
- the consortium chain member sends a voting request to the group service unit, it generates a cryptographic commitment as a voting parameter to indicate agreement to the voting content;
- the group service unit generates the mapping relationship between the group management public key and the identity of each alliance chain member, and records all the mapping relationships in the committee management contract of the blockchain;
- the group service unit stores the local public key corresponding to the local private key of each alliance chain member on the blockchain.
- one alliance chain member may send an initialization request to the group service unit, or multiple or all alliance chain members may send an initialization request to the group service unit.
- the initialization parameters of all alliance chain members are sent to the group service unit, so that the group service unit can use the group signature algorithm to generate the group management private key and the group management public key based on all the initialization parameters.
- any alliance chain member sends an initialization request to the group service unit, and the alliance chain member sends the initialization parameters of all alliance chain members to the group service unit.
- each consortium chain committee member generates an initialization parameter locally, which is represented by s i .
- Each member of the alliance chain uses his own local private key k i to sign the initialization parameter s i and broadcasts it, so that each member of the alliance chain can collect the initialization parameters of the other members of the alliance chain, that is, each member of the alliance chain has Initialization parameters of all alliance chain members.
- the value of the public function in the embodiment of the present invention can also be calculated based on the initialization parameter values of all alliance chain members, that is, the initialization parameter of each alliance chain member is the parameter of the public function f, and the value of the public function can be determined by f (s 1 , s 2 ...s n ) calculated.
- the group service unit After the group service unit receives the initialization parameters of all the alliance chain members, it verifies each function, and after the verification is passed, it generates the group management private key Pri and the group management public key Pub.
- the group service unit uses multi-party calculations to generate a private key fragment for each consortium chain member based on the group management private key, and sends the private key fragment to the corresponding consortium chain member.
- the private key sharding is used when the consortium chain member sends a voting request to the group service unit, as a voting parameter to generate a cryptographic commitment to indicate that the consortium chain member agrees to the voting content. That is to say, there are more important matters in the alliance chain, such as the joining, exiting, and tracing of the alliance chain members, which need to be voted by the alliance chain members.
- Each alliance chain member sends its own private key shards to the group as a voting parameter Service unit to indicate approval of voting content; if a consortium chain member disagrees with the voting content, the consortium chain member can set the voting parameters to be different from the private key shards, and then send it to the group service unit.
- Groups service unit also generates a mapping between group identity and public key management of each chain alliance members, such as (Pub, R i), the Commission deployed to block chain management contracts and mappings.
- the group service unit also stores the local public key of each consortium chain member on the blockchain to verify the signature of the local private key of the consortium chain member.
- the group service unit In order to facilitate the alliance chain members to manage the entire alliance chain, after the group service unit generates the group management private key and the corresponding group management public key according to the initialization parameters of all the alliance chain members, it further includes:
- the group service unit uses the group management private key and the group management public key to generate a low-rights management private key for each alliance chain member;
- the group service unit sends the low-rights management private key to the corresponding alliance chain committee member.
- the above-mentioned private key fragmentation is used for alliance chain members to send voting requests to the group service unit.
- the application authority is higher.
- the application scenario is a more important matter in the alliance chain, generally related to the alliance chain members.
- the low-privilege management private key application scenario is a less important matter in the alliance chain, generally related to the members of the alliance chain, for example, when the subject applies to join the alliance chain to become a member of the alliance chain, send a message to a certain alliance chain member to join To request, only the approval of a member of the alliance chain is required for the subject to join.
- the group service unit generates a low-rights management private key for each consortium chain committee member, and sends the low-rights management private key to the corresponding consortium chain committee member.
- consortium chain committee members in the consortium chain committee change, all consortium chain committee members vote for a decision.
- the consortium chain member uses its own local private key to generate a joining request file and send it to the consortium chain committee, and the joining request file also includes the local public key of the consortium chain member.
- Each member of the alliance chain verifies the joining request file and sends a voting request to the group service unit.
- the voting request contains a password promise.
- the group service unit executes steps 201 to 203 to determine whether the voting content is approved, that is, whether to approve the alliance chain member to join the alliance chain committee. If passed, the group service unit generates private key fragments for the new alliance chain members according to the group management private key, and sends the private key fragments to the new alliance chain members. At the same time, the group service unit generates the mapping relationship between the group management public key and the identity of the new alliance chain member, and records the mapping relationship in the blockchain committee management contract, and the new alliance chain member’s The local public key is stored on the blockchain.
- the group service unit stores the local public key corresponding to the local private key of each consortium chain committee member on the blockchain, and further includes:
- the group service unit receives a member withdrawal message, and the member withdrawal message contains the identity of the member of the alliance chain who withdrew;
- the group service unit searches for the mapping relationship of the alliance chain committee members from the committee management contract according to the identity of the alliance chain committee members, and finds out the alliance chain committee members’ information from the blockchain.
- Local public key
- the group service unit invalidates the mapping relationship of the alliance chain members and the local public key of the alliance chain members.
- the group service unit receives a member withdrawal message, which may be sent by the quit alliance chain member to the group service unit, or sent by any other alliance chain member to the group service unit.
- the group service unit finds the mapping relationship of the retired consortium chain members from the committee management contract according to the identity identifier contained in the member’s exit message, and finds the local public key of the retired consortium chain member from the blockchain. Both are set to invalid.
- the group service unit reduces the maximum total number of requests of the alliance chain committee by one. In this way, when the exited consortium chain members use the group signature generated by the local private key to access the corresponding resources, or perform operations such as voting, the signature verification is invalid.
- the embodiment of the present invention also sets a supervision mechanism.
- the group service unit sends the group management private key and the corresponding group management public key to a regulatory agency, so that the regulatory agency can supervise and trace the information of all alliance chain members.
- the supervisory agency in the embodiment of the present invention can track illegal operations, so that the alliance chain committee has supervisable characteristics, and the overall legality of the committee is guaranteed.
- the regulatory agencies since the regulatory agencies are inert, they will not interfere with the operation and governance of the alliance chain.
- the initiator of tracking abnormal operations in the embodiment of the present invention may be a regulatory agency or a consortium chain committee. If the initiator is a supervisory authority, since the supervisory authority has a complete group management private key, the group management private key can be directly used to initiate a member tracking request to the group service unit. If the initiator is the consortium chain committee, since each consortium chain committee does not have a complete group management private key, it is necessary to restore the complete group management private key through voting.
- the embodiment of the present invention further includes:
- the group service unit receives a member tracking request, and the member tracking request includes the group management private key and the signature of the member to be tracked;
- the group service unit After passing the verification of the group management private key, the group service unit searches for the identity of the member to be tracked from the committee management contract based on the signature of the member to be tracked.
- the group service unit obtains the group management private key, it obtains the relevant certificate corresponding to the signature, so as to achieve the purpose of tracking the information of the abnormal visitor of the resource.
- each consortium chain committee member has two public keys, two private keys, and one private key fragment.
- the local private key corresponds to the local public key
- the local private key and the local public key are used for group signatures to prove the identity of the consortium chain members.
- the private key sharding is generated based on the group management private key, and is used by the alliance chain members to vote on the more critical issues in the alliance chain committee; the low-privilege management private key is also generated based on the group management private key and used for the alliance chain committee members to the alliance General matters in the chain are dealt with.
- the group management private key and the low authority management private key of each consortium chain member correspond to the group management public key.
- the embodiment of the present invention provides a set of safe, peer-to-peer, anonymous, effective, supervisable and auditable voting scheme for the alliance chain committee.
- the status of each alliance chain committee is equal.
- the anonymity of the members of the alliance chain is guaranteed.
- Embodiment 1 is the initialization process of the alliance chain committee.
- the steps of the specific embodiment are shown in Figure 3 and include:
- Step 301 All N alliance chain members jointly generate initialization parameters locally, which are denoted as s 1 , s 2 , s i , ... s N.
- Step 302 The i-th consortium chain member uses the local private key k i to sign the initialization parameter s i and broadcast it.
- Step 303 N consortium chain members send activation requests to the group service unit, and each activation request contains the activation result Q(k i ) calculated by a consortium chain member using the voting algorithm Q to the local private key k i of the consortium chain member ).
- Step 304 The group service unit uses the prestored value F of the public function to verify the received activation result. If the number of passed activation results is greater than the second threshold, step 305 is executed; otherwise, step 306 is executed.
- Step 305 The group service unit feeds back a successful start message to all alliance chain members, and then executes step 307.
- Step 306 The group service unit sends a failure message to all alliance chain members.
- Step 307 Any alliance chain member sends an initialization request to the group service unit, and the initialization request includes the initialization parameters s 1 , s 2 , s i , ... s N of all the alliance chain members.
- Step 309 The group service unit uses the group signature algorithm to generate the group management private key Pri and the corresponding group management public key Pub according to the initialization parameters s 1 , s 2 , s i , ... s N of all alliance chain members, and pass The secure channel is sent to the regulatory agency.
- Step 310 The group service unit generates private key fragments Pri(s i ) and low-privileged management private key GSK(s i ) for the i-th consortium chain member according to the group management private key Pri, and sends them to each consortium through a secure channel Chain members sent.
- Step 311 a group generating a group management service unit with the i-th public key Pub identity federation chain members identifier mapping relationship of R i (Pub, R i), and the mapping relationship (Pub, R i) is recorded in block chains The committee management contract.
- Step 312 the service unit group i-th local public key Pk Union chain members i stored encrypted on the block chain.
- the second embodiment is the joining process of alliance chain members.
- the steps of the specific embodiment are shown in Figure 4, including:
- Step 401 The consortium chain member uses the local private key to generate a joining request file, and sends it to the consortium chain committee.
- the joining request file contains the local public key of the consortium chain member.
- Step 402 For any member of the alliance chain committee, verify the joining request file and certificate.
- Step 403 After the consortium chain members pass the verification, a voting request is initiated to the group service unit.
- the voting request includes the cryptographic commitment of the consortium chain members and the certificate obtained by the consortium chain members using the local private key to sign.
- Step 404 The group service unit verifies the certificate of the consortium chain committee member, and determines the voting parameters of the consortium chain committee member according to the password commitment after passing.
- Step 405 The group service unit inputs all voting parameters into the voting algorithm Q for calculation, and compares the calculated result to be verified with the pre-stored group management private key Pri. If the two are the same, the voting content is determined to pass, that is Through the joining request of the alliance chain members.
- Step 406 The group service unit uses the group management private key Pri to generate private key fragments Pri(s x ) and the low-privilege management private key GSK(s x ) for the new consortium chain committee members, and sends them to the new consortium chain through a secure channel Member sent.
- Step 407 The group service group management unit generates a public key and the identity of the new alliance Pub chain members identifier mapping relationship of R x (Pub, R x), and the mapping relationship (Pub, R x) recorded in the block chain Committee management contract.
- Step S408 The group service unit encrypts and stores the local public key Pk x of the new alliance chain member on the blockchain.
- the embodiment of the present invention also provides a voting device in the blockchain, as shown in FIG. 5, including:
- the transceiver module 501 is configured to receive voting requests from N consortium chain members, and any one of the voting requests includes a cryptographic commitment of a consortium chain committee member;
- the determining module 502 is configured to determine the voting parameters of a consortium chain committee member according to the password promise for a password promise;
- the verification module 503 is configured to input N voting parameters into the voting algorithm for calculation, and compare the calculated result to be verified with the pre-stored group management private key, if the result to be verified is the same as the group management private key , It is determined that the voting content is passed; when the voting algorithm is set to input correct voting parameters greater than the first threshold, the calculated result to be verified is the same as the group management private key.
- the transceiver module 501 is further configured to receive activation requests sent by M consortium chain members, where any activation request includes a consortium chain committee member’s local private key using the voting algorithm The calculated start result;
- the verification module 503 is further configured to verify the M startup results by using the value of the pre-stored public function, and if the number of the startup results passed by the verification is greater than the second threshold, the group service unit is started.
- the transceiver module 501 is further configured to receive an initialization request sent by any alliance chain member, and the initialization request includes the initialization parameters of all alliance chain members;
- It also includes a generation module 504, which is used to generate the group management private key and the corresponding group management public key according to the initialization parameters of all alliance chain members by using the group signature algorithm; generate the group management private key for each alliance chain member according to the group management private key A private key fragment to generate a mapping relationship between the group management public key and the identity of each consortium chain member;
- the transceiver module 501 is also used to send private key fragments to the corresponding alliance chain members; the private key fragments are used as voting parameters when the alliance chain members send voting requests to the group service unit Generate a password promise to indicate agreement to the voting content;
- It also includes a recording module 505, which is used to record all mapping relationships in the committee management contract of the blockchain; and store the local public key corresponding to the local private key of each consortium chain committee member on the blockchain.
- the generating module 504 is further configured to use the group management private key and the group management public key to generate a low-rights management private key for each consortium chain member;
- the transceiver module 501 is also used to send the low-rights management private key to the corresponding alliance chain committee member.
- the transceiver module 501 is further configured to receive a member exit message, and the member exit message contains the identity of the member of the alliance chain who withdrew;
- the recording module 505 is also configured to find the mapping relationship of the alliance chain committee members from the committee management contract according to the identity of the alliance chain committee members, and find out the alliance chain committee members from the blockchain.
- the local public key of the chain committee member; the mapping relationship of the alliance chain committee member and the local public key of the alliance chain committee member are set to be invalid.
- the determining module 502 is specifically configured to:
- the cryptographic commitment is parsed to obtain the voting parameters of the alliance chain members.
- the transceiver module 501 is further configured to receive a member tracking request, and the member tracking request includes the group management private key and the signature of the member to be tracked;
- the recording module 505 is also used to find the identity of the member to be tracked from the committee management contract based on the signature of the member to be tracked after the verification of the group management private key is passed.
- the transceiver module 501 is further configured to:
- the group management private key and the corresponding group management public key are sent to the regulatory agency, so that the regulatory agency can supervise and trace the information of all alliance chain members.
- the present invention also provides an electronic device, as shown in FIG. 6, including:
- It includes a processor 601, a memory 602, a transceiver 603, and a bus interface 604.
- the processor 601, the memory 602 and the transceiver 603 are connected through the bus interface 604;
- the processor 601 is configured to read a program in the memory 602 and execute the voting method in the above-mentioned blockchain, and the method includes:
- For a cryptographic commitment determine the voting parameters of a consortium chain committee member according to the cryptographic commitment
- the processor 601 may be a central processing unit (central processing unit, CPU for short), a network processor (NP for short), or a combination of CPU and NP. It can also be a hardware chip.
- the aforementioned hardware chip may be an application-specific integrated circuit (ASIC for short), a programmable logic device (PLD for short), or a combination thereof.
- ASIC application-specific integrated circuit
- PLD programmable logic device
- the above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (generic array logic, GAL), or any of them combination.
- the memory 602 is configured to store one or more executable programs, and can store data used by the processor 601 when performing operations.
- the program may include program code, and the program code includes computer operation instructions.
- the memory 602 may include a volatile memory (volatile memory), such as random-access memory (random-access memory, RAM for short); the memory 702 may also include a non-volatile memory (non-volatile memory), such as flash memory ( flash memory), hard disk drive (HDD for short) or solid-state drive (SSD for short); the memory 602 may also include a combination of the foregoing types of memories.
- volatile memory volatile memory
- RAM random-access memory
- non-volatile memory such as flash memory ( flash memory), hard disk drive (HDD for short) or solid-state drive (SSD for short
- SSD solid-state drive
- the memory 602 stores the following elements, executable modules or data structures, or their subsets, or their extended sets:
- Operating instructions including various operating instructions, used to implement various operations.
- Operating system including various system programs, used to implement various basic services and process hardware-based tasks.
- the bus interface 604 may be a wired communication access port, a wireless bus interface or a combination thereof.
- the wired bus interface may be, for example, an Ethernet interface.
- the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
- the wireless bus interface may be a WLAN interface.
- the embodiments of the present invention also provide a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the above The voting method in the blockchain.
- embodiments of the present invention also provide a computer program product.
- the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium.
- the computer program includes program instructions. When the instruction is executed by the computer, the computer is caused to execute the voting method in the blockchain.
- These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
- the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
- the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Health & Medical Sciences (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
一种区块链(Block chain)中的投票方法及装置,用以提升联盟链投票的平等性和可信性,同时对投票者身份提供隐私保护。群组服务单元接收N个联盟链委员的投票请求,任一个投票请求包含一个联盟链委员的密码承诺(201);针对一个密码承诺,群组服务单元根据密码承诺,确定一个联盟链委员的投票参数(202);群组服务单元将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若待验证结果与群管理私钥相同,则确定投票内容通过(203);投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与群管理私钥相同。
Description
相关申请的交叉引用
本申请要求在2019年04月24日提交中国专利局、申请号为201910332167.0、申请名称为“一种区块链中的投票方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及金融科技(Fintech)领域,尤其涉及一种区块链中的投票方法及装置。
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Finteh)转变,区块链(Block chain)技术也不例外,但由于金融行业的安全性、实时性要求,也对技术提出的更高的要求。
联盟链的治理、维护、准入、权限控制的工作均由联盟链委员会完成,联盟链委员会可以执行初始化区块链、准入节点、改变链状态等操作,是联盟链中权力最大的主体。因此,如何让联盟链委员地位对等,同时又能保证整条链健壮,稳定的运行,是联盟链委员会选举制度需要考虑的重要原则。
现有方案中,联盟链委员会一般由联盟链成员通过投票选举形成。一旦确定联盟链委员会后,联盟链委员会中的每个委员都拥有整条链的管理私钥。每次需要联盟链委员会通过投票进行联盟链的管理维护时,采用传统的联盟链匿名投票方式,会有中心化的群管理存在,即需要某些联盟链委员作为整个投票过程的管理者收集并统计所有委员的投票,这样无法满足联盟链委员地位对等的要求。同时,投票过程是不匿名的,无法保证每个联盟链委员的隐私诉求。
发明内容
本申请提供一种区块链中的投票方法及装置,用以提升联盟链投票的平等性和可信性,同时对投票者身份提供隐私保护。
第一方面,本发明实施例提供的一种区块链中的投票方法,包括:
群组服务单元接收N个联盟链委员的投票请求,其中任一个投票请求中包含一个联盟链委员的密码承诺;
针对一个密码承诺,所述群组服务单元根据所述密码承诺,确定一个联盟链委员的投票参数;
所述群组服务单元将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若所述待验证结果与所述群管理私钥相同,则确定投票内容通过;所述投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与所述群管理私钥相同。
一种可选的实施例中,所述群组服务单元接收N个联盟链委员的投票请求之前,还包括:
所述群组服务单元接收M个联盟链委员发送的启动请求,其中任一启动请求中包含一个联盟链委员利用所述投票算法对所述联盟链委员的本地私钥计算得到的启动结果;
所述群组服务单元利用预存的公共函数的值对所述M个启动结果进行验证,若验证通过的启动结果的数量大于第二阈值,则所述群组服务单元启动。
一种可选的实施例中,所述群组服务单元接收N个联盟链委员的投票请求之前,还包括:
所述群组服务单元接收任一联盟链委员发送的初始化请求,所述初始化请求中包含所有联盟链委员的初始化参数;
所述群组服务单元利用群签名算法,根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥;
所述群组服务单元根据所述群管理私钥为每一个联盟链委员生成一个私钥分片,并将私钥分片向对应的联盟链委员发送;所述私钥分片用于所述联盟链委员向所述群组服务单元发送投票请求时,作为投票参数生成密码承诺以表明同意投票内容;
所述群组服务单元生成所述群管理公钥与每一个联盟链委员的身份标识的映射关系,并将所有映射关系记录于区块链的委员会管理合约中;
所述群组服务单元将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上。
一种可选的实施例中,所述群组服务单元根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥之后,还包括:
所述群组服务单元利用所述群管理私钥以及所述群管理公钥,为每一个联盟链委员生成低权限管理私钥;
所述群组服务单元将所述低权限管理私钥向对应的联盟链委员发送。
一种可选的实施例中,所述群组服务单元将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上之后,还包括:
所述群组服务单元接收委员退出消息,所述委员退出消息中包含退出的联盟链委员的身份标识;
所述群组服务单元根据所述联盟链委员的身份标识,从所述委员会管理合约中查找出 所述联盟链委员的映射关系,并从所述区块链中查找出所述联盟链委员的本地公钥;
所述群组服务单元将所述联盟链委员的映射关系以及所述联盟链委员的本地公钥设置为无效。
一种可选的实施例中,所述投票请求中还包括所述联盟链委员利用本地私钥生成的数字证书;
所述群组服务单元根据所述密码承诺,确定一个联盟链委员的投票参数,包括:
所述群组服务单元利用所述联盟链委员的本地公钥对所述数字证书进行验证;
所述群组服务单元在验证通过后,解析所述密码承诺,得到所述联盟链委员的投票参数。
一种可选的实施例中,还包括:
所述群组服务单元接收委员追踪请求,所述委员追踪请求中包括所述群管理私钥以及待追踪委员的签名;
所述群组服务单元对所述群管理私钥验证通过后,依据所述待追踪委员的签名,从委员会管理合约中查找出所述待追踪委员的身份标识。
一种可选的实施例中,还包括:
所述群组服务单元将所述群管理私钥以及对应的群管理公钥向监管机构发送,以使所述监管机构对所有联盟链委员的信息进行监管和追溯。
第二方面,本发明实施例提供一种区块链中的投票装置,包括:
收发模块,用于接收N个联盟链委员的投票请求,其中任一个投票请求中包含一个联盟链委员的密码承诺;
确定模块,用于针对一个密码承诺,根据所述密码承诺,确定一个联盟链委员的投票参数;
验证模块,用于将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若所述待验证结果与所述群管理私钥相同,则确定投票内容通过;所述投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与所述群管理私钥相同。
一种可选的实施例中,所述收发模块,还用于接收M个联盟链委员发送的启动请求,其中任一启动请求中包含一个联盟链委员利用所述投票算法对所述联盟链委员的本地私钥计算得到的启动结果;
所述验证模块,还用于利用预存的公共函数的值对所述M个启动结果进行验证,若验证通过的启动结果的数量大于第二阈值,则所述群组服务单元启动。
一种可选的实施例中,所述收发模块,还用于接收任一联盟链委员发送的初始化请求,所述初始化请求中包含所有联盟链委员的初始化参数;
还包括生成模块,用于利用群签名算法,根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥;根据所述群管理私钥为每一个联盟链委员生成一个私钥分片,生成所述群管理公钥与每一个联盟链委员的身份标识的映射关系;
所述收发模块,还用于将私钥分片向对应的联盟链委员发送;所述私钥分片用于所述联盟链委员向所述群组服务单元发送投票请求时,作为投票参数生成密码承诺以表明同意投票内容;
还包括记录模块,用于将所有映射关系记录于区块链的委员会管理合约中;将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上。
一种可选的实施例中,所述生成模块,还用于利用所述群管理私钥以及所述群管理公钥,为每一个联盟链委员生成低权限管理私钥;
所述收发模块,还用于将所述低权限管理私钥向对应的联盟链委员发送。
一种可选的实施例中,所述收发模块,还用于接收委员退出消息,所述委员退出消息中包含退出的联盟链委员的身份标识;
所述记录模块,还用于根据所述联盟链委员的身份标识,从所述委员会管理合约中查找出所述联盟链委员的映射关系,并从所述区块链中查找出所述联盟链委员的本地公钥;将所述联盟链委员的映射关系以及所述联盟链委员的本地公钥设置为无效。
一种可选的实施例中,所述投票请求中还包括所述联盟链委员利用本地私钥生成的数字证书;
所述确定模块,具体用于:
利用所述联盟链委员的本地公钥对所述数字证书进行验证;
在验证通过后,解析所述密码承诺,得到所述联盟链委员的投票参数。
一种可选的实施例中,所述收发模块,还用于接收委员追踪请求,所述委员追踪请求中包括所述群管理私钥以及待追踪委员的签名;
所述记录模块,还用于对所述群管理私钥验证通过后,依据所述待追踪委员的签名,从委员会管理合约中查找出所述待追踪委员的身份标识。
一种可选的实施例中,所述收发模块还用于:
将所述群管理私钥以及对应的群管理公钥向监管机构发送,以使所述监管机构对所有联盟链委员的信息进行监管和追溯。
第三方面,本发明实施例还提供一种电子设备,包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上所述的方法。
第四方面,本发明实施例还提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行如上所述的方法。
第五方面,本发明实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行如上所述方法。
本发明实施例中,联盟链委员会共同启动群组服务单元。需进行投票时,群组服务单元接收联盟链委员发送的投票请求,每一个投票请求中包含一个联盟链委员的密码承诺,群组服务单元可根据密码承诺确定该联盟链委员的投票参数。群组服务单元将所有投票参数输入投票算法中进行计算,并将计算得到的待验证结果与群管理私钥进行对比。若待验证结果与群管理私钥相同,则确定投票内容通过。这里的投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与群管理私钥相同。本发明实施例中,群组服务单元收集联盟链委员的投票,并利用投票算法统计投票结果,联盟链委员同意投票内容时,将正确的投票参数发送至群组服务单元,不同意投票内容时,将错误的投票参数发送至群组服务单元。群组服务单元在统计过程中无需知道联盟链委员的具体信息,也不知道每个联盟链委员是否同意投票内容,只需将所有投票参数输入投票算法,当正确的投票参数个数大于第一阈值时,即表明有个数超过第一阈值的联盟链委员同意该投票内容,确定投票内容通过,从而在联盟链委员会投票过程中,各个联盟链之间的地位是对等的;且联盟链委员的操作是匿名的,保证了联盟链委员的操作和身份的隐私性。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种可能的系统构架的结构示意图;
图2为本发明实施例提供的一种区块链中投票方法的流程示意图;
图3为本发明具体实施例一提供的联盟链委员会的初始化的流程示意图;
图4为本发明具体实施例二提供的联盟链委员加入的流程示意图;
图5为本发明实施例提供的一种区块链中投票装置的结构示意图;
图6为本发明实施例提供的电子设备的结构示意图。
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步 地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
如图1所示,本发明实施例所适用的一种系统架构,包括联盟链委员101、联盟链成员102和待准入成员103。可选的,还可以包括监管机构104。
联盟链委员101共同维护联盟链委员会,联盟链委员101通过投票的方式完成对联盟链委员会和联盟链成员的操作。每个联盟链委员具有自己的低权限管理私钥和自己的身份标识。联盟链委员会接收联盟链成员的加入请求,联盟链委员共同启动群组服务单元进行投票,并通过投票决定是否通过联盟链成员加入联盟链委员会、联盟链委员从联盟链委员会中剔除等操作。群组服务单元对区块链上的委员会管理合约执行读写操作,当有联盟链委员加入时,将该联盟链委员的身份标识记录于委员会管理合约中;联盟链委员退出时,将该联盟链委员的身份标识设置为无效,或直接将该联盟链委员的身份标识从委员会管理合约中删除。
联盟链成员102为经过联盟链委员许可,加入到联盟链之中的节点。联盟链成员102拥有与其他节点进行通信的节点证书和私钥,可以正常地与其他联盟链成员进行网络通信。联盟链成员102没有投票权,但是可以通过发送加入请求成为拥有投票权的联盟链委员。
待准入成员103为递交了加入请求但尚未加入联盟链的主体。待准入成员103可以利用本地私钥产生证书请求文件,发送给联盟链委员101,待联盟链委员101同意后,成为联盟链成员102,并将其证书记入区块链上的联盟链成员合约中。
监管机构104存有联盟链委员会的群管理私钥,可以在监管时刻打开区块链上的合约,查看合约中联盟链委员或联盟链成员信息。监管机构104是被动的,不会干预联盟链的运行和治理。
为了便于理解,下面对本发明实施例中可能涉及的名词进行定义和解释。
区块链:是由一系列区块组成的一条链,每个块上除了记录本块的数据还会记录上一块的Hash(哈希)值,通过这种方式组成一条链。区块链的核心理念有两个,一个是密码学技术,另一个是去中心化思想,基于这两个理念做到区块链上的历史信息无法被篡改。一个区块由块头和块体组成,其中块头定义包括该区块高度h,上一个区块的Hash值prevHash等重要字段,而块体主要存储交易数据。
联盟链:只针对特定某个群体的成员和有限的第三方,内部指定多个预选的节点为记账人,每个块的生成由所有的预选节点共同决定,其他接入节点可以参与交易,但不过问记账过程,其他第三方可以通过该区块链开放的API(Application Programming Interface,应用程序编程接口)进行限定查询。为了获得更好的性能,联盟链对于共识或验证节点的配置和网络环境有一定要求。联盟链中存在准入机制,可以使得交易性能更容易提高,避 免由参次不齐的参与者产生的一些问题。
联盟链委员会:联盟链整个准入机制由联盟链委员会管理。联盟链委员会负责审核、修改、删除联盟链上的节点和账号相关资料。如设定某一个联盟链的信息和进行初始化部署,组织各机构加入联盟链,为各机构分配对应的机构管理员和交易员权限,管理链上应用的生命周期等。
为了提升联盟链投票的平等性和可信性,基于上述架构,本发明实施例提供了一种区块链中的投票方法,如图2所示,本发明实施例提供的区块链中的投票方法包括以下步骤:
步骤201、群组服务单元接收N个联盟链委员的投票请求,其中任一个投票请求中包含一个联盟链委员的密码承诺。
上述步骤中的密码承诺为联盟链委员对投票参数进行一定的计算生成的。若联盟链委员同意投票内容,则利用正确的投票参数得到密码承诺;若联盟链委员不同意投票内容,则利用错误的投票参数得到密码承诺。
步骤202、针对一个密码承诺,所述群组服务单元根据所述密码承诺,确定一个联盟链委员的投票参数。
具体实施过程中,群组服务单元接收到N个密码承诺后,根据一个密码承诺确定一个投票参数,但群组服务单元并不知道该投票参数是否正确,因此,群组服务单元无法获知每一个联盟链委员是否同意该投票内容的意见,从而保证了投票的匿名性和私密性。
步骤203、所述群组服务单元将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若所述待验证结果与所述群管理私钥相同,则确定投票内容通过。所述投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与所述群管理私钥相同。
具体来说,投票算法中输入正确的投票参数的个数大于第一阈值时,待验证结果与群管理私钥相同,此时表明N个联盟链委员中有超过第一阈值个数的联盟链委员同意该投票内容,因此确定投票内容通过。而投票算法中输入正确的投票参数的个数小于第一阈值时,得到的待验证结果与群管理私钥不同,此时表明N个联盟链委员中有较多个数的联盟链委员不同意该投票内容,因此确定投票内容不通过。
本发明实施例中,群组服务单元收集联盟链委员的投票,并利用投票算法统计投票结果,联盟链委员同意投票内容时,将正确的投票参数发送至群组服务单元,不同意投票内容时,将错误的投票参数发送至群组服务单元。群组服务单元在统计过程中无需知道联盟链委员的具体信息,也不知道每个联盟链委员是否同意投票内容,只需将所有投票参数输入投票算法,当正确的投票参数个数大于第一阈值时,即表明有个数超过第一阈值的联盟链委员同意该投票内容,确定投票内容通过,从而在联盟链委员会投票过程中,各个联盟链之间的地位是对等的;且联盟链委员的操作是匿名的,保证了联盟链委员的操作和身份 的隐私性。
为了保证投票的有效性,所述投票请求中还包括所述联盟链委员利用本地私钥生成的数字证书;
所述群组服务单元根据所述密码承诺,确定一个联盟链委员的投票参数,包括:
所述群组服务单元利用所述联盟链委员的本地公钥对所述数字证书进行验证;
所述群组服务单元在验证通过后,解析所述密码承诺,得到所述联盟链委员的投票参数。
具体地,联盟链委员还利用本地私钥对密码承诺进行签名,得到数字证书。群组服务单元接收到数字证书后,利用该联盟链委员的本地私钥对应的本地公钥对数字证书进行验证。由于只有联盟链委员具有投票的权力,因此只有验证通过,证明该密码承诺为联盟链委员生成,群组服务单元才会对密码承诺进行解析,得到该联盟链委员的投票参数。从而保证了投票的安全性和有效性。
本发明实施例在进行投票之前,需启动群组服务单元,并生成联盟链委员会的投票参数,这里的投票参数可以包括群管理私钥、群管理公钥、私钥分片等。所述群组服务单元接收N个联盟链委员的投票请求之前,还包括:
所述群组服务单元接收M个联盟链委员发送的启动请求,其中任一启动请求中包含一个联盟链委员利用所述投票算法对所述联盟链委员的本地私钥计算得到的启动结果;
所述群组服务单元利用预存的公共函数的值对所述M个启动结果进行验证,若验证通过的启动结果的数量大于第二阈值,则所述群组服务单元启动。
具体来说,群组服务单元的启动需足够数量的联盟链委员共同发起。联盟链委员利用约定的投票算法,对本地私钥计算得到启动结果,并向群组服务单元发送。群组服务单元接收到启动请求后,利用预存的公共函数的值对启动结果进行验证。与该公共函数的值相等的启动结果为验证通过。若验证通过的启动结果的数量大于第二阈值,则表明有超过第二阈值的联盟链委员向群组服务单元发送启动请求,则该群组服务单元启动。
群组服务单元启动后,为各个联盟链委员分发投票参数。所述群组服务单元接收N个联盟链委员的投票请求之前,还包括:
所述群组服务单元接收任一联盟链委员发送的初始化请求,所述初始化请求中包含所有联盟链委员的初始化参数;
所述群组服务单元利用群签名算法,根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥;
所述群组服务单元根据所述群管理私钥为每一个联盟链委员生成一个私钥分片,并将私钥分片向对应的联盟链委员发送;所述私钥分片用于所述联盟链委员向所述群组服务单元发送投票请求时,作为投票参数生成密码承诺以表明同意投票内容;
所述群组服务单元生成所述群管理公钥与每一个联盟链委员的身份标识的映射关系,并将所有映射关系记录于区块链的委员会管理合约中;
所述群组服务单元将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上。
具体实施过程中,可以是一个联盟链委员向群组服务单元发送初始化请求,也可以是多个或全部联盟链委员向群组服务单元发送初始化请求。所有联盟链委员的初始化参数都被发送给群组服务单元,以使群组服务单元可以利用群签名算法,基于所有初始化参数生成群管理私钥和群管理公钥。本发明实施例中是任一联盟链委员向群组服务单元发送初始化请求,且由该联盟链委员将所有联盟链委员的初始化参数向群组服务单元发送。本发明实施例中每一个联盟链委员都会在本地产生初始化参数,用s
i表示。每个联盟链委员利用自身的本地私钥k
i对初始化参数s
i签名后,进行广播,这样每个联盟链委员均可收集到其余联盟链委员的初始化参数,即每个联盟链委员均具有所有联盟链委员的初始化参数。
进一步地,本发明实施例中公共函数的值也可以是基于所有联盟链委员的初始化参数值计算得到,即以各联盟链委员的初始化参数为公共函数f的参数,公共函数的值可以由f(s
1,s
2…s
n)计算得到。
群组服务单元接收到所有联盟链委员的初始化参数后,对各函数进行验证,验证通过后,生成群管理私钥Pri和群管理公钥Pub。群组服务单元利用多方计算,根据群管理私钥为每一个联盟链委员生成一个私钥分片,并将私钥分片向对应的联盟链委员发送。私钥分片用于联盟链委员向群组服务单元发送投票请求时,作为投票参数生成密码承诺以表明该联盟链委员同意投票内容。也就是说,联盟链中有较为重要的事宜,如联盟链委员的加入、退出、追溯等,需要联盟链委员投票决定,各联盟链委员将自身的私钥分片作为投票参数发送给群组服务单元,以表明同意投票内容;若某联盟链委员不同意投票内容,则该联盟链委员可以将投票参数设置为与私钥分片不同,再发送至群组服务单元。
群组服务单元还生成群管理公钥与每一个联盟链委员的身份标识的映射关系,例如(Pub,R
i),并将映射关系部署到区块链的委员会管理合约中。此外,群组服务单元还将每一个联盟链委员的本地公钥存储于区块链上,用于验证联盟链委员的本地私钥的签名。通过以上步骤,生成了联盟链委员会的投票参数,完成联盟链委员会的初始化。
为了便于联盟链委员管理整个联盟链,所述群组服务单元根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥之后,还包括:
所述群组服务单元利用所述群管理私钥以及所述群管理公钥,为每一个联盟链委员生成低权限管理私钥;
所述群组服务单元将所述低权限管理私钥向对应的联盟链委员发送。
上述私钥分片用于联盟链委员向群组服务单元发送投票请求,应用权限较高,应用的 场景为联盟链中较为重要的事宜,一般为与联盟链委员相关的事宜。而低权限管理私钥应用的场景为联盟链中重要程度较低的事宜,一般为与联盟链成员相关的事宜,例如主体申请加入联盟链成为联盟链成员时,向某一个联盟链委员发送加入请求,只需一个联盟链委员的赞同,该主体即可加入。群组服务单元为每一个联盟链委员生成低权限管理私钥,并将低权限管理私钥向对应的联盟链委员发送。
初始化完成后,联盟链委员会中的联盟链委员变更时,所有联盟链委员投票决定。具体可以为,联盟链成员使用自己的本地私钥生成加入请求文件向联盟链委员会发送,加入请求文件中还包括该联盟链成员的本地公钥。每个联盟链委员对加入请求文件进行验证,并向群组服务单元发送投票请求,投票请求中包含密码承诺。
群组服务单元执行步骤201至步骤203,确定是否通过投票内容,即是否同意该联盟链成员加入联盟链委员会。若通过,则群组服务单元根据群管理私钥为新的联盟链委员生成私钥分片,并将私钥分片向新的联盟链委员发送。同时,群组服务单元生成群管理公钥与该新的联盟链委员的身份标识的映射关系,并将该映射关系记录于区块链的委员会管理合约中,并且将该新的联盟链委员的本地公钥存储于所述区块链上。
当联盟链委员会中有联盟链委员退出时,所述群组服务单元将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上之后,还包括:
所述群组服务单元接收委员退出消息,所述委员退出消息中包含退出的联盟链委员的身份标识;
所述群组服务单元根据所述联盟链委员的身份标识,从所述委员会管理合约中查找出所述联盟链委员的映射关系,并从所述区块链中查找出所述联盟链委员的本地公钥;
所述群组服务单元将所述联盟链委员的映射关系以及所述联盟链委员的本地公钥设置为无效。
具体实施过程中,群组服务单元接收委员退出消息,该委员退出消息可以是退出的联盟链委员向群组服务单元发送,也可以是其余任一联盟链委员向群组服务单元发送。群组服务单元根据委员退出消息中包含的身份标识,从委员会管理合约中查找出该退出的联盟链委员的映射关系,并从区块链中查找出退出的联盟链委员的本地公钥,将两者均设置为无效。此外,群组服务单元还将联盟链委员会的最大请求总人数减一。这样,退出的联盟链委员再利用本地私钥产生的群签名去访问对应的资源,或进行投票等操作时,签名验证无效。
进一步地,本发明实施例为了保证联盟链以及联盟链委员会的合法性,还设置了监管机制。所述群组服务单元将所述群管理私钥以及对应的群管理公钥向监管机构发送,以使所述监管机构对所有联盟链委员的信息进行监管和追溯。这样,本发明实施例中的监管机构可追踪非法操作,使得联盟链委员会具有可监管特性,保障了委员会整体合法性。同时, 由于监管机构是惰性的,不会干预联盟链的运行和治理。
可选的,本发明实施例中的追踪异常操作的发起者可以是监管机构,也可以是联盟链委员会。若发起者为监管机构,由于监管机构中存在完整的群管理私钥,可以直接利用群管理私钥向群组服务单元发起委员追踪请求。而若发起者为联盟链委员会,由于每一个联盟链委员均没有完整的群管理私钥,因此需要通过投票恢复完整的群管理私钥。
之后,本发明实施例还包括:
所述群组服务单元接收委员追踪请求,所述委员追踪请求中包括所述群管理私钥以及待追踪委员的签名;
所述群组服务单元对所述群管理私钥验证通过后,依据所述待追踪委员的签名,从委员会管理合约中查找出所述待追踪委员的身份标识。
具体地,当群组服务单元得到群管理私钥后,获取对应签名的相关证书,从而达到追踪资源异常访问者信息的目的。
总的来说,本发明实施例中每个联盟链委员具有两个公钥、两个私钥以及一个私钥分片。其中,本地私钥与本地公钥相对应,本地私钥和本地公钥用于进行群签名,以证明联盟链委员的身份。私钥分片为根据群管理私钥生成的,用于联盟链委员对联盟链委员会中较为关键的事宜进行投票;低权限管理私钥也根据群管理私钥生成,用于联盟链委员对联盟链中一般事宜进行处理。群管理私钥与每个联盟链委员的低权限管理私钥均与群管理公钥相对应。
基于上述联盟链委员会的投票机制,本发明实施例提供了一套安全、对等、匿名、有效、可监管审计、可追踪的联盟链委员会投票方案。联盟链委员会投票期间,每个联盟链委员的地位对等。同时保证联盟链委员的操作匿名。
为了更清楚地理解本发明,下面以具体实施例对上述流程进行详细描述,实施例一为联盟链委员会的初始化过程,具体实施例的步骤如图3所示,包括:
步骤301:所有N个联盟链委员共同在本地产生初始化参数,记为s
1、s
2、s
i、……s
N。
步骤302:第i个联盟链委员利用本地私钥k
i对初始化参数进行s
i签名,并广播。
步骤303:N个联盟链委员向群组服务单元发送启动请求,每个启动请求中包含一个联盟链委员利用投票算法Q对联盟链委员的本地私钥k
i计算得到的启动结果Q(k
i)。
步骤304:群组服务单元利用预存的公共函数的值F对接收到的启动结果进行验证,若通过的启动结果数量大于第二阈值,则执行步骤305,否则执行步骤306。
步骤305:群组服务单元向所有联盟链委员反馈启动成功的消息,然后执行步骤307。
步骤306:群组服务单元向所有联盟链委员失败消息。
步骤307:任一联盟链委员向群组服务单元发送初始化请求,初始化请求中包含所有联盟链委员的初始化参数s
1、s
2、s
i、……s
N。
步骤308:群组服务单元利用公共函数f对初始化参数进行计算,若得到f(s
1、s
2、s
i、……s
N)=F,则执行步骤S309,否则执行步骤306。
步骤309:群组服务单元利用群签名算法,根据所有联盟链委员的初始化参数s
1、s
2、s
i、……s
N生成群管理私钥Pri以及对应的群管理公钥Pub,并通过安全信道向监管机构发送。
步骤310:群组服务单元根据群管理私钥Pri为第i个联盟链委员生成私钥分片Pri(s
i)以及低权限管理私钥GSK(s
i),并通过安全信道向每个联盟链委员发送。
步骤311:群组服务单元生成群管理公钥Pub与第i个联盟链委员的身份标识R
i的映射关系(Pub,R
i),并将映射关系(Pub,R
i)记录于区块链的委员会管理合约中。
步骤312:群组服务单元将第i个联盟链委员的本地公钥Pk
i加密存储于区块链上。
具体实施例二为联盟链委员加入过程,具体实施例的步骤如图4所示,包括:
步骤401:联盟链成员使用本地私钥生成加入请求文件,发送给联盟链委员会,加入请求文件中包含该联盟链成员的本地公钥。
步骤402:针对联盟链委员会中的任一联盟链委员,验证加入请求文件和证书。
步骤403:联盟链委员验证通过后向群组服务单元发起投票请求,投票请求中包含联盟链委员的密码承诺以及该联盟链委员利用本地私钥签名得到的证书。
步骤404:群组服务单元对联盟链委员的证书进行验证,通过后根据密码承诺,确定联盟链委员的投票参数。
步骤405:群组服务单元将所有投票参数输入投票算法Q中进行计算,并将计算得到的待验证结果与预存的群管理私钥Pri进行对比,若两者相同,则确定投票内容通过,即通过联盟链成员的加入请求。
步骤406:群组服务单元利用群管理私钥Pri为新的联盟链委员生成私钥分片Pri(s
x)以及低权限管理私钥GSK(s
x),并通过安全信道向新的联盟链委员发送。
步骤407:群组服务单元生成群管理公钥Pub与新的联盟链委员的身份标识R
x的映射关系(Pub,R
x),并将映射关系(Pub,R
x)记录于区块链的委员会管理合约中。
步骤S408:群组服务单元将新的联盟链委员的本地公钥Pk
x加密存储于区块链上。
本发明实施例还提供了一种区块链中的投票装置,如图5所示,包括:
收发模块501,用于接收N个联盟链委员的投票请求,其中任一个投票请求中包含一个联盟链委员的密码承诺;
确定模块502,用于针对一个密码承诺,根据所述密码承诺,确定一个联盟链委员的投票参数;
验证模块503,用于将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若所述待验证结果与所述群管理私钥相同,则确定 投票内容通过;所述投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与所述群管理私钥相同。
可选的,所述收发模块501,还用于接收M个联盟链委员发送的启动请求,其中任一启动请求中包含一个联盟链委员利用所述投票算法对所述联盟链委员的本地私钥计算得到的启动结果;
所述验证模块503,还用于利用预存的公共函数的值对所述M个启动结果进行验证,若验证通过的启动结果的数量大于第二阈值,则所述群组服务单元启动。
可选的,所述收发模块501,还用于接收任一联盟链委员发送的初始化请求,所述初始化请求中包含所有联盟链委员的初始化参数;
还包括生成模块504,用于利用群签名算法,根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥;根据所述群管理私钥为每一个联盟链委员生成一个私钥分片,生成所述群管理公钥与每一个联盟链委员的身份标识的映射关系;
所述收发模块501,还用于将私钥分片向对应的联盟链委员发送;所述私钥分片用于所述联盟链委员向所述群组服务单元发送投票请求时,作为投票参数生成密码承诺以表明同意投票内容;
还包括记录模块505,用于将所有映射关系记录于区块链的委员会管理合约中;将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上。
可选的,所述生成模块504,还用于利用所述群管理私钥以及所述群管理公钥,为每一个联盟链委员生成低权限管理私钥;
所述收发模块501,还用于将所述低权限管理私钥向对应的联盟链委员发送。
可选的,所述收发模块501,还用于接收委员退出消息,所述委员退出消息中包含退出的联盟链委员的身份标识;
所述记录模块505,还用于根据所述联盟链委员的身份标识,从所述委员会管理合约中查找出所述联盟链委员的映射关系,并从所述区块链中查找出所述联盟链委员的本地公钥;将所述联盟链委员的映射关系以及所述联盟链委员的本地公钥设置为无效。
可选的,所述确定模块502,具体用于:
利用所述联盟链委员的本地公钥对所述数字证书进行验证;
在验证通过后,解析所述密码承诺,得到所述联盟链委员的投票参数。
可选的,所述收发模块501,还用于接收委员追踪请求,所述委员追踪请求中包括所述群管理私钥以及待追踪委员的签名;
所述记录模块505,还用于对所述群管理私钥验证通过后,依据所述待追踪委员的签名,从委员会管理合约中查找出所述待追踪委员的身份标识。
可选的,所述收发模块501还用于:
将所述群管理私钥以及对应的群管理公钥向监管机构发送,以使所述监管机构对所有联盟链委员的信息进行监管和追溯。
基于相同的原理,本发明还提供一种电子设备,如图6所示,包括:
包括处理器601、存储器602、收发机603、总线接口604,其中处理器601、存储器602与收发机603之间通过总线接口604连接;
所述处理器601,用于读取所述存储器602中的程序,执行上述区块链中的投票方法,所述方法包括:
接收N个联盟链委员的投票请求,其中任一个投票请求中包含一个联盟链委员的密码承诺;
针对一个密码承诺,根据所述密码承诺,确定一个联盟链委员的投票参数;
将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若所述待验证结果与所述群管理私钥相同,则确定投票内容通过;所述投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与所述群管理私钥相同。
所述处理器601可以是中央处理器(central processing unit,简称CPU),网络处理器(network processor,简称NP)或者CPU和NP的组合。还可以是硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,简称ASIC),可编程逻辑器件(programmable logic device,简称PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,简称CPLD),现场可编程逻辑门阵列(field-programmable gate array,简称FPGA),通用阵列逻辑(generic array logic,简称GAL)或其任意组合。
所述存储器602,用于存储一个或多个可执行程序,可以存储所述处理器601在执行操作时所使用的数据。
具体地,程序可以包括程序代码,程序代码包括计算机操作指令。存储器602可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,简称RAM);存储器702也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,简称HDD)或固态硬盘(solid-state drive,简称SSD);存储器602还可以包括上述种类的存储器的组合。
存储器602存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集:
操作指令:包括各种操作指令,用于实现各种操作。
操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。
总线接口604可以为有线通信接入口,无线总线接口或其组合,其中,有线总线接口 例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线总线接口可以为WLAN接口。
基于相同的原理,本发明实施例还提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行如上所述的区块链中的投票方法。
基于相同的原理,本发明实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述区块链中的投票方法。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包括这些改动和变型在内。
Claims (19)
- 一种区块链中的投票方法,其特征在于,包括:群组服务单元接收N个联盟链委员的投票请求,其中任一个投票请求中包含一个联盟链委员的密码承诺;针对一个密码承诺,所述群组服务单元根据所述密码承诺,确定一个联盟链委员的投票参数;所述群组服务单元将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若所述待验证结果与所述群管理私钥相同,则确定投票内容通过;所述投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与所述群管理私钥相同。
- 如权利要求1所述的方法,其特征在于,所述群组服务单元接收N个联盟链委员的投票请求之前,还包括:所述群组服务单元接收M个联盟链委员发送的启动请求,其中任一启动请求中包含一个联盟链委员利用所述投票算法对所述联盟链委员的本地私钥计算得到的启动结果;所述群组服务单元利用预存的公共函数的值对所述M个启动结果进行验证,若验证通过的启动结果的数量大于第二阈值,则所述群组服务单元启动。
- 如权利要求1所述的方法,其特征在于,所述群组服务单元接收N个联盟链委员的投票请求之前,还包括:所述群组服务单元接收任一联盟链委员发送的初始化请求,所述初始化请求中包含所有联盟链委员的初始化参数;所述群组服务单元利用群签名算法,根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥;所述群组服务单元根据所述群管理私钥为每一个联盟链委员生成一个私钥分片,并将私钥分片向对应的联盟链委员发送;所述私钥分片用于所述联盟链委员向所述群组服务单元发送投票请求时,作为投票参数生成密码承诺以表明同意投票内容;所述群组服务单元生成所述群管理公钥与每一个联盟链委员的身份标识的映射关系,并将所有映射关系记录于区块链的委员会管理合约中;所述群组服务单元将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上。
- 如权利要求3所述的方法,其特征在于,所述群组服务单元根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥之后,还包括:所述群组服务单元利用所述群管理私钥以及所述群管理公钥,为每一个联盟链委员生 成低权限管理私钥;所述群组服务单元将所述低权限管理私钥向对应的联盟链委员发送。
- 如权利要求3所述的方法,其特征在于,所述群组服务单元将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上之后,还包括:所述群组服务单元接收委员退出消息,所述委员退出消息中包含退出的联盟链委员的身份标识;所述群组服务单元根据所述联盟链委员的身份标识,从所述委员会管理合约中查找出所述联盟链委员的映射关系,并从所述区块链中查找出所述联盟链委员的本地公钥;所述群组服务单元将所述联盟链委员的映射关系以及所述联盟链委员的本地公钥设置为无效。
- 如权利要求1所述的方法,其特征在于,所述投票请求中还包括所述联盟链委员利用本地私钥生成的数字证书;所述群组服务单元根据所述密码承诺,确定一个联盟链委员的投票参数,包括:所述群组服务单元利用所述联盟链委员的本地公钥对所述数字证书进行验证;所述群组服务单元在验证通过后,解析所述密码承诺,得到所述联盟链委员的投票参数。
- 如权利要求1所述的方法,其特征在于,还包括:所述群组服务单元接收委员追踪请求,所述委员追踪请求中包括所述群管理私钥以及待追踪委员的签名;所述群组服务单元对所述群管理私钥验证通过后,依据所述待追踪委员的签名,从委员会管理合约中查找出所述待追踪委员的身份标识。
- 如权利要求1至7任一项所述的方法,其特征在于,还包括:所述群组服务单元将所述群管理私钥以及对应的群管理公钥向监管机构发送,以使所述监管机构对所有联盟链委员的信息进行监管和追溯。
- 一种区块链中的投票装置,其特征在于,包括:收发模块,用于接收N个联盟链委员的投票请求,其中任一个投票请求中包含一个联盟链委员的密码承诺;确定模块,用于针对一个密码承诺,根据所述密码承诺,确定一个联盟链委员的投票参数;验证模块,用于将N个投票参数输入投票算法中进行计算,并将计算得到的待验证结果与预存的群管理私钥进行对比,若所述待验证结果与所述群管理私钥相同,则确定投票内容通过;所述投票算法设置为输入正确的投票参数的个数大于第一阈值时,计算得到的待验证结果与所述群管理私钥相同。
- 如权利要求9所述的装置,其特征在于,所述收发模块,还用于接收M个联盟链委员发送的启动请求,其中任一启动请求中包含一个联盟链委员利用所述投票算法对所述联盟链委员的本地私钥计算得到的启动结果;所述验证模块,还用于利用预存的公共函数的值对所述M个启动结果进行验证,若验证通过的启动结果的数量大于第二阈值,则所述群组服务单元启动。
- 如权利要求9所述的装置,其特征在于,所述收发模块,还用于接收任一联盟链委员发送的初始化请求,所述初始化请求中包含所有联盟链委员的初始化参数;还包括生成模块,用于利用群签名算法,根据所有联盟链委员的初始化参数生成所述群管理私钥以及对应的群管理公钥;根据所述群管理私钥为每一个联盟链委员生成一个私钥分片,生成所述群管理公钥与每一个联盟链委员的身份标识的映射关系;所述收发模块,还用于将私钥分片向对应的联盟链委员发送;所述私钥分片用于所述联盟链委员向所述群组服务单元发送投票请求时,作为投票参数生成密码承诺以表明同意投票内容;还包括记录模块,用于将所有映射关系记录于区块链的委员会管理合约中;将每一个联盟链委员的本地私钥对应的本地公钥存储于所述区块链上。
- 如权利要求11所述的装置,其特征在于,所述生成模块,还用于利用所述群管理私钥以及所述群管理公钥,为每一个联盟链委员生成低权限管理私钥;所述收发模块,还用于将所述低权限管理私钥向对应的联盟链委员发送。
- 如权利要求11所述的装置,其特征在于,所述收发模块,还用于接收委员退出消息,所述委员退出消息中包含退出的联盟链委员的身份标识;所述记录模块,还用于根据所述联盟链委员的身份标识,从所述委员会管理合约中查找出所述联盟链委员的映射关系,并从所述区块链中查找出所述联盟链委员的本地公钥;将所述联盟链委员的映射关系以及所述联盟链委员的本地公钥设置为无效。
- 如权利要求9所述的装置,其特征在于,所述投票请求中还包括所述联盟链委员利用本地私钥生成的数字证书;所述确定模块,具体用于:利用所述联盟链委员的本地公钥对所述数字证书进行验证;在验证通过后,解析所述密码承诺,得到所述联盟链委员的投票参数。
- 如权利要求9所述的装置,其特征在于,所述收发模块,还用于接收委员追踪请求,所述委员追踪请求中包括所述群管理私钥 以及待追踪委员的签名;所述记录模块,还用于对所述群管理私钥验证通过后,依据所述待追踪委员的签名,从委员会管理合约中查找出所述待追踪委员的身份标识。
- 如权利要求9至15任一项所述的装置,其特征在于,所述收发模块还用于:将所述群管理私钥以及对应的群管理公钥向监管机构发送,以使所述监管机构对所有联盟链委员的信息进行监管和追溯。
- 一种电子设备,其特征在于,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-8任一所述的方法。
- 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行权利要求1~8任一所述方法。
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1~8任一所述方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910332167.0A CN110110555B (zh) | 2019-04-24 | 2019-04-24 | 一种区块链中的投票方法及装置 |
CN201910332167.0 | 2019-04-24 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020216065A1 true WO2020216065A1 (zh) | 2020-10-29 |
Family
ID=67486443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/083842 WO2020216065A1 (zh) | 2019-04-24 | 2020-04-08 | 一种区块链中的投票方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110110555B (zh) |
WO (1) | WO2020216065A1 (zh) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113225736A (zh) * | 2021-03-24 | 2021-08-06 | 湖南宸瀚信息科技有限责任公司 | 无人机集群节点认证方法、装置、存储介质及处理器 |
CN113905035A (zh) * | 2021-09-29 | 2022-01-07 | 上海万向区块链股份公司 | 基于区块链的生物数据非同质化映射系统 |
CN114499952A (zh) * | 2021-12-23 | 2022-05-13 | 中电科大数据研究院有限公司 | 一种联盟链共识身份认证方法 |
CN114978553A (zh) * | 2022-06-30 | 2022-08-30 | 中国光大银行股份有限公司 | 一种联盟链密码算法切换方法、装置及联盟链系统 |
CN115473643A (zh) * | 2022-08-29 | 2022-12-13 | 安徽师范大学 | 一种适用于联盟链的可信任的效率共识系统、方法 |
CN118074916A (zh) * | 2024-02-26 | 2024-05-24 | 杭州目光科技有限公司 | 基于投票码同步上传区块链的业主投票与公示方法及系统 |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110110555B (zh) * | 2019-04-24 | 2023-05-12 | 深圳前海微众银行股份有限公司 | 一种区块链中的投票方法及装置 |
CN110399745A (zh) * | 2019-08-16 | 2019-11-01 | 微位(深圳)网络科技有限公司 | 密钥的管理方法与装置、存储介质及计算机设备 |
CN110995711A (zh) * | 2019-12-05 | 2020-04-10 | 全链通有限公司 | 基于区块链的电子投票方法、设备及存储介质 |
CN111314095B (zh) * | 2019-12-05 | 2023-01-31 | 全链通有限公司 | 基于区块链的电子投票方法、设备及存储介质 |
CN111163165A (zh) * | 2019-12-28 | 2020-05-15 | 北京工业大学 | 一种基于Fabric联盟链的投票共识方法 |
CN113206748B (zh) * | 2020-02-03 | 2022-10-18 | 北京百度网讯科技有限公司 | 联盟链网络的治理方法、联盟链网络和电子设备 |
CN111416705A (zh) * | 2020-02-29 | 2020-07-14 | 南京如般量子科技有限公司 | 基于身份密码学的抗量子计算联盟链投票系统和方法 |
CN111464631B (zh) * | 2020-03-31 | 2023-03-28 | 成都质数斯达克科技有限公司 | 联盟区块链中的业务共识方法及装置 |
CN111510347B (zh) * | 2020-04-08 | 2021-10-26 | 北京链化未来科技有限公司 | 一种提高区块链共识效率的方法 |
CN111786968B (zh) * | 2020-06-17 | 2022-04-19 | 杭州溪塔科技有限公司 | 一种保护隐私的数据上报方法、装置、系统及电子设备 |
CN112291062B (zh) * | 2020-10-28 | 2021-07-27 | 深圳前海微众银行股份有限公司 | 一种基于区块链的投票方法及装置 |
CN112466032B (zh) * | 2020-11-23 | 2021-08-17 | 深圳前海微众银行股份有限公司 | 电子投票方法、装置及电子设备 |
CN112600675B (zh) * | 2020-12-04 | 2022-11-01 | 网易(杭州)网络有限公司 | 基于群签名的电子投票方法及装置、电子设备、存储介质 |
CN112633890B (zh) * | 2020-12-22 | 2024-04-05 | 深圳前海微众银行股份有限公司 | 一种基于区块链的隐匿权益证明的验证方法及装置 |
CN112927414A (zh) * | 2021-01-29 | 2021-06-08 | 福建中科星泰数据科技有限公司 | 基于联盟区块链的业务公识系统及方法 |
CN112784305A (zh) * | 2021-02-01 | 2021-05-11 | 杭州复杂美科技有限公司 | 加密投票方法、计算机设备和存储介质 |
CN113890751B (zh) * | 2021-09-22 | 2024-07-09 | 网易(杭州)网络有限公司 | 控制联盟链权限投票的方法、设备和可读存储介质 |
CN113935665B (zh) * | 2021-12-17 | 2022-03-08 | 南京金宁汇科技有限公司 | 一种用于联盟链的投票管理方法和系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108768607A (zh) * | 2018-05-14 | 2018-11-06 | 中钞信用卡产业发展有限公司杭州区块链技术研究院 | 一种基于区块链的投票方法、装置、设备及介质 |
US20190051079A1 (en) * | 2017-08-11 | 2019-02-14 | United States Postal Service | Cryptographically tracked and secured vote by mail system |
CN109493063A (zh) * | 2018-12-29 | 2019-03-19 | 杭州趣链科技有限公司 | 一种联盟区块链中进行权限控制的方法 |
CN109523683A (zh) * | 2018-12-29 | 2019-03-26 | 杭州趣链科技有限公司 | 一种基于区块链技术的不记名电子投票方法 |
CN110110555A (zh) * | 2019-04-24 | 2019-08-09 | 深圳前海微众银行股份有限公司 | 一种区块链中的投票方法及装置 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ES2255455B1 (es) * | 2001-12-12 | 2007-03-01 | Scytl Secure Electronic Voting, S.A. | Metodo para votacion electronica segura y protocolos criptograficos empleados. |
CN106411503B (zh) * | 2016-11-28 | 2019-11-08 | 中国银行股份有限公司 | 区块链投票记账模式的记账方法及系统、投票及记账节点 |
KR101837170B1 (ko) * | 2016-12-29 | 2018-04-19 | 주식회사 코인플러그 | 영지식 증명 알고리즘을 사용하여 블록체인 기반 비밀 전자 투표 서비스를 제공하기 위한 방법, 및 이를 이용한 투표 코인 발행 서버, 투표 토큰 분배 서버 및 투표 지원 서버 |
US20190371106A1 (en) * | 2017-01-30 | 2019-12-05 | EXO One Pty Ltd | Voting system and method |
CN108846289A (zh) * | 2018-06-08 | 2018-11-20 | 北京京东尚科信息技术有限公司 | 选举信息处理方法和处理系统及选举系统和存储介质 |
CN109242705A (zh) * | 2018-08-15 | 2019-01-18 | 深圳前海微众银行股份有限公司 | 基于联盟委员链的业务处理方法、设备及存储介质 |
-
2019
- 2019-04-24 CN CN201910332167.0A patent/CN110110555B/zh active Active
-
2020
- 2020-04-08 WO PCT/CN2020/083842 patent/WO2020216065A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190051079A1 (en) * | 2017-08-11 | 2019-02-14 | United States Postal Service | Cryptographically tracked and secured vote by mail system |
CN108768607A (zh) * | 2018-05-14 | 2018-11-06 | 中钞信用卡产业发展有限公司杭州区块链技术研究院 | 一种基于区块链的投票方法、装置、设备及介质 |
CN109493063A (zh) * | 2018-12-29 | 2019-03-19 | 杭州趣链科技有限公司 | 一种联盟区块链中进行权限控制的方法 |
CN109523683A (zh) * | 2018-12-29 | 2019-03-26 | 杭州趣链科技有限公司 | 一种基于区块链技术的不记名电子投票方法 |
CN110110555A (zh) * | 2019-04-24 | 2019-08-09 | 深圳前海微众银行股份有限公司 | 一种区块链中的投票方法及装置 |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113225736A (zh) * | 2021-03-24 | 2021-08-06 | 湖南宸瀚信息科技有限责任公司 | 无人机集群节点认证方法、装置、存储介质及处理器 |
CN113225736B (zh) * | 2021-03-24 | 2024-02-02 | 湖南宸瀚信息科技有限责任公司 | 无人机集群节点认证方法、装置、存储介质及计算机设备 |
CN113905035A (zh) * | 2021-09-29 | 2022-01-07 | 上海万向区块链股份公司 | 基于区块链的生物数据非同质化映射系统 |
CN114499952A (zh) * | 2021-12-23 | 2022-05-13 | 中电科大数据研究院有限公司 | 一种联盟链共识身份认证方法 |
CN114499952B (zh) * | 2021-12-23 | 2024-04-09 | 中电科大数据研究院有限公司 | 一种联盟链共识身份认证方法 |
CN114978553A (zh) * | 2022-06-30 | 2022-08-30 | 中国光大银行股份有限公司 | 一种联盟链密码算法切换方法、装置及联盟链系统 |
CN114978553B (zh) * | 2022-06-30 | 2024-01-30 | 中国光大银行股份有限公司 | 一种联盟链密码算法切换方法、装置及联盟链系统 |
CN115473643A (zh) * | 2022-08-29 | 2022-12-13 | 安徽师范大学 | 一种适用于联盟链的可信任的效率共识系统、方法 |
CN118074916A (zh) * | 2024-02-26 | 2024-05-24 | 杭州目光科技有限公司 | 基于投票码同步上传区块链的业主投票与公示方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN110110555A (zh) | 2019-08-09 |
CN110110555B (zh) | 2023-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020216065A1 (zh) | 一种区块链中的投票方法及装置 | |
CN110288480B (zh) | 一种区块链的私密交易方法及装置 | |
US11115418B2 (en) | Registration and authorization method device and system | |
JP7208930B2 (ja) | 制御された暗号化秘密鍵の開放 | |
CN112311735B (zh) | 可信认证方法,网络设备、系统及存储介质 | |
US12101399B2 (en) | Secure storage techniques utilizing consortium distributed ledgers | |
CN111919239A (zh) | 基于区块链的匿名密码表决 | |
CN115001706A (zh) | 基于安全区块链的共识 | |
CN108616539A (zh) | 一种区块链交易记录访问的方法及系统 | |
Zhu et al. | Hybrid blockchain design for privacy preserving crowdsourcing platform | |
KR102357460B1 (ko) | 동형 암호 기술 기반 전자 투표 시스템 및 그 방법 | |
CN113364589B (zh) | 用于联邦学习安全审计的密钥管理系统、方法及存储介质 | |
US11676111B1 (en) | Apparatuses and methods for determining and processing dormant user data in a job resume immutable sequential listing | |
WO2022089420A1 (zh) | 一种基于区块链的投票方法及装置 | |
CN115270145A (zh) | 一种基于联盟链和联邦学习的用户窃电行为检测方法及系统 | |
US11611435B2 (en) | Automatic key exchange | |
US12074987B1 (en) | Systems and methods of using group functions certificate extension | |
US20230267226A1 (en) | Blockchain-based operations | |
CN113591103A (zh) | 一种电力物联网智能终端间的身份认证方法和系统 | |
CN112688775A (zh) | 联盟链智能合约的管理方法和装置、电子设备、及介质 | |
WO2023185862A1 (zh) | 基于区块链系统的多方计算方法和系统 | |
CN111861736B (zh) | 基于区块链的政务数据处理方法、装置、设备和介质 | |
CN112235251B (zh) | 一种区块链管理方法、装置、计算机设备及存储介质 | |
US11398916B1 (en) | Systems and methods of group signature management with consensus | |
KR102174687B1 (ko) | 비밀 전자 투표 시스템 및 방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20795270 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31.01.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20795270 Country of ref document: EP Kind code of ref document: A1 |