区块链

基于区块链的公平和可验证电子投票智能合约

展开
  • 重庆邮电大学 软件工程学院, 重庆 400060

收稿日期: 2022-10-25

  网络出版日期: 2023-08-02

基金资助

国家重点研发计划(No. 2021YFF0704102)资助

Fair and Verifiable Voting Smart Contract Based on Blockchain

Expand
  • College of Software Engineering, Chongqing University of Posts and Telecommunication, Chongqing 400060, China

Received date: 2022-10-25

  Online published: 2023-08-02

摘要

针对等权投票机制中存在的公平性缺陷和重放攻击问题,提出一种基于区块链的加密证明方案。首先,将投票流程和规则写入智能合约,包括时间戳和财务激励,以保证投票按时进行。规定每个投票者负责自己的地址密钥生成,构建基于地址公钥的Merkle树来证明投票者身份的合法性且保证交易数据不被篡改。同时利用哈希函数生成随机序列预防重复投票。其次,考虑到最终目的是得到求和结果,利用区块链公告板和Paillier算法加密存储选票,在克服公平性缺陷的同时提升加解密效率。最后,考虑到交易合法性和计算结果准确性问题,利用区块链的不可篡改特性,构造基于zk-SNARK的零知识证明。将需要证明的现实问题转化为特定输出的计算问题,将加密算法从零知识证明电路中抽离,不会泄露验证数据的信息。理论分析和实验结果表明,所提出的方案与已有方案相比显著提高了投票的安全和隐私,且具有更低的时间开销和成本消耗。

本文引用格式

刘红, 张靖宇, 雷梦婷, 肖云鹏 . 基于区块链的公平和可验证电子投票智能合约[J]. 应用科学学报, 2023 , 41(4) : 541 -562 . DOI: 10.3969/j.issn.0255-8297.2023.04.001

Abstract

This paper proposes a blockchain-based encryption-proof scheme to address the fairness flaws and replay attacks in the equal voting mechanism. First, the voting process and rules are written into smart contracts, including time stamps and financial incentives, to ensure that voting takes place on time. It is stipulated that each voter is responsible for his address key generation. A Merkle tree based on the address public key is constructed to prove the legitimacy of the voter’s identity. Meanwhile, a random sequence is generated by hash to prevent repeat voting. Second, the blockchain bulletin board and Paillier algorithm encrypt and store votes to improve the encryption and decryption rate while overcoming the fairness defect. Finally, to ensure transaction legality and calculation accuracy, a zero-knowledge proof based on zk-SNARK is constructed based on the immutable characteristics of the blockchain. In this way, the real problem to be proved is transformed into a calculation problem with specific output, and the encryption algorithm is separated from the zero-knowledge proof circuit, so that the information of the verification data will not be disclosed. Theoretical analysis and experimental results show that the proposed scheme significantly improves the security and privacy of voting and has lower time and cost consumption.

参考文献

[1] 祝烈煌, 高峰, 沈蒙, 等. 区块链隐私保护研究综述[J]. 计算机研究与发展, 2017, 54(10):2170-2186. Zhu L H, Gao F, Shen M, et al. Survey on privacy preserving techniques for blockchain technology[J]. Journal of Computer Research and Development, 2017, 54(10):2170-2186. (in Chinese)
[2] 刘敖迪, 杜学绘, 王娜, 等. 区块链技术及其在信息安全领域的研究进展[J]. 软件学报, 2018, 29(7):2092-2115. Liu A D, Du X H, Wang N, et al. Blockchain technology and its research progress in the field of information security[J]. Journal of Software, 2018, 29(7):2092-2115. (in Chinese)
[3] 刘明达, 陈左宁, 拾以娟, 等. 区块链在数据安全领域的研究进展[J]. 计算机学报, 2021, 44(1):1-27. Liu M D, Chen Z N, Shi Y J, et al. Research progress of blockchain in the field of data security[J]. Chinese Journal of Computers, 2021, 44(1):1-27. (in Chinese)
[4] Liu Z, Qian P, Wang X, et al. Combining graph neural networks with expert knowledge for smart contract vulnerability detection[J]. IEEE Transactions on Knowledge and Data Engineering, 2021, 35(2):1296-1310.
[5] Zou W, Lo D, Kochhar P S, et al. Smart contract development:challenges and opportunities[J]. IEEE Transactions on Software Engineering, 2019, 47(10):2084-2106.
[6] Zhao Z C. How to vote privately using bitcoin[C]//International Conference on Information and Communications Security. Cham:Springer, 2015:82-96.
[7] Cruz J P, Kaji Y. E-voting system based on the bitcoin protocol and blind signatures[J]. IPSJ Transactions on Mathematical Modeling and Its Applications, 2017, 10(1):14-22.
[8] Kiayias A, Yung M. Self-tallying elections and perfect ballot secrecy[C]//Proceedings of the 5th International Workshop on Practice and Theory in Public Key Cryptosystems:Public Key Cryptography (PKC'02). Berlin:Springer, 2002:141-158.
[9] Mccorry P, Shahandashti S F, Hao F. A smart contract for boardroom voting with maximum voter privacy[C]//International Conference on Financial Cryptography and Data Security. Berlin:Springer, 2017, 10322:357-375.
[10] Panja S, Bag S, Hao F, et al. A smart contract system for decentralized Borda count voting[J]. IEEE Transactions on Engineering Management, 2020, 67(4):1323-1339.
[11] Yang X, Yi X, Nepal S, et al. Blockchain voting:publicly verifiable online voting protocol without trusted tallying authorities[J]. Future Generation Computer Systems, 2020, 112:859-874.
[12] Takabatake Y, Kotani D, Okabe Y. An anonymous distributed electronic voting system using Zerocoin[J]. IEICE Technical Report, 2016, 116(282):127-131.
[13] Yu B, Liu J K, Sakzad A, et al. Platform-independent secure blockchain-based voting system[C]//Information Security:21st International Conference, ISC 2018, Guildford, UK. Springer, 2018:369-386.
[14] Zaghloul E, Li T, Ren J. D-BAME:distributed blockchain-based anonymousmobile electronic voting[J]. IEEE Internet of Things Journal, 2021, 8(22):16585-16597.
[15] Groth J. Efficient maximal privacy in boardroom voting and anonymous broadcast[C]//International Conference on Financial Cryptography. Berlin:Springer, 2004:90-104.
[16] Li Y, Susilo W, Yang G, et al. A blockchain-based self-tallying voting protocol in decentralized IoT[J]. IEEE Transactions on Dependable and Secure Computing, 2020, 19(1):119-130.
[17] Li H, Li Y, Yu Y, et al. A blockchain-based traceable self-tallying E-voting protocol in AI era[J]. IEEE Transactions on Network Science and Engineering, 2020, 8(2):1019-1032.
[18] Chondros N, Zhang B, Zacharias T, et al. Distributed, end-to-end verifiable, and privacypreserving internet voting systems[J]. Computers & Security, 2019, 83:268-299.
[19] Sasson E B, Chiesa A, Garman C, et al. Zerocash:decentralized anonymous payments from bitcoin[C]//2014 IEEE Symposium on Security and Privacy. Berkeley, CA, USA:IEEE, 2014:459-474.
[20] Anstreicher K, Brixius N, Goux J P, et al. Solving large quadratic assignment problems on computational grids[J]. Mathematical Programming, 2002, 91(3):563-588.
[21] Groth J, Kohlweiss M, Maller M, et al. Updatable and universal common reference strings with applications to zk-SNARKs[C]//Annual International Cryptology Conference. Cham:Springer, 2018:698-728.
[22] Paillier P. Public-key cryptosystems based on composite degree residuosity classes[C]//International Conference on the Theory and Applications of Cryptographic Techniques. Berlin:Springer, 1999:223-238.
[23] Bernhard D, Cortier V, Galindo D, et al. SoK:a comprehensive analysis of game-based ballot privacy definitions[C]//2015 IEEE Symposium on Security and Privacy. San Jose, CA, USA:IEEE, 2015:499-516.
[24] Groth J. On the size of pairing-based non-interactive arguments[C]//Annual International Conference on the Theory and Applications of Cryptographic Techniques. Berlin:Springer, 2016:305-326.
[25] Groth J, Maller M. Snarky signatures:minimal signatures of knowledge from simulationextractable SNARKs[C]//Annual International Cryptology Conference. Cham:Springer, 2017:581-612.
[26] SCIPR-Lab. Libsnark[EB/OL].[2022-10-25]. https://github.com/scipr-lab/libsnark.
[27] Ghareh C J, Papadopoulos D. New constructions for forward and backward private symmetric searchable encryption[C]//Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security. New York, NY, USA:ACM, 2018:1038-1055.
文章导航

/