You are on page 1of 17

Implementation of

Decentralized Blockchain E-voting

TRAINING/INTERNSHIP/PROJECT REPORT

Submi&ed in par.al fulfillment of the


requirements for the award of the
degree of
BACHELOR OF TECHNOLOGY
In
ELECTRONIC AND COMMUNICATION (AI)

By

Vanshika Yadav
(06901182021)

Guided By

Anveshan Founda.on of IGDTUW

INDIRA GANDHI DELHI TECHNICAL UNIVERSITY FOR WOMEN


NEW DELHI – 110006
JULY 2023
UNDERTAKING REGARDING ANTI-PLAGIARISM

I, Vanshika Yadav hereby, declare that the material/ content presented in the
Report is free from plagiarism and is properly cited and written in my own
words. In case, plagiarism is detected at any stage, I shall be solely
responsible for it.

Vanshika Yadav

ECE-AI

(06901182021)
ACKNOWLEDGEMENT

I would like to express my gratitude and appreciation to all those who gave me
the possibility to complete this report. Special thanks are to the Anveshan
Foundation of IGDTUW who guided me on my way to learn something new and
helped me to create a project based on what helped me in processing and giving
shape to my technical skills. Their encouragement during the course period helped
me to learn forward.

I would like to acknowledge the role of the ECE Department and our respected HOD
Prof. Nidhi Goel , for giving us such an opportunity to learn something beyond the
scope of college studies. I would like to thank my parents and friends for helping
mein the best way they can to help me in preparing my report.

Vanshika Yadav

ECE-AI

(06901182021)
DECLARATION

I, Vanshika Yadav solemnly declare that the project report is based on my own
work carried out during the course of our study under the supervision of
Anveshan Foundation of IGDTUW, assert the statements made and
conclusions drawn are an outcome of my research work. I further certify that:
I. The work contained in the report is original and has been done by me
under the supervision of my supervisor.
II. The work has not been submitted to any other Institution for any other
degree/diploma/certificate in this university or any other University in
India or abroad.
III. We have followed the guidelines provided by the university in writing the
report.
IV. Whenever we have used materials (text, data, theoretical analysis/
equations, codes/programs, figures, tables, pictures, text, etc.) from other
sources, we have given due credit to them in the report and have also
given their details in the references.

Vanshika Yadav

ECE-AI

(06901182021)
Table of contents

1. ABSTRACT

2. INTRODUCTION

3. KEYWORDS

4. PROPOSED METHODOLOGY

5. WORKING

6. RESULTS

7. CONCLUSION
ABSTRACT :

In a democratic society, elections are a fundamental pillar that empowers citizens to choose their
representatives and form a responsible government. The traditional approach to voting has
evolved over the years, with electronic voting (e-voting) systems offering a more efficient and
accurate alternative. However, concerns about the security and integrity of electronic voting have
led to the exploration of emerging technologies like blockchain and smart contracts. This project
proposes an innovative e-voting system that leverages the power of blockchain and smart
contracts to enhance the security and transparency of the voting process. The system utilizes tools
such as Ganache, the Truffle framework, npm, and MetaMask to create a robust platform. The
project's implementation and testing demonstrate the potential for a secure and reliable e-voting
platform, paving the way for further advancements in smart governance and participatory
democracy. As technological progress continues, blockchain-based e-voting holds promise for
shaping the future of electoral processes, ensuring fair and trustworthy elections for all citizens.

Introduction :

Elections have been a cornerstone of democratic societies, allowing citizens to participate in


choosing their representatives and shaping the course of their governments. The history of
elections traces back to ancient civilizations like Greece, Rome, and the early Vedic period in
India, where leaders were elected by the people. Over time, the electoral process has evolved, and
with the advent of the modern era, elections became more structured and widespread across
Europe and North America. The traditional method of voting, relying on paper ballots, proved to
be laborious and prone to errors. However, with the advancements in technology, the introduction
of Electronic Voting Machines (EVMs) brought a new era of efficiency and accuracy to the voting
process. E-voting, as it is commonly known, involves the use of electronic systems to cast and
compile votes, making the process smoother and faster. There are two main types of e-voting: on-
site e-voting, where electronic voting machines are stationed at polling booths under the
supervision of government officials, and remote e-voting, which empowers individuals to cast
their votes from any location using devices like computers or mobile phones, often via the internet
or SMS. Despite the benefits of e-voting, concerns about its security and reliability have been
raised by the security community. Electronic voting machines have been criticized for their
vulnerability to tampering, potentially compromising the accuracy and legitimacy of election
outcomes. Ensuring the security and integrity of elections, while safeguarding voter privacy, is
paramount regardless of the organizational setup. To address these challenges and enhance the e-
voting system's security and transparency, emerging technologies like blockchain and smart
contracts are gaining attention. Blockchain, as a decentralized and immutable ledger, has the
potential to create a tamper-resistant and transparent voting system. Each block in the chain
contains data and a unique cryptographic hash of the previous block, making any attempt to alter
past records practically impossible without altering the entire chain. In this paper, we propose an
innovative e-voting system that harnesses the power of blockchain and smart contracts to
overcome the shortcomings of traditional electronic voting. By leveraging these technologies, our
system aims to build trust among voters, enhance the legitimacy of election results, and pave the
way for more efficient and transparent governance.
KEYWORDS :

1. Blockchain:- Blockchain is a decentralized and immutable distributed ledger technology. It


consists of a chain of blocks, with each block containing data and a unique cryptographic hash
of the previous block. This structure ensures the security and immutability of data, making it
tamper-resistant and transparent.

2. Smart Contracts:- Smart contracts are self-executing contracts with predefined rules written
in code. These contracts automatically execute actions once the specified conditions are met.
In the context of blockchain, smart contracts enable trustless and automated interactions
between parties without the need for intermediaries.

3. Ganache:- Ganache is a development and testing tool used for Ethereum-based applications.
It provides a local, private Ethereum blockchain environment that developers can use to
deploy, test, and debug smart contracts before deploying them to the main network.

4. Truffle Framework:- The Truffle framework is a popular development framework for


Ethereum-based applications. It offers a suite of tools that simplify the development, testing,
and deployment of smart contracts, making the development process more efficient and
manageable.

5. MetaMask:- MetaMask is a browser extension that acts as a bridge between web applications
and the Ethereum blockchain. It allows users to manage their Ethereum accounts, interact with
decentralized applications (DApps), and securely sign transactions directly from their web
browsers.

6. Ether:- Ether is the native cryptocurrency of the Ethereum blockchain. It is used as the fuel to
power transactions and smart contract executions within the Ethereum network. Users need
Ether to pay transaction fees (gas) when interacting with the blockchain.

7. Decentralization:- Decentralization refers to the distribution of power, control, and decision-


making across a network or multiple participants, rather than being concentrated in a central
authority. It aims to reduce single points of failure and promote autonomy and transparency.

Objectives/ Learning Outcomes

The Decentralized Blockchain E-voting Project has a set of clear and ambitious objectives and
learning outcomes aimed at revolutionizing the traditional voting process, enhancing security and
trust, ensuring transparency and auditability, promoting accessibility and participation,
empowering decentralization and governance, educating the public on blockchain technology, and
complying with legal and regulatory frameworks. One of the primary objectives of this project is
to enhance the security and trustworthiness of the voting process. By leveraging blockchain
technology, the e-voting system aims to eliminate the vulnerabilities associated with traditional
voting systems. Blockchain's decentralized and immutable nature ensures that all voting data is
securely stored, making it resistant to tampering, manipulation, and unauthorized access. The use
of cryptographic techniques further adds a layer of security to the voting process, protecting the
identity and integrity of each vote. Through this, the project seeks to restore confidence in the
electoral process, reassuring voters that their choices will be accurately recorded and counted.
Ensuring transparency and auditability is another critical objective of the e-voting project. With
the traditional voting systems, the lack of transparency often raises doubts about the integrity of
the results. By storing all voting data on a public blockchain, the e-voting system allows
authorized participants to access and verify the voting process in real-time. Each vote cast on the
blockchain is recorded in a transparent and immutable manner, enabling post-election audits to
ensure the accuracy and fairness of the results. This transparency fosters greater public trust in the
electoral process, making the system more accountable and reducing the potential for disputes or
controversies. Promoting accessibility and participation is a fundamental goal of the project.
Traditional voting methods often pose challenges for certain groups of voters, such as those with
mobility issues, individuals living in remote areas, or voters abroad. The e-voting system aims to
overcome these barriers by providing an online platform for casting votes. This platform can be
accessed from any internet-enabled device, allowing voters to participate in the electoral process
conveniently and securely. By increasing accessibility, the project aspires to boost voter turnout
and foster a more engaged and politically active citizenry. Empowering decentralization and
governance is another crucial aspect of the project's objectives. Decentralization is a core principle
of blockchain technology, and the e-voting system leverages this principle to distribute power and
authority across the network. Through the decentralized nature of the blockchain, all participants,
including voters, candidates, and auditors, have an equal say in the governance and decision-
making processes. This democratic approach ensures that no single entity everyone is familiar
with. The e-voting project presents an opportunity to raise awareness and understanding of
blockchain's capabilities and potential applications beyond voting. Through voter education
campaigns and outreach programs, the project aims to demystify blockchain, explaining its
underlying principles and benefits. By educating the public about this innovative technology, the
project seeks to facilitate broader adoption and acceptance of blockchain solutions in various
domains. Compliance with legal and regulatory frameworks is a critical aspect of the project's
objectives. E-voting systems, especially those involving blockchain technology, must adhere to
existing laws and regulations governing elections and data protection. The project team will
collaborate with relevant authorities to address any concerns and ensure that the system aligns
with applicable legal requirements. By prioritizing compliance, the project aims to gain
acceptance and legitimacy, building the foundation for widespread adoption of blockchain-based
e-voting solutions in the future. The Decentralized Blockchain E-voting Project is driven by a
comprehensive set of objectives and learning outcomes aimed at transforming the voting process
through the innovative use of blockchain technology. By enhancing security and trust, ensuring
transparency and auditability, promoting accessibility and participation, empowering
decentralization and governance, educating the public on blockchain technology, and complying
with legal and regulatory frameworks, the project strives to create a robust, reliable, and inclusive
e-voting system. Through this endeavor, the project aims to contribute to the advancement of
democratic processes, public engagement, and societal trust, ultimately paving the way for a more
democratic and digitally empowered future of elections.

Proposed methodology :

The proposed system utilizes a combination of powerful tools, including Ganache, the Truffle
framework, npm (Node Package Manager), and MetaMask, to create a robust and secure e-voting
platform on the blockchain. Ganache serves as the internal blockchain for our system, allowing us
to develop and test smart contracts locally before deploying them to the main blockchain network.
It provides a simulated blockchain environment, which is invaluable for debugging and ensuring
the smart contracts function as intended.
Research and Analysis: The first step in the proposed methodology is conducting thorough
research and analysis. This involves studying existing e-voting systems, traditional voting
processes, and the challenges faced in both approaches. The project team will explore various
blockchain platforms to identify the most suitable one for the e-voting system based on factors like
scalability, security, and community support. Additionally, legal and regulatory requirements related
to voting and data protection will be thoroughly examined to ensure compliance.

Define Objectives and Requirements: After conducting research, the project team will define the
objectives and requirements of the e-voting system. This includes determining the specific features
and functionalities the system must have to meet its objectives. Clear goals related to security,
transparency, accessibility, and governance will be established to guide the development process
effectively.

Smart Contract Development: The heart of the e-voting system lies in the smart contracts. The
next step involves developing smart contracts that govern the voting process. These contracts will
handle tasks such as voter registration, vote casting, and vote counting. The smart contracts will be
written in a secure programming language, and extensive testing and auditing will be performed to
ensure their reliability and resistance to vulnerabilities.

User Interface Design: A user-friendly interface is crucial for the success of the e-voting system.
The project team will design intuitive interfaces for voters to register, cast their votes, and view the
election results. The interfaces will be accessible from various devices, including computers, tablets,
and smartphones, to cater to a wide range of voters.

Security Implementation: Security is of paramount importance in an e-voting system. The


proposed methodology includes implementing robust security measures, such as encryption, multi-
factor authentication, and decentralized identity management. The project team will also address
potential attack vectors and perform penetration testing to identify and rectify vulnerabilities.

Blockchain Network Setup: In this step, the project team will set up the blockchain network that
will host the e-voting system. Whether it's a public, private, or consortium blockchain, careful
consideration will be given to network infrastructure, node configuration, and consensus
mechanisms to ensure optimal performance and scalability.

Voter Registration and Verification: To participate in the e-voting system, voters need to register
and verify their identities. The methodology will include a secure and streamlined process for voter
registration, where each voter will be assigned a unique cryptographic key for authentication.
Identity verification mechanisms will be implemented to prevent fraudulen registrations.

Vote Casting: Once registered, voters will be able to cast their votes securely through the
blockchain interface. The methodology will ensure that the vote-casting process is simple, reliable,
and tamper-proof, guaranteeing the anonymity of voters while preventing double-voting or
coercion.

Vote Counting and Results: The proposed methodology includes mechanisms for transparent and
immutable vote counting. As votes are cast, the blockchain will record them in real-time. After the
voting period ends, the votes will be tallied automatically by the smart contracts, and the election
results will be publicly accessible for auditing and verification.
Governance and Decentralization: To empower decentralization and governance, the e-voting
system will facilitate the participation of all stakeholders, including voters, candidates, and
auditors. The methodology will define the roles and responsibilities of each participant in the
decision-making process and ensure that no single entity has undue control over the system.

Testing and Evaluation: Throughout the development process, the e-voting system will
undergo extensive testing and evaluation. The project team will conduct various testing
scenarios, including load testing, security testing, and usability testing, to identify and resolve
any issues or weaknesses.

Voter Education and Outreach: To increase awareness and acceptance of the e-voting system,
the methodology includes a voter education and outreach program. This will involve organizing
workshops, seminars, and information campaigns to familiarize voters with the benefits of
blockchain-based e-voting and address any concerns they may have.

Legal Compliance and Approval: Before deploying the e-voting system for actual elections,
the project team will seek legal approval and compliance with relevant election laws and data
protection regulations. Collaboration with election authorities and relevant stakeholders will be
sought to ensure that the system aligns with existing legal frameworks.

Deployment and Monitoring: Once all the necessary preparations are complete, the e-voting
system will be deployed on the blockchain network. Throughout the election period, the system
will be closely monitored to ensure its smooth functioning and address any issues that may arise
promptly.

Evaluation and Improvement: After the election process is complete, the proposed
methodology includes a comprehensive evaluation phase. Feedback from stakeholders and
participants will be collected, and an analysis of the system's performance will be conducted.
Based on this evaluation, necessary improvements and updates will be identified and
implemented for future iterations of the e-voting system.

Preliminaries:

The proposed model for implementing the decentralized blockchain e-voting system requires
specific hardware and software components. It is designed to be compatible with 64-bit
hardware or machines running Windows 7 or later operating systems. The following are the key
dependencies and tools used in the implementation:

Dependency NPM (Node Package Manager): NPM is a crucial package manager that facilitates
the management, installation, updating, and uninstallation of node.js packages within an
application. It operates through a command-line interface and can work in two modes: local
mode and global mode. In local mode, it affects a specific directory of an application, while in
global mode, it impacts all node.js applications.

Truffle Framework: The Truffle framework is a powerful tool specifically designed for working
with Ethereum smart contracts. It provides a comprehensive set of functionalities such as
contract compilation, deployment, linking, and testing. Truffle also enables network
management and package management for Ethereum-based applications .
Ganache: Formerly known as Testrpc, Ganache comes in both command-line and UI versions. It
sets up a virtual blockchain with ten standard Ethereum addresses, each preloaded with a simulated
hundred ether. Unlike real blockchain networks, Ganache automatically confirms every transaction
without mining. It offers convenience for operating systems like Windows, Linux, and macOS.

Metamask: Metamask is an open-source and user-friendly tool that provides a graphical user
interface for conducting transactions in the Ethereum blockchain. It allows Ethereum DApps to run
without the need for a complete Ethereum node running on the user's system browser. Metamask
acts as a bridge between the browser and the Ethereum blockchain, facilitating secure and seamless
interactions .

Coding Language: Solidity, HTML, JavaScript, CSS: The proposed e-voting system relies on a
combination of programming languages. Solidity is used for writing smart contracts with a
JavaScript-style syntax. It is a high-level language that compiles into EVM (Ethereum Virtual
Machine) bytecode, which is executed on the Ethereum blockchain. HTML, JavaScript, and CSS
are used for creating the user interface and frontend components of the e-voting application

Working:

The working of the Decentralized Blockchain E-voting Project is a sophisticated process that
harnesses the power of blockchain technology to revolutionize the traditional voting system. The
project's underlying principle is to provide a secure, transparent, and tamper-proof platform for
conducting elections. The system's intricate workings can be divided into several key stages, each
contributing to the overall integrity and success of the e-voting process. At the heart of the project
lies the blockchain network, a distributed and decentralized ledger that ensures the immutability and
transparency of all transactions. The project team selects a suitable blockchain platform based on
factors such as security features, scalability, and consensus mechanisms. This blockchain serves as
the foundation for the e-voting system, providing a secure environment where all voting data and
actions are recorded in a transparent and unalterable manner. The process begins with voter
registration, where eligible participants provide their information and undergo identity verification.
Upon successful verification, each voter is issued a unique cryptographic key that serves as their
digital identity. This key ensures that only authorized voters can participate and prevents any form
of duplication or fraud. The decentralized nature of the blockchain guarantees that this sensitive
information remains secure and private. As the election date approaches, voters log into the system
using their cryptographic keys and cast their votes through a user-friendly interface. The process of
vote casting involves the encryption of the voter's choice using their cryptographic key. Once
encrypted, the vote is added to the blockchain, creating an indelible record of the transaction. This
encryption guarantees the anonymity of the voter while ensuring that their vote remains confidential
and tamper-proof. Simultaneously, the smart contracts governing the e-voting process come into
play. These intelligent, self-executing contracts define the rules and logic of the voting process.
They ensure that votes are counted accurately, that no voter casts more than one vote, and that the
results remain tamper-proof. The decentralized nature of blockchain technology ensures that these
contracts are executed across the network, eliminating the need for a central authority and reducing
the risk of manipulation. As votes continue to be cast, the blockchain records each transaction in
real-time. This transparency enables all stakeholders, including candidates, auditors, and voters, to
monitor the process and verify the accuracy of the results independently. The decentralized and
immutable nature of the blockchain prevents any unauthorized changes to the voting data,
enhancing the system's integrity and trustworthiness. Once the voting period ends, the smart
contracts automatically tally the votes based on predefined rules.
The results are then publicly accessible on the blockchain, allowing for real-time verification and
auditing. The transparency of the process fosters public trust and ensures that the election
outcomes are credible and free from manipulation. Throughout the entire process, the system's
security features play a pivotal role. Encryption ensures the confidentiality of voters' choices,
while multi-factor authentication safeguards against unauthorized access. The distributed nature of
the blockchain makes it highly resistant to hacking and fraud attempts, ensuring that the integrity
of the election is upheld. Moreover, the project's emphasis on education and outreach plays a
critical role in its working. The public is educated about the benefits of the blockchain-based e-
voting system, addressing concerns and increasing participation. Voter education campaigns help
participants understand the technology and its potential, fostering a more informed and engaged
electorate. The working of the Decentralized Blockchain E-voting Project showcases a seamless
integration of cutting-edge technology and democratic principles. By leveraging blockchain's
transparency, security, and decentralization, the project aims to redefine the way elections are
conducted. Through a robust process of registration, vote casting, smart contract execution, and
results verification, the e-voting system ensures a fair, secure, and transparent electoral process
that empowers citizens, fosters trust, and strengthens the foundations of democracy.

Results :

Setting up: The first thing that we need to do is run local blockchain by starting up Ganache. After
setting up ganache there will be not any transaction as we have not done any transaction yet. As
we can see from the snapshot below there is no transaction. After that we use truffle framework to
transfer the smart contract to the blockchain by giving command on the command line. After
migrating the smart contract, we start the project using We have also used NPM directory by cmd.
Following NPM directory by cmd.

Fig. Setting up Ganache


Fig. Snapshot of No Transaction

User Interface: User interface is through which users can interact with the e-voting system. The
picture bellow is how user will see the interface. The loading screen will continue to display
loading until the electorate login through metamask. Below secreen will be displayed when the
electorate is logging in through metamask.

Fig. User login


Fig. Main Screen

After the user has logged in, main screen comes up with zero vote, the user cannot vote until
they import their account by entering private key. The private key is given in advance to the user
that will look like Figure below.

Fig. Private key

Fig. Importing Account.


Checking the Transactions: The transaction list will be available publicly to provide the user with
convenience to tally their votes respectively. The users can check their votes given by them by
looking into the transaction list. An entire transaction list will be like one given in figure below.

Fig. Confirming Transaction.

Fig. Result on Main Page.

Fig. Transaction List.


Conclusion:

The culmination of the Decentralized Blockchain E-voting Project marks a significant milestone
in the realm of modern democratic processes. Through the fusion of cutting-edge blockchain
technology and the fundamental principles of participatory governance, this project presents a
bold attempt to redefine how societies engage in the electoral process. By embarking on this
journey, the project seeks to address key challenges that have historically plagued traditional
voting systems, including concerns related to transparency, security, and accessibility. Throughout
the course of this project, a multi-faceted approach was adopted to achieve its overarching
objectives. The initial focus was on building a robust technological infrastructure, which involved
the selection of an appropriate blockchain platform, the formulation of smart contracts governing
the various stages of the voting process, and the creation of an intuitive user interface. By
meticulously implementing cryptographic techniques, tamper-proof audit trails, and decentralized
identity verification, the project aimed to mitigate vulnerabilities that have previously marred
electoral integrity. The project's aspirations went beyond technology; they extended into the realm
of societal engagement and empowerment. Recognizing the significance of educating citizens
about this novel e-voting paradigm, extensive outreach efforts were launched to raise awareness
about blockchain's transformative potential. Public seminars, workshops, and educational
materials played an instrumental role in dispelling misconceptions, instilling confidence, and
inspiring active participation. As the project transitioned from development to deployment,
rigorous testing assumed paramount importance. The comprehensive simulation of various voting
scenarios allowed for the identification and rectification of potential flaws, underscoring the
commitment to delivering a reliable, functional, and trustworthy system. Ethical hacking and
security audits further bolstered the project's resilience against potential threats, ensuring that it
adhered to the highest standards of cybersecurity. Throughout its journey, the project remained
grounded in the ethos of inclusivity and accessibility. By designing interfaces that accommodated
diverse technological competencies and ensuring compatibility with various devices, the project
aimed to erase the barriers that might deter citizens from engaging in the electoral process. The
system's architecture was engineered with scalability in mind, ensuring that it could seamlessly
accommodate an increasing number of participants without compromising its performance.
However, it's important to acknowledge that this ambitious project encountered its fair share of
challenges. The integration of complex blockchain technology into a domain deeply ingrained in
traditional practices required a delicate balance between innovation and adherence to established
norms. Regulatory considerations, interoperability issues, and the need for cross-sector
collaboration posed formidable obstacles that demanded innovative solutions and adept
negotiation.
In conclusion, the Decentralized Blockchain E-voting Project stands as a testament to the potential
of technology to reshape democratic processes. It encapsulates a journey that spanned
technological innovation, public awareness campaigns, rigorous testing, and adaptive problem-
solving. By providing an alternative paradigm for elections—one that marries the attributes of
security, transparency, and accessibility—the project aims to inspire a global shift towards a more
participatory and accountable governance framework. Its success lies not merely in the
operationalization of a sophisticated e-voting system but in the empowerment it offers to citizens,
reaffirming the principle that the cornerstone of democracy is the collective voice of its people. As
this project reaches its conclusion, it invites us to contemplate the future landscape of democratic
engagement, where technology and civic responsibility converge to pave the way for a more
inclusive and resilient society.

You might also like