Zero-knowledge Voting for True Democracy
Zero-knowledge voting is a blockchain-based remedy for two rapidly growing global deficits in our global electoral processes: privacy and truth. Let's dive in.
“Snatching of nomination papers, nomination of candidates in police reports, rejection of nominations on unprecedented scale, forcing PTI candidates to abandon the party under duress, all this evidence is available to show what the party has to endure,”
Shayan Bashir, PTI’s information secretary in the state of Punjab to Aljazeera.
Paper-based voting used during government elections is an expensive way of voting. It costs millions and billions of dollars to fund these elections that are never transparent or in any way close to true democracy.
Transportation of election materials like ballot papers is unsafe and these ballot papers can get mutilated by bad actors.
An assessment from the Brazilian election campaigns showed that candidates spent R$ 2.82 billion (US$ 740 million), 73% of which originated from government sources (party and election funds).
Campaign finance reports submitted to the Federal Election Commission reveal that during the 24 months of the 2019-2020 election cycle, presidential candidates amassed and expended a total of $4.1 billion, encompassing activities from January 1, 2019, to December 31, 2020.
$4.1 billion for a presidential election that was said to be undemocratic with lots of external influence unsustainable.
It is time to focus on blockchain-based zero-knowledge voting and get election voting right for once.
Zero-knowledge is a blockchain innovation that focuses on the privacy and security of data.
Zero-knowledge in voting would only cost a fraction of the current cost of election voting as it only requires a device and access to the internet for the voters. On the back end, it requires no transportation of election materials.
It is super secure and blockchains are public, allowing everybody to track everything on it.
Laszlo Fazekas built an anonymous voting system on the Ethereum blockchain using zero-knowledge proof from the comfort of his home. This anonymous voting system is usable to date proving that elections can be less expensive and eligible voters can securely vote from their rooms, especially in unsafe regions.
Zero-knowledge voting provides:
Privacy Protection: Confidential Voting and Ensuring Anonymity.
Voter Authentication: Proving Eligibility and Securing Identity.
Reduced Information Exposure
Verification Without Disclosure
Security Against Coercion
Efficiency and Scalability
These are just a few.
This article is a deep dive into the importance of zero-knowledge voting and how it can transform our current voting systems.
the basics of blockchain technology,
the basics of zero-knowledge,
the top 5 problems of voting,
Zero-knowledge voting,
ZK vote, a use case for zero-knowledge voting,
how zero-knowledge voting solves these problems, and
the challenges of zero-knowledge voting.
The Basics of Blockchain Technology
Today, you can create a YouTube account with a few clicks and create content. Since YouTube is a Web2 application, the data generated by users, such as video views, is owned and controlled by the platform provider (Google).
In Web3, instead of relying on a single centralized entity like YouTube, Web3 services operate on decentralized networks using blockchain technology.
Simply put, blockchain technology is an upgrade to the internet many people are used to.
Blockchain technology enables users to own and manage their data securely and share or restrict access as they see fit without intermediaries or third parties.
Blockchain is a shared, immutable ledger that facilitates recording transactions and tracking assets or data.
Enhancing blockchain technology is zero-knowledge technology,
The Basics of Zero-Knowledge Technology
Zero-knowledge is a powerful blockchain-related concept that revolutionizes information sharing and verification without revealing the data.
It is a groundbreaking approach that balances the need for privacy and security, allowing parties to verify information without revealing unnecessary or sensitive data.
Imagine a scenario where one person wants to prove to another that he knows a solution to a complex mathematical problem or surgical research without revealing the solution.
Zero-knowledge enables this by allowing the prover to convince the verifier of his knowledge without disclosing any information beyond the fact that he possesses the solution.
In an age where privacy concerns are paramount, zero-knowledge plays a pivotal role in developing secure and transparent systems by allowing individuals or entities to prove the authenticity of information without divulging unnecessary details.
This cryptographic technique has far-reaching applications in various fields, including digital identity, privacy-preserving transactions, and secure voting systems.
The Top 5 Problems of Voting
Voting, a cornerstone of democratic societies, is not without its challenges. Nations have struggled with voting during elections over the decades and centuries since adopting democracy.
Honestly, true democracy is still a dream. (pre and post) election violence has always occurred due to the problems of voting.
Ensuring Equal Access: One prominent challenge lies in ensuring equal access to the voting process.
Lack of Voter Verification: Verifying the identity of voters in electronic systems can be challenging.
Security and Trust: The integrity of the voting system is a paramount concern.
Vulnerability to Cyber Attacks: Electronic voting systems are susceptible to various cyber threats, including malware, phishing attacks, and distributed denial-of-service (DDoS) attacks.
Transparency and Trust Concerns: In some electronic voting systems, the lack of transparency in the software and hardware components can lead to doubts about the accuracy and fairness of the results.
Open-source technologies like zero-knowledge voting and transparent independent audits can help address transparency concerns and bolster public confidence in e-voting.
Though we cannot solve voting problems in one go, we can try. Zero-knowledge is a safe and quick path to this.
Zero-Knowledge Voting
Zero-knowledge voting presents a promising approach to addressing several challenges associated with traditional voting systems.
Zero-knowledge in voting would only cost a fraction of the current cost of election voting. It is super secure and blockchains are public, allowing everybody to track everything on it.
The only thing untrackable is who voted to which party, thanks to zero-knowledge ensuring voter privacy and security.
As seen in the above table, zero-knowledge voting falls in the remote electronic ballot and is under blockchain voting but not really under blockchain voting because it works off-chain.
Hearing the word off-chain for web3 natives may feel as if we are moving against the goal of web3, which is on-chain activities for true decentralization. It doesn’t mean we go off the blockchain.
Zero-knowledge operates as a Layer 2 solution, which means it functions on top of an existing blockchain (Layer 1) to address scalability issues: to process transactions more efficiently at a lower cost than executing everything directly on a Layer 1 blockchain like Ethereum.
Looking at the photo below, you can see that zero-knowledge works with a main chain like Ethereum.
With zero-knowledge, the bulk of the processing work and storage functions go off the main blockchain, all performed off-chain, reducing congestion and costs without losing the trustworthiness of an on-chain activity.
Using zero-knowledge is like having a congested highway (the main chain) and opting for less congested routes (zero-knowledge) to increase speed, scalability, and reduce cost.
In voting, the voters would prove they are eligible to vote.
All eligible voters could have an NFT in their password-protected voter account and log into the election portal where they can vote.
Here is a simple zero-knowledge voting sketch (not a framework) for an election:
Set up the elections database, election voting options, and modalities.
Create a front end for users to sign up to meet the eligibility criteria.
Every eligible voter should have a token or NFT assigned to each account.
Allocate the votes to each voter.
Cast a vote by each voter.
Tally the votes for publishing and the final result announcement.
For developers utilizing zero-knowledge, you can assert your knowledge of a piece of information without disclosing the information.
A circuit is essential in utilizing zero-knowledge. In this context, a circuit functions like a compact program featuring public inputs and outputs alongside private inputs.
The crucial aspect is that these private inputs, representing the knowledge not disclosed during verification, are why it is termed a zero-knowledge proof.
A simple circuit looks like this:
pragma circom 2.0.0;
include "node_modules/circomlib/circuits/bitify.circom";
include "node_modules/circomlib/circuits/pedersen.circom";
template Main() {
signal input nullifier;
signal output nullifierHash;
component nullifierHasher = Pedersen(248);
component nullifierBits = Num2Bits(248);
nullifierBits.in <== nullifier;
for (var i = 0; i < 248; i++) {
nullifierHasher.in[i] <== nullifierBits.out[i];
}
nullifierHash <== nullifierHasher.out[0];
}
component main = Main();
With this circuit, we can demonstrate our knowledge of the origin of the provided hash. The circuit involves a singular input, referred to as the nullifier, and produces a singular output known as the nullifier hash.
The default setting for inputs (the voter) is private, ensuring confidentiality, while outputs (the votes) are consistently public.
The zero-knowledge proof system can run the circuit and generate the proof and the outputs.
I know this may be too much for non-developers, but now back to how ZK voting solves the problems of elections.
ZK vote, a use case for zero-knowledge-based voting
ZK Vote
Zk Vote is a privacy voting system using zero-knowledge proofs via Polygon ID to ensure user anonymity and uniqueness of the vote.
The ZK vote is an innovative solution designed to authenticate voters securely and privately.
This system authenticates voters using verifiable private credentials through zero-knowledge proofs (ZKPs) without divulging specific data.
The ZK Vote front-end, built with nextJS, serves as the user interface for this voting system. It interacts with the Polygon ID, a component that issues and verifies verifiable private credentials. These credentials play a crucial role in generating a Zero-Knowledge Proof (ZKP) that attests to the fact that the voter's data qualifies them to vote. The ZKP ensures that the voter's data remains undisclosed.
The ZK Vote system incorporates a checking mechanism to determine whether a user has already cast their vote using the credentials stored in the Polygon ID.
Once the verification is successful, the voter is authorized to vote. This process ensures that each eligible user can securely and privately participate in the voting process, maintaining the confidentiality of their personal information throughout the authentication and voting stages.
The implemented PUSH Protocol technology gives notification for a successful vote.
Below is what a simple voting process with ZK should look like.
ZeroVote is another use case for zero-knowledge voting.
How Zero-Knowledge Voting Solves These Problems
Ensuring Equal Access: Zero-knowledge voting allows individuals to cast their votes without revealing the specific details of their choices ensuring privacy and reducing the risk of coercion or discrimination, promoting inclusivity in voting.
Security and Trust: Zero-knowledge enables vote verification and authenticity without disclosing the voter’s information just like using Polygon ID. This establishes a secure and private voting environment, addressing concerns related to tampering and ensuring the integrity of the electoral system.
Ensuring Universal Suffrage: By incorporating zero-knowledge voting mechanisms, voter registration, and participation barriers can be reduced. The privacy-preserving nature of zero-knowledge ensures that all eligible voters can participate without undue scrutiny or discrimination during paper-based elections.
Technological Advancements: Zero-knowledge voting utilizes blockchain technology, providing a decentralized and secure framework. The immutability of the blockchain ensures that votes are not tampered with, enhancing the overall security and reliability of the voting system.
Public Engagement and Apathy: Zero-knowledge voting can contribute to increased transparency in the voting process. As the technology allows for verifiable yet private transactions, individuals may have greater confidence in the fairness and accuracy of the electoral system, potentially fostering increased public trust and engagement.
While zero-knowledge voting holds great promise, its successful implementation requires careful consideration of technical, legal, and ethical aspects.
Additionally, educating the public/ voters about the benefits of zero-knowledge voting and addressing concerns related to its adoption is crucial for widespread acceptance. As technology evolves, zero-knowledge voting is a potential solution to the persistent challenges in traditional voting systems, offering a pathway to more secure, private, and inclusive elections.
The Challenges of Zero-Knowledge Voting
While zero-knowledge voting holds promise in addressing various challenges associated with traditional voting systems, it also comes with complexities and hurdles.
Technical Complexity: Integrating zero-knowledge into a voting system requires specialized technical expertise. Developing and deploying secure zero-knowledge protocols can be complex, and errors or vulnerabilities may compromise voting. The solution is to hire and train blockchain experts.
User Adoption and Education: Zero-knowledge voting relies on new technologies. Educating voters about the technology and assuring them of its security features is crucial for gaining public trust and acceptance.
Key Management: Zero-knowledge voting systems involve privacy and security. Security against theft or unauthorized access to a voter’s account is crucial, and compromise could have consequences.
Regulatory and Legal Frameworks: New technologies like zero-knowledge voting may require the establishment of legal and regulatory frameworks to ensure compliance with election laws.
Trust and Auditability: While zero-knowledge voting ensures privacy, it may introduce challenges in ensuring transparency and auditability. Balancing the need for voter privacy with verifying the integrity of the election process is a delicate task.
Addressing these challenges requires collaboration among developers, technologists, policymakers, and the public.
While zero-knowledge voting offers potential solutions to many issues in traditional voting, careful consideration and continuous refinement are essential for the successful and widespread adoption of these technologies in real-world electoral systems.
Conclusion
Zero-knowledge (voting stands at the forefront of innovative solutions for secure, private, and verifiable electoral processes.
Zero-knowledge voting ensures that individuals can authenticate their eligibility to vote without compromising the confidentiality of their personal information.
As the world continues to explore novel avenues in digital governance, zero-knowledge voting emerges as a beacon, providing a robust framework for the future of trustworthy and privacy-preserving elections.
📢Hit that subscribe button!
✌Thanks for reading!
Let’s connect here: https://linktr.ee/iamini
Disclaimer
This article is for information & educational purposes.
References
https://www.fec.gov/updates/statistical-summary-24-month-campaign-activity-2019-2020-election-cycle/
https://github.com/luanpontolio/zk-voting-system
https://ethglobal.com/showcase/zk-vote-9ipgt
https://github.com/advaita-saha/zk-Voting
https://hackernoon.com/zero-knowledge-proofs-in-blockchain-voting
https://www.aljazeera.com/news/2024/1/12/election-engineering-is-pakistans-february-vote-already-rigged
https://people.csail.mit.edu/rivest/pubs/PSNR20.pdf?ref=hackernoon.com
https://thebojda.medium.com/how-i-built-an-anonymous-voting-system-on-the-ethereum-blockchain-using-zero-knowledge-proof-d5ab286228fd
https://betterprogramming.pub/understanding-zero-knowledge-proofs-through-the-source-code-of-tornado-cash-41d335c5475f
https://github.com/TheBojda/zktree-vote/commit/7ba0f58558a8018cfdce2ced050678c877ff8b88#diff-a07c89006cfeba4f1e14dbd77b7103bc177dfb75c9cf715fdc97fd27cd061372
https://blog.o1labs.org/zero-knowledge-proofs-for-voting-3c6a6d5d89db
https://cointelegraph.com/magazine/crypto-zero-knowledge-voting-finance/
https://ethresear.ch/t/zkconvex-a-large-scale-anonymous-electronic-voting-scheme-based-on-zk-snarks/18461
https://www.electionsecurityglossary.com/glossary/paper-based-voting-system
https://www.linkedin.com/pulse/introducing-zk-merkle-tree-enabling-anonymous-voting-ethereum-kolhe/
https://chinmaysonar.github.io/Projects/bc-zk-report.pdf
https://blog.aragon.org/technical-deep-dive-anonymous-voting-with-zk-snarks/
https://noir-by-example.org/gadgets/zk-voting/
https://coincodex.com/article/37012/new-zk-powered-voting-and-survey-platform-to-launch-on-mina-protocol/
https://github.com/TheBojda/zktree-vote
https://www.researchgate.net/figure/Comparison-of-traditional-electronic-and-blockchain-e-voting_fig2_369044354
https://devfolio.co/projects/zerovote-or-zkpowered-anon-voting-devconistanbul-7db4