Journal of Applied Sciences ›› 2023, Vol. 41 ›› Issue (4): 541-562.doi: 10.3969/j.issn.0255-8297.2023.04.001

• Blockchain • Previous Articles     Next Articles

Fair and Verifiable Voting Smart Contract Based on Blockchain

LIU Hong, ZHANG Jingyu, LEI Mengting, XIAO Yunpeng   

  1. College of Software Engineering, Chongqing University of Posts and Telecommunication, Chongqing 400060, China
  • Received:2022-10-25 Published:2023-08-02

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.

Key words: blockchain, smart contract, zero-knowledge proof, Paillier algorithm, voting protocol

CLC Number: