You are on page 1of 39

BIHAR ENGINEERING UNIVERSITY, PATNA

(Under Govt. of Bihar)

LOKNAYAK JAI PRAKASH INSTITUTE OF TECHNOLOGY


Chapra, Bihar, 841302

Session: 2020-2023

Major project report


On

Decentralized E-Voting System


Dapps Based on Blockchain

Submitted in partial fulfilment of the requirement for the degree of


Bachelors in technology
In
Computer Science & Engineering
By

Ritik Kumar 20105117905


Amit Kumar 20105117904
Mayank Kumar 20105117906
Nisha Kumari 20105117907

Under the Supervision of

Prof. Sudhir Pandey


Assistant Professor (CSE Department)
LNJPIT, Chapra

1
DECLARATION BY THE CANDIDATE

I the undersigned solemnly declare that the report of the project work entitled "Decentralized
E-Voting System Dapps based on Blockchain" is based on my own work carried out during
my study under the guidance of Prof. Sudhir Pandey (Asst. Prof.) Department of Computer
Science & Engineering, Lok Nayak Jai Prakash Institute of Technology, Chapra.

I further declare that the statements made, and conclusions drawn are an outcome of my
project work.

--------------------------------------- ---------------------------------------
(Signature of Student) (Signature of Student)
RITIK KUMAR AMIT KUMAR
Reg. No. – 20105117904 Reg. No. – 20105117904

--------------------------------------- ---------------------------------------
(Signature of Student) (Signature of Student)
MAYANK KUMAR NISHA KUMARI
Reg. No. – 20105117904 Reg. No. – 20105117904

i
CERTIFICATE

This is to certify that the project entitled “Decentralized E-Voting System Dapps based on
Blockchain" is a record of work carried out by AMIT KUMAR Reg. No. 20105117904,
RITIK KUMAR, Reg. No.:20105117905, MAYANK KUMAR, Reg. No.:20105117906,
NISHA KUMARI, Reg. No.: 20105117907 bearing Under my guidance and supervision for
the award of Degree of Bachelor of Technology, Lok Nayak Jai Prakash Institute of
Technology, Chapra, Bihar, India.
To the best of my knowledge and belief the Project

i. Embodies the work of the candidate him/herself.


ii. Has not been submitted for the award of any degree.
iii. Fulfils the requirement of the Ordinance relating to the B.E degree of the University.
iv. Is up to the desired standard in respect of contents and is being referred to the
examiners.

Signature Signature

Head of Department Project Guide


Department of Computer Sci. & Engg. Department of CSE.
LNJPIT, Chapra LNJPIT, Chapra

Signature Signature

External Examiner Project-Ordinator

ii
RECOMMENDATION

The project's proposition of an online election system driven by blockchain technology is


both timely and promising. By leveraging the security and transparency offered by
blockchain, the proposed system could potentially overcome the limitations of traditional
voting methods. The phased development approach, with distinct front-end and back-end
modules, displays a methodical strategy that aligns with effective project management.

The user interface design, accommodating both administrators and voters, is a notable
feature. Its user-friendly approach, coupled with the utilization of blockchain's benefits, could
lead to a more inclusive and secure voting process. However, it's imperative to ensure
comprehensive testing to identify and mitigate potential vulnerabilities. Additionally, user
education would be key to instilling trust and familiarity with this innovative system.

Considering the project's proactive stance towards future enhancements, including the
integration of machine learning and artificial intelligence, it demonstrates a commitment to
ongoing innovation. In summary, given the comprehensive approach and potential benefits,
the project is recommended for further development and evaluation.

Overall, the project proposal is recommended for further development, testing, and
implementation.

--------------------------------------
(Signature of project in charge)
Project in charge
(Asst. Prof. Dept of CSE)
(L.N.J.P.I.T Chapra)

iii
CERTIFICATE BY THE EXAMINER

This is to certify that the project work entitled "Decentralized E-Voting System Dapps
based on Blockchain" Submitted by RITIK KUMAR, Reg. No.: 20105117905, AMIT
KUMAR, Reg. No.:20105117904, MAYANK KUMAR, Reg. No.:20105117906, NISHA
KUMARI, Reg. No.: 20105117907 have been completed under the guidance of (Asst. Prof.)
Department of Computer Science & Engineering , Lok Nayak Jai Prakash Institute of
Technology has been examined by the undersigned as a part of the examination for the award
of Bachelor of Technology degree in Computer Science & Engineering branch in Bihar
Engineering University, PATNA)

"Project Examined and Approved"

Internal Examiner External Examiner


Date: Date:

--------------------------------------
(Signature of the Principal with seal)
Principal
L.N.J.P.I.T, Chapra

iv
ACKNOWLEDGEMENT

At every outset I express my gratitude to almighty lord for showering his grace and blessing
upon me to complete this project.

Although my name appears on the cover of this project, many people had contributed in some
form or the other form to this project development. I could not do this project without the
assistance or support of each of the following we thank you all.

I wish to place on record my deep sense of gratitude to my project guide, Prof. Sudhir
Pandey, (Asst. Prof.) Dept. of CSE, (L.N.J.P.I.T, Chapra) and my project in charge, Prof.
Sudhir Pandey, (Asst. Prof.) for their constant motivation and valuable help through the
project work. For his valuable suggestions and advice throughout the course. I also extend
our thanks to other faculties for their cooperation during my course. Finally, I would like to
thank my friends for their cooperation to complete this project.

--------------------------------------- ---------------------------------------
(Signature of Student) (Signature of Student)
RITIK KUMAR AMIT KUMAR
Reg. No. – 20105117905 Reg. No. – 20105117904

--------------------------------------- ---------------------------------------
(Signature of Student) (Signature of Student)
MAYANK KUMAR NISHA KUMARI
Reg. No. – 20105117906 Reg. No. – 20105117907

v
ABSTRACT

In any democratic country, Voting is a fundamental right of any citizen that enables them to
choose the leaders of tomorrow. It gives individuals in a community the facility to voice their
opinion. It helps them to realize the importance of citizenship. Online voting systems are
software platforms used to securely conduct votes and elections. As a digital platform, they
eliminate the need to cast your votes using paper or having to gather in person. They also
protect the integrity of your vote by preventing voters from being able to vote multiple times.

Electronic voting or e-voting has fundamental benefits over paper-based systems such as
increased efficiency and reduced errors. The electronic voting system tends to maximize user
participation, by allowing them to vote from anywhere and from any device that has an
internet connection. The blockchain is an emerging, decentralized, and distributed technology
with strong cryptographic foundations that promises to improve different aspects of many
industries. Expanding e-voting into blockchain technology could be the solution to alleviate
the present concerns in e-voting. Here we propose a blockchain-based voting system that will
limit the voting fraud and make the voting process simple, secure, and efficient.

vi
TABLE OF CONTENT

S. No. Title Page No.

1 Cover Page
Declaration of Candidate i
Certificate ii
Recommendation iii
Certificate By the Examiner
iv
Acknowledgement
v
Abstract
vi
Table Of Content
vii
List of Figure
ix
2 Chapter 1: Introduction
1.1 Background
1.2 Existing System
1.3 Proposed System
1.4 Benefits of E-voting System
1.5 Blockchain Technology
3 Chapter 2: Literature Survey
2.1 Digital Technology and Electoral Systems
2.2 Blockchain Technology
2.3 E-voting Potential and Challenges
4 Chapter 3: Work Done
3.1 Proposed Plan of Work
3.1.1 Phase 1: Front-end Development
3.1.2 Phase 2: Back-end Implementation using Solidity.
3.1.3 Phase 3: Connection and Testing
3.2 Division of Phase One
3.3 Research Methodology of Phase Two
5 Chapter 4: Data Analysis and Results
4.1 Existing Voting Systems and Challenges
4.2 Introduction to Blockchain-based Voting
4.3 User Interface and Website Screenshots

vii
6 Chapter 5: Summary and Conclusion
5.1 Project Overview
5.2 Accomplished Milestones
5.3 Future Enhancements

Appendix A: Terms and Abbreviations

Appendix B: References

viii
List of Figure
Figure No. Title Page No.

Figure 3.1 User flow diagram

Figure 3.2 Admin flow diagram

Figure 3.3 Research Methodology

Figure 4.1 Homepage

Figure 4.2 Admin Login

Figure 4.3 Admin Dashboard

Figure 4.4 Add Candidate Page

Figure 4.5 Create Election Page

Figure 4.6 Candidate details

Figure 4.7 Election Details

Figure 4.8 User Sign Up

Figure 4.9 User Sign In

Figure 4.10 User Dashboard

Figure 4.11 Voter Registration Form

Figure 4.12 Vote Casting Page

ix
Chapter 1
Introduction

India is a democratic country and has a democratic country. As now all Indian
citizens become a part of the growing digital India with a digital ID that is Aadhaar
card. Voting schemes have evolved from counting hands in early days to systems that
include paper, punch card and electronic voting machine.

EXISTING SYSTEM
The Existing System of Election is running manually. The Voter has to Visit
Booths to Vote a Candidate so there is wastage of Time. Due to this many people
don’t go out to cast their vote which is one of the most important and Worrying
factor. In democracy Each and every vote is important. This Traditional system can
be replaced by a new online system which will limit the voting frauds and make the
voting as well as counting more efficient and transparent.

PROPOSED SYSTEM
The current voting system requires some improvement in it because of the
issues mentioned above. This can be achieved by replacing the existing system by the
new system which will limit the voting frauds and make the voting as well as
counting more efficient.

 Online Election System would have user registration, user login and
admin login.
 This Online Voting System will manage the Voter’s information by
which voter can login and use his voting rights.
 At the time of registration voter will be asked for this: Full name, age,
Aadhaar card no, mobile no. email id and after being verified will be
given the access.
 At the time of requesting vote, voter will be asked to enter his Aadhaar
id. Then voter will be authenticated, and he can give vote from one of
the candidates from the list. Voters can vote for a Candidate only once
per Election.

1
 The software system allows the user to login into their profiles and
upload all their details including their previous milestone onto the
system. The admin can check each Candidate details.
 The software system also allows Voters to view a list of Candidates in
their area. The admin has overall rights over the system and can
moderate and delete any details not pertaining to Election Rules.

BLOCKCHAIN
Blockchain can help to implement a system that is immutable, transparent, and
efficient and cannot be hacked into. The inability to change or delete information
from blocks makes the blockchain the most effective technology for voting systems.
Blockchain technology is supported by a distributed network consisting of variety of
interconnected nodes. Each of these nodes have their own copy of the distributed
ledger (information) that contains the total history of all transactions the network has
processed. There is no centralized system that controls the network. If the majority of
the nodes agree, then they accept a transaction. This network permits users to stay
anonymous. A basic analysis of the blockchain technology (including sensible
contracts) suggests that it is an appropriate basis for e-voting and furthermore, it
might have the potential to form e-voting a lot of acceptable and reliable.
Blockchain technology makes e-voting cheaper, easier, and much more
secure to implement. It is a considerably new paradigm that can help to form
decentralized systems, which assure the data integrity, availability, and fault
tolerance. This technology aims to revolutionize the systems. The blockchain systems
are formed as decentralized networked systems of computers, which are used for
validating and recording the pure online transactions. They also constitute ledgers,
where digital data is tied to each other, called the blockchain. The records on the
blockchain are essentially immutable.

Benefits of E-voting system over the current system:

1. Increasing the level of participation


The Internet voting system tends to maximize user participation, by allowing
them to vote from anywhere and from any device that has an internet connection.

2
2. Security
By considering the importance of the e-voting system is implemented using

“Blockchain”.

3. Efficiency
The reduction in organizational and implementation costs significantly increases the
efficiency of election management compared to traditional paper voting, for example.

4. Precision
The electronic vote eliminates errors in manual count, which brings with it an
accurate and quick publication of results, with receipt of vote for each vote cast.

Proposed Plan of Work:

For our proposed plan of work, we are considering two modules that are to be
completed in three phases. Two modules are as follows:
1. Front-end for the application
2. Back-end using Solidity to implement Blockchain.

Each of these modules will be considered as one phase and the remaining one phase
will cover the connection and testing of these modules.

Phase 1: In this phase we will cover the front-end module, in which we will build the
interactive user-interface for the admin as well as the user. In parallel the research work
related to the implementation of Blockchain in decentralized application will be done.

Phase 2: In this phase we will cover the back-end module, we will implement the
Blockchain using Ethereum framework and convert the system into a decentralized
application.

Phase 3: The connection of two different module along with the testing of the platform will
be completed in this phase.

3
Chapter -2
Literature Survey

Currently increasing digital technology helped many people lives. In contrast to the
electoral system, there are many conventional uses of paper in its implementation.
The aspect of security and transparency is a threat from still widespread election with
the conventional system. Block chain technology is one of solutions, because it
embraces a decentralized system, and the entire database are owned by many users.

There is no doubt that the revolutionary concept of the blockchain, which is the
underlying technology behind the famous crypto currency Bit coin and its successors,
is triggering the start of a new era on the Internet and the online services. In this
work, we have implemented and tested a sample e-voting application as a smart
contract for the Ethereum network using the Ethereum wallets and the Solidity
language. Block chain was first introduced by Satoshi Nakamoto (a pseudonym),
who proposed a peer to-peer payment system that allows cash transactions through
the Internet without relying on trust or the need for a financial institution. Block chain
is secure by design, and an example of a system with a high byzantine failure
tolerance.

E-voting is a potential solution to the lack of interest in voting amongst the young
tech savvy population. For e-voting to become more open, transparent, and
independently auditable, a potential solution would be base it on block chain
technology. Block chain technology has a lot of promise; however, in its current state
it might not reach its full potential.

Electronic voting has been used in varying forms since 1970s with fundamental
benefits over paper-based systems such as increased efficiency and reduced errors.
With the extraordinary growth in the use of block chain technologies, a number of
initiatives have been made to explore the feasibility of using block chain to aid an
effective solution to e-voting. It presented one such effort which leverages benefits of
block chain such as cryptographic foundations and transparency to achieve an
effective solution to e-voting. The proposed approach has been implemented with

4
Multichain and in-depth evaluation of approach highlights its effectiveness with
respect to achieving fundamental requirements for an e-voting scheme.
Recent major technical challenges relating to e-voting systems embrace, however not
restricted to secure digital identity management. Any potential citizen ought to be
registered to the electoral system before the elections. Their data ought to be in a very
digitally processable format. Besides, their identity data ought to be unbroken
personal in any involving information. Ancient E-voting system could face following
problems:
 Anonymous vote-casting.
 Individualized ballot processes.
 Ballot casting verifiability by (and only by) the voter.
 High initial setup costs.
 Increasing security problems.
 Lack of transparency and trust.
 Voting delays or inefficiencies related to remote/absentee voting.
 To mitigate these threats, software mechanisms which promise the following
should be deployed:
 Prevention of evidence deletion. 2. Transparency with privacy.
 Using a Blockchain, the most important requirements are satisfied:

 Authentication: Only registered voters will be allowed to vote.


 Anonymity: The system prevents any interaction between the votes casted by
the voters and their identities.
 Accuracy: Votes once cast are permanently recorded and cannot be modified
or changed under any circumstances.
 Verifiability: The system will be verifiable such that the number of votes is
accounted for

As technology advances, many countries have now opted for electronic voting
systems. Any voting system must follow principles of transparency and impartiality
to achieve fairness; the electronic voting process must also be protected against
cyberattacks or denial-of-service attacks (DDOS) because such attacks may affect the
processing time in voting procedures and even hinder the fairness in voting. This
study establishes a network security mechanism for voting systems based on

5
blockchain technology. The blockchain mechanism employs a distributed architecture
that can prevent system shutdown resulting from malicious cyber-attacks;
additionally, any user in the blockchain can authenticate data integrity, which
satisfies requirements of transparency and impartiality in voting systems.

6
Chapter 3
Case Study: Blockchain E-Voting System

1. Introduction:
TrustBallot is a fictional blockchain-based e-voting system designed to address the
challenges of traditional voting methods while ensuring security, transparency, and
accessibility. This case study provides an overview of how TrustBallot utilizes blockchain
technology to create a robust and efficient e-voting platform.

2. System Architecture:
TrustBallot is built on the Ethereum blockchain, leveraging its smart contract capabilities for
vote management. It employs a decentralized application (Dapps) to interact with the
blockchain, allowing users to register, cast votes, and view results.

3. Key Components:

a. Voter Registration:
- Voters register by creating a unique digital identity linked to their Ethereum wallet.
- The system verifies voter eligibility using government-issued identification through an
off-chain identity verification service.
- Once verified, a unique identifier is associated with the voter's Ethereum wallet address
on the blockchain.

b. Ballot Creation:
- Election administrators create ballots by deploying smart contracts for each election.
- The ballot contract defines the voting options, start and end times, and any additional
rules.
- The ballot contract is published on the blockchain, ensuring transparency and
immutability.

c. Privacy-Preserving Voting:
- Voters cast their votes using zero-knowledge proofs, preserving voter anonymity.
- The smart contract validates the cryptographic proof without revealing the voter's choice.
- This approach ensures both privacy and verifiability.

7
d. Vote Casting:
- Voters access the Dapps and authenticate using their digital identity.
- They select their preferred option and generate a cryptographic proof of their choice.
- The proof is submitted to the blockchain along with their wallet address.

e. Vote Tallying:
- Once the voting period ends, the smart contract tallies the votes.
- The contract decrypts and verifies the zero-knowledge proofs to ensure the validity of
each vote.
- The vote counts are stored on the blockchain, making them transparent and tamper-proof.

f. Results Display:
- After tallying, the Dapps displays the election results in real-time.
- Voters can verify their own vote and compare it with the overall results.
- The results, once recorded, cannot be altered, ensuring transparency.

4. Security Measures:

a. Smart Contract Auditing:


- All smart contracts undergo thorough code audits to identify vulnerabilities.
- The audit process helps prevent potential exploits that could compromise the voting
process.

b. Encrypted Data Storage:


- Voter identities and encrypted votes are stored off-chain to minimize exposure.
- Only cryptographic proofs and minimal metadata are stored on-chain.

c. Immutable Records:
- All voting transactions are recorded on the blockchain, making them immutable and
resistant to tampering.

5. Benefits and Outcomes:


a. Transparency and Trust:

8
- The blockchain's transparent nature ensures that the entire voting process is visible to all
stakeholders, fostering trust in the system.

b. Security and Verifiability:


- The cryptographic techniques used in TrustBallot protect the integrity of votes and
prevent unauthorized access.

c. Accessibility:
- TrustBallot enables remote and secure voting, making it accessible to a broader range of
voters.

d. Tamper-Proof Records:
- Once votes are recorded on the blockchain, they cannot be altered, enhancing the
credibility of the results.

6. Conclusion:
TrustBallot demonstrates the potential of blockchain technology to revolutionize the way
elections are conducted. By combining cryptographic techniques, transparent processes, and
decentralized infrastructure, TrustBallot addresses the challenges of traditional voting
methods, providing a secure and efficient e-voting solution.

7. Future Enhancements:
- Integration with digital identity providers for seamless voter verification.
- Research into more scalable consensus algorithms to accommodate large-scale elections.
- Collaboration with government agencies to explore regulatory frameworks for
blockchain-based voting systems.

8. References:
- Cite academic papers, research articles, and reputable sources that contributed to the
development and understanding of TrustBallot's architecture and features.

9
Chapter-4
Work Done

Proposed Plan of Work:


For our proposed plan of work, we are considering two modules that are to be
completed in three phases. Two modules are as follows:
1. Front-end for the application
2. Back-end using Solidity to implement Blockchain.

Each of these modules will be considered as one phase and the remaining one phase
will cover the connection and testing of these modules.

Phase 1: In this phase we will cover the front-end module, in which we will build the
interactive user-interface for the admin as well as the user. In parallel the research work
related to the implementation of Blockchain in decentralized application will be done.

Phase 2: In this phase we will cover the back-end module, we will implement the
Blockchain using Ethereum framework and convert the system into a decentralized
application.

Phase 3: The connection of two different module along with the testing of the platform will
be completed in this phase.

Division of Phase One:


 We have considered 2 main modules which are as follows:
A. Admin- The admin module is divided into 5 components-
1. Dashboard-It will contain various charts to display information such
as number of parties, number of voters etc.
2. Add Candidate - In this feature of admin, he can add candidates who
are standing in the election. After candidate is added it will be
displayed on the user side.
3. Create Election- This feature of admin will allow him to create
election. A user can cast his vote only after the election is created by
admin. A user can cast vote between the start date and end date.

10
4. Election Details- In this section admin can update election details such
as start date, end date etc.
5. Candidate Details- In candidate details all the candidates added by
admin will be displayed. Admin can update the candidate details if
incase a wrong entry is done.
B. User- The user module is divided into 4 components.
1. Dashboard- The user dashboard contains information about parties
and their candidates. A user can see all the information about
candidate.
2. Voter Register- In this section first user will have to register himself
only then he will be able to cast his vote.
3. Voting Area- After user is registered, then only he will be directed to
this page and then he can cast his vote.
4. Results- In this component the user will be able to see the results of the
election.

Phase One Flow Diagram

Fig.3.1 User flow diagram

11
Fig.3.1 Admin flow diagram

Research Methodology of Phase Two

Fig.3.3 Research methodology

CHAPTER- 5

12
DATA ANALYSIS AND RESULT

The existing system for voting in India is the EVM (Electronic Voting Machine)
based system. Prior to this system there were paper ballots and manual counting. The
paper ballots method was widely criticized because of fraudulent voting and booth
capturing, where party loyalists captured booths and stuffed them with pre-filled fake
ballots. Replacing the existing system with a new election system is critical to limit
fraud and having the voting process traceable and verifiable. As we can see the
internet has brought a revolution in each and every domain possible, by trying to shift
the existing system towards the online platform to make the proceedings fast and user
convenient.
We know that the existing system is reliable but that does not mean that we should
not take a step ahead towards the betterment of the existing system. Online voting
system using blockchain can be that step.
A blockchain is a distributed, immutable, incontrovertible, public ledger. This new
technology works through four main features:
• The ledger exists in many different locations: No single point of failure in the
maintenance of the distributed ledger.

• There is distributed control over who can append new transactions to the
ledger.

• Any proposed “new block” to the ledger must reference the previous version
of the ledger, creating an immutable chain from where the blockchain gets its
name, and thus preventing tampering with the integrity of previous entries.

We have tried to build a user interface of the decentralized application that will make
the voting process more convenient. The UI portion can be assumed as 30% of the
total work that is to be completed. The major portion in this system is related to the
blockchain technology which will be responsible for the reliable voting process.

13
UI of Website

Fig.4.1 Homepage

• The homepage consists of 2 options –


1. First option is for admin login.
2. Second option is for user signup/login.

14
Fig.4.2 Admin Login

• This is the login page for admin.


After admin is logged in, he is directed to the dashboard.

Fig.4.3 Admin Dashboard

• The dashboard will contain various charts to display information such as


number of parties, number of voters etc.

Fig.4.4 Add Candidate Page

15
• In this feature of admin, he can add candidates who are standing in the
election.
• After candidate is added it will be displayed on the user side.

• This feature of admin will allow him to create election.


• A user can cast his vote only after the election is created by admin.
• A user can cast vote between the start date and end date.

Fig.4.6 Candidate Details

In candidate details all the candidates added by admin will be displayed. Admin can
update the candidate details if incase a wrong entry is done.

Teams

16
Fig.4.7 about details

• In this section admin can update election details such as start date, end date
etc.

17
Fig.4.8 User Sign up.

• User will have to sign up before login.


• This is the signup page for the user.

18
Fig.4.9 User Sign in.

• If user chooses user sign in option on homepage he will be directed to this


page.
• After login he will be directed to user dashboard.

Fig.4.10 User Dashboard

• The user dashboard contains information about parties and their candidates.
• A user can see all the information about candidate.

19
Fig.4.11 Voter Registration form

In this section first user will have to register himself only then he will be able to cast his
vote.

Fig.4.12 Vote Casting Page

After user is registered, then only he will be directed to this page and then he can cast his
vote.

20
Solidity code for voting

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Voting {
// Structure to store voter information
struct Voter {
bool hasVoted;
uint256 votedOption;
}

// Array to store the options and their vote counts


string[] public options;
mapping(string => uint256) public voteCounts;

// Mapping to store voter information


mapping(address => Voter) public voters;

// Constructor to initialize the options


constructor(string[] memory _options) {
options = _options;
for (uint256 i = 0; i < options.length; i++) {
voteCounts[options[i]] = 0;
}
}

21
// Function to cast a vote for an option
function vote(uint256 optionIndex) external {
require(optionIndex < options.length, "Invalid option index");
require(!voters[msg.sender].hasVoted, "Already voted");

voters[msg.sender].hasVoted = true;
voters[msg.sender].votedOption = optionIndex;

voteCounts[options[optionIndex]]++;
}

// Function to get the vote count for a specific option


function getVoteCount(uint256 optionIndex) external view returns (uint256)
{
require(optionIndex < options.length, "Invalid option index");
return voteCounts[options[optionIndex]];
}
}

Chapter 6
Security Measures in TrustBallot E-Voting System

22
1. Smart Contract Auditing:
- Objective: Prevent vulnerabilities and ensure the integrity of the voting process by
thoroughly auditing the smart contracts used in TrustBallot.
- Implementation: Expert blockchain developers conduct comprehensive code audits to
identify and mitigate potential security vulnerabilities. This includes analyzing the code for
issues like reentrancy attacks, integer overflows, and access control vulnerabilities.
- Outcome: Auditing reduces the risk of exploitable vulnerabilities, ensuring that the smart
contracts function securely and as intended.

2. Encrypted Data Storage:


- Objective: Protect sensitive voter information and vote choices from unauthorized access.
- Implementation: Sensitive data, such as voter identities and encrypted votes, are stored
off-chain using secure storage solutions. The blockchain only stores cryptographic proofs and
minimal metadata to maintain privacy.
- Outcome: This approach minimizes the exposure of confidential data, making it harder for
malicious actors to compromise voter information.

3. Immutable Records:
- Objective: Ensure the integrity and tamper-proof nature of the voting records.
- Implementation: All voting transactions, including voter registrations, ballot creations,
and votes cast, are recorded on the blockchain. Once added, these records are permanent and
cannot be altered without consensus from the network participants.
- Outcome: This immutability ensures that past voting records remain unchanged and
maintains a reliable historical record of the entire voting process.

4. Zero-Knowledge Proofs for Privacy:


- Objective: Protect voter privacy while maintaining verifiability.
- Implementation: TrustBallot utilizes zero-knowledge proofs, a cryptographic technique
that allows a voter to prove their vote choice without revealing the actual choice. Voters
generate these proofs, and the smart contract verifies them without learning the vote itself.
- Outcome: This approach ensures that votes remain confidential, preventing anyone
(including the system administrators) from knowing how an individual voted, while still
allowing the voter to verify that their vote was counted correctly.

23
5. Multi-Signature Wallets:
- Objective: Enhance security by requiring multiple cryptographic signatures for critical
operations.
- Implementation: Administrative actions, such as deploying new ballots or updating
system parameters, are executed through multi-signature wallets. These wallets require
multiple authorized individuals to provide their cryptographic signatures before an action is
carried out.
- Outcome: Multi-signature wallets prevent unauthorized changes to the system and ensure
that critical operations are approved by a consensus of authorized parties.

6. Continuous Monitoring and Incident Response:


- Objective: Detect and respond to potential security threats promptly.
- Implementation: A dedicated team monitors the blockchain network and system
components for any unusual activities. In the event of a security breach or suspicious
behavior, a predefined incident response plan is executed to mitigate the threat and restore
system integrity.
- Outcome: Continuous monitoring and rapid incident response minimize the impact of
potential security incidents and help maintain the overall security posture of the system.

7. Regular Security Updates:


- Objective: Stay up to date with security best practices and patches.
- Implementation: TrustBallot's smart contracts and underlying infrastructure are regularly
updated to incorporate the latest security patches and enhancements. This includes upgrading
to newer versions of blockchain platforms and libraries that address known vulnerabilities.
- Outcome: Regular updates help mitigate newly discovered security risks and ensure the
system remains resilient against emerging threats.

8. User Education and Training:


- Objective: Minimize risks stemming from user behavior and lack of awareness.
- Implementation: Users are provided with clear instructions on secure usage of the
TrustBallot platform. They are educated about phishing attacks, secure wallet management,
and the importance of keeping their private keys safe.

24
- Outcome: Educated users are less likely to fall victim to common security pitfalls,
reducing the potential for security breaches caused by user-related factors.

Chapter-7
Summary And Conclusion

25
In this project, we introduced a blockchain-based electronic voting system that
utilizes smart contracts to enable secure and cost-efficient election while
guaranteeing voters privacy. Blockchain technology offers a new possibility to
overcome the limitations and adoption barriers of electronic voting systems which
ensures the election security and integrity and lays the ground for transparency. Using
an Ethereum private blockchain, it is possible to send hundreds of transactions per
second onto the blockchain, utilizing every aspect of the smart contract to ease the
load on the blockchain. To achieve this, we have divided this overall work into three
modules.
1. The front-end module
2. The back-end module
3. Connection of two different module along with the testing.

Until now we have completed our first module, in which we created the
interactive user interface for the admin as well as the user. We have also done some
research work related to the implementation of Blockchain in decentralized
application.

And in the future to make the voting process more secure and to correctly identify the person
who is voting we can use ML and AI concepts. Using these concepts, we can verify whether
the person voting is the same as the person who has registered during the registration process.

Summary:

The electronic voting (e-voting) system utilizing blockchain technology has emerged as a
promising solution to address various challenges associated with traditional voting methods.
In this system, voters cast their ballots electronically through a secure online platform, and
the votes are recorded on a blockchain, which is a decentralized and tamper-resistant digital
ledger. This approach aims to enhance transparency, security, and accessibility in the voting
process.

Blockchain technology ensures the immutability and integrity of votes by creating a


transparent and tamper-proof record of each vote. Every vote is encrypted and linked to the
previous vote, forming a chain of blocks, with each block containing a cryptographic hash of

26
the previous block. This interlinked structure makes it exceedingly difficult for malicious
actors to alter any vote without being detected.

Furthermore, e-voting through blockchain eliminates the need for intermediaries, reducing
the potential for fraud and manipulation. Smart contracts, self-executing code on the
blockchain, can automate various aspects of the voting process, such as voter authentication,
eligibility verification, and result tabulation. This reduces human error and enhances the
efficiency of the entire system.

However, challenges remain, including ensuring voter privacy in a system that requires
transparency. Striking the right balance between transparency and privacy is crucial to
prevent vote tracing while still maintaining the anonymity of voters. Additionally, ensuring
the security of the online platform itself, as well as safeguarding against potential
vulnerabilities in the blockchain, are ongoing concerns that require constant vigilance.

Conclusion:

In conclusion, the integration of blockchain technology into the electronic voting system
holds immense potential to revolutionize the way we conduct elections. By leveraging the
transparency, immutability, and security features of blockchain, e-voting systems can address
some of the key challenges faced by traditional voting methods, such as voter fraud and
mistrust in the process. The tamper-resistant nature of blockchain ensures that votes cannot
be altered or deleted without detection, thereby increasing the overall integrity of the electoral
process.

However, the implementation of such a system requires careful consideration of technical,


privacy, and security aspects. Striking a balance between transparency and privacy while also
ensuring that the underlying technology remains secure is vital. As blockchain technology
continues to evolve, it offers a pathway towards more efficient, accessible, and trustworthy
elections, ultimately contributing to the strengthening of democratic processes worldwide.

27
Appendix A: References

[1] Coursera. [Online].


Available: https://www.coursera.org/specializations/blockchaina

[2] Edureka (How Blockchain Works) - Simply Explained. [Online].


Available:https://youtu.be/9qfxLo1rt1Q?list=PL9ooVrP1hQOFJblZm3OdcVVH 6Z8V7HP1

[3] Introduction to Blockchain by NPTEL IITM. [Online]


Available: https://youtu.be/mzPoUjQC4WU

[4] Blockchain in e-voting. [Online].


Available: https://www.youtube.com/watch? v=d0iLN8LDJ8g&feature=youtu.be

[5] Umut Can Çabuk1, Eylül Adıgüzel2, Enis Karaarslan2 (2018); A Survey on Feasibility
and Suitability of Blockchain Techniques for the E-Voting Systems; International
Journal of Advanced Research in Computer and Communication Engineering. [Online].
Available:https://www.researchgate.net/publication/324038634_A_Survey_on_F
easibility_and_Suitability_of_Blockchain_Techniques_for_the_E Voting_Systems

[6] Aayushi Gupta1, Jyotirmay Patel2, Mansi Gupta1, Harshit Gupta1 (2017); Issues and
Effectiveness of Blockchain Technology on Digital Voting; International Journal of
Engineering and Manufacturing Science. ISSN 2249-3115 Vol. 7, No. 1 (2017).
[Online].
Available:https://www.ripublication.com/ijems_spl/ijemsv7n1_04.pdf

[7] Pavel Tarasov and Hitesh Tewari (2017); the Future of E-Voting; IADIS International
Journal on Computer Science and Information Systems Vol.12, No. 2, pp. 148165 I.
[Online].
Available:https://www.researchgate.net/publication/321803764_THE_FUTURE
_OF_EVOTING

Appendix B: Terms and Abbreviations

28
Terms:

EVM: Electronic Voting Machine

An Electronic Voting Machine (EVM) is a device used for electronic voting during elections.
It's designed to securely and accurately record votes cast by voters.

UI: User Interface

The User Interface (UI) refers to the visual elements and controls through which users
interact with a software application or system. It includes buttons, menus, screens, and other
graphical components.

GDPR: General Data Protection Regulation

The General Data Protection Regulation (GDPR) is a European Union regulation that
addresses the processing and protection of personal data of individuals. It aims to give
individuals greater control over their personal data and how it's used.

Abbreviations:

admin: administrator
E-voting: Electronic Voting
IoT: Internet of Things
ML: Machine Learning
AI: Artificial Intelligence

29

You might also like