CN111159683B - Electronic voting method, device, computer and storage medium - Google Patents

Electronic voting method, device, computer and storage medium Download PDF

Info

Publication number
CN111159683B
CN111159683B CN202010260573.3A CN202010260573A CN111159683B CN 111159683 B CN111159683 B CN 111159683B CN 202010260573 A CN202010260573 A CN 202010260573A CN 111159683 B CN111159683 B CN 111159683B
Authority
CN
China
Prior art keywords
voting
account
participating
electronic
initiating
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.)
Active
Application number
CN202010260573.3A
Other languages
Chinese (zh)
Other versions
CN111159683A (en
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010260573.3A priority Critical patent/CN111159683B/en
Publication of CN111159683A publication Critical patent/CN111159683A/en
Priority to PCT/CN2020/105885 priority patent/WO2021196473A1/en
Application granted granted Critical
Publication of CN111159683B publication Critical patent/CN111159683B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME 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/00Voting apparatus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

When a participating terminal carries out voting, the balance in a corresponding first voting account is not directly transferred to the agreement account or the rejection account, but the balance is transferred to a shadow account of the agreement account or the rejection account, wherein the shadow account is the accept Acc1= B1 gKDF(DH(r,B2))And acceptAcc2= B1 × gKDF(DH(r,B3))And searching each second voting account according to the accept acc1 '= B1 × gKDF (DH (R, B2)) and the accept acc 2' = B1 × gKDF (DH (R, B3)) to collect the corresponding second voting accounts, thereby completing the electronic voting. In the process, the problem of the existing hot account is solved, the voting safety and privacy are improved, and the audit of an audit department can be met.

Description

Electronic voting method, device, computer and storage medium
Technical Field
The present application relates to the field of data query, and in particular, to an electronic voting method, apparatus, computer device, and storage medium.
Background
The existing block chain electronic voting system has the problem of hot account. The hot account problem is that: if multiple writing or updating operations are carried out on the same address (or account) within the time T on the blockchain, at most only one writing or updating operation can be successful, and all other writing or updating operations fail; the time T is mainly the time of generating the block once by the blockchain (i.e. the time of the update operation being effective); such as: assuming that two voters a and B vote 1 for a chapter of a company within time T, and the original voted votes that have been cast before voting are 5, since the block chain is a distributed system, the voter a may initiate voting on one node (voter a sees that votes are 6 after the voter a finishes voting), and the voter B initiates voting on another node (voter B sees that votes are 6 after the voter B finishes voting), the two nodes do not know the existence of the votes of the other nodes, and at this time, when the block chain documents the proposals of the respective nodes, and finally a block is generated, only one voter can vote successfully, that is, a vote is lost.
Disclosure of Invention
The application mainly aims to provide an electronic voting method, an electronic voting device, a computer and a storage meson, and aims to solve the technical problem of hot accounts generated when a block chain is used for electronic voting in the prior art.
In order to achieve the above object, the present application provides an electronic voting method, including:
receiving an electronic voting application sent by an initiating end, wherein the electronic voting application contains information of a proposal scheme and a voting agenda;
judging whether the initiating terminal is qualified for initiating electronic voting or not through an intelligent contract;
if the initiating terminal is judged to have the qualification of initiating the electronic voting, three public keys uploaded by the initiating terminal are obtained: b1, B2, and B3, wherein the three public keys are public keys in a public-private key pair (B1, B1), (B2, B2), (B3, B3), respectively, B1= gb1mod n, B2 = gb2mod n, B3 = gb3mod n, where n is the product of two large prime numbers p, q, i.e., n = pq; the b1, b2 and b3 are kept locally by the initiating terminal;
receiving electronic votes from participating terminals participating in the votes, wherein the participating terminals randomly pick a public and private key pair (R, R), wherein R = gr(ii) a The participating end calculates the account address for casting the agreement ticketacceptAcc1 = B1 *gKDF(DH(r, B2))Alternatively, the account address acceptAcc2= B1 × g for the voteKDF(DH(r, B3))(ii) a Transferring the balance in the first voting account corresponding to the participation end to a second voting account corresponding to the acceptAcc1 or a second voting account corresponding to the acceptAcc2 to generate the electronic vote;
after the voting agenda is finished, receiving a collection request of the initiating terminal, wherein the collection request comprises an account address needing collection, the initiating terminal calculates a voting account corresponding to each participating terminal by using an accept acc1 '= B1 × gKDF (DH (R, B2)), and calculates a voting account corresponding to each participating terminal by using a formula accept acc 2' = B1 × gKDF (DH (R, B3)), wherein the accept acc1= accept acc1 'and the accept acc2= accept acc 2';
collecting balances in voting accounts corresponding to all the accceptacc 1 'into an agreement account for storing agreement tickets, and collecting balances in voting accounts corresponding to all the accceptacc 2' into an opposition account for storing opposition tickets.
Further, after the step of determining whether the initiating terminal is qualified to initiate the electronic voting by the smart contract, the method further includes:
establishing the consent account and the opposition account.
Further, the step of receiving the electronic votes of the participating terminals participating in the votes comprises:
receiving an identity CA (CA, CA Authority, also called as an electronic commerce authentication center) Certificate of the participating end, and signing an electronic voting application by using a first private key of the identity CA Certificate to obtain Sig;
generating a second private key corresponding to the participating end and the current voting agenda, and generating a certificate application CSR (certificate Signing request) by using the second private key;
sending the identity CA certificate, Sig and CSR and the account address of the participating end to the initiating end for identity verification;
and if the identity authentication information fed back by the initiating terminal is received, generating a command of receiving the electronic votes of the participating terminals participating in the votes.
Further, before the step of receiving the electronic votes of the participating terminals participating in the votes, the method further includes:
acquiring the voting number of the participating end and the voting weight value of the participating end through an intelligent contract;
multiplying the voting number by the voting weight value through an intelligent contract to obtain the balance of the participating end;
and creating the first voting account with the balance and the opening key as the second private key through a smart contract.
Further, the step of obtaining the number of votes held by the participating end and the vote weight value of the participating end through the smart contract includes:
judging the application type of the electronic voting application;
and determining the voting number of the participating end and the voting weight value of the participating end according to the application type.
Further, the step of determining whether the initiator is qualified to initiate the electronic vote through the smart contract includes:
acquiring face information of a terminal user corresponding to the initiating terminal;
judging whether the face information is matched with the initiating terminal;
and if so, executing the step of judging whether the initiating end has the qualification of initiating the electronic voting by the intelligent contract.
Further, the step of determining whether the initiator is qualified to initiate the electronic vote through the smart contract includes:
judging whether the initiating terminal is a management account or not;
if yes, judging whether the electronic voting application carries joint signatures of other management accounts;
and if the joint signature is carried, judging that the initiating terminal is qualified for initiating electronic voting.
The present application further provides an electronic voting apparatus, comprising:
the system comprises a receiving and initiating unit, a sending unit and a receiving and initiating unit, wherein the receiving and initiating unit is used for receiving an electronic voting application sent by an initiating end, and the electronic voting application contains information of a proposal scheme and a voting agenda;
the judging qualification unit is used for judging whether the initiating terminal has qualification for initiating the electronic voting through the intelligent contract;
an obtaining unit, configured to obtain three public keys uploaded by the initiating terminal if it is determined that the initiating terminal qualifies to initiate electronic voting: b1, B2, and B3, wherein the three public keys are public keys in a public-private key pair (B1, B1), (B2, B2), (B3, B3), respectively, B1= gb1mod n, B2 = gb2mod n, B3 = gb3mod n, where n is the product of two large prime numbers p, q, i.e., n = pq; the b1, b2 and b3 are kept locally by the initiating terminal;
a voting receiving unit for receiving electronic votes from participating terminals participating in the votes, wherein the participating terminals randomly select a public and private key pair (R, R), where R = gr(ii) a The participating terminal calculates an account address acceptAcc1= B1 g for voting the agreement ticketKDF(DH(r, B2))Alternatively, the account address acceptAcc2= B1 × g for the voteKDF(DH(r, B3))(ii) a Transferring the balance in the first voting account corresponding to the participation end to a second voting account corresponding to the acceptAcc1 or a second voting account corresponding to the acceptAcc2 to generate the electronic vote;
a receiving and collecting unit, configured to receive a collection request of the initiating end after the voting agenda ends, where the collection request includes an account address that needs to be collected, where the initiating end calculates a voting account corresponding to each participating end by using an accept acc1 '= B1 × gKDF (DH (R, B2)), and calculates a voting account corresponding to each participating end by using a formula accept acc 2' = B1 × gKDF (DH (R, B3)), where the accept acc1= accept acc1 ', and accept acc2= accept acc 2';
a collecting unit, configured to collect the balances in all voting accounts corresponding to the acceptAcc1 'into an agreement account for storing agreement tickets, and collect the balances in all voting accounts corresponding to the acceptAcc 2' into an opposition account for storing opposition tickets.
The present application further provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of any of the above.
When the participating end votes, the electronic voting method, the electronic voting device, the computer equipment and the storage medium do not directly transfer the balance in the corresponding first voting account to the agreement account or the rejection account, but firstly transfer the balance to a shadow account of the agreement account or the rejection account, wherein the shadow account is the accepted Acc1= B1 gKDF(DH(r, B2))And acceptAcc2= B1 × gKDF(DH(r, B3))And searching each second voting account according to the accept acc1 '= B1 × gKDF (DH (R, B2)) and the accept acc 2' = B1 × gKDF (DH (R, B3)) to collect the corresponding second voting accounts, thereby completing the electronic voting. In the process, the problem of hot account is solved; although the participating end can calculate the shadow account address of the initiating end, the participating end has no way to calculate the private key of the shadow account; only the originating end can calculate the private key of the sub-account, because the originating end knows b1, the method is: gb1* gx=g(b1 + x)= acceptAcc, (b1 + x) is the private key of the initiator; only a person who possesses the private key r or the private key b1 can calculate the address of the shadow account, namely, only the voter and the initiating terminal can know the address of the second account, so that the voting privacy is improved; before voting, the participating end does not need to ask the initiating end for a voting address, and the participating end can directly calculate a corresponding account address through a key provided by the initiating end; this applicationThe method also supports audit examination, because the address of the shadow account is hidden, the shadow account cannot be verified if the initiating terminal cheats; therefore, the scheme needs to support auditing, and the method comprises the following steps: the organiser (initiator) provides private keys b2 and b3 to the auditor, since the public key R is public on the blockchain, the auditor can calculate all the voting addresses: acceptAcc = B1 × gKDF(DH(R, b2))And RejectAcc = B1 gKDF(DH(R, b3))
Drawings
FIG. 1 is a flowchart illustrating an electronic voting method according to an embodiment of the present invention;
FIG. 2 is a block diagram of an electronic voting device according to an embodiment of the present invention;
fig. 3 is a block diagram schematically illustrating a structure of a computer apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, an embodiment of the present application provides an electronic voting method, including:
s1, receiving an electronic voting application sent by an initiating terminal, wherein the electronic voting application contains information of a proposal scheme and a voting agenda;
s2, judging whether the initiating terminal has the qualification of initiating the electronic voting through an intelligent contract;
s3, if the initiating terminal is judged to have the qualification of initiating the electronic voting, acquiring three public keys uploaded by the initiating terminal: b1, B2, and B3, wherein the three public keys are public keys in a public-private key pair (B1, B1), (B2, B2), (B3, B3), respectively, B1= gb1mod n, B2 = gb2mod n, B3 = gb3mod n, where n is the multiplication of two large prime numbers p, qProduct, i.e. n = pq; the b1, b2 and b3 are kept locally by the initiating terminal;
s4, receiving the electronic votes of the participating terminals participating in the votes, wherein the participating terminals randomly choose a public and private key pair (R, R), wherein R = gr(ii) a The participating terminal calculates an account address acceptAcc1= B1 g for voting the agreement ticketKDF(DH(r, B2))Alternatively, the account address acceptAcc2= B1 × g for the voteKDF(DH(r, B3))(ii) a Transferring the balance in the first voting account corresponding to the participation end to a second voting account corresponding to the acceptAcc1 or a second voting account corresponding to the acceptAcc2 to generate the electronic vote;
s5, after the voting agenda is finished, receiving a collection request from the initiating terminal, where the collection request includes an account address to be collected, and the initiating terminal calculates a voting account corresponding to each participating terminal by using an accept 1 '= B1 × gKDF (DH (R, B2)), and calculates a voting account corresponding to each participating terminal by using a formula accept 2' = B1 × gKDF (DH (R, B3)), where accept 1= accept 1 'and accept 2= accept 2';
s6, collecting the balance in the voting accounts corresponding to all the acceptAcc1 'into an agreement account for storing agreement tickets, and collecting the balance in the voting accounts corresponding to all the acceptAcc 2' into an opposition account for storing opposition tickets.
The method of the present application is a voting method based on the blockchain technology, and the above steps are performed on a blockchain system supporting distributed voting.
As described in step S1, the initiating terminal is a terminal that has registered an initiating account, and may be a terminal that can register a blockchain system, such as a mobile phone, a computer, or a tablet computer. The proposed scheme is the specific content of the current vote, and the voting agenda mainly requires the specific flow of the vote, such as specifying the time at which the vote is cut off.
As described above in step S2, the intelligent contract is a set of digitally defined commitments (promises) that include agreements on which the contract participants can execute. The initiating end can have the real qualification of initiating the electronic voting only after the verification of the intelligent contract. The intelligent contract verifies whether the initiating terminal has the qualification of initiating the electronic voting, and the intelligent contract does not verify the terminal of the initiating terminal but verifies the initiating account logged in the terminal. In other embodiments, if the terminal and originating account must be in a bound state, the smart contract may need to verify whether the terminal and originating account are in a bound state and whether the originating account qualifies to initiate an electronic vote, and only if all that is satisfied, will the originating terminal qualify to initiate an electronic vote be determined.
As described in step S3, the three public keys uploaded by the initiator: b1, B2 and B3 may be issued together to the blockchain system at the time of uploading the electronic voting application, or may be uploaded to the blockchain system when it is determined that the originating terminal qualifies to initiate electronic voting. The three public keys mentioned above: b1, B2 and B3 are voting account public keys as initiators; wherein, B1 is used as the main public key of the initiating terminal account, and has the same meaning as the traditional public key address of the account; and B2 and B3 are derived public keys of the originating account for deriving a second account (shadow account) described below, having the effect of obfuscating sub-account addresses; specifically, B2 is for deriving all consenting account public keys, and B3 is for deriving all objection account public keys. The number of bits of n is 2048 bits, which can further improve security.
As described in step S4, the electronic vote of the participating end is received, where the participating end refers to a terminal that logs in a participation account that can be voted, and may be a terminal that logs in the blockchain system, such as a mobile phone, a computer, or a tablet computer. In the process of voting, the participating end randomly selects a public and private key pair (R, R), wherein R = grAnd then the users of the receiving participants cast agreement tickets or objection tickets according to the voting willingness, wherein, the public and private key pairs (R, R) selected by different participants are different. Specifically, when the participating side user issues a consent ticket, the participating side calculates the public key B2 as described aboveAddress acceptAcc1= B1 × g to create a second voting accountKDF(DH(r, B2))When the user of the participant terminal throws an objection to the vote, the participant terminal calculates the address acceptAcc2= B1 g of a second voting account by using the public key B3KDF (DH(r, B2))The intelligent contract is based on accept Acc1= B1 gKDF(DH(r, B2))Or acceptAcc2= B1 × gKDF (DH(r, B2))And establishing a corresponding second voting account, and transferring the balance and the like of the first account corresponding to the participation end to the second voting account to generate the electronic vote. In this embodiment, the corresponding second voting accounts are established according to the voting results of the participating terminals, and two second voting accounts do not need to be generated for each participating account.
In one embodiment, before the step S4, the method further includes: s401, receiving the identity CA certificate of the participating end, and signing the electronic voting application by using a first private key of the identity CA certificate to obtain Sig; s402, generating a second private key corresponding to the participation end and the current voting agenda, and generating a certificate application CSR by using the second private key; s403, sending the identity CA certificate, Sig and CSR and the account address of the participating end to the initiating end for identity verification; and S404, if the identity authentication passing information fed back by the initiating terminal is received, generating a command of receiving the electronic votes of the participating terminals participating in the votes. That is, whether the participating end has the authority to participate in the voting is verified, only the participating end having the authority to participate in the voting can perform the electronic voting.
After the voting session is finished, the voting results need to be collected as described in step S5. In the aggregation process, the address of the account to be aggregated is provided by the initiating terminal, and the address provided by the initiating terminal is obtained through R, and B1 or B2, specifically, accceptacc 1 '= B1 × gKDF (DH (R, B2)), and accceptacc 2' = B1 × gKDF (DH (R, B3)). Since the address of the second voting account is calculated by R, and B2 or B3, the same address of the second voting account, i.e., accept acc1= accept acc1 ', accept acc2= accept acc 2', can be found by R, and B1 or B2. And then collecting the balances in the voting accounts corresponding to all the acceptAcc1 'into an agreement account for storing agreement tickets, and collecting the balances in the voting accounts corresponding to all the acceptAcc 2' into an opposition account for storing opposition tickets to obtain a final voting result. It should be noted that, because the initiating end does not know the voting result of the participating end, two addresses, namely, acceptAcc 1' and acceptAcc2, are calculated for each participating end, and during the aggregation, if the corresponding address is not found, the process is skipped. After the angelica sinensis is gathered, the balance in the consent account and the objection account is compared to obtain the final voting result.
In one embodiment, after the step S2 of determining whether the initiator is qualified to initiate electronic voting according to the smart contract, the method further includes:
s201, establishing the agreement account and the opposition account.
The agreement account and the opposition account are accounts for depositing an agreement balance and an opposition balance. In the application, as long as the initiating terminal has the qualification of initiating the electronic voting, the blockchain system establishes the agreement account and the objection account, and after the voting session is finished, the balance of the second voting account casting the agreement ticket can be collected into the agreement account, and the balance of the second voting account casting the objection ticket can be collected into the objection account. The method and the device finish the setting of the agreement account and the opposition account in advance, enable the participating users who participate in voting to know the result in advance, and enable the focusing points of the participating accounts to be converged on the agreement account and the opposition account.
In one embodiment, before the step S4 of receiving the electronic vote of the participating end of each participating vote, the method further includes:
s41, acquiring the voting number of the participant and the voting weight value of the participant through an intelligent contract;
s42, multiplying the voting number by the voting weight value through an intelligent contract to obtain the balance of the participating end;
s43, creating the first voting account with the balance and the open key as the second private key through the smart contract.
As described in the above steps S41 to S43, the voting amount of the participating end refers to the original voting amount of the participating user using the participating end, and the voting weight value represents a weight value of the voting of the participating user, specifically, in one shareholder electronic vote, the voting amount of the participating user may be a share weight value a of the participating user, and the voting weight value is a weight value b of the share weights of the participating user, for example, if the participating user is an original shareholder, the voting weight value is 10, the balance of the vote is 10a, or if the participating user is a common shareholder, the balance of the vote is 1a, and so on. In this embodiment, the statistics of the normal voting number is converted into a balance mode, and whether the mode is a block chain mode is determined. In the above-mentioned intelligent contract, the above-mentioned block chain system records in advance the voting weight values and the voting numbers of all users who may participate in the electronic voting.
In an embodiment, the step S41 of obtaining the number of votes held by the participant and the vote weight value of the participant through the smart contract includes:
s411, judging the application type of the electronic voting application;
s412, determining the voting number of the participating end and the voting weight value of the participating end according to the application type.
As described in the above steps S411 and S422, the application types of the electronic voting application include multiple types, for example, whether an electronic voting application is carried out by a certain service, where the application type is a common application type, and participating users corresponding to participating terminals such as an original shareholder and a common shareholder have the same or similar voting weight values; for another example, the electronic voting application of the right of one stock strike is a special application type, at this time, the electronic voting weight value of the original stock is far higher than the voting weight value of the ordinary stock, for example, the voting weight value of the original stock is 10 times that of the ordinary stock, and the like. The method for specifically judging the application type of the electronic voting application comprises multiple types, such as a first type, wherein an initiating end actively inputs the application type when initiating the electronic voting application, so that the electronic voting application carries an identification signal for being identified by an intelligent contract, and the intelligent contract determines the application type; for example, in the second type, the intelligent contract traverses the proposed scheme by means of keyword recognition, and if the number of times of occurrence of a preset keyword in the proposed scheme reaches a set threshold, it may determine the application type, and if a specified number of "strike" keywords occur in the proposed scheme, it determines that the application type is a special application. It should be noted that the keywords set in different fields are different and may be set according to the application scenario of the specific blockchain system.
In one embodiment, the step S2 of determining whether the initiator is qualified to initiate electronic voting according to the smart contract includes:
s21, acquiring the face information of the terminal user corresponding to the initiating terminal;
s22, judging whether the face information is matched with the initiating terminal;
and S23, if the two are matched, executing the step of judging whether the initiating terminal has the qualification of initiating the electronic voting through the intelligent contract.
In this embodiment, in order to prevent that someone else maliciously initiates an electronic voting application after an initiating account of an initiating terminal is stolen, face recognition and the like are performed first, and any existing face recognition matching method, such as live body detection first and then face recognition and the like, can be used in a specific face information matching process, which is not described herein again.
In one embodiment, the step S2 of determining whether the initiator is qualified to initiate electronic voting according to the smart contract includes:
s211, judging whether the initiating end is a management account or not through the intelligent contract;
s212, if yes, judging whether the electronic voting application carries joint signatures of other management accounts or not through the intelligent contract;
s212, if the joint signature exists, the initiating terminal is judged to have the qualification of initiating the electronic voting.
In this embodiment, the blockchain system first determines whether an initiating account of an initiating terminal is a management account, if so, determines whether the electronic voting application carries a joint signature of another management account, and if so, determines that the initiating terminal has a qualification for initiating electronic voting. That is, the account initiating the electronic voting can only be a preset management account, and if the account is corresponding to an ordinary user, the electronic voting process cannot be initiated. For example, the shareholder account with the share right ratio of more than 20% is set as the management account, and the other shareholder accounts are common accounts, so that only the shareholder account with the share right ratio of more than 20% has the right to initiate the electronic voting. Further, even if the management account is authorized to initiate electronic voting, another condition needs to be satisfied, that is, a joint signature of other management accounts, which is not necessarily a joint signature of all management accounts, but may be a signature of more than half of the management accounts, and the like, and may be set in advance according to specific situations. For example, different types of applications require different numbers of management accounts for joint signatures, and the like, and the more management accounts for joint signatures are required for important types of electronic voting. In another embodiment, the application type of the electronic voting application is judged; determining a stock right threshold value required by a shareholder initiating the electronic voting application according to the application type; and if the sum of the share rights of the management users is larger than the share right threshold value, judging that the initiating account is qualified for initiating the electronic voting.
In this embodiment, when the participating end performs voting, the balance in the corresponding first voting account is not directly transferred to the agreement account or the rejection account, but the balance is first transferred to a shadow account of the agreement account or the rejection account, where the shadow account is the accepted acc1= B1 gKDF(DH(r, B2))And acceptAcc2= B1 × gKDF(DH(r, B3))And corresponding second voting accounts are searched according to the accept Acc1 '= B1 xgKDF (DH (R, B2)) and the accept Acc 2' = B1 xgKDF (DH (R, B3)) to be classifiedAnd collecting, thereby completing the electronic voting. In the process, the problem of hot account is solved; although the participating end can calculate the shadow account address of the initiating end, the participating end has no way to calculate the private key of the shadow account; only the originating end can calculate the private key of the sub-account, because the originating end knows b1, the method is: gb1* gx= g(b1 + x)= acceptAcc, (b1 + x) is the private key of the initiator; only a person who possesses the private key r or the private key b1 can calculate the address of the shadow account, namely, only the voter and the initiating terminal can know the address of the second account, so that the voting privacy is improved; before voting, the participating end does not need to ask the initiating end for a voting address, and the participating end can directly calculate a corresponding account address through a key provided by the initiating end; the method also supports audit examination, because the method hides the address of the shadow account, and cannot be verified if the initiating terminal cheats; therefore, the scheme needs to support auditing, and the method comprises the following steps: the originating party provides private keys b2 and b3 to the auditor, because the public key R is public on the blockchain, the auditor can calculate all the voting addresses: acceptAcc = B1 × gKDF(DH(R, b2))And RejectAcc = B1 gKDF(DH(R, b3))
Referring to fig. 2, an embodiment of the present application further provides an electronic voting device, including:
the system comprises a receiving initiating unit 10, a receiving unit, a sending unit and a receiving unit, wherein the receiving initiating unit is used for receiving an electronic voting application sent by an initiating end, and the electronic voting application contains information of a proposal scheme and a voting agenda;
a qualification judging unit 20 for judging whether the initiating terminal is qualified to initiate electronic voting by the smart contract;
an obtaining unit 30, configured to obtain three public keys uploaded by the initiating terminal if it is determined that the initiating terminal qualifies to initiate electronic voting: b1, B2, and B3, wherein the three public keys are public keys in a public-private key pair (B1, B1), (B2, B2), (B3, B3), respectively, B1= gb1mod n, B2 = gb2mod n, B3 = gb3mod n, where n is the product of two large prime numbers p, q, i.e., n = pq; the b1, b2 and b3 are kept locally by the initiating terminal;
a voting receiving unit 40, configured to receive electronic votes from participating terminals participating in the votes, where the participating terminals randomly select a public and private key pair (R, R), where R = gr(ii) a The participating terminal calculates an account address acceptAcc1= B1 g for voting the agreement ticketKDF(DH(r, B2))Alternatively, the account address acceptAcc2= B1 × g for the voteKDF(DH(r, B3))(ii) a Transferring the balance in the first voting account corresponding to the participation end to a second voting account corresponding to the acceptAcc1 or a second voting account corresponding to the acceptAcc2 to generate the electronic vote;
the address receiving unit 50 is configured to receive a collection request of the initiating terminal after the voting agenda is ended, where the collection request includes an account address to be collected, where the initiating terminal calculates a voting account corresponding to each participating terminal by using an accept acc1 '= B1 × gKDF (DH (R, B2)), and calculates a voting account corresponding to each participating terminal by using a formula accept acc 2' = B1 × gKDF (DH (R, B3)), where the accept acc1= accept acc1 ', and accept acc2= accept acc 2';
a collecting unit 60, configured to collect the balances in all voting accounts corresponding to the accceptacc 1 'into an agreement account for storing agreement tickets, and collect the balances in all voting accounts corresponding to the accceptacc 2' into an opposition account for storing opposition tickets.
In one embodiment, the electronic voting apparatus further includes:
a establishing unit for establishing the consent account and the objection account.
In one embodiment, the electronic voting apparatus further includes:
receiving the identity CA certificate of the participating end, and signing the electronic voting application by using a first private key of the identity CA certificate to obtain Sig;
generating a second private key corresponding to the participation end and the current voting agenda, and generating a certificate application CSR by using the second private key;
sending the identity CA certificate, Sig and CSR and the account address of the participating end to the initiating end for identity verification;
and if the identity authentication information fed back by the initiating terminal is received, generating a command of receiving the electronic votes of the participating terminals participating in the votes.
In one embodiment, the electronic voting apparatus further includes:
the quantity and weight acquisition unit is used for acquiring the voting quantity of the participation end and the voting weight value of the participation end through an intelligent contract;
a balance calculating unit, configured to multiply the voting number by the voting weight value through an intelligent contract to obtain a balance of the participating end;
and the account creating unit is used for creating the first voting account with the balance and the open key as the second private key through the intelligent contract.
In an embodiment, the number and weight obtaining unit includes:
the judging module is used for judging the application type of the electronic voting application;
and the determining module is used for determining the voting number of the participating end and the voting weight value of the participating end according to the application type.
In one embodiment, the electronic voting apparatus further includes:
a face information obtaining unit, configured to obtain face information of a terminal user corresponding to the originating terminal;
the face matching unit is used for judging whether the face information is matched with the initiating terminal;
and the execution unit is used for judging whether the initiating end has the qualification of initiating the electronic voting through the intelligent contract if the initiating end is matched with the intelligent contract.
Further, the execution unit includes:
the first judgment module is used for judging whether the initiating terminal is a management account or not;
the second judgment module is used for judging whether the electronic voting application carries joint signatures of other management accounts or not if the initiating end is a management account;
and the judging module is used for judging that the initiating terminal has the qualification of initiating the electronic voting if the initiating terminal has the joint signature.
The units and modules are devices for executing the method, and are not discussed herein.
Referring to fig. 3, an embodiment of the present application further provides a computer device, and an internal structure of the computer device may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the electronic voting method of any one of the above embodiments.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is only a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects may be applied.
When the participating end votes, the computer device in the embodiment of the application does not directly transfer the balance in the corresponding first voting account to the agreement account or the opposition account, but first transfers the balance to a shadow account of the agreement account or the opposition account, where the shadow account is the accept acc1= B1 gKDF(DH(r, B2))And acceptAcc2= B1 × gKDF(DH(r, B3))And searching each second voting account according to the accept acc1 '= B1 × gKDF (DH (R, B2)) and the accept acc 2' = B1 × gKDF (DH (R, B3)) to collect the corresponding second voting accounts, thereby completing the electronic voting. In the process, the heat is solvedA point account issue; although the participating end can calculate the shadow account address of the initiating end, the participating end has no way to calculate the private key of the shadow account; only the originating end can calculate the private key of the sub-account, because the originating end knows b1, the method is: gb1* gx= g(b1 + x)= acceptAcc, (b1 + x) is the private key of the initiator; only a person who possesses the private key r or the private key b1 can calculate the address of the shadow account, namely, only the voter and the initiating terminal can know the address of the second account, so that the voting privacy is improved; before voting, the participating end does not need to ask the initiating end for a voting address, and the participating end can directly calculate a corresponding account address through a key provided by the initiating end; the method also supports audit examination, because the method hides the address of the shadow account, and cannot be verified if the initiating terminal cheats; therefore, the scheme needs to support auditing, and the method comprises the following steps: the organiser (initiator) provides private keys b2 and b3 to the auditor, since the public key R is public on the blockchain, the auditor can calculate all the voting addresses: acceptAcc = B1 × gKDF (DH(R, b2))And RejectAcc = B1 gKDF(DH(R, b3))
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements an electronic voting method according to any one of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. An electronic voting method, comprising:
receiving an electronic voting application sent by an initiating end, wherein the electronic voting application contains information of a proposal scheme and a voting agenda;
judging whether the initiating terminal is qualified for initiating electronic voting or not through an intelligent contract;
if the initiating terminal is judged to have the qualification of initiating the electronic voting, three public keys uploaded by the initiating terminal are obtained: b1, B2, and B3, wherein the three public keys are public keys in a public-private key pair (B1, B1), (B2, B2), (B3, B3), respectively, B1= gb1mod n, B2 = gb2mod n, B3 = gb3mod n, where n is the product of two large prime numbers p, q, i.e. n = pq, the number of bits of n is 2048 bits; the b1, b2 and b3 are kept locally by the initiating terminal;
receiving electronic votes from participating terminals participating in the votes, wherein the participating terminals randomly pick a public and private key pair (R, R), wherein R = gr(ii) a The participating terminal calculates an account address acceptAcc1= B1 g for voting the agreement ticketKDF(DH (r, B2))Alternatively, the account address acceptAcc2= B1 × g for the voteKDF(DH(r, B3))(ii) a However, the device is not suitable for use in a kitchenTransferring the balance in the first voting account corresponding to the participation terminal to a second voting account corresponding to the acceptAcc1 or a second voting account corresponding to the acceptAcc2 to generate the electronic vote;
after the voting agenda is finished, receiving a collection request of the initiating terminal, wherein the collection request comprises an account address needing collection, the initiating terminal calculates a voting account corresponding to each participating terminal by using an accept acc1 '= B1 × gKDF (DH (R, B2)), and calculates a voting account corresponding to each participating terminal by using a formula accept acc 2' = B1 × gKDF (DH (R, B3)), wherein the accept acc1= accept acc1 'and the accept acc2= accept acc 2';
collecting balances in voting accounts corresponding to all the acceceacc 1 'into an agreement account for storing agreement tickets, and collecting balances in voting accounts corresponding to all the acceceacc 2' into a rejection account for storing rejection tickets;
the initiator provides private keys b2 and b3 to the auditor for the auditor to calculate all voting addresses: acceptAcc = B1 × gKDF(DH(R, b2))And RejectAcc = B1 gKDF(DH(R, b3))
2. An electronic voting method according to claim 1, wherein said step of determining whether the originator is eligible to initiate electronic voting by means of a smart contract further comprises:
establishing the consent account and the opposition account.
3. An electronic voting method according to claim 1, wherein the step of receiving the electronic vote of the participating end of each participating vote is preceded by:
receiving the identity CA certificate of the participating end, and signing the electronic voting application by using a first private key of the identity CA certificate to obtain Sig;
generating a second private key corresponding to the participation end and the current voting agenda, and generating a certificate application CSR by using the second private key;
sending the identity CA certificate, Sig and CSR and the account address of the participating end to the initiating end for identity verification;
and if the identity authentication information fed back by the initiating terminal is received, generating a command of receiving the electronic votes of the participating terminals participating in the votes.
4. A method for electronic voting according to claim 3, wherein the step of receiving the electronic votes from the participating terminals that participated in the voting is preceded by:
acquiring the voting number of the participating end and the voting weight value of the participating end through an intelligent contract;
multiplying the voting number by the voting weight value through an intelligent contract to obtain the balance of the participating end;
and creating the first voting account with the balance and the opening key as the second private key through a smart contract.
5. An electronic voting method according to claim 4, wherein the step of obtaining, by the intelligent contract, the number of votes the participating end has and the vote weight value of the participating end comprises:
judging the application type of the electronic voting application;
and determining the voting number of the participating end and the voting weight value of the participating end according to the application type.
6. An electronic voting method according to claim 1, wherein the step of determining whether the originator is eligible to initiate an electronic vote via a smart contract is preceded by the steps of:
acquiring face information of a terminal user corresponding to the initiating terminal;
judging whether the face information is matched with the initiating terminal;
and if so, executing the step of judging whether the initiating end has the qualification of initiating the electronic voting by the intelligent contract.
7. An electronic voting method according to claim 1, wherein the step of determining whether the originator is eligible to initiate an electronic vote via a smart contract comprises:
judging whether the initiating terminal is a management account or not;
if yes, judging whether the electronic voting application carries joint signatures of other management accounts;
and if the joint signature is carried, judging that the initiating terminal is qualified for initiating electronic voting.
8. An electronic voting apparatus, comprising:
the system comprises a receiving and initiating unit, a sending unit and a receiving and initiating unit, wherein the receiving and initiating unit is used for receiving an electronic voting application sent by an initiating end, and the electronic voting application contains information of a proposal scheme and a voting agenda;
the judging qualification unit is used for judging whether the initiating terminal has qualification for initiating the electronic voting through the intelligent contract;
an obtaining unit, configured to obtain three public keys uploaded by the initiating terminal if it is determined that the initiating terminal qualifies to initiate electronic voting: b1, B2, and B3, wherein the three public keys are public keys in a public-private key pair (B1, B1), (B2, B2), (B3, B3), respectively, B1= gb1mod n, B2 = gb2mod n, B3 = gb3mod n, where n is the product of two large prime numbers p, q, i.e. n = pq, the number of bits of n is 2048 bits; the b1, b2 and b3 are kept locally by the initiating terminal;
a voting receiving unit for receiving electronic votes from participating terminals participating in the votes, wherein the participating terminals randomly select a public and private key pair (R, R), where R = gr(ii) a The participating terminal calculates an account address acceptAcc1= B1 g for voting the agreement ticketKDF(DH(r, B2))Alternatively, the account address acceptAcc2= B1 × g for the voteKDF(DH(r, B3))(ii) a Then corresponding first vote of the participation endTransferring the balance in the account to a second voting account corresponding to the acceptAcc1 or a second voting account corresponding to the acceptAcc2 to generate the electronic vote;
the receiving address unit is configured to receive a collection request of the initiating end after the voting agenda is ended, where the collection request includes an account address that needs to be collected, where the initiating end calculates a voting account corresponding to each participating end by using an accept acc1 '= B1 × (DH (R, B2)), and calculates a voting account corresponding to each participating end by using a formula accept acc 2' = B1 × (DH (R, B3)), where the accept acc1= accept acc1 ', and accept acc2= accept 2'; the initiator provides private keys b2 and b3 to the auditor for the auditor to calculate all voting addresses: acceptAcc = B1 × gKDF(DH(R, b2))And RejectAcc = B1 gKDF (DH(R, b3))
A collecting unit, configured to collect the balances in all voting accounts corresponding to the acceptAcc1 'into an agreement account for storing agreement tickets, and collect the balances in all voting accounts corresponding to the acceptAcc 2' into an opposition account for storing opposition tickets.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010260573.3A 2020-04-03 2020-04-03 Electronic voting method, device, computer and storage medium Active CN111159683B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010260573.3A CN111159683B (en) 2020-04-03 2020-04-03 Electronic voting method, device, computer and storage medium
PCT/CN2020/105885 WO2021196473A1 (en) 2020-04-03 2020-07-30 Electronic voting method and device, computer, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010260573.3A CN111159683B (en) 2020-04-03 2020-04-03 Electronic voting method, device, computer and storage medium

Publications (2)

Publication Number Publication Date
CN111159683A CN111159683A (en) 2020-05-15
CN111159683B true CN111159683B (en) 2020-08-21

Family

ID=70567763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010260573.3A Active CN111159683B (en) 2020-04-03 2020-04-03 Electronic voting method, device, computer and storage medium

Country Status (2)

Country Link
CN (1) CN111159683B (en)
WO (1) WO2021196473A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159683B (en) * 2020-04-03 2020-08-21 深圳壹账通智能科技有限公司 Electronic voting method, device, computer and storage medium
CN117061089B (en) * 2023-10-12 2024-02-06 腾讯科技(深圳)有限公司 Voting management method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108109257A (en) * 2018-01-05 2018-06-01 杭州电子科技大学 A kind of Anonymous Electronic Voting method based on block chain
CN109934988A (en) * 2019-02-15 2019-06-25 哈尔滨工程大学 A kind of electronic voting method based on block chain
CN110519059A (en) * 2019-09-29 2019-11-29 四川师范大学 A kind of block chain dual key concealment address processing method based on bilinear map
CN110675265A (en) * 2019-09-29 2020-01-10 四川师范大学 Method for realizing block chain double-key hiding address protocol without temporary key leakage
CN110912705A (en) * 2019-11-14 2020-03-24 山东师范大学 Distributed electronic voting method and system based on block chain

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190114707A1 (en) * 2017-10-16 2019-04-18 Shinestack LLC Distribution of Blockchain Tokens
CN109274505B (en) * 2018-11-22 2021-09-24 浙江工商大学 Anonymous electronic election method based on block chain technology
CN109617695A (en) * 2018-12-28 2019-04-12 无锡井通网络科技有限公司 Voting method, device, electronic equipment and storage medium based on block chain
CN110933098B (en) * 2019-12-05 2022-04-08 全链通有限公司 Electronic voting method, device and storage medium based on block chain
CN111159683B (en) * 2020-04-03 2020-08-21 深圳壹账通智能科技有限公司 Electronic voting method, device, computer and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108109257A (en) * 2018-01-05 2018-06-01 杭州电子科技大学 A kind of Anonymous Electronic Voting method based on block chain
CN109934988A (en) * 2019-02-15 2019-06-25 哈尔滨工程大学 A kind of electronic voting method based on block chain
CN110519059A (en) * 2019-09-29 2019-11-29 四川师范大学 A kind of block chain dual key concealment address processing method based on bilinear map
CN110675265A (en) * 2019-09-29 2020-01-10 四川师范大学 Method for realizing block chain double-key hiding address protocol without temporary key leakage
CN110912705A (en) * 2019-11-14 2020-03-24 山东师范大学 Distributed electronic voting method and system based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于区块链的匿名投票协议研究与设计;李鹏程;《中国优秀硕士学位论文全文数据库 信息科技辑》;20190615;正文第12、20-24页 *

Also Published As

Publication number Publication date
WO2021196473A1 (en) 2021-10-07
CN111159683A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
US20220092586A1 (en) Off network identity tracking in anonymous cryptocurrency exchange networks
Xu et al. EVchain: An anonymous blockchain-based system for charging-connected electric vehicles
CN110633963B (en) Electronic bill processing method, electronic bill processing device, computer readable storage medium and computer readable storage device
EP3247070B1 (en) Cryptocurrency-based event participation verification
CN108960832B (en) Privacy protection method and system for block chain real-name communication
CN109102404B (en) Privacy protection method and system for block chain real-name communication
CN111340494B (en) Asset type consistency evidence generation, transaction and transaction verification method and system
CN111159683B (en) Electronic voting method, device, computer and storage medium
CN111080455A (en) Cross-border transaction method and device based on block chain and hardware equipment
CN110992178A (en) Verification method and device for block chain node, computer equipment and storage medium
CN112884562B (en) Mortgage processing method and device based on blockchain and readable storage medium
CN110321730A (en) A kind of method, block chain node and the storage medium of operation data processing
CN111866042A (en) Method and device for synchronizing telecommunication account number change
US20240187259A1 (en) Method and apparatus for generating, providing and distributing a trusted electronic record or certificate based on an electronic document relating to a user
CN111556148B (en) Data sharing method, data sharing platform and device
CN110598479B (en) Data processing method, device and computer readable storage medium
CN110599332A (en) Block chain-based user intention determination method, device, equipment and storage medium
CN112632497B (en) Identity information verification method and system based on blockchain
CN110581820B (en) Financial technology application system and method based on IPV6 and biological recognition technology
CN111027992A (en) Asset transaction method and device based on blockchain system and hardware equipment
CN111383110A (en) Cross-block-chain evidence transfer method and device and hardware equipment
Cheng et al. Correlation trust authentication model for peer-to-peer networks
CN111327425B (en) Vehicle information safety broadcasting excitation system based on bitcoin and working method thereof
CN116866009B (en) Authentication network-based cross-chain identity verification method and device, electronic equipment and storage medium
CN113572620B (en) On-line voting method and system based on block chain

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
GR01 Patent grant
GR01 Patent grant