Verifiable privacy voting method based on block chain
By combining homomorphic encryption and zero-knowledge proof technology on the blockchain, the problem of poor robustness of the self-counting voting system and the inability of candidates to voluntarily disclose the results is solved, achieving the security, transparency and robustness of voting, ensuring Voters’ privacy and candidates’ right to voluntary vote counting.
Patent Information
- Application Number
- CN202410781253.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-10-15
AI Technical Summary
The existing self-counting electronic voting system is less robust, and candidates cannot voluntarily choose whether to disclose voting results, causing candidates with lower scores to face an embarrassing situation, and the issue of whether candidates can abstain during the voting process is not considered.
Based on the blockchain system, combined with homomorphic encryption algorithm, secret sharing technology and zero-knowledge proof technology, a verifiable privacy voting method is constructed, allowing candidates to voluntarily choose whether to disclose the score results, and realize the voting content through dual zero-knowledge proof Verification and recovery to ensure the privacy and robustness of the voting process.
It achieves the security and transparency of voting information, ensures voter privacy, provides verifiability and robustness of self-counting votes, allows candidates to count votes voluntarily, avoids candidates with lower scores from being forced to disclose the results, and Ensure the recoverability of voting results in the event that voters abstain.
Smart Images

Figure CN118784201A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of blockchain and cryptography technology applications, and mainly relates to a verifiable privacy voting method based on blockchain. Background Art
[0002] Electronic voting systems have been widely used in industry and democratic elections. Electronic voting is one of the important activities of decentralized industrial Internet, such as wireless leader election sensor network. In addition, many companies or organizations currently use electronic voting for internal elections or major decisions.
[0003] Privacy and verifiability are attributes that cannot be ignored in electronic voting. In terms of privacy, many solutions currently use cryptographic technologies such as homomorphic encryption or ring signatures to protect privacy. In terms of the verifiability of the counting results, many solutions currently use self-counting to achieve verifiability, that is, all voters or other people can independently complete the counting to verify whether the counting results are correct. However, the self-counting electronic voting system is generally less robust. If there are voters who abstain from voting, the final voting results cannot be obtained. In addition, in the existing self-counting electronic voting protocol, the question of whether candidates can abstain during the voting process is not considered, that is, whether candidates can choose not to disclose their scores. In the self-counting electronic voting protocol, the scores of candidates who abstain will also be disclosed. In some important votes within an organization, candidates with low scores may face embarrassing situations when they know clearly that they will not win the election but must disclose their voting results. Summary of the invention
[0004] Aiming at the shortcomings of poor robustness of self-counting and the problem of whether candidates can abstain, the present invention constructs a verifiable privacy voting method based on blockchain based on blockchain system and combines homomorphic encryption algorithm, secret sharing technology and zero-knowledge proof technology. And solves the problem of multiple voters abstaining from voting. And in the counting stage, candidates can voluntarily choose whether to disclose their scoring results. Scoring voting means that each voter has a preset total number, which he can flexibly allocate to the candidates. Homomorphic encryption is adopted and a dual zero-knowledge proof that can provide range proof and sum proof at the same time is proposed, which can realize the verification of ballot content without leaking the encrypted content.
[0005] A blockchain-based verifiable privacy voting method starts from the entire voting process and implements the following steps:
[0006] Step 1: Voting Initiation The election body initiates a vote and generates public parameters.
[0007] Step 2: Candidates and voters send registration requests to the election authority and confirm their identity.
[0008] Step 3: The election body registers candidates and voters who initiate registration requests on the blockchain.
[0009] Step 4: Voters use the candidate's public key to encrypt the corresponding score and confuse the ciphertext to obtain the ballot.
[0010] Step 5: The voter calculates a zero-knowledge proof for the ballot and sends the ballot plus the zero-knowledge proof to the blockchain.
[0011] Step 6: The smart contract in the blockchain automatically checks the zero-knowledge proof of the ballot and saves the verified ballot on the blockchain.
[0012] Step 7: Candidates publish their private keys on the blockchain, and voters use the public private keys to calculate the vote count.
[0013] Step 8: If any voter abandons the ballot, an additional recovery step is performed. The voter calculates a new ballot with the same score as the original ballot. After all voters have completed the calculation, the public private key is used to calculate the vote count.
[0014] Furthermore, step 1 includes the following specific steps:
[0015] Step 1.1: Choose a group of order prime q g, h are the generators of the group.
[0016] Step 1.2: Determine the number of candidates to be nc, and the total number of points that voters can allocate to be P = 2 m =1 (m is the number of bits of the total score P converted into binary form), and the minimum number of voters who can restore the counting results is n t .
[0017] Step 1.3: Order is a collision-resistant hash function. is the field of integers of order q, represented by {0, 1, 2, 3, …, q-1}.
[0018] Step 1.4: From the group The commitment key for zero-knowledge proof is randomly selected in and
[0019] Step 1.5: Deploy a smart contract on the blockchain to verify the validity of the ballot.
[0020] Further step 2 comprises the following specific steps:
[0021] Candidates or voters choose their own private keys Candidates or voters calculate their own public key pk = g sk, send the public key to the election body for registration.
[0022] Furthermore, step 3 includes the following specific steps:
[0023] Step 3.1: The election agency randomly generates a t -1 secret polynomial
[0024] Step 3.2: For candidate registration, the election body signs the candidate’s public key with its own private key and sends it to the blockchain.
[0025] Step 3.3: For each voter registration, the election authority calculates a secret value The institution computes the commitment to the secret value where r i is a random number. The voter's public key and commitment signature are sent to the blockchain to complete the registration, and y i , r i Delivered securely to voters.
[0026] Furthermore, step 4 includes the following specific steps:
[0027] Step 4.1: Voters obtain the public keys of all voters from the blockchain n v The number of all eligible voters and the public keys of the candidates
[0028] Step 4.2: Voter V i Using the public keys of all voters, a public auxiliary value is calculated, the Lagrange coefficient
[0029] Step 4.3: For all candidates participating in the election Voter V i The scores assigned to them are Voters choose a random value r i.,j and encrypt the assigned score using the candidate's public key After that, use your own secret value y i and the Lagrange coefficient λ i Obfuscate the ciphertext, and the final vote is
[0030] Furthermore, step 5 includes the following specific steps:
[0031] Step 5.1: For all votes, compute a dual zero-knowledge proof π that includes both range and sum Dual Guarantee relationship Established.
[0032] The public reference string of the dual zero-knowledge proof is:
[0033]
[0034] The voting score Encoded as a binary vector For all j∈{1, 2, 3, …, nc}, there is a vector inner product j , 2 m >=p i,j .
[0035] Step 5.2: Concatenate all the encoded voting scores into a vector calculate
[0036] Step 5.3: Draw a random integer Random binary vector Random vector of integers
[0037] Step 5.4: Calculate commitment and Use the commitment to calculate the hash value z = hash(B i,2 , A, S, P, g, h) and k = hash (A, S, P, g, h) as the challenge value of the zero-knowledge proof protocol, where It is a vector of the second terms of all votes for this voter. Calculate a commitment
[0038] Step 5.5: Calculate the polynomial t(X) =<l(X),r(X)> =t 0 +t 1 X+t 2 X 2 , and the coefficients of the polynomial t 1 , t 2 ,promise The polynomials l(X) and r(X) are:
[0039]
[0040]
[0041] Step 5.6: Calculate the hash value x = hash(A, S, H, P, g, h, T 1 , T 2 ), calculate the value of polynomial l(X), r(X) at point x to get l, r. Calculate the inner product of the vector πDual =(A, S, H, T 1 , T 2 , t, τ x , μ, η r , l, r).
[0042] Step 5.7: For Ballot B i,j , calculate a zero-knowledge proof π that guarantees the correct obfuscation of the ciphertext i,j , which ensures the relationship Established. Voters randomly select four random numbers (u 1 ,s 1 ,u 2 ,s 2 ),calculate Then use the above commitment to calculate the hash value c = hash (B i,j , A, S, H, P, g, h, θ 1 ,θ 2 ,θ 3 ) as the challenge value of the zero-knowledge proof protocol. Finally, calculate β 1 =u 1 +c·y i , β 2 =s 1 +c·r i , β 3 =u 2 +c·p i,j , β 4 =s 2 +c·r i,j .
[0043] Step 5.8: Use the obfuscated ciphertext, the dual zero-knowledge proof of the validity of the verification score, and the zero-knowledge proof of the correct obfuscated ciphertext π Dual =(A, S, H, T 1 , T 2 , t, τ x , μ, η r , l, r), {π i,j =(θ 1 ,θ 2 ,θ 3 , β 1 , β 2 , β 3 , β 4 )}, j∈{1, 2, …, n c}Sent to the blockchain to complete the vote.
[0044] Further, step 6 includes the following steps:
[0045] Step 6.1: Smart contract is called to verify the dual zero-knowledge proof π DualThe smart contract calculates the challenge value z = hash (B i,2 ,A,S,P,g,h),k=hash(A,S,P,g,h),x=hash(A,S,H,P,g,h,T 1 , T 2 ).
[0046] Then calculate the following equation:
[0047]
[0048] Step 6.2: Check whether the following equation holds:
[0049]
[0050] E=h μ ·g l ·(h′) r
[0051] t=<l,r>
[0052] If the verification is passed, the next step will be entered. Otherwise, the voter's ballot will be rejected.
[0053] Step 6.3: The smart contract is called to verify the zero-knowledge proof that the ciphertext is correctly obfuscated For each ballot B i,j , the smart contract will calculate the value c = hash (B i,j , A, S, H, P, g, h, θ 1 ,θ 2 ,θ 3 ), and verify the equation
[0054] Is it true? For vote B i,j If the verification is successful, the next step will be taken. Otherwise, the voter's ballot will be rejected.
[0055] Step 6.4: The smart contract saves the votes and zero-knowledge proof on the blockchain.
[0056] Furthermore, if no voter abstains from voting, step 7 is executed, which specifically includes the following steps:
[0057] Step 7.1: After the voting phase, each candidate will publish their private key on the blockchain. Candidates who do not publish their private key will be deemed to have abstained from voting.
[0058] Step 7.2: All entities that want to count votes collect all votes on the blockchain.
[0059] Step 7.3: For a candidate Cj The vote count result of the candidate can be multiplied to obtain a decryptable ciphertext:
[0060]
[0061] Step 7.4: Using the candidate's private key, decrypt B j Get the candidate's score result
[0062] Furthermore, if any voter abstains from voting, step 8 is executed, which specifically includes the following steps:
[0063] Step 8.1: All voters who have not abstained from voting (assuming that the set of voters who have not abstained is J) calculate new ballots
[0064] Step 8.2: Pick two random values And use the public keys of all voters who have not abstained to calculate a new Lagrangian coefficient
[0065] Step 8.3: For each new ballot, calculate a zero-knowledge proof that ensures the new ballot is consistent with the previous ballot secret value.
[0066] Step 8.4: The smart contract verifies the validity of the new vote and determines the equation and If it is true, proceed to the next step; otherwise, the blockchain refuses to accept the ballot.
[0067] Step 8.5: After all voters have completed the calculation, all new votes are multiplied and decrypted using the candidate's private key to obtain the result of the vote count.
[0068] Compared with the prior art, the present invention has the following benefits:
[0069] (1) The present invention uses blockchain as a voting platform. Once the voting information is confirmed, it will be permanently recorded on the blockchain, ensuring the security and integrity of the voting data.
[0070] (2) The voting initiator in the present invention only operates as an identity authentication center and cannot perform any operations on the ballots, thereby improving the transparency of electronic voting.
[0071] (3) The present invention uses secret sharing technology and elliptic curve exponential ELGamal encryption to create ballots for voters. After the voter performs standard homomorphic encryption on the ballot, the obfuscation value is used to further re-encrypt the standard ciphertext. This ensures that even if the private key is published, the content of the ballot will not be leaked. The privacy of voters is guaranteed at all stages of the voting.
[0072] (4) The vote counting operation of the present invention does not rely on a trusted vote counting center. During the vote counting stage, all users can multiply all votes and cleverly eliminate the influence of the obfuscation value, thereby recovering a decryptable ciphertext, realizing self-counting, and completing the verification of the vote counting results.
[0073] (5) The present invention uses secret sharing technology. As long as the number of voters exceeds a set threshold, the voting result can be calculated through the recovery phase without restarting the voting protocol. At the same time, the threshold in the present invention has high flexibility, and the minimum number of voters required for a valid voting result can be freely set according to the specific application scenario. That is, at least a certain number of voters must participate in the voting before the result of this vote is recognized.
[0074] (6) The present invention proposes a dual zero-knowledge proof to replace the range proof and sum proof used in the general scheme. In the present invention, voters only need to calculate one proof to ensure that the scores of all votes are legal and valid. There is no need to perform range proof and sum proof for each vote separately, which improves the efficiency of voting.
[0075] (7) The present invention writes the verification algorithm of zero-knowledge proof into a smart contract to achieve highly private and secure interaction between voters and blockchain. By combining zero-knowledge proof with smart technology, it can provide voters with a highly secure and automated voting environment while also ensuring that all votes on the blockchain are legal and valid.
[0076] (8) The present invention takes into account the issue of voluntary vote counting by candidates, allowing candidates to master the encrypted private key. However, the privacy of the ballot will not be destroyed because the private key cannot decrypt any voter's ballot. If a candidate gives up the election for some reason, no one can obtain his score result. Candidates with low scores can avoid being embarrassed. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 This is a flowchart of a verifiable privacy voting method based on blockchain of the present invention;
[0078] Figure 2 This is a diagram of the interaction process between the election agency, voters, candidates and blockchain of the present invention. DETAILED DESCRIPTION
[0079] In order to better understand the purpose, structure and function of the present invention, the following is a detailed description of a blockchain-based verifiable privacy voting method of the present invention in conjunction with the accompanying drawings. Figure 1 and Figure 2 As shown, a verifiable privacy voting method based on blockchain includes four entities: blockchain, election agency, candidates, and voters.
[0080] Specifically:
[0081] Blockchain, through smart contracts, automatically verifies the validity of ballots and records the votes of all voters.
[0082] The election agency initiates a vote and generates public parameters for the voting system. At the same time, the agency also reviews the eligibility of voters and candidates to participate.
[0083] After obtaining the election qualification from the election agency, candidates participate in the voting and election. Candidates need to disclose their private keys during the counting stage. Candidates who do not disclose their private keys are deemed to have abstained from voting.
[0084] After obtaining the voting qualification from the election agency, voters will obtain their own secret value from the election agency to confuse the homomorphic encrypted ciphertext. The obfuscated homomorphic ciphertext is used as the ballot and attached with the corresponding zero-knowledge proof and sent to the blockchain.
[0085] 1. Specific content of the method
[0086] like Figure 1 As shown in the figure, a blockchain-based verifiable privacy voting method supports fractional voting, where voters can arbitrarily assign their scores to candidates. Compared with a single "yes" or "no" option, voters have more flexible choices when voting. This method uses homomorphic ciphertext obfuscation to ensure that any voter's ballot will not be decrypted by anyone during the entire voting process (including the counting stage), and uses zero-knowledge proof, including the following steps:
[0087] Step 1: Initiate a vote The election body initiates a vote and generates public parameters. The implementation method is as follows:
[0088] Step 1.1: Choose an additive cyclic group of prime order q on an elliptic curve g, h are the generators of the group. At the same time, we determine an integer field of order q
[0089] Step 1.2: Determine the number of candidates n c , the total number of points that voters can allocate is P = 2 m -1, and the minimum number of voters to recover the vote count is n t, m is the number of bits in binary form of the total score P.
[0090] Step 1.3: Order As a collision-resistant hash function, it will be used as an instantiation of a random oracle. Its role is to convert zero-knowledge proof from interactive to non-interactive, so that smart contracts can implement the verification algorithm of zero-knowledge proof.
[0091] Step 1.4: From the group The commitment key for zero-knowledge proof is randomly selected in and
[0092] Step 1.5: Deploy a smart contract on the blockchain to verify the validity of the ballot. The content of the smart contract includes the verification algorithm of the digital signature and the verification algorithm of the zero-knowledge proof.
[0093] Step 2: Candidates and voters send registration requests to the election authority and confirm their identities, which can be achieved as follows:
[0094] Candidates and voters choose their own private keys Candidates or voters calculate their own public key pk = g sk , send the public key to the election body for registration.
[0095] Step 3: The election authority registers candidates and voters who initiate the registration request on the blockchain, which is implemented as follows:
[0096] Step 3.1: The election agency randomly generates a t -1 secret polynomial All computations on the polynomial f(x) are performed in the domain of integers. Therefore, all calculations need to be done modulo q.
[0097] Step 3.2: For candidate registration, the election body signs the candidate’s public key with its own private key and sends it to the blockchain.
[0098] Step 3.3: For each voter registration, the election authority calculates a secret value The institution computes the commitment to the secret value where r i is a random number. This commitment value is used to verify the legality of the secret value used by the voter to confuse the ciphertext through zero-knowledge proof. Finally, the voter's public key and commitment signature are sent to the blockchain to complete the registration, and y i , r i Delivered securely to voters.
[0099] Step 4: Voters use the candidate's public key to encrypt the corresponding score and confuse the ciphertext. The implementation method is as follows: Step 4.1: Voters obtain the public keys of all voters from the blockchain n v The number of all eligible voters and the public keys of the candidates
[0100] Step 4.2: Voter V i Use the public keys of all voters to calculate a public auxiliary value for implementing the self-counting function, the Lagrangian system Since the public key is a point on the elliptic curve, the public key consists of two integer fields It is represented by a value on the integer domain. Here it needs to be converted into a value on the integer domain. Therefore, a hash function is used to convert the public key into a unique integer on the integer domain.
[0101] Step 4.3: For all candidates participating in the election Voter V i The scores assigned to them are Voters choose a random value r i,j and encrypt the assigned score using the candidate's public key After that, use your own secret value y i and the Lagrange coefficient λ i Obfuscate the ciphertext, and the final vote is Since the ciphertext is obfuscated with the secret value and the secret value is kept secret by the voters, even if the candidate has the private key for decryption, he has no way to obtain the content of the ballot. This effectively ensures the fairness and privacy of the entire vote.
[0102] Step 5: The voter calculates the zero-knowledge proof for the ballot, attaches the zero-knowledge proof to the ballot and sends it to the blockchain. The implementation method is as follows:
[0103] Step 5.1: For all votes, compute a dual zero-knowledge proof π that includes both range and sum Dual Guarantee relationship The dual zero-knowledge proof proposed in this invention can simultaneously complete the range proof of all ballot content scores, that is, the score p assigned to each candidate i,j ∈[0,P], and a sum proof, i.e. the sum of the scores assigned to all candidates Through dual zero-knowledge proof, voters can prove the legitimacy of all ballot contents by calculating one proof, and no longer need to calculate range proofs and an additional sum proof for each ballot separately. This greatly improves computing efficiency and communication efficiency.
[0104] The public reference string of the dual zero-knowledge proof is:
[0105]
[0106] The voting score Encoded as a binary vector, All j∈{1, 2, 3, ..., n c},have j , 2 m >=p i,j .
[0107] Step 5.2: Concatenate all the encoded voting scores into a vector calculate
[0108] Step 5.3: Draw a random integer Random binary vector Random vector of integers Used to ensure that the generated proofs have zero-knowledge properties, that is, all proofs will be obfuscated by random numbers.
[0109] Step 5.4: Calculate commitment and Use the commitment to calculate the hash value z = hash(B i,2 , A, S, P, g, h) and k = hash (A, S, P, g, h), where It is a vector composed of the second items of all votes of this voter. Calculate another commitment H =
[0110] Step 5.5: Calculate the polynomial t(X) =<l(X),r(X)> =t 0 +t 1 X+t 2 X 2 , and the coefficients of the polynomial t 1 , t 2 ,promise The polynomials l(X) and r(X) are:
[0111]
[0112]
[0113] Step 5.6: Calculate the hash value x = hash(A, S, H, P, g, h, T 1 , T 2 ), calculate the value of polynomial l(X), r(X) at point x to get l, r. Calculate the inner product of the vector πDual =(A, S, H, T 1 , T 2 , t, τ x , μ, η r , l, r)
[0114] Step 5.7: For Ballot B i,j , calculate a zero-knowledge proof π that guarantees the correct obfuscation of the ciphertext i,j , which ensures the relationship The zero-knowledge proof of obfuscated ciphertext proposed by the present invention has a proof of constant size. For a ballot, its communication overhead is seven group elements, and its size does not change with the change of the ballot content. At the same time, since the protocol is a knowledge proof of a secret value, its computational overhead is also constant, because the secret value and its commitment have been determined at the registration stage. The specific steps of the zero-knowledge proof of correct obfuscated ciphertext are:
[0115] Voters randomly select four random numbers (u 1 ,s 1 ,u 2 ,s 2 ), and calculate Here θ 1 ,θ 2 ,θ 3 , are all commitments to random numbers, which are important calculation steps in zero-knowledge proofs to ensure zero-knowledge properties. These commitments will be used to verify subsequent zero-knowledge proofs. Then use the above commitments to calculate the challenge value c=hash(B i,j , A, S, H, P, g, h, θ 1 ,θ 2 ,θ 3 ). Finally, calculate β 1 =u 1 +c·y i , β 2 =s 1 +c·r i , β 3 =u 2 +c·p i,j , β 4 =s 2 + c.r i,j .
[0116] Step 5.8: Compare the obfuscated ciphertext with the dual zero-knowledge proof of the validity of the check score and the zero-knowledge proof of the correct obfuscated ciphertext π Dual =(A, S, H, T 1 , T 2 , t, τx , μ, η r , l, r), {π i,j =(θ 1 ,θ 2 ,θ 3 , β 1 , β 2 , β 3 , β 4 )}, j∈{1, 2, …, n c}Sent to the blockchain to complete the vote.
[0117] Step 6: The smart contract automatically checks the zero-knowledge proof of the ballot and saves the verified ballot on the blockchain. The combination of smart contracts and zero-knowledge proofs realizes the automatic verification of the legitimacy of the ballot and ensures that the ballots on the blockchain are legal and valid. The implementation method is as follows:
[0118] Step 6.1: Smart contract is called to verify the dual zero-knowledge proof π Dual The smart contract calculates the challenge value of the dual zero-knowledge proof:
[0119] z=hash(B i,2 ,A,S,P,g,h),k=hash(A,S,P,g,h),x=hash(A,S,H,P,g,h,T 1 , T 2 ).
[0120] Then calculate the equations needed to verify the dual zero-knowledge proof:
[0121]
[0122] Step 6.2: Check whether the following equation holds:
[0123]
[0124] E=h μ ·g l ·(h′) r
[0125] t=<l,r>
[0126] If the verification is passed, the next step will be entered. Otherwise, the voter's ballot will be rejected.
[0127] Step 6.3: The smart contract is called to verify the zero-knowledge proof that the ciphertext is correctly obfuscated For each ballot B i,j , the smart contract will calculate the value c = hash (B i,j , A, S, H, P, g, h, θ 1 ,θ2 ,θ 3 ), and verify the equation
[0128] Is it established? For vote B i,j If the verification is successful, the next step will be taken. Otherwise, the voter's ballot will be rejected.
[0129] Step 6.4: After all verifications are passed, the smart contract saves the ballots and zero-knowledge proofs on the blockchain. All users can obtain the ballots on the blockchain for counting and verification of the counting results.
[0130] Step 7: The candidate publishes his private key on the blockchain. If a candidate gives up the election for some reason, he can choose not to disclose his private key and declare that he will give up the counting of his score. The candidate who gives up the election can protect his score from being disclosed, realizing the voluntary counting of candidates. Then, among the remaining candidates, the candidate with the highest score wins the vote. Voters use the public private key to calculate the counting results. The implementation method is as follows:
[0131] Step 7.1: After the voting phase, all candidates who have not abstained will publish their private keys on the blockchain. Since the ciphertext has been obfuscated, the private key can only decrypt the final score of the aggregated candidate, but cannot decrypt the score content of the voter's ballot.
[0132] Step 7.2: The entity that wants to count the votes collects all the votes on the blockchain.
[0133] Step 7.3: The user can obtain the score results of all candidates. j , j∈{1, 2, 3, …, n c}'s vote count, multiplying all the votes together can get a decryptable ciphertext:
[0134]
[0135] Step 7.4: Using the candidate's private key, decrypt B j Get the candidate's score results
[0136] Step 8: If a voter abandons his or her ballot, an additional recovery step is performed. The voter calculates a new ballot with the same score as the original ballot. The specific implementation method is as follows:
[0137] Step 8.1: Let the set of voters who have not abstained be J. For all voters who have not abstained, calculate the new ballots
[0138] Step 8.2: Pick two random values And use the public keys of all voters who have not abstained to calculate a new Lagrangian coefficient
[0139] Step 8.3: For each new ballot, calculate a zero-knowledge proof that ensures the new ballot is consistent with the previous ballot’s secret value. z 1 =ξ 1 +r i,j +e,z 2 =ξ 2 +y i ·e,).
[0140] Step 8.4: The smart contract verifies the validity of the new vote and determines the equation and Is it true?
[0141] Step 8.5: After all voters have completed the calculation, multiply all the new votes and decrypt them using the candidate's private key to obtain the result of the vote count.
[0142] Compared to the original vote In comparison, the new ballot c 2 is unchanged, and c 1 It does not contain any score information, so in the recovery phase, voters no longer need to reassign scores to candidates, nor do they need to recalculate the dual zero-knowledge proof. The zero-knowledge proof for ensuring consistency in the recovery phase proposed by the present invention also has a constant proof and computational overhead. Its proof size is 5 group elements. Therefore, even if the recovery phase is entered due to voters abstaining from voting, the computational overhead and communication overhead of the recovery phase are efficient.
[0143] 2. Method performance analysis
[0144] 2.1 Test Environment
[0145] For the underlying cryptographic operation, the points on the secp256k1 elliptic curve are selected as the cyclic group, and its security length is 256 bits. The experiment was conducted on a laptop equipped with an AMD Ryzen 76800H CPU@3.20GHz*8 and 16GB RAM, running a 64-bit Ubuntu 20.04.6 system.
[0146] 2.2 Test Results
[0147] When voting, voters need to count a vote for each candidate. When there are 10 candidates, it takes 2.5ms for each voter to generate all the votes. In the dual zero-knowledge proof, the proof time and the time to ensure correct obfuscation are 18.54ms and 28.06ms respectively, and their proof time and verification time are 5.01ms and 7.53ms respectively. Therefore, for 10 candidates, the total time spent by voters in the voting phase is 26.05ms. When there are 10 candidates and 100 voters, the time required for self-counting is 16 milliseconds. In the recovery phase, additional operations will be performed by voters who have already voted. When the number of remaining voters is 80 and the number of candidates is 10, the total time spent by all remaining voters in the recovery phase is 208.93ms. In the recovery phase, each voter needs to calculate a zero-knowledge proof that guarantees the consistency of the secret value used for obfuscation. When there are 10 candidates, the proof generation time and verification time are 4.15ms and 5.03ms respectively.
[0148] 3. Method safety analysis
[0149] 3.1 Privacy
[0150] Theorem: During the entire voting process, the content of the voter's ballot will not be disclosed.
[0151] During the voting phase, the scores of voters' votes are encrypted using the candidate's public key. The encrypted ciphertext is then further obfuscated with the voter's secret value. Therefore, the privacy of voters is ensured during the voting phase. During the counting or recovery phase, candidates publish their private keys. However, the ciphertext has been obfuscated so that only the voter himself can decrypt his vote. The privacy of this method is established.
[0152] 3.2 Public Verifiability
[0153] Theorem: The validity of votes on the blockchain and the correctness of the counting results in the voting system can be verified by any user.
[0154] Because all votes and zero-knowledge proofs are recorded on the blockchain, anyone can verify them. During the voting phase, each voter must attach a zero-knowledge proof to their ballot to ensure the validity of the ballot. Anyone can verify the proof to check the validity of the ballot. This ensures the verifiability of the validity of the ballot. During the counting phase, anyone can independently calculate the final result, ensuring the universal verifiability of the voting results. The public verifiability of this method is established.
[0155] 3.3 Fairness
[0156] Theorem: Fairness means that no one can obtain partial vote count results in advance. If someone obtains partial vote count results in advance, it may affect the voting intention of subsequent voters.
[0157] All voters need to calculate zero-knowledge proofs for their votes to ensure the validity of their votes. Zero-knowledge proofs can ensure that no one can obtain any information about these votes in advance before the voting period ends.
[0158] 3.4 Candidates voluntarily count votes
[0159] Theorem: Voluntary counting of votes by candidates means that candidates can voluntarily collect their own votes during the counting stage.
[0160] During the voting phase, the candidate's score is encrypted using the candidate's public key. If a candidate chooses not to collect his or her votes and does not disclose his or her private key, no one can decrypt the vote count and obtain the candidate's evaluation score pj. This is because the result of multiplying all votes is still an encrypted ElGamal ciphertext.
[0161] 3.5 Robustness
[0162] Theorem: Robustness means that the normal operation of the system will not be forced to stop even if a certain number of voters choose to abstain from voting.
[0163] The present invention uses secret sharing technology and zero-knowledge proof to solve the abstention problem. Zero-knowledge proof ensures that voters can only use the correct secret value to confuse the ciphertext. As long as the number of voters participating in the vote exceeds the preset threshold, the voting results can be calculated in the counting stage.
[0164] In summary, the present invention proposes a verifiable privacy voting based on blockchain. The present invention takes into account the willingness of candidates to abstain, realizes the attribute of voluntary counting of candidates, and protects the score results of abstaining candidates from being disclosed. In addition, in order to prevent malicious voters, the present invention proposes three improved zero-knowledge proof schemes. Among them, the dual zero-knowledge proof replaces the range proof and sum proof used in the general scheme. In the present invention, voters only need to calculate a proof to ensure that the scores of all ballots are legal and valid, and there is no need to perform range proof and sum proof for each ballot separately, which improves voting efficiency. The present invention meets privacy, robustness, fairness, public verifiability and voluntary counting of candidates. Experimental and analysis results show that a verifiable privacy voting based on blockchain is effective and can be applied to a variety of voting scenarios.
[0165] It is understood that the present invention is described by some embodiments, and those skilled in the art are aware that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the scope of protection of the present invention.
Claims
1. A verifiable privacy voting method based on blockchain, characterized in that: The following steps are involved: Step 1: Voting Initiation The election body initiates a vote and generates public parameters; Step 2: Candidates and voters send registration requests to the election authority and confirm their identities; Step 3: The election authority registers candidates and voters who initiate registration requests on the blockchain; Step 4: Voters use the candidate's public key to encrypt the corresponding score and confuse the ciphertext to obtain the ballot; Step 5: The voter calculates a zero-knowledge proof for the ballot and sends the ballot plus the zero-knowledge proof to the blockchain; Step 6: The smart contract in the blockchain automatically checks the zero-knowledge proof of the ballot and saves the verified ballot on the blockchain; Step 7: Candidates publish their private keys on the blockchain, and voters use the public private keys to calculate the vote count; Step 8: If any voter abandons their vote, an additional recovery step is entered, and the voter calculates a new ballot with the same score as the original ballot. After all voters have completed the calculation, the public private key is used to calculate the counting result.
2. The blockchain-based verifiable privacy voting method according to claim 1 is characterized in that: The step 1 comprises the following specific steps: Step 1.1: Choose a group of order prime q g,h are the generators of the group; Step 1.2: Determine the number of candidates n c , the total number of points that voters can allocate is P = 2 m -1, m is the number of bits converted from the total score P into binary form, and the minimum number of voters to restore the counting result is n t ; Step 1.3: Order is a collision-resistant hash function. is the integer field of order q, represented by {0,1,2,3,…,q-1}; Step 1.4: From the group The commitment key for zero-knowledge proof is randomly selected in and Step 1.5: Deploy a smart contract on the blockchain to verify the validity of the ballot.
3. The blockchain-based verifiable privacy voting method according to claim 1 is characterized in that: The specific implementation of step 2 is: candidates or voters choose their own private key Candidates or voters calculate their own public key pk = g sk , send the public key to the election body for registration.
4. The blockchain-based verifiable privacy voting method according to claim 3 is characterized in that: The step 3 comprises the following specific steps: Step 3.1: The election agency randomly generates a t -1 secret polynomial Step 3.2: For candidate registration, the election body signs the candidate’s public key with its own private key and sends it to the blockchain; Step 3.3: For voter registration, the election authority calculates the secret value The institution computes the commitment to the secret value where r i is a random number; the voter's public key and commitment signature are sent to the blockchain to complete the registration, and y i ,r i Delivered securely to voters.
5. The blockchain-based verifiable privacy voting method according to claim 4 is characterized in that: The step 4 comprises the following specific steps: Step 4.1: Voters obtain the public keys of all voters from the blockchain n v The number of all eligible voters and the public keys of the candidates Step 4.2: Voter V i Using the public keys of all voters, a public auxiliary value is calculated: Lagrangian system Step 4.3: For all candidates participating in the election Voter V i The scores assigned to them are Voters choose a random value r i,j and encrypt the assigned score using the candidate's public key After that, use your own secret value y i and the Lagrange coefficient λ i Obfuscate the ciphertext, and the final vote is 6. The blockchain-based verifiable privacy voting method according to claim 5 is characterized in that: The step 5 comprises the following specific steps: Step 5.1: For all votes, compute a dual zero-knowledge proof π that includes both range and sum Dual Guarantee relationship Established; The public reference string of the dual zero-knowledge proof is: The voting score Encoded as a binary vector All j∈{1,2,3,…,n c }, there is a vector inner product j ,2 m >=p i,j ; Step 5.2: Concatenate all the encoded voting scores into a vector calculate Step 5.3: Draw a random integer Random binary vector Random vector of integers Step 5.4: Calculate commitment and Use the commitment to calculate the hash value z = hash(B i,2 ,A,S,P,g,h) and k=hash(A,S,P,g,h) as the challenge value of the zero-knowledge proof protocol, where It is a vector of the second items of all votes of this voter; then calculate a commitment Step 5.5: Calculate the polynomial t(X) =<l(X),r(X)> =t0+t1X+t2X 2 , and for the coefficients t1, t2 of the polynomial, we promise The polynomials I(X) and r(X) are: Step 5.6: Calculate the hash value x = hash(A, S, H, P, g, h, T1, T2), calculate the value of the polynomial l(X), r(X) at point x to get l, r; calculate the inner product of the vector t =<l,r> ,τ x =τ2·x 2 +τ1·x+ω·x, μ=α+ρx;π Doual =(A,S,H,T1,T2,t,τ x ,μ,η r ,l,r); Step 5.7: For Ballot B i,j , calculate a zero-knowledge proof π that guarantees the correct obfuscation of the ciphertext i,j , guarantee relationship Established; voters randomly select four random numbers (u1, s1, u2, s2), calculate Then use the above commitment to calculate the hash value c = hash (B i,j ,A,S,H,P,g,h,θ1,θ2,θ3) as the challenge value of the zero-knowledge proof protocol; finally calculate β1=u1+c·y i ,β2=s1+c·r i ,β3=u2+c·p i,j , β4=s2+c·r i,j ; Step 5.8: Use the obfuscated ciphertext to verify the dual zero-knowledge proof of the validity of the score and the zero-knowledge proof of the correct obfuscated ciphertext π Dual =(A,S,H,T1,T2,t,τ x ,μ,η r ,l,r),{π i,j =(θ1,θ2,θ3,β1,β2,β3,β4)},j∈{1,2,…,n c }Sent to the blockchain to complete the vote.
7. The blockchain-based verifiable privacy voting method according to claim 6 is characterized in that: The step 6 comprises the following steps: Step 6.1: Smart contract is called to verify the dual zero-knowledge proof π Dual ; Smart contract calculates challenge value: z=hash(B i,2 ,A,S,P,g,h),k=hash(A,S,P,g,h),x=hash(A,S,H,P,g,h,T1,T2); Then calculate the following equation: Step 6.2: Check whether the following equation holds: E=h μ ·g l ·(h′) r t=<l,r> If the verification is passed, proceed to the next step; otherwise, the voter's ballot will be rejected; Step 6.3: The smart contract is called to verify the zero-knowledge proof that the ciphertext is correctly obfuscated For each ballot B i,j , the smart contract will calculate the value c = hash (B i,j ,A,S,H,P,g,h,θ1,θ2,θ3), and verify the equation: Is it established? For vote B i,j If the verification is successful, proceed to the next step; Otherwise, the voter's ballot will be refused. Step 6.4: The smart contract saves the votes and zero-knowledge proof on the blockchain.
8. The blockchain-based verifiable privacy voting method according to claim 7 is characterized in that: If no voter abstains, proceed to step 7, which includes the following steps: Step 7.1: After the voting phase, each candidate publishes his / her private key on the blockchain; candidates who do not publish their private keys are deemed to have abstained from voting; Step 7.2: All entities that want to count votes collect all votes on the blockchain; Step 7.3: For a candidate C j The vote count result is multiplied by all the votes of the candidate to obtain a decryptable ciphertext: Step 7.4: Using the candidate's private key, decrypt B j Get the candidate's score result 9. The blockchain-based verifiable privacy voting method according to claim 8, characterized in that: If any voter abstains from voting, proceed to step 8, which includes the following steps: Step 8.1: For all voters who have not abstained from voting, let the set of voters who have not abstained be J, and calculate the new ballots Step 8.2: Pick two random values And use the public keys of all voters who have not abstained to calculate a new Lagrangian coefficient Step 8.3: For each new ballot, calculate a zero-knowledge proof that ensures the new ballot is consistent with the previous ballot secret value. e=hash(a1,a2,A,S,H,P,g,h),z1=ξ1+r i,j +e,z2=ξ2+y i ·e,); Step 8.4: The smart contract verifies the validity of the new vote and determines the equation and Is it true? If it is true, proceed to the next step; otherwise, the blockchain refuses to accept the ballot; Step 8.5: After all voters have completed the calculation, multiply all the new votes and decrypt them using the candidate's private key to obtain the result of the vote count.
