殷红建, 朱岩, 王静, 郭光来, 陈娥. 基于零知识证明的智能合约投票系统设计与实现[J]. 工程科学学报, 2023, 45(4): 632-642. DOI: 10.13374/j.issn2095-9389.2022.07.07.001
引用本文: 殷红建, 朱岩, 王静, 郭光来, 陈娥. 基于零知识证明的智能合约投票系统设计与实现[J]. 工程科学学报, 2023, 45(4): 632-642. DOI: 10.13374/j.issn2095-9389.2022.07.07.001
YIN Hong-jian, ZHU Yan, WANG Jing, GUO Guang-lai, CHEN E. Design and implementation of a smart-contract voting system based on zero-knowledge proof[J]. Chinese Journal of Engineering, 2023, 45(4): 632-642. DOI: 10.13374/j.issn2095-9389.2022.07.07.001
Citation: YIN Hong-jian, ZHU Yan, WANG Jing, GUO Guang-lai, CHEN E. Design and implementation of a smart-contract voting system based on zero-knowledge proof[J]. Chinese Journal of Engineering, 2023, 45(4): 632-642. DOI: 10.13374/j.issn2095-9389.2022.07.07.001

基于零知识证明的智能合约投票系统设计与实现

Design and implementation of a smart-contract voting system based on zero-knowledge proof

  • 摘要: 作为一种具有法律约束力的程序,智能合约为电子投票系统提供了可信执行平台.然而,由于合约部署在公开透明的区块链上,这将为投票内容的有效性与隐私性带来巨大威胁.为了解决上述问题,基于交互式零知识证明技术设计了智能合约投票系统.首先,提出了一个新的交互式零知识集合成员关系证明协议,使得投票者在不泄露投票内容的前提下,完成对投票内容有效性的验证,从而避免无效选票对投票系统的影响.其次,本文通过智能合约规范语言SPESC对投票合约进行描述并对投票各个阶段的触发条件进行限定,通过将合约以JAR包形式上传至区块链,实现智能合约投票系统的部署和自动化执行.最后,对智能合约投票系统的性能进行分析,实验结果表明该系统投票和计票阶段均可高效实施,为密码协议构造技术与智能合约投票系统的有效结合提供参考.

     

    Abstract: As a legally binding computer program, smart contracts are stored on the blockchain and can be automatically executed according to the contract terms. These features of smart contracts provide a trusted execution environment for the electronic voting system. However, since the contract is deployed on an open and transparent blockchain, this causes a considerable threat to the validity and privacy of the voting content. However, due to the openness of the blockchain network, any node linked to the network can obtain information concerning contract transactions on the chain without restriction, which greatly threatens the validity and privacy of the voting content. To address this problem, a smart-contract voting system has been designed. First, we construct a new interactive zero-knowledge set membership proof protocol (ZSMPP) based on the discrete logarithm problem. Using ZSMPP in the design of the smart-contract voting system, the voter can verify the voting content validity to the initiator without disclosing the voting content itself to avoid the impact of invalid votes. Moreover, we prove that the proposed protocol is complete and has zero knowledge. Second, we describe the voting contract by the specification language of smart-contract (SPESC) and limit the trigger conditions of stages of the voting system through contract terms. By deploying the voting contract to the blockchain as a JAR file, the proposed smart-contract voting system can be automatically executed in accordance with the predefined contract terms. Additionally, we further introduce the execution process and related algorithms of the four stages of the proposed voting system and show the related execution results in the form of contract transactions. Furthermore, we analyzed five security features of the proposed voting protocol. Particularly, the validity of the ballot content is ensured by the zero-knowledge of our protocol, which can prevent invalid votes from affecting the system. The privacy of the ballot ensures that the voting content is undisclosed either in the verification or counting stage. Uniqueness ensures that each voter can only vote once. Supervision-free means that there are no trusted supervisors in the proposed voting protocol. Self-counting indicates that smart-contract programs automatically implement the counting process. Finally, the performance of the proposed smart-contract voting system is analyzed. The experimental results show that both the voting and counting stages of our voting system can be implemented efficiently. Moreover, our smart-contract voting system can provide a reference for effectively combining the cryptographic protocol construction technology and smart-contract voting system.

     

/

返回文章
返回