0% found this document useful (0 votes)
11 views6 pages

Blockchain-Based E-Voting System

The document discusses the implementation of an E-voting system using blockchain technology to enhance security, transparency, and voter turnout. It highlights the drawbacks of traditional voting methods and proposes a decentralized application on the Ethereum network that utilizes smart contracts for secure voting. The paper also outlines the design, functionality, and advantages of the proposed system, while comparing it to existing e-voting solutions.

Uploaded by

xdxenon18
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
0% found this document useful (0 votes)
11 views6 pages

Blockchain-Based E-Voting System

The document discusses the implementation of an E-voting system using blockchain technology to enhance security, transparency, and voter turnout. It highlights the drawbacks of traditional voting methods and proposes a decentralized application on the Ethereum network that utilizes smart contracts for secure voting. The paper also outlines the design, functionality, and advantages of the proposed system, while comparing it to existing e-voting solutions.

Uploaded by

xdxenon18
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

E-Voting using Blockchain Technology

Harshit Verma Karan Khadipure


Computer Engineering Dept. Computer Engineering Dept.
SATI, Vidisha SATI,Vidisha

Kanishk jagdev Himanshu Sonkunwar


Computer Engineering Dept. Computer Engineering Dept.
SATI, Vidisha SATI, Vidisha

Abstract — Democratic voting is a crucial and serious event in world can be followed momentarily and clearly. There is no
any country, the current voting scheme in any country is need for a central authority to approve or complete the
through ballot paper or by use of EVM. These processes have operations on this P2P-based system.
many drawbacks such as transparency, low voter turn-out,
tampering of votes, distrust in the election body, forging of Because of that, not only the money transfers but also all
unique Id (voter id card), delay in giving out results and the kinds of structural information can be kept in this distributed
most important is security issues. Security of digital voting is chain, and with the help of some crypto-logical methods, the
always the biggest concern when considering to implement a system can be maintained securely. Like people's assets,
digital voting system. With such monumental decisions at
marriage certificates, bank account books, medical
stake, there can be no doubt about the system’s ability to secure
information, etc., a lot of information can be recorded with
this system with relevant modifications [3]. Ethereum coin
data and defend against potential attacks. One way the security
(Ether), another cryptocurrency with multipurpose
issues can be potentially solved is through the use of blockchain
development environments, which emerged a few years
technology. Blockchain technology offers infinite number of
after Bitcoin, distinguishes the blockchain in a real sense,
applications. Blockchain is a distributed ledger technology that
revealing that this technology can produce software that can
allows digital assets to be transacted in a peer-to-peer
hold information that is structured as described above. The
decentralized network. A distributed ledger technology is an
software programs enforced by smart contracts [4]
exciting advancement in this regard. Block is a collection of all (explained later) are written into the blockchain and are
the transactions. Blockchain possess salient features such as immutable. They cannot be (illegally) removed nor
immutability, Decentralization, Security, Transparency and manipulated once written. Hence, they can work properly,
anonymity. Blockchain with smart contracts emerges as a autonomously and transparently forever, without any
promising candidate for building a safer, secure and external stimuli [5].
transparent E-voting systems. In this paper we have
implemented and tested a sample e-voting application as a Blockchain stores transactions in a block, the block
smart contract for the Ethereum network using the blockchain eventually becomes completed as more transactions are
technology through wallets and the Solidity language. Limited carried out. Once complete it is then added in a linear,
amount of token(gas) is given in the wallet which is exhausted chronological order to the blockchain
when the user votes thus preventing duplicity of votes. This
paper also highlights the pros and cons of using blockchain
technology and also demonstrates a practical system by
showcasing a webapp for voting and its limitations. The initial block in a blockchain is known as the
‘Genesis block’ or ‘Block 0’. The genesis block is usually
Keywords— E-voting, Smart-contracts, Blockchain, hardcoded into the software; it is special in that it doesn’t
Ethereum contain a reference to a previous block. (‘Genesis Block’,
2015) Once the genesis block has been initialised ‘Block 1’
I. INTRODUCTION is created and when complete is attached to the genesis
Blockchain technology that shines like a star after the block. Each block has a transaction data part, copies of each
entrance and widespread acceptance of Bitcoin [1], the very transaction are hashed, and then the hashes are paired and
first cryptocurrency in peoples’ everyday life, has become a hashed again, this continues until a single hash remains; also
trending topic in today's software world[2]. Blockchain known as a merkle root (Figure 1).
technology originates from the underlying architectural
design of the cryptocurrency bitcoin, where it was first
introduced to the internet world and sooner became a
promising technology due its high degree of transparency in
the system it become an active field of research and study
for its application various other fields For example, in
Bitcoin, since the wallets are in a distributed structure, the
total amount of coins and instant transaction volume in the
valued in democratic societies is a robust electoral process
that provides transparency and privacy. Today, a lot of
decisions are being made by people (and members in
organizations)[2].

The current voting scheme raises many questions such


as how reliable and transparent the system is, are the votes
not changed before they are counted, how can we verify the
transparency of the system. So to tackle this kind of
questions in this paper we investigate and propose a web-
application using the blockchain technology over the
Ethereum server by deploying smart contracts. In the 2
section we discuss about the current deployment of e-voting
systems and further on we discuss limitations of it.

II. MOTIVATION AND RELATED WORKS


Our main motivation in this project is to provide a secure
voting environment and show that a reliable e-voting
Figure 1- Hash table
scheme is possible using blockchain. Because, when e-
voting is available for everyone who has a computer, or a
The block header is where the merkle root is stored. To mobile phone, every single administrative decision can be
ensure that a transaction cannot be modified each block also made by people and members; or at least people’s opinion
keeps a record of the previous blocks header, this means to will be more public and more accessible by politicians and
change data you would have to A blockchain is designed to managers. This will eventually lead humanity to the true
be accessed across a peer-to-peer network, each node/peer direct democracy [6]. It’s important for us since elections
then communicates with other nodes for block and can easily be corrupted or manipulated especially in small
transaction exchange. Once connected to the network, peers towns, and even in bigger cities located in corrupt countries.
start sending messages about other peers on the network, Plus, large-scale traditional elections are very expensive in
this creates a decentralised method of peer discovery. The the long term, especially if there are hundreds of
purpose of the nodes within the network is to validate geographically distributed vote centers and millions of
voters [7]. Also, the voter turn-out at the voting centers is
unconfirmed transactions and recently mined blocks, before
relatively low as the person might not be staying at the
a new node can start to do this it first has to carry out an
address his name is enrolled in the list, or he might be out
initial block download. The initial block download makes for vacation or any other work. E-voting will be able solve
the new node download and validate all blocks from block these problems, if implemented carefully. The concept of e-
1 to the most current blockchain, once this is done the node voting is significantly older than blockchain. So that, all
is considered synchronised known examples so far used means of centralized
computation and storage models.
Estonia is a very good example, since the government of
Estonia is one of the first to implement a fully online and
comprehensive e-voting solution [8]. The concept of e-
voting was started to be debated in the country in 2001 and
officially started by the national authorities in the summer
of 2003 [9]. Their system is still in use, with many
improvements and modifications on the original scheme. As
reported, it is currently very robust and reliable. They use
smart digital ID cards and personal card readers (distributed
by the government) for person-wise authentication [10]. For
Figure-2 Simplified bitcoin blockchain([Link])
citizens to attend the elections by listing the candidates and
casting a vote, there is a special web portal as well as an
equivalent desktop app. So that, anyone having a computer
Blockchain might be a suitable solution for e-voting and Internet connection and also his/her ID card, can easily
projects. E-voting is being studied extensively, and many vote remotely.
implementations are tested and even used for a while.
However, very few implementations are reliable enough and
are still in use. Of course, there are many successful
examples of online polls and questionnaires, yet we cannot
claim the same for online elections for governments and
businesses. That’s mainly because, official elections are
essential elements of the democracy and democratic
administrations, which are the most preferred administrative
methodology in the modern world. More, what is most
People can also digitally create petitions and proposals In this paper we build a system by integrate the
for acts and laws at the parliament’s website blockchain paradigm into e-voting procedure and come up
([Link] These petitions can be digitally with a feasible and general e-voting protocol without a TTP,
signed using the smart ID card by any citizen who wants to which provides a secure and flexible voting mechanism,
support the proposal. If proposals achieve a certain number which satisfies almost all of the main requirements for an e-
of signatures, they are discussed in the parliament. That’s voting system and strengthens the power of the election
another good example showing how technology can organized.
strengthen the democracy. Though being considerably
successful and reaching nearly 30% penetration rate during III. IMPLEMENTATION AND DISCUSSION
recent elections, the Estonian model has some drawbacks, In this section we will illustrate the design and functional
too. The centralized solution, by its nature, creates a single- phase of our application, The User accesses the web
point-of-failure and is open to hacking/hijacking attempts. application where the platform is hosted and register’s itself
In example, Distributed Denial of Service (DDoS) attacks as well as cast its vote in an secured and transparent manner.
can harm the software, servers or databases used. The Fig 3 depicts the overview of the application.
administrators of such a system may act malicious and steal, 1. Registration Phase: The Voter has to Register itself
if cannot manipulate, some valuable information during an first with its unique id and attributes such as name
election. The scalability of this system is another question. roll no and mobile number. All this data is stored in
Since Estonia has a relatively small population, it is hard to the database.
estimate if such a system would work flawlessly in, say, 2. Login: The voter after registration tries to login
China. The constant need for the ID card and the reader themselves to cast a vote. In this phase voter first
device is not nice, too, due to the extra cost of producing, logs in using password. After successful login, to
distributing, and carrying (for voters) them. cast their vote voter has to authenticate themselves.
Switzerland is another one of the few countries For real-time authentication OTP verification is
participating in the electronic voting trend. In Switzerland, used for enhanced security.
known for its widespread democracy, every citizen who 3. Blockchain Technology: This technology is mainly
completes the age of 18 can take an active or passive role in used for its security features. Blockchain provides a
the elections, which may be held in many different topics secure and transparent environment. Blockchain
for many different decisions. They have also begun an encrypts the voter message (Casted vote) using
official work on a voting system called remote voting [11]. Asymmetric encrypting algorithm. A public key is
Example - Sierra Leone’s March 2018 general election – provided by Blockchain and private key is with
Swiss startup Agora carried out tallying in two districts. host. Public key is used for verification purpose by
After the voting, a team of accredited observers from ledger..
different locations manually entered approximately 400,000 4. Database: User database is stored in database.
ballots into Agora’s blockchain system. These system was Details like name, gender, Unique Id are stored is
the partial deployment of blockchain and the votes were database. MySQL is the proposed database to be
verified by blockchajn and they were not blockchain used.
powered 5. Ethereum Network: Ethereum network provides a
framework for blockchain creation and storage.
similar commercial or experimental work was carrried out
Every block is created and its details are stored in an
in the Russian city of Moscow for its Active Citizen
encrypted ledger. These created blocks are
program –In December 2017. the program started using a
distributed among nodes which provides high fault
blockchain for voting and to make the voting results
tolerance to the system.
publicly auditable. Each question discussed by the
6. Result phase: The processing and tallying of votes
community and put up for voting is moved to the e-voting
is done in results phase. Results are generated and
system using a blockchain. After the voting is complete, the
displayed on website. Users can verify their votes
results are listed on a ledger containing all the previous
using their own public key. This provides
poll[10]
transparency to the voting system
As an online polling example, rather than an e-voting
system, [Link] is a popular and free
service. It’s a simple website that allows everyone to create
questionnaires and allows answering others’ polls with
votes. It shows how powerful can be e-voting, because
everyone easily accesses the election and uses his/her votes
and declares his/her choice. People can share private
hyperlinks to any created poll (as long as they know the link)
and people who have the link can vote and one browser can
only use one vote. The security here, in terms of voter
authentication, duplicate votes and non-repudiation of
votes, is very weak. [Link] trusts people
about they will not violate the election process while
benefiting ease of access and using features of e-voting.
Hence, it cannot be used in real cases such as choosing the
Figure 3 – System Overview
chairman of a department, etc[2].
The application is built using the architectural pattern of then smart contracts are where all the business logic that
Model-View-Controller. It is also widely used architecture. transacts with that data lives. Smart contracts represent a
Here, the application is divided into three main logical covenant or agreement, In our application its is an
components: the model, the view and the controller. agreement that user’s vote will count, others vote will be
counted only once and the candidates with highest vote will
• View: The top layer is where the end-user
be declared the winner.
communicates with the application through clicking
buttons, typing details, accessing camera, selecting radio Step first to build our application is installing all the
button, uploading songs, etc. This layer is responsible for dependencies and then writing our contract and deploying it
displaying all data or a portion of data to user based on the to the blockchain successfully. To create the contract
requirement of the application. This layer also acts as a declare the smart contract with the "contract" keyword,
bridge between the user and application itself. followed by the contract name. Next, we declare a state
• Controller: This middle layer of the application variable that will store the value of the candidate name.
contains the business logic, and the main functionality of the State variables allow us to write data to the blockchain
application. As soon as the user interacts with the constructor is called whenever we deploy the contract. Fig
application, the response is processed in this layer. From – 5 shows the structure, variable and contract declaration.
log-in to casting vote, all the functions that run in
background belong to this layer. This mainly consists of all We have specified that struct candidate has an id of
the functions and sending output to view layer unsigned integer type, name of string type, and the vote
count of unsigned integer type. To store these structs we use
• Model: This layer is responsible for maintaining the
solidity mapping which is like associative array or a hash,
user’s data. Relational Database MySQL is used for storing
that associates key-value pairs.
user data.
here the key to mapping is unsigned integer and value is
Candidate structure type and mapping’s visibility is set to
public so as to get a getter function.
The complete contract code contains mapping, function
to add candidates and smart contract called contract election
.

Figure-4 MVC architecture

In our application for a user to vote he/she needs an


account with a wallet address and some Ether, Ethereum’s
cryptocurrency. After connecting to the network they cast
their vote and pay a small transaction fee to write their vote
to the blockchain. This transaction fee is called as “gas” in
our application which can be related to some coins. This
transaction fee “gas” is awarded to the miner-node of the
network after he completes the transaction. It’s important to
note that voting on the blockchain costs us some Ether but
seeing the list of candidates is free, because writing to
blockchain costs but reading data from the blockchain is
free.
To code our application Ethereum blockchain allows us to
execute code with Ethereum Virtual machine (EVM) on
blockchain with smart contract. In our application Smart
contracts are responsible of reading and writing data to the
blockchain as well as executing the logic. Smart contracts
are written in programming language called Solidity. If the
public ledger represents database layer of the blockchain,
side application that will talk to our smart contract. we created
our front-end with java script and HTML. To make our
system more secure we have included one more unique
feature other than unique id and password is the OTP(one
time password) feature. We request users to enter their mobile
no on which otp is send and then the system verifies the user.

After creating the webpage we need to log in to the when the user votes by using gas which is rewarded to the
blockchain. To connect to blockchain we need to import one node(miner) whoever writes it to the blockchain, after
of the accounts from ganache- One of the dependencies successful casting of votes results are displayed and
which gives us 10 accounts with account address and some candidate with highest votes is the winner.
fake ethers, into MetaMask. In order to use blockchain we
must install a special browser extension in order to use the shows the elections results after successful casting of
Ethereum blockchain. That’s where MetaMask is used. vote and shows vote casting entry in the chain with
After connecting we can interact with our smart contract and transaction hash, blocks-created till now, contract
will be able to see our contract and account data. address, timestamp, account, block number of the
transaction, gas used, and the total cost during the whole
process of casting.
The next step was to add the ability to cast votes in the
elections. To keep the track of accounts that have voted we In this project, our scope is limited for small-scale polls
define voters and mapped it to the smart contract, and add and elections such as college elections. A larger voting with
‘vote’ function which takes in one argument- candidate-Id. millions of voters may have different problems to address.
It checks that the user hasn’t voted before, candidate is valid, The Ethereum network’s scalability is still unknown and
needs further research, that’s why we cannot suggest use of
recording that user has voted after his voting and then update
these contracts for nation-wide elections, at least for now.
the candidate vote count. Fig-9 depicts the code and
Our contracts are executed in the Ethereum blockchain, so
mapping for casting the vote wherever browser can be run (location, platform, device,
etc.), our voting application can be used, too. A fundamental REFERENCES
problem of blockchain based e-voting systems is to provide [1] S. Nakamoto, “Bitcoin: a peer-to-peer electronic cash system”,
anonymity for voters without compromising the [Online]. Available: [Link] .
transparency of the general voting process. In detail, all the [2] Ali Kaan Koç, Emre Yavuz, Umut Can Çabuk, Gökhan Dalkılıç
transactions (money transfers, votes etc.) are essentially “Towards Secure E-Voting Using Ethereum Blockchain”
written to the blocks of the blockchain as plaintext. So that, [3] G. Wood, "Ethereum: a secure decentralised generalised transaction
ledger", Ethereum Project Yellow Paper, vol. 151, pp. 1-32, 2014.
a vote from wallet address A to wallet address B can be seen [4] C.D. Clack, V.A. Bakshi, and L. Braine, “Smart contract templates:
by anyone who has access to the chain. Which is, of course, foundations, design landscape and research directions”, Mar 2017,
a big disadvantage. And, it is not possible to use such a arXiv:1608.00771.
system for official/critical elections. Providing this [5] E. Maaten, “Towards remote e-voting: Estonian case”, Electronic
anonymity is also a major challenge in the current state-of- Voting in Europe-Technology, Law, Politics and Society, vol. 47, pp.
83-100, 2004.
the-art works. Hao et al. in their work, proposed a solution [6] U.C. Çabuk, A. Çavdar, and E. Demir, "E-Demokrasi: Yeni Nesil
based on the Diffie-Hellman process, which also implies the Doğrudan Demokrasi ve Türkiye’deki Uygulanabilirliği", [Online]
use of public/private key pairs and random numbers, so that Available: [Link]
a “two-round” referendum can supposedly be held with publication/308796230_E-Democracy_The_Next_Generation_
some ballot privacy [12] Direct_Democracy_and_Applicability_in_Turkey/links/5818a6d408
a ee7cdc685b40b/E-Democracy-The-Next-Generation-
[Link].
IV. CONCLUSION [7] "Final report: study on eGovernment and the reduction of
administrative burden (SMART 2012/0061)", 2014, [Online].
In this paper, we introduced a unique, blockchain-based Available: [Link]
electronic voting system that utilizes smart contracts to market/en/news/finalreport-study-egovernment-and-reduction-
enable secure and cost-efficient election while guaranteeing administrative-burdensmart-20120061
[8] F. Hao and P.Y.A. Ryan, Real-World Electronic Voting: Design,
voters privacy By comparison to previous work, we have
Analysis and Deployment, CRC Press, pp. 143-170, 2017.
shown that the blockchain technology offers a new [9] N. Braun, S. F. Chancellery, and B. West. "E-Voting: Switzerland's
possibility for democratic countries to advance from the pen projects and their legal framework–In a European context",
and paper election scheme, to a more cost- and time- Electronic Voting in Europe: Technology, Law, Politics and Society.
efficient election scheme, while increasing the security Gesellschaft für Informatik, Bonn, pp.43-52, 2004.
measures of the todays scheme and offer new possibilities [10] Nir Kshetri, Jeffrey Voas, “Blockchain-Enabled E-Voting”.
[11] P. McCorry, S.F. Shahandashti, and F. Hao, "A smart contract for
of transparency. boardroom voting with maximum voter privacy", International
E-voting is still a controversial topic within both political Conference on Financial Cryptography and Data Security. Springer,
Cham, pp. 357-375, 2017.
and scientific circles. Despite the existence of a few very [12] U.C. Çabuk, T. Şenocak, E. Demir, and A. Çavdar, “A Proposal on
good examples, most of which are still in use; many more initial remote user enrollment for IVR-based voice authentication
attempts were either failed to provide the security and systems”, Int. J. of Advanced Research in Computer and
privacy features of a traditional election or have serious Communication Engineering, vol 6, pp.118-123, July 2017.
usability and scalability issues [8]. On the contrary, [13] Y. Takabatake, D. Kotani, and Y. Okabe, “An anonymous distributed
electronic voting system using Zerocoin“, IEICE Technical Report,
blockchain-based e-voting solutions, including the one we pp. 127-131, 2016.
have implemented using the smart contracts and the
Ethereum network, address (or may address with relevant
modifications) almost all of the security concerns, like
privacy of voters, integrity, verification and non-repudiation
of votes, and transparency of counting. Yet, there are also
some properties that cannot be addressed solely using the
blockchain, for example authentication of voters (on the
personal level, not on the account level) requires additional
mechanisms to be integrated, such as use of biometric
factors [13].
Blockchain technology has lot of promise, but in its
current state its require lot more research and currently
might not reach till its full potential. There needs a
concerted effort in the core blockchain technology to
improve its support for more complex applications.

You might also like