100% found this document useful (2 votes)
3K views

Voting System Mini Project Report

The document describes a project report on developing an electronic voting system using blockchain technology. It was submitted by three students - Shrenath A.R., Adhithya E., and Dhinesh D. - under the guidance of Dr. N. Poonguzhali. The report introduces the proposed system for developing a blockchain-based e-voting system and addresses limitations in existing electronic voting methods. It includes the implementation details, source code, screenshots and an evaluation of the proposed system. The goal is to create a secure, transparent and verifiable e-voting system leveraging the properties of blockchain technology.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
3K views

Voting System Mini Project Report

The document describes a project report on developing an electronic voting system using blockchain technology. It was submitted by three students - Shrenath A.R., Adhithya E., and Dhinesh D. - under the guidance of Dr. N. Poonguzhali. The report introduces the proposed system for developing a blockchain-based e-voting system and addresses limitations in existing electronic voting methods. It includes the implementation details, source code, screenshots and an evaluation of the proposed system. The goal is to create a secure, transparent and verifiable e-voting system leveraging the properties of blockchain technology.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

ELECTRONIC VOTING SYSTEM USING

BLOCKCHAIN TECHNOLOGY

MINI PROJECT REPORT


Submitted by

SHRENATH A.R. REGISTER NO: 20TK0001


ADHITHYA.E REGISTER NO: 20TK0002
DHINESH D REGISTER NO: 20TK0004

Under the guidance of

Dr. N. POONGUZHALI, Ph.D.,


Associate Professor, DEPT OF CSE (IoT &CS)

in partial fulfillment for the award of the degree

of

BACHELOR OF TECHNOLOGY

in

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING (INTERNET OF


THINGS AND CYBER SECURITYINCLUDING BLOCK CHAIN TECHNOLOGY)

MANAKULA VINAYAGAR INSTITUTE OF TECHNOLOGY,


KALITHEERTHALKUPPAM, PONDICHERRY
PONDICHERRY UNVIERSITY, INDIA.
MAY 2023
MANAKULA VINAYAGAR INSTITUTE OF TECHNOLOGY
PONDICHERRY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING (INTERNET OF

THINGS AND CYBER SECURITYINCLUDING BLOCK CHAIN TECHNOLOGY)

BONAFIDE CERTIFICATE

This is to certify that the project work entitled “ELECTRONIC VOTING SYSTEM USING
BLOCKCHAIN TECHNOLOGY” is a bonafide work done by A.R.SHRENATH
[REGISTER NO: 20TK000], ADHITHYA.E [REGISTER NO: 20TK0002], DHINESH.D
[REGISTER NO: 20TK0004] in partial fulfillment of the requirement for the award of B.Tech
Degree in DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING (INTERNET OF
THINGS AND CYBER SECURITY INCLUDING BLOCK CHAIN TECHNOLOGY) by
Pondicherry University during the academic year 2022-23.

PROJECT GUIDE HEAD OF THE DEPARTMENT

Dr. N. POONGUZHALI, Ph.D. Dr. N. POONGUZHALI, Ph.D.


ASSOCIATE PROFESSOR. ASSOCIATE PROFESSO & HOD
ACKNOWLEDGEMENT

We are personally indebted to a number of persons that a complete acknowledgement


would be encyclopedic. First of all, We love to record our deepest gratitude to the Almighty
Lord and our family.

We express our sincere thanks to our Chairman and Managing Director


Shri.M.DHANASEKARAN for all his encouragement and moral support. We thank our Vice
Chairman Shri.S.V.SUGUMARAN and Secretary Dr.K.NARAYANASAMY for his support
and encouragement.

It gives us great ecstasy of pleasure to convey our deep and sincere thanks to our Principal Dr. S.
MALARKKAN, for giving constant motivation in succeeding our goal.

With profoundness we would like to express our sincere thanks to Dr.N. POONGUZHALI ,
Head of the Department, Computer Science Engineering (Internet of Things and Cyber Security
Including Block Chain Technology), for her kindness in extending the infrastructural facilities to
carry out our project work successfully.

We extend our sincere and heartfelt thanks to our guide Dr. N. POONGUZHALI, Associate
Professor, Department of Computer Science Engineering (Internet of Things and Cyber Security
Including Block Chain Technology) for providing the right ambience for carrying out this work
and her valuable guidance and suggestions for our project work. I thank her for the continuous
encouragement and the interest shown on us to bring out our project work at this stage and also
for providing the freedom that we needed and wanted.

We would like to express our gratitude to all teaching and non-teaching staff members of our
Department for the support they extended during the course of this project.
TABLE OF CONTENTS

CONTENT NO TITLE PAGE NO

1 BONAFIDE CERTIFICATE

2 KNOWLEDGEMENT

3 TABLE OF CONTENTS

4 ABSTRACT

5 INTRODUCTION

6 EXISTING SYSTEM

7 PROPOSED SYSTEM

8 SOURCE CODE

9 SAMPLE SCREEN SHOTS


Problem Definition

Current voting systems like ballot box voting or electronic voting suffer from various security
threats such as DDoS attacks, polling booth capturing, vote alteration and manipulation, malware
attacks, etc, and also require huge amounts of paperwork, human resources, and time. This
creates a sense of distrust among existing systems.

Abstract

The Proposed system presents an effort to leverage benefits of blockchain such as cryptographic
foundations and transparency to achieve an effective scheme for evoting. The proposed scheme
conforms to the fundamental requirements for e-voting schemes and achieves end-to-end
verifiability. The report presents details of the proposed e-voting scheme along with its
implementation using Multichain platform. The system presents in-depth evaluation of the
scheme which successfully demonstrates its effectiveness to achieve an end-to-end verifiable e-
voting scheme.

Introduction

Electronic voting or e-voting has been used in varying forms since 1970s with fundamental
benefits over paper based systems such as increased efficiency and reduced errors. But, there
remain challenges to achieve wide spread adoption of such systems especially with respect to
improving their resilience against potential faults. Blockchain is a disruptive technology of
current era and promises to improve the overall resilience of e-voting systems.

Elections are fundamental pillar of a democratic system enabling the general public to express
their views in the form of a vote. Due to their significance to our society, the election process
should be transparent and reliable so as to ensure participants of its credibility. Within this
context, the approach to voting has been an ever evolving domain. This evolution is primarily
driven by the efforts to make the system secure, verifiable and transparent. In view of its
significance, continuous efforts have been made to improve overall efficiency and resilience of
the voting system. Electronic voting or e-voting has a profound role in this. Since its first use as
punched-card ballots in 1960’s, e-voting systems have achieved remarkable progress with its
adaption using the internet technologies.

However, e-voting systems must adhere to specific benchmark parameters so as to facilitate its
widespread adoption. These parameters include anonymity of the voter, integrity of the vote and
non-repudiation among others. Blockchain is one of the emerging technologies with strong
cryptographic foundations enabling applications to leverage these abilities to achieve resilient
security solutions. A Blockchain resembles a data structure which maintains and shares all the
transactions being executed through its genesis. It is primarily a distributed decentralized
database that maintains a complete list of constantly germinating and growing data records
secured from unauthorized manipulating, tampering and revision.

Electronic voting has been an area of research focus for many years by using computing
machines and equipment for casting votes and producing high quality and precise results in
accordance with the sentiments of the participating voters. Various attempts have been adopted
in practice to support election process. Initially computer counting system allowed the voter to
cast vote on papers. Later on, those cards went through the process of scanning and tallying at
every polling cell on a central server. Direct Recording Electronic (DRE) voting systems were
put in place later on which were admired and acknowledged greatly by the voters in-spite of the
resistance from computer scientists. If the voting system is well understood by the voters, the
system’s usability can be increased remarkably.

DRE systems in particular have gathered a lot of successes in bringing the voters to use this
technology. These systems work more or less in the same way as any conventional election
system does. In the case of DRE, a voter begins his journey by going to their polling place and
get their token to vote where he utilizes his token at the voting terminal to vote for his candidate.
When the candidate selection procedure is completed, DRE systems present the final selection to
the voter before actually casting it (in case if the voter wants to change his opinion) and after the
final selection, the ballot casting is completed.
More recently, distributed ledger technologies such as blockchain have been used to achieve e-
voting systems primarily due to their advantages in terms of end-to-end verifiability. With
properties such as anonymity, privacy protection and non-repudiation, blockchain is a very
attractive alternative to contemporary e-voting systems.

Existing system

The existing approaches perform well for end-to-end verifiability without compromising the
privacy of voters. In the implementation of decentralized and self-tallying internet voting
protocol over the blockchain using Ethereum. Since current voting systems don’t suffice to
security needs of modern generation, there is a need to build a system that leverages security,
convenience, and trust involved in voting process. Hence voting systems make use of Blockchain
technology to add an extra layer of security and encourage people to vote from any time,
anywhere without any hassle and makes voting process more cost-effective and time-saving.

Proposed System

MetaMask : A software cryptocurrency wallet , which is used to interact with the Ethereum
blockchain. It allows users to access their Ethereum wallet through a browser extension or
mobile app, which can then be used to interact with decentralized applications. Truffle and
Ganache : Truffle is a framework that was used throughout the process of developing the
prototype. It was helpful by having the ability to act as a package manager, but also came with
built-in functionality to compile Solidity code and deploy it to a blockchain. Truffle offered three
different commands: truffle compile, truffle migrate and truffle test which were used to compile
the contracts, deploy them to a blockchain on the network and perform tests on them. Ganache
was used to simulate an Ethereum blockchain on a local machine. It came in two different
representations, GUI and CLI.

The generic requirements for a typical e-voting system have been defined in. We present a brief
description of each requirement along with an explanation of how the proposed system fulfils it.
Privacy - Keeping an individual’s vote secret The system leverages cryptographic properties of
blockchain to achieve privacy of a voter. More specifically, as voter is registered into the system,
a voter hash is generated by blockchain which is the unique identifier of a voter into the
blockchain, and is protected from misuse due to collision resistance property of the
cryptographic hash. Due to this, the traceability of a vote is also non-trivial thereby protecting
the voter when under duress.

Eligibility - Allowing only registered voters to vote, with each such voter voting only once All
eligible users are required to register using unique identifiers such as government-issued
documents to assert their eligibility. In addition to this, our system implements strong
authentication mechanism using finger printing technology to assert that only authorized voters
can access the system.

Furthermore, the use of biometrics also enables the system to protect against double voting.
Receipt Freeness - Voters should be unable to prove to a third party that they voted in a
particular way The proposed system enables a voter to vote as per their choice and creates a
cryptographic hash for each such event (transaction). This is important to achieve verifiability
i.e. to verify if a certain vote was included in the count. However, possession of this hash does
not allow to extract information about the way voter has voted.

Convenience - Voters must be able to vote easily, and everyone who is eligible must be able to
vote The system has been implemented using a user friendly web based interface with the voting
process requiring minimal input from the user. For instance, fingerprinting is implemented for
authentication mechanism to avoid the requirement to remember username/passwords.
Furthermore, the overall process is integrated which enables the user to interact with it in a
seamless manner.

Verifiability - The ability to trust the vote tallying process Upon casting their vote successfully, a
user is provided with their unique transaction ID in the form of a cryptographic hash. A user can
use this transaction ID to track if their vote was included in the tallying process.
Architecture Diagram

However, this process does not enable a user to view how they voted which has been adopted to
mitigate threats when under duress. The analysis presented above highlights the performance of
the proposed system with respect to the specific requirements of e-voting. It also highlights the
significance of defining characteristics of blockchain and their profound role in achieving the
cornerstones of an efficient e-voting system. Therefore, we believe the work presented here
makes significant contribution to the existing knowledge with respect to the application of
blockchain technology to achieve a secure digital voting system.
Source Code

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract VotingSystem {

struct Candidate {

string name;

uint256 voteCount;

Candidate[] public candidates;

mapping(address => bool) public voters;

uint256 public totalVotes;

bool public votingOpen;

event VoteCast(address indexed voter, uint256 candidateId);

constructor(string[] memory _candidateNames) {

require(_candidateNames.length > 0, "At least one candidate is required");

for (uint256 i = 0; i < _candidateNames.length; i++) {

candidates.push(Candidate({ name: _candidateNames[i], voteCount: 0 }));

}
votingOpen = true;

modifier onlyOpen() {

require(votingOpen, "Voting is closed");

_;

function castVote(uint256 _candidateId) public onlyOpen {

require(!voters[msg.sender], "You have already voted");

require(_candidateId < candidates.length, "Invalid candidate");

candidates[_candidateId].voteCount++;

voters[msg.sender] = true;

totalVotes++;

emit VoteCast(msg.sender, _candidateId);

function closeVoting() public {

require(votingOpen, "Voting is already closed");

votingOpen = false;

}
function getCandidatesCount() public view returns (uint256) {

return candidates.length;

function getCandidate(uint256 _candidateId) public view returns (string memory, uint256) {

require(_candidateId < candidates.length, "Invalid candidate");

return (candidates[_candidateId].name, candidates[_candidateId].voteCount);

// SPDX-License-Identifier: MIT

pragma solidity >=0.4.25 <0.9.0;

contract Ballot {

struct Voter {

uint256 aadharNumber; // voter unique ID

string name;

uint8 age;

uint8 stateCode;

uint8 constituencyCode;

bool isAlive;

uint256 votedTo; // aadhar number of the candidate

}
struct Candidate {

// Note: If we can limit the length to a certain number of bytes,

// we can use one of bytes1 to bytes32 because they are much cheaper

string name;

string partyShortcut;

string partyFlag;

uint256 voteCount; // number of accumulated votes

uint256 nominationNo; // unique ID of candidate

uint8 stateCode;

uint8 constituencyCode;

address electionCommision;

uint256 private votingStartTime;

uint256 private votingEndTime;

mapping(uint256 => Voter) internal voter;

mapping(uint256 => Candidate) internal candidate;

function isVoterEligible(uint256 voterAadharNumber)

public

view

returns (bool voterEligible_)

Voter storage voter_ = voter[voterAadharNumber];


if (voter_.age >= 18 && voter_.isAlive) voterEligible_ = true;

function getCandidateList(uint256 voterAadharNumber)

public

view

returns (Candidate[] memory)

Voter storage voter_ = voter[voterAadharNumber];

uint256 _politicianOfMyConstituencyLength = 0;

for (uint256 i = 0; i < candidates.length; i++) {

if (

voter_.stateCode == candidates[i].stateCode &&

voter_.constituencyCode == candidates[i].constituencyCode

) _politicianOfMyConstituencyLength++;

Candidate[] memory cc = new Candidate[](

_politicianOfMyConstituencyLength

);

uint256 _indx = 0;

for (uint256 i = 0; i < candidates.length; i++) {

if (

voter_.stateCode == candidates[i].stateCode &&

voter_.constituencyCode == candidates[i].constituencyCode

){

cc[_indx] = Candidate({
name: candidates[i].name,

partyShortcut: candidates[i].partyShortcut,

partyFlag: candidates[i].partyFlag,

voteCount: 0,

nominationNo: candidates[i].nominationNo,

stateCode: candidates[i].stateCode,

constituencyCode: candidates[i].constituencyCode

});

_indx++;

return cc;

function vote(

uint256 candidateNominationNo,

uint256 voterAadharNumber,

uint256 currentTime_

public

areVotingLinesOpen(currentTime_)

isEligibleVote(voterAadharNumber, candidateNominationNo)

// updating the current voter values

voter[voterAadharNumber].voted = true;
voter[voterAadharNumber].votedTo = candidateNominationNo;

// Incrementing the votes to the relevant candidate.

for (uint256 i = 0; i < candidates.length; i++) {

// we can't iterate via map to find who got most votes,

// so it has to be updated in array only

if (candidates[i].nominationNo == candidateNominationNo) {

candidates[i].voteCount++;

break;

modifier areVotingLinesOpen(uint256 currentTime_) {

require(currentTime_ >= votingStartTime);

require(currentTime_ <= votingEndTime);

_;

modifier isEligibleVote(uint256 voterAadhar_, uint256 candidateAadhar_) {

Voter storage voter_ = voter[voterAadhar_];

Candidate storage politician_ = candidate[candidateAadhar_];

require(voter_.age >= 18);

require(voter_.isAlive);

require(!voter_.voted);
require(

(politician_.stateCode == voter_.stateCode &&

politician_.constituencyCode == voter_.constituencyCode)

);

_;

Sample Screen Shots

You might also like