Design and implementation of a smart-contract voting system based on zero-knowledge proof
-
-
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.
-
-