Blockchain Based E - Voting System
Blockchain Based E - Voting System
A project report
submitted in partial fulfilment of the requirements for the award of the degree of
Bachelor of Technology
in
Computer Science & Engineering
By
HARSHIT KUMAR
B Tech VII Semester
Exam Roll No.:25780542
Enrolment No.:U2151052
December, 2024
CANDIDATE’S DECLARATION
I, Harshit Kumar, hereby certify that the work, which is being presented in the report,
entitled Blochchain Based E-Voting System, in partial fulfillment of the requirement for the
award of the Degree of Bachelor of Technology( Computer Science & Engineering)
submitted to the institution is an authentic record of my own work carried out during the
period August 2024 to December2024 under the supervision of Dr. Sudhakar Singh at the
Department of Electronics and Communication, University of Allahabad. The matter
presented in this report has not been submitted elsewhere for the award of any other degree or
diploma from any Institutions.
I declare that I have cited the reference about the text(s) /equation(s) from where they
have been taken. I further declare that I have not willfully lifted up some other’s work, para,
text, data, results, etc. reported in the journals, books, magazines, reports, dissertations,
theses, etc., or available at web-sites and included them in this report and cited as my own
work.
2
CERTIFICATE FROM THE SUPERVISOR
This is to certify that the Mr. Harshit kumar has carried out this project/dissertation entitled
Blockchain Based E Voting System under my supervision.
3
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to all those who contributed to the completion
of this project on the Blockchain-Based E-Voting System.
First and foremost, I extend my heartfelt thanks to my supervisor Dr. Sudhakar Singh, for
their invaluable guidance, support, and constructive feedback throughout the development of
this project. Their expertise and encouragement have been instrumental in shaping the
direction and outcome of this work.
I would also like to acknowledge the contributions of my colleagues and peers, whose
discussions and insights helped refine my understanding of the challenges and possibilities
within the blockchain and e-voting domains. Their collaboration and thoughtful suggestions
have been vital to this project.
Finally, I would like to thank my family and friends for their continuous support and
encouragement, without which the completion of this project would not have been possible.
Their patience and understanding during the course of this work have been a great source of
motivation.
This project would not have been possible without the contributions and support of all the
individuals mentioned above. Thank you.
HARSHIT KUMAR
Bachelor of Technology
(Computer Science & Engineering)
4
ABSTRACT
Elections are fundamental to democratic governance, yet traditional voting systems often face
challenges such as voter fraud, lack of transparency, and limited accessibility. Blockchain
technology offers an innovative solution to address these issues by providing a secure,
transparent, and decentralized framework for e-voting. This project explores the design and
implementation of a Blockchain-Based E-Voting System aimed at enhancing electoral
integrity, fostering trust, and improving accessibility. By leveraging the immutability and
distributed nature of blockchain, the system ensures that votes are tamper-proof and
verifiable. Cryptographic techniques, such as zero-knowledge proofs, protect voter
anonymity while allowing voters to confirm their votes were correctly recorded.
The proposed system consists of several key components, including a voter authentication
mechanism, a user-friendly voting interface, a blockchain network for recording votes, and
smart contracts to automate vote tallying and ensure integrity. Voter authentication employs
biometric verification and two-factor authentication to ensure only eligible voters participate.
The blockchain network employs a consensus mechanism, such as Proof of Stake, to validate
transactions and maintain trust among decentralized nodes. Additionally, smart contracts
streamline the electoral process, from vote recording to real-time result computation, while
ensuring accuracy and transparency.
5
TABLE OF CONTENTS
ABSTRACT ...........................................................................................................................5
LIST OF ABBREVIATIONS ................................................................................................8
CHAPTER 1 INTRODUCTION
6
CHAPTER 5 RESULTS AND DISCUSSION
7
LIST OF ABBREVIATIONS
8
CHAPTER 1
INTRODUCTION
Elections play a vital role in shaping democratic governance by enabling citizens to exercise
their right to vote. However, traditional voting systems, whether paper-based or electronic,
often face significant challenges, including voter fraud, lack of transparency, logistical
inefficiencies, and limited accessibility for remote or differently-abled individuals. These
issues undermine public trust in the electoral process, highlighting the urgent need for
innovative solutions. Blockchain technology, originally developed to support cryptocurrency
transactions, has emerged as a transformative tool for various applications, including e-
voting. Its decentralized, immutable, and transparent nature addresses many of the
shortcomings of traditional voting systems. By leveraging blockchain, this project seeks to
develop a secure and trustworthy e-voting platform that enhances accessibility and fosters
confidence in electoral outcomes. The motivation for this project lies in the potential to
revolutionize the voting process, making it more secure, efficient, and inclusive.
Traditional voting systems are prone to vulnerabilities such as fraud, tampering, and lack of
transparency, which can lead to disputed results and diminished public trust. Moreover,
existing systems often fail to accommodate voters who are geographically dispersed or
physically unable to visit polling stations. This project aims to address these issues by
developing a blockchain-based e-voting system that ensures security, transparency, and
accessibility. It seeks to provide a verifiable and auditable platform where voters can confirm
the integrity of their votes. By implementing cryptographic techniques, the system will
protect voter anonymity while maintaining vote integrity. Furthermore, the design will
prioritize scalability, making it suitable for large-scale elections, and inclusivity by enabling
remote voting through internet-enabled devices.
9
1.3 PROJECT CATEGORY
This project falls under the category of Networking and Cryptography, with a focus on
blockchain technology. It also integrates elements of Artificial Intelligence to enhance
security and efficiency.
To implement this system, several technologies and platforms will be utilized. The
blockchain framework, such as Ethereum or Hyperledger, will be employed for decentralized
vote recording and management. Smart contracts will automate the voting process and ensure
result integrity. Cryptographic tools, such as zero-knowledge proofs and advanced encryption
algorithms, will be used to ensure security and anonymity. For frontend development,
frameworks like React.js or Angular will provide a user-friendly voting interface, while
backend development will rely on Node.js or Python to manage server-side logic. High-
performance servers will host blockchain nodes, and secure, internet-enabled devices will
facilitate voter access. Software requirements include Linux or Windows operating systems,
development tools like Visual Studio Code and Docker for containerization, and Git for
version control. NoSQL databases like MongoDB will manage ancillary data.
10
CHAPTER 2
Estonia's i-Voting system, one of the earliest and most notable initiatives in online voting,
introduced the concept of remote voting in national elections. Although it did not incorporate
blockchain technology, i-Voting set an important precedent for secure digital voting. Despite
its successes, the system’s centralized architecture posed significant risks, notably its
vulnerability to single points of failure. Blockchain's decentralized nature offers a solution to
these challenges, enhancing resilience and reducing susceptibility to central authority
manipulation, while providing higher assurance in election integrity.
Voatz, a blockchain-based voting application, has been piloted in several U.S. elections and
serves as a practical demonstration of the potential for decentralized systems in remote
voting. Its blockchain backbone ensures tamper-proof vote recording and offers accessibility
through mobile platforms, which could increase voter turnout and participation. However, the
platform’s closed-source codebase has raised significant concerns regarding transparency and
auditability, which are crucial to maintaining public trust in the voting process. Additionally,
vulnerabilities discovered in its mobile app have underscored the importance of rigorous
security audits, open-source development, and comprehensive testing to ensure robustness in
real-world deployments.
11
factors for success in blockchain-based voting systems, as these systems must cater to a
diverse population with varying levels of digital literacy.
In their comprehensive study, Kshetri and Voas (2018) highlighted the advantages of
blockchain's immutability and auditability in enhancing the transparency of electoral
processes. These features are particularly valuable for ensuring the integrity of election
results and providing verifiable audit trails. However, the study also acknowledged scalability
and energy consumption as critical barriers to the widespread adoption of blockchain-based
voting systems. Specifically, energy-intensive consensus algorithms like Proof of Work
(PoW) present challenges for large-scale implementation. In response, alternative consensus
mechanisms, such as Proof of Stake (PoS) and permissioned blockchains, have gained
attention for their reduced energy consumption and increased scalability, presenting
promising avenues for further research.
12
CHAPTER 3
DESIGN DETAILS
3.1 INTRODUCTION
The blockchain-based e-voting system aims to address the challenges of traditional voting
systems by leveraging the key features of blockchain technology: decentralization,
immutability, transparency, and security. This chapter details the system design,
requirements, proposed approaches, and algorithms used to implement the solution.
The design focuses on a system that ensures voter anonymity, prevents fraud, and maintains
transparency while remaining user-friendly for voters and election officials. The system is
built around Ethereum, a public blockchain that allows for the implementation of smart
contracts, which provide automated vote tallying and secure, tamper-proof election results.
The blockchain-based e-voting system must meet several technical, functional, and non-
functional requirements to ensure its success in real-world elections. These include:
Security:
o Voter identity and vote data should be encrypted to prevent tampering.
o A secure authentication mechanism must be in place to ensure that only
eligible voters can vote.
Transparency:
o The system should provide public access to voting records in a way that
allows any party to verify the election results.
Anonymity:
o Voter identities should be kept anonymous while allowing for the verification
of their eligibility to vote.
Auditability:
o All transactions (votes) should be recorded on the blockchain to provide a
transparent, immutable record for auditing purposes.
13
3.3 SYSTEM DESIGN
At the heart of the e-voting system is the blockchain, which serves as a decentralized ledger
for recording all voting transactions. Ethereum is chosen as the platform due to its robust
smart contract capabilities and large developer ecosystem.
14
3.3.2 VOTING PROCESS FLOW
1. Voter Registration: Voters register in the system using a secure digital identity (e.g.,
based on biometrics, national ID, or verified credentials). This registration process is
linked to the Ethereum wallet and requires the generation of public/private key pairs.
2. Casting a Vote: Once registered, voters can access the election interface. After
selecting their preferred candidate(s), voters submit their votes. The vote is then
recorded as a transaction on the Ethereum blockchain. This transaction is signed with
the voter’s private key to maintain voter authenticity and anonymity.
3. Vote Validation: The system validates the vote using a combination of voter
authentication and checks to ensure no double voting. The smart contract verifies the
authenticity of the transaction, ensuring the voter has not already voted.
4. Vote Tallying: After the election concludes, the smart contract automatically tallies
all the votes recorded on the blockchain. The results are public and transparent,
allowing anyone to verify the outcome.
15
CHAPTER 4
IMPLEMENTATION DETAILS
4.1 INTRODUCTION
In order to implement the blockchain-based e-voting system, a wide range of tools and
technologies were used, including blockchain frameworks, development environments, and
cryptographic tools. This chapter explains the technologies used in the development process,
including Ethereum for blockchain functionality, Solidity for smart contracts, and various
other tools for simulation, testing, and user interface development.
The system design is implemented using a modular approach, where each component plays a
vital role in ensuring that the blockchain-based e-voting system functions correctly, securely,
and efficiently. The system can be broken down into several key components:
16
4.3 TOOLS & TECHNOLOGY USED
4.3.1 WEB3.PY
Web3.py is the most commonly used Python library to interact with Ethereum. It enables the
blockchain integration necessary for the e-voting system:
4.3.2 PYCRYPTODOME
Encryption: Encrypt votes to ensure they are stored securely on the blockchain,
allowing only authorized parties to decrypt them.
Digital Signatures: Sign transactions (votes) using a private key and verify using a
public key to maintain the integrity of vote data.
Testing Smart Contracts: Smart contracts can be tested using Python scripts that
invoke functions in Truffle’s test suite.
Integration with Python: Web3.py can interact with Truffle-deployed contracts,
which makes it possible to use Python for deploying, interacting, and testing smart
contracts.
17
4.3.4 SMART CONTRACT DEVELOPMENT
While Python isn’t directly used for writing smart contracts, Solidity is essential for this task.
Solidity contracts are written for managing votes, validating voter eligibility, and tallying
votes. Python-based tools (like Web3.py) interact with these contracts once deployed.
While React.js is commonly used for the front-end interface, Flask or Django (both Python-
based frameworks) can be used for building a back-end API that interacts with the
blockchain. This allows the front-end to send requests to the Ethereum blockchain via
Python.
Flask: A lightweight web framework for building RESTful APIs. It can be used to
connect the front-end interface with the Ethereum blockchain, receiving and
processing votes, and interacting with smart contracts.
Django: A more robust web framework, Django can be used if the system requires
more complex server-side logic and an integrated database for logging user activities
or voting metadata.
4.4 SIMULATION
Simulations were conducted using the Ethereum test networks (Ganache and Rinkeby) to test
the functionality and performance of the e-voting system. The following steps outline the
simulation process:
18
public/private key pairs, and digital signatures are used to ensure that votes cannot be
altered once submitted.
4. Scalability Testing: The system is tested under different load conditions to determine
how well it scales. This includes simulating large numbers of voters and ensuring that
the blockchain network can handle the increased volume of transactions without
performance degradation.
5. Usability Testing: The user interface is tested to ensure that it is intuitive and easy to
use for both voters and election officials. Feedback is gathered to improve the design
and functionality of the application.
4.5 IMPLEMENTATION
Deploy the smart contracts to an test network using Python scripts and Web3.py.
Write migration scripts that handle the deployment process and ensure contracts are
deployed to the correct Ethereum network.
Set up a Flask or Django server to handle requests from the front-end (React.js) and
pass them to the Ethereum network.
Use Web3.py to retrieve data from the blockchain and display results in real-time on
the front-end.
19
CHAPTER 5
In this section, we present the outcomes of the testing and simulation of the blockchain-based
e-voting system. This includes testing its various components, such as the voting mechanism,
transaction validation, smart contract execution, and user interactions. The goal is to
demonstrate how well the system performs in a real-world election scenario, ensuring that it
meets the objectives defined earlier in the report, such as security, transparency, scalability,
and usability.
Testing the blockchain-based e-voting system is crucial to ensure that it works as expected
under various conditions. This section outlines the different types of testing performed and
the results achieved. We break down the testing into functional testing, security testing, and
performance testing.
Functional testing ensures that the blockchain-based e-voting system correctly implements all
the required functionalities as described in the design. The following tests were carried out:
1. Voter Registration:
o The system successfully registered voters using Ethereum accounts. Each
voter’s address was stored in the smart contract, and the system validated
eligibility before allowing them to vote.
o Test Outcome: All eligible voters were successfully registered and could cast
their votes.
2. Vote Casting:
o Voters were able to cast their votes securely through the web interface, which
interacted with the smart contract deployed on the Ethereum blockchain. The
system ensured that each voter could vote only once.
o Test Outcome: Vote casting functionality worked smoothly without errors.
3. Vote Counting:
20
o After votes were cast, the smart contract automatically tallied the votes in real-
time, ensuring the results were accurate and tamper-proof.
o Test Outcome: The smart contract accurately counted the votes, and the results
were consistent with the number of votes cast.
4. Vote Verification:
o Voters were able to verify their vote without revealing their identity. This was
achieved by storing the transaction hash of each vote, allowing voters to check
that their vote was recorded on the blockchain.
o Test Outcome: Vote verification was successful, and voters could confirm
their participation.
5. Vote Security:
o The system implemented cryptographic techniques to ensure that votes were
encrypted and could not be tampered with. The use of private-public key pairs
ensured that only the voter could cast their vote, and the vote could not be
altered by anyone else.
o Test Outcome: The vote security mechanism performed as expected, and no
tampering or unauthorized vote casting was detected.
2. Vote Integrity:
21
o Various attack scenarios were simulated to test the integrity of the votes. For
example, an attacker attempting to alter a vote after it was recorded on the
blockchain was simulated.
o Test Outcome: Blockchain’s immutability ensured that once a vote was cast, it
could not be changed or deleted, ensuring vote integrity.
3. Double Voting Prevention:
o The system was tested for double voting prevention by simulating multiple
attempts to vote from the same address.
o Test Outcome: The system successfully detected double voting and rejected
subsequent voting attempts from the same address.
Performance testing is essential to evaluate how well the blockchain-based e-voting system
handles a large number of transactions and voters. The following performance tests were
conducted:
22
5.3 COMPARISON OF RESULTS
we compare the performance and functionality of the blockchain-based e-voting system with
traditional e-voting systems and other blockchain-based voting solutions.
Several other blockchain-based voting solutions have been developed or proposed in recent
years. When compared with these systems, our solution stands out in terms of:
Security Features: While many blockchain-based voting systems use blockchain for
vote recording, our system goes a step further by integrating cryptographic
mechanisms like private-public key pairs to ensure voter anonymity and prevent
tampering.
Decentralization: Unlike some blockchain voting systems that rely on centralized
validators, our solution utilizes the full decentralization of Ethereum, ensuring that no
single entity can manipulate or control the election process.
23
CHAPTER 6
6.1 INTRODUCTION
The blockchain-based e-voting system has emerged as a promising solution to address the
challenges of traditional voting systems, such as security, transparency, and voter privacy.
This system uses blockchain technology to ensure that votes are immutable, traceable, and
secure, offering significant improvements over existing voting methods. In this chapter, we
reflect on the achievements of the system, identify the key conclusions drawn from the
development process, and explore areas where the system could be improved or expanded in
the future.
6.2 CONCLUSIONS
The blockchain-based e-voting system has proven to be an effective way to enhance the
reliability and security of the voting process. The following conclusions have been drawn
from the implementation and testing of the system:
One of the primary advantages of using blockchain technology in an e-voting system is its
ability to ensure data security. Blockchain’s inherent properties, such as decentralization and
immutability, make it nearly impossible for any entity to tamper with vote data after it has
been recorded. Once a vote is cast, it is encrypted, signed, and recorded on the blockchain,
ensuring that it cannot be altered.
Blockchain provides a transparent and traceable record of all votes cast. This transparency
allows stakeholders, including voters, election authorities, and third-party observers, to verify
the election process. Each transaction (vote) can be traced back to its source without
compromising voter anonymity, offering a higher level of accountability compared to
traditional voting systems.
The system has demonstrated scalability, as it can handle a large number of voters and
transactions simultaneously. The decentralized nature of blockchain means that there is no
central server or infrastructure that could become a bottleneck during high-volume elections.
24
While the blockchain-based e-voting system offers numerous advantages, there are still
several challenges and limitations that need to be addressed:
User Accessibility: While the digital nature of the system enhances accessibility, it
may still exclude certain groups of voters who are not familiar with the technology or
lack access to the necessary tools (e.g., smartphones or internet access).
Smart Contract Security: Although blockchain provides a secure environment for
storing data, vulnerabilities in smart contracts could still lead to potential exploits.
Ensuring the security of smart contracts is crucial for the overall security of the voting
system.
Regulatory Compliance: In many countries, elections are governed by strict laws
and regulations. The adoption of blockchain-based e-voting systems may face
challenges in terms of legal and regulatory approval.
Scalability of Public Blockchains: While private blockchains may offer a more
scalable solution for e-voting systems, public blockchains like Ethereum may face
scalability issues when handling a large number of transactions, particularly during
high-demand election periods.
While the current implementation of the blockchain-based e-voting system addresses many of
the challenges of traditional voting methods, there are several avenues for improvement and
expansion. The following sections highlight key areas where the system could be extended or
enhanced in the future.
Voter authentication remains a critical aspect of the e-voting system. In the current system,
Ethereum wallets and private keys are used to authenticate voters, but this may not be
accessible to all individuals.
25
To address the scalability limitations of current blockchain networks, there are several
potential solutions:
Decentralized Identity (DID) technologies can further enhance voter verification and security.
By using DID systems, voters can maintain control over their identity while ensuring that
their voting rights are verified without revealing any personal information.
Self-Sovereign Identity (SSI): SSI solutions could be integrated into the e-voting
system to enable voters to manage their identity using blockchain, ensuring that voter
information is decentralized and secure while remaining accessible only to authorized
parties.
The current system implements a simple voting mechanism where each voter casts a single
vote. Future enhancements could involve:
26
REFERENCES
[1] Narayanan, A., Bonneau, J., Felten, E., Miller, A., & Shasha, S. (2016).
Bitcoin and Cryptocurrency Technologies.
Princeton University Press.
[2] Crosby, M., Pattanayak, P., Verma, S., & Kalyanaraman, V. (2016). Blockchain technology:
Beyond bitcoin.
[3] Moti, A., & Shi, Y. (2020). Blockchain-based e-voting system for secure elections.
Proceedings of the International Conference on Internet of Things and Cloud Computing (IoT
Cloud 2020).
[4] Kshetri, N. (2017). 1 Blockchain's roles in strengthening cybersecurity and protecting privacy in
the internet of things.
Computer Networks, 128, 98-110..
[5] Zohar, S., & Marczak, S. (2019). Security issues and solutions in blockchain-based electronic
voting systems.
Journal of Information Security, 10(3), 158-167.
[6] Wüst, K., & Gervais, A. (2018). Do you need a blockchain?
Proceedings of the 2018 Crypto Valley Conference on Blockchain Technology (CVCBT 2018), 45-
54.
[7] Kosba, A., Miller, A., Shi, E., Wen, Z., & Papamanthou, C. (2016). Hawk: The blockchain
model of cryptography and privacy-preserving smart contracts.
Proceedings of the 2016 IEEE Symposium on Security and Privacy (SP), 839-858.
[8] Gupta, M., & Jain, S. (2021). A survey on blockchain-based voting systems for secure elections.
International Journal of Computer Applications, 177(7), 1-7.
27