A Scalable Implementation of Anonymous Voting over Ethereum Blockchain
Abstract
:1. Introduction
1.1. Motivation
1.2. Previous Work
1.3. Contribution of This Paper
- (1)
- We devised and implemented a scalable anonymous voting system for multiple candidates on the Ethereum blockchain. The anonymous voting system by McCorry, Shahandashti, and Hao [1] was also implemented on Ethereum, but only works for a yes/no vote for a single candidate. Hao, Ryan, and Zielinski [6] devised an anonymous voting protocol for multiple candidates, but it is not meant for blockchain implementation.
- (2)
- We propose a solution to the division overflow problem in encryption of voting values for anonymity. Voter publishes as an encrypted voting value to guarantee anonymity. The represents whom voter votes for and, thus, should not be revealed. For a yes/no vote in a single candidate case [1], vi is one of {1,0}.For multiple candidates, can be encoded to facilitate tallying. To compute voter need collect for all and perform a division [1,6]. In regards to huge numbers resulting from encryption, the division may introduce a round-off error. Modular division using the cyclic group [16] can be used to prevent this. Modular division can be performed by a multiplication by the inverse of a multiplicand.However, computing the multiplicative inverse in the modular computation takes time using the extended Euclidean algorithm. This limits scalability of the scheme since an arbitrarily large is usually chosen for encryption [17].To circumvent this, we remove computing the multiplicative inverse. We replace the modular division by a multiplication exploiting a feature of the cyclic group. This removes time, enhancing scalability of our scheme.
- (3)
- We devised a tallying scheme that is superior to known schemes [6,7] in terms of time complexity. The tallying is individually performed in each voter. A tally value is constructed in each voter after it collects all of the encrypted voting values from all other voters. Each voter should resolve this tally value to identify how many votes each candidate has won.The tallying scheme for multiple candidates used in Hao, Ryan, and Zielinski [6] is not scalable if implemented in Ethereum. The tally value grows enormously, even for the modest number of voters or candidates. The tallying requires a division involving the tally number and may result in division overflow.One way to avoid this is to precompute all possible mappings between the tally values and the corresponding tally results (i.e., how many votes each candidate has won). The size of the mapping table is for candidates and voters. time and memory space are needed for construction of this table. This can grow very large, even for moderate values of and . We devised a new way to encrypt voting values and a new scheme to encode candidates to reduce the time complexity from to .
- (4)
- We proposed a solution to the tallying failure due to “no votes” from registered voters. We identified this problem from a previous voting scheme for multiple candidates [6]. The previous tallying scheme was unable to retrieve tally value if one or more registered voters failed to send their encrypted voting values. In reality, we may have this situation more often than not.
2. Mathematical Foundation
2.1. ZKP (Zero-Knowledge Proof)
2.2. Non-Interactive Zero-Knowledge Proof (NIZKP)
2.3. Two-Round Referenda
2.4. Extend to Multiple Candidates
2.5. Ethereum
- An externally owned account (user-controlled) is controlled by a user. We denote these accounts by EOA.
- A contract account is controlled by the smart contract itself. We denote a contract account by CA.
- From: a signature from the owner of the EOA is needed to authorize the transaction.
- To: the receiver of the transaction can either be an EOA or CA.
- Data: the code to deploy a new contract or to execute transactions for the contract.
- Gas price: the conversion rate from gas to ether currency.
- Total gas: the maximum amount of gas that may be consumed by the transaction.
- Nonce: a counter that is incremented per each new transaction from an account.
3. Technical Bottlenecks in Ethereum Implementation and Proposed Solutions
3.1. Division Problem in Encryption of Voting Values
Our Solution
3.2. Large Time Complexity in Tallying
Our Solution
3.3. Tallying Failure Due to “No Votes” from Registered Voters
Our Solution
4. Performance Evaluation
4.1. Scalability
4.2. Gas Cost
4.3. Computational Burden for Tallying
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- McCorry, P.; Shahandashti, S.F.; Hao, F. A smart contract for boardroom voting with maximum voter privacy. In Proceedings of the International Conference on Financial Cryptography and Data Security, Sliema, Malta, 3–7 April 2017; Springer: Cham, Switzerland, 2017; pp. 357–375. [Google Scholar]
- Buterin, V. A Next-Generation Smart Contract and Decentralized Application Platform; White Paper. 2014, Volume 3. Available online: https://blockchainlab.com/pdf/Ethereum_white_paper-a_next_generation_smart_contract_and_decentralized_application_platform-vitalik-buterin.pdf (accessed on 2 November 2020).
- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 2 November 2020).
- Jakobsson, M.; Juels, A. Proofs of work and bread pudding protocols. In Secure Information Networks; Springer: Boston, MA, USA, 1999; pp. 258–272. [Google Scholar]
- Al Khalil, F.; Butler, T.; O’Brien, L.; Ceci, M. Trust in smart contracts is a process, as well. In Proceedings of the International Conference on Financial Cryptography and Data Security, Sliema, Malta, 3–7 April 2017; Springer: Cham, Switzerland, 2017; pp. 510–519. [Google Scholar]
- Hao, F.; Ryan, P.Y.; Zieliński, P. Anonymous voting by two-round public discussion. IET Inf. Secur. 2010, 4, 62–67. [Google Scholar] [CrossRef] [Green Version]
- Baudron, O.; Fouque, P.A.; Pointcheval, D.; Stern, J.; Poupard, G. Practical multi-candidate election system. In Proceedings of the Twentieth Annual ACM Symposium on Principles of Distributed Computing, Newport, RI, USA, 26–28 August 2001; pp. 274–283. [Google Scholar]
- Rosic, A. What Is Ethereum Gas? Available online: https://blockgeeks.com/guides/ethereum-gas/ (accessed on 2 November 2020).
- Shahzad, B.; Crowcroft, J. Trustworthy electronic voting using adjusted blockchain technology. IEEE Access 2019, 7, 24477–24488. [Google Scholar] [CrossRef]
- Khan, K.M.; Arshad, J.; Khan, M.M. Investigating performance constraints for blockchain based secure e-voting system. Future Gener. Comput. Syst. 2020, 105, 13–26. [Google Scholar] [CrossRef]
- Dimitriou, T. Efficient, coercion-free and universally verifiable blockchain-based voting. Comput. Netw. 2020, 174, 107234. [Google Scholar] [CrossRef]
- Park, S.; Specter, M.; Narula, N.; Rivest, R.L. Going from bad to worse: From internet voting to blockchain voting. J. Cybersecur. 2021, 7, tyaa025. [Google Scholar] [CrossRef]
- Lovejoy, J. Bitcoin Gold (btg) Was 51% Attacked. January 2020. Available online: https://gist.github.com/metalicjames/71321570a105940529e709651d0a9765 (accessed on 6 January 2021).
- Nesbitt, M. Deep Chain Reorganization Detected on Ethereum Classic (etc.). January 2019. Available online: https://blog.coinbase.com/ethereum-classic-etc-is-currently-being-51-attacked-33be13ce32de (accessed on 6 January 2021).
- Nesbitt, M. Vertcoin (vtc) Was Successfully 51% Attacked. December 2018. Available online: https://medium.com/coinmonks/vertcoin-vtc-is-currently-being-51-attacked-53ab633c08a4 (accessed on 6 January 2021).
- Morgado, M. Modular Arithmetic. Available online: http://math.uchicago.edu/~may/REU2014/REUPapers/Morgado.pdf (accessed on 10 September 2015).
- Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithms, 2nd ed.; MIT Press: Cambridge, MA, USA, 2001; pp. 805–813. [Google Scholar]
- Goldreich, O.; Oren, Y. Definitions and properties of zero-knowledge proof systems. J. Cryptol. 1994, 7, 1–32. [Google Scholar] [CrossRef]
- Schnorr, C.P. Efficient identification and signatures for smart cards. In Proceedings of the Conference on the Theory and Application of Cryptology, Houthalen, Belgium, 10–13 April 1989; Springer: New York, NY, USA, 1989; pp. 239–252. [Google Scholar]
- Fiat, A.; Shamir, A. How to prove yourself: Practical solutions to identification and signature problems. In Proceedings of the Conference on the Theory and Application of Cryptographic Techniques, Santa Barbara, CA, USA, 11–15 August 1986; Springer: Berlin/Heidelberg, Germany, 1986; pp. 186–194. [Google Scholar]
- Stinson, D.R.; Paterson, M. Cryptography: Theory and Practice; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar]
- Lenstra, A.K.; Lenstra, H.W., Jr. Algorithms in number theory. In Algorithms and Complexity; Elsevier: Amsterdam, The Netherlands, 1990; pp. 673–715. [Google Scholar]
- Kiayias, A.; Yung, M. Self-tallying elections and perfect ballot secrecy. In Proceedings of the International Workshop on Public Key Cryptography, Paris, France, 12–14 February 2002; Springer: Berlin/Heidelberg, Germany, 2002; pp. 141–158. [Google Scholar]
- Groth, J. Efficient maximal privacy in boardroom voting and anonymous broadcast. In Proceedings of the International Conference on Financial Cryptography, Key West, FL, USA, 9–12 February 2004; Springer: Berlin/Heidelberg, Germany, 2004; pp. 90–104. [Google Scholar]
- Cramer, R.; Damgård, I.; Schoenmakers, B. Proofs of partial knowledge and simplified design of witness hiding protocols. In Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 21–25 August 1994; Springer: Berlin/Heidelberg, Germany, 1994; pp. 174–187. [Google Scholar]
- Cramer, R.; Gennaro, R.; Schoenmakers, B. A secure and optimally efficient multi-authority election scheme. Eur. Trans. Telecommun. 1997, 8, 481–490. [Google Scholar] [CrossRef] [Green Version]
- Stanley, R.P. Enumerative Combinatorics, 2nd ed.; Cambridge University Press: Cambridge, UK, 2011; Volume 1, Chapters 1–3. [Google Scholar]
- Savelyev, A. Contract law 2.0:‘Smart’contracts as the beginning of the end of classic contract law. Inf. Commun. Technol. Law 2017, 26, 116–134. [Google Scholar] [CrossRef]
- Bourbaki, N.; Algebra, I. Elements of Mathematics; Translated from the French; Springer: Berlin/Heidelberg, Germany, 1989; Chapters 1–3. [Google Scholar]
- Truffle Suite. “Configuration”, Truffle Suite. Available online: https://truffleframework.com/docs/advanced/configuration (accessed on 7 April 2018).
- Remix. Web-Based User Interface. 2018. Available online: https://remix.ethereum.org/ (accessed on 7 April 2018).
Field | Example |
---|---|
From | EOA (External Owned Account) A |
To | CA (Contract Address) |
Gas Price | ether |
Total Gas | 2,000,000 |
Nonce | 35 |
Data | Contract code made by A |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Song, J.-G.; Moon, S.-J.; Jang, J.-W. A Scalable Implementation of Anonymous Voting over Ethereum Blockchain. Sensors 2021, 21, 3958. https://doi.org/10.3390/s21123958
Song J-G, Moon S-J, Jang J-W. A Scalable Implementation of Anonymous Voting over Ethereum Blockchain. Sensors. 2021; 21(12):3958. https://doi.org/10.3390/s21123958
Chicago/Turabian StyleSong, Jae-Geun, Sung-Jun Moon, and Ju-Wook Jang. 2021. "A Scalable Implementation of Anonymous Voting over Ethereum Blockchain" Sensors 21, no. 12: 3958. https://doi.org/10.3390/s21123958
APA StyleSong, J. -G., Moon, S. -J., & Jang, J. -W. (2021). A Scalable Implementation of Anonymous Voting over Ethereum Blockchain. Sensors, 21(12), 3958. https://doi.org/10.3390/s21123958