Block Chain Voting System
Block Chain Voting System
INTRODUCTION
Considering the need for trust, some propose leveraging blockchain technology as
a decentralized and transparent bulletin board. Blockchain, functioning as a
decentralized database, introduces innovative tools for developing trustless and
decentralized systems. Unlike traditional systems, blockchain lacks a centralized
coordinator, with each node storing data blocks locally. Originally designed for
secure financial transactions, blockchain's applications have expanded to diverse
fields like the Internet of Things, carbon dating, and healthcare.
Our technique employs threshold encryption, eliminating the need for a trusted
third party to ensure that election results cannot be tallied before the end of the
election. The public and secret key pair setup is part of the encryption process,
with the public key shared among all parties, while the secret key remains separate
and inaccessible until key reconstruction, requiring the contribution of at least n
individuals (Pathak et al., 2021).
Within a block, the Merkle tree block header encompasses multiple transactions.
Cryptography, a secure networking technique combining computer science and
mathematics, ensures the confidentiality of data. It facilitates the secure
transmission of encrypted and decrypted data across an unsecured network.
Fig 1: Blockchain Structure (Jafar..,Aziz., & Shukur., 2021)
However, it's important to note that while blockchain technology can uphold the
anonymity of cryptocurrency transactions, challenges arise in scenarios such as
online voting. While ballots must be accepted anonymously, ensuring that they
originate only from eligible voters, the blockchain alone may not fully address the
issue of voter confidentiality. Additional measures may be necessary to ensure a
comprehensive solution in the context of online voting systems.
The existing voting system employed in the Nigerian electoral process faces
notable inefficiencies. These inefficiencies are evident in several aspects:
1.3.1 Aim
The primary aim of this project is to develop a user-friendly and efficient prototype
of an E-voting system. This system will be based on a digital application that
ensures enhanced security and protection through the implementation of
blockchain technology.
1.3.2 Objectives
This research work is organized into five chapters, each chapter gives the
exposition of the fundamental concepts, procedures, ad implementation of the
project.
Chapter one introduces the background of the study with the statement of the
problem, objectives of the project, its significance, scope and constraints while
previous literature in the understudied topic were reviewed in chapter two. Chapter
three focuses on system investigation, system analysis and design. It details with
detailed investigation and analysis of the existing system and problem
identification. It also proposes the new system. Chapter four covers the system
implementation, results and system integration test. Finally the chapter five discuss
the summary, recommendation and the conclusion of the project.
Chapter Two
Literature Review
This chapter presents a review of the literature on the voting system, types of
voting, security using cryptography and other techniques, countries with electronic
voting systems, places where blockchain-based electronic voting systems have
been used, and related works on electronic voting systems.
Over the years, various types of voting systems have been used in different
countries and regions. Many innovative changes have also been made to strengthen
election systems with the core purpose of reducing various types of election fraud.
Mohammad et al. (2010) and Olowookere and Awode (2014) highlighted various
types of voting systems.
Electronic voting offers several advantages over traditional voting methods. Some
of these include:
iii. Cost: The implementation and maintenance of electronic voting systems can be
expensive compared to the cost of conducting elections in the traditional way.
iv. Reliability: Electronic voting systems rely on technologies that can fail, leading
to potential inaccuracies in the vote count or preventing voters from casting their
votes in case of a failure.
2.1.4 Electronic Voting System Phases
i. Pre-Voting Phase
This phase of electronic voting is the actual voting process. Depending on the
results of the pre-voting phase, this stage enables all eligible voters to make
decisions and cast their votes.
a. Transmission of Vote
After the voting, the electronic voting system conveys the votes via the internet or
a network to a central counting remote location. This often involves the use of
secure communication protocols to guarantee the integrity of the vote.
b. Vote Counting
This phase is one of the most critical steps in elections and is typically done by
software programmed to count the votes.
After vote counting, the results are sent to authorized election officers. Based on
specified rules, the total votes polled by each candidate are displayed and signed
by the authorized election officers.
d. Result Announcement
e. Audit
This phase is used to verify the accuracy of the vote count and ensure the integrity
of the voting process.
Fig 2: E-voting System Phases.
B. Voting Phase: Each valid voter automatically possesses one of the private
keys associated with the public keys stored on the voter list and is familiar
with the public information.
C. Tally Phase: Using the key management scheme established in the setup
phase, key managers disclose their individual secrets to retrieve their
deposits. The smart contract ceases to accept any ballots after the voting
phase.
However, the proposed system has limitations, including its vulnerability to denial-
of-service (DOS) attacks. This vulnerability arises from the absence of a third-
party authority within the scheme responsible for auditing votes after the election
process.
The primary objective of the research is to design a fair, impartial, and transparent
voting system that leverages Blockchain to ensure the security, traceability, and
anonymity of voting data. This approach is intended to prevent data usurpation,
enable verifiability, and protect voter privacy. The exploration of using blockchain
as the underlying technology led to the identification of two key mechanisms: the
Consensus mechanism and the Data verification mechanism.
The implementation underwent testing on the official Ethereum test network with
forty simulated voters, revealing that the voting protocol could be employed for
small-scale elections at a cost of $0.73 per voter. The authors considered this cost
reasonable, given that the voting protocol provided maximum voter privacy and
was publicly verifiable.
This study marked the first implementation of a decentralized internet voting
protocol running on a blockchain, utilizing Ethereum not only as a public bulletin
board but also as a platform for consensus computing, ensuring the correct
execution of the voting protocol. In summary, the authors presented a
groundbreaking study on a smart contract for boardroom voting with maximum
voter privacy using blockchain technology. The research offers a new perspective
on decentralized, trustless, and secure internet voting. The proposed smart contract
implementation of the Open Vote Network introduces a novel approach to
conducting small-scale elections, and the authors express their intent to explore the
possibility of using blockchain for national-scale elections in the future.
a. User Interaction and Front-end Security layer: This critical layer ensures
that only legitimate users gain access to the system through authentication
and authorization processes. Authentication and authorization methods
could vary, encompassing simple username/password to advanced
biometric methods (fingerprint, iris) recognition. This layer serves as the
initial point of contact with users, validating their credentials based on the
system's access control policies.
b. Access Control Management layer: Acting as an intermediary between
layers a and c, this layer provides services such as roles definition to
facilitate the expected functions of these layers.
c. E-Voting Transaction Management layer: At the core of the system, this
layer maps transactions (containing the credentials provided by each voter
at layer a) onto the blockchain for mining.
d. The Ledger Synchronization layer: This layer establishes a connection
between the Multichain ledger and the local database for vote tracking and
secure storage. Votes are recorded, tracked using unique IDs, and secured
through cryptographic hashes. Results are stored in the database for auditing
and future operations.
Research findings suggest that blockchain can serve as a solution for current legal
frameworks regulating contracts across jurisdictions, offering the ability to
maintain a digital ledger without the need for a third party. Additionally,
implementing blockchain architecture in digital rights management systems has the
potential to provide transparency among stakeholders while safeguarding the
security and privacy of individuals.
The research findings indicated that the perspectives of BPE start-ups regarding
blockchain-powered democracy diverge from conventional understandings of
democracy. These start-ups envision a democracy shaped by powerful institutions,
individuals possessing advanced technical skills, and economic interests. This
interpretation of democracy restricts the role of voters in decision-making
processes beyond casting their votes, leaving the ultimate decisions in the hands of
these established powers. The emphasis on appealing to existing elites for BPE
implementation, coupled with a lack of attention to community, collective rights,
and the non-technologically literate population, suggests that BPE developers
prioritize a specific understanding of democracy while overlooking privacy,
security, and accountability concerns related to implementing blockchain
technology for e-voting.
CHAPTER THREE
3.0 INTRODUCTION
In the pursuit of revolutionizing the traditional voting experience and ensuring the
integrity of electoral processes in today's digital age, the "Design and
Implementation of a Blockchain-Based E-Voting System" project embarks on a
crucial phase of its journey. Chapter Three delves into the intricacies of blockchain
analysis, design, and methodology, offering a comprehensive view of how this E-
Voting system is meticulously crafted to enhance the security and transparency of
the electoral process.
The voting process begins with voter registration using the BVAS kit, followed by
voter verification during the voting phase. Votes are cast manually into a ballot
box, and seals are recorded before counting for each elective position. The process
involves breaking seals (in the presence of party agents and observers at the polling
station), emptying contents into a counting container, unfolding ballots to
determine validity, and sorting them by candidate. The counting process includes
filing Forms, bundling counted ballot papers in groups, and filling out Forms along
with a statement of rejected ballots where applicable
The current voting system in Nigeria, relying on the Biometric Verification and
Authentication System (BVAS), exhibits several limitations that warrant careful
consideration. These limitations are crucial to understanding the challenges
associated with the present electoral process.
2. Reliability Concerns:
The manual aspects of the voting process, such as the counting of ballots and
the filling out of various forms, introduce a risk of human error. This
includes errors during tallying and incorrect data entry, which can
compromise the accuracy of the final results.
5. Security Concerns:
The manual steps involved in the voting process, from breaking seals to
filling out forms and bundling ballot papers, contribute to a time-consuming
procedure. This may result in delayed announcements and the prolonged
delivery of results to higher-level tallying centers.
Diverging from the structured nature of the Waterfall model, where revisiting prior
stages is challenging, Agile allows for changes even post-initial planning. The
methodology entails breaking down the project into manageable components,
including design, coding, and testing, and assembling them as required. Agile
practices prioritize incremental development with frequent releases, typically every
two or three weeks, facilitating rapid user feedback and the accommodation of
evolving requirements.
The strategic selection of the Agile methodology for this research focuses on its
capacity to release small modules of the blockchain voting system for user
evaluation and feedback. These assessments play a pivotal role in guiding
developers on feature additions, modifications, or removals. The iterative nature of
Agile supports changes even after the completion of a development stage, fostering
continuous improvement based on user input.
Moreover, Agile's emphasis on early and frequent testing ensures the prompt
identification and resolution of any bugs or errors within the development cycle.
This methodology not only accommodates ongoing adjustments but also promotes
a streamlined and efficient design and implementation process for the blockchain
voting system.
3.2.1 USE CASE DIAGRAM
In this diagram, actors are symbolized as stick figures, and use cases are
represented as ovals. Actors embody entities, such as individuals, who will utilize
the application, while use cases signify the distinct activities associated with the
system. This portrayal provides a clear and concise depiction of the essential
functionalities that the system is designed to perform. below is the use case
diagram for the system
Fig 3: Use Case Diagram
In this section, we'll delve into the specifics of how this will be implemented.
There are two main components: the registration system and the voting system.
a. Registration System
Users' already-collected personal information, such as their name, address,
and date of birth, is stored in a SQL database behind an HTML/CSS-based
front end for the voting registration system. Users are authenticated and
given a hash code/address to use as a voting credential if they are deemed
legitimate users.
b. Voting System
The voting system is a decentralized app that uses Bootstrap or HTML for
the frontend and a Blockchain for the backend. The smart contract is written
in a language called "Solidity." In the smart contract, the name of the
candidate and their symbol are written. A smart contract is the part of the
voting system that is the actual logic. A transaction is a change made to a
blockchain.
The way the outside world communicates with the Ethereum network is through
transactions. When we want to change or update the state stored in the Ethereum
network, we use a "transaction." A transaction fee or service charge must be paid
for each transaction. Within an Ethereum network, a currency called ether moves
around. Ether is mostly used as a service charge or transaction fee, also called a
"gas fee." For this prototype, we are using the IOTA testnet on EVM, so there is no
need for a gas fee since it is free. Ganache-CLI is being used for this project. This
makes setting up a private network faster, and transactions are mined almost as
soon as they happen. MetaMask is a bridge that lets you visit the decentralized web
of the future in your browser right now. It lets you run Ethereum decentralized
applications (dApps) right in your browser without having to run a full Ethereum
node.
The smart contract for this architecture is also split into two parts: the factory
contract, which makes multiple copies of the election contract, and the election
contract itself. The way the factory contract works with the election contract model
is set by the variables and functions it has. An array of type Ethereum address
stores the addresses of all the contracts deployed by the factory contract, as well as
the addresses of two special functions: the create election function, which creates a
new election instance, and the getDeployedElections function, which returns the
deployedElections variable.
Once the produced bytecode has been uploaded to the Ethereum network, the
contract's ABI creates several election instances.
The flowchart illustrates the sequential process of the system, utilizing the two
actors involved. Both voters and administrators play crucial roles in the system,
with their contributions representing both possible next steps and the completion of
the process.
SYSTEM ARCHITECTURE
A system architecture diagram would be used to show the relationship between
different components. Usually they are created for systems which include hardware
and software and these are represented in the diagram to show the interaction
between them.
CHAPTER FOUR
SYSTEM IMPLEMENTATION
Ganache
Truffle
Truffle complements Ganache by providing a development framework for
Ethereum. It simplifies the process of writing, compiling, and deploying smart
contracts. With Truffle, the development workflow becomes more structured.
Smart contracts can be tested in a sandbox environment (like Ganache) before
being
deployed to the mainnet. This ensures that the logic governing the voting process is
robust and error-free.
MetaMask
MetaMask acts as the bridge between the user's browser and the Ethereum
blockchain. It enables users to interact with decentralized applications (DApps)
seamlessly. In the E-Voting System, MetaMask becomes the interface through
which voters connect their browsers to the blockchain. It handles the cryptographic
keys, allowing users to securely cast their votes without compromising their
private information
HTML, CSS, and JavaScript: These front-end virtuosos compose the visual and
interactive symphony of the E-Voting System. HTML lays the structural
foundation, CSS adorns it with visual aesthetics, and JavaScript breathes life into
the interface, orchestrating real-time updates and user interactions. Together, they
create an immersive and intuitive voting platform, a masterpiece in user
experience.
Solidity: As the backbone of the smart contracts, Solidity interacts with the
Ethereum blockchain. Truffle simplifies the development and deployment of these
smart contracts, ensuring a smooth integration between the front-end and the
blockchain. Ganache provides a local testing ground, allowing developers to iterate
quickly and test the functionality of smart contracts in a controlled environment.
Use Cases
1. Local Testing with Ganache: Developers use Ganache to test smart
contracts locally before deploying them to the mainnet. This ensures that the
smart contracts function as intended and are free from errors.
During the development of the system, the system required some setup to run some
basic tests. The system environment was set up to suit and mimick an ethereum
network as well as connecting metamask to the localhost server. The Ganache
application was used to serve the local accounts and account balance used in the
transactions, the ganache local sever served as the ethereum local net
Fig 8: system testing using Ganache
HARDWARE DETAILS
SOFTWARE DETAILS
4.5 RESULTS
Login Page
The login page functions as the entry point for authorized users to interact with the
blockchain-based voting system, emphasizing simplicity and security.
The user is required to input a valid Email and a secure password is mandatory for
access, utilizing industry-standard encryption techniques.
Once the user submits the login form, the system verifies the authenticity of the
entered email and password against the stored data on the blockchain.
Fig 9: Login page
Registration Page
The registration page facilitates the onboarding of new users into the blockchain-
based voting system. It is designed to capture essential user details, ensuring a
seamless and secure registration process.
Once the user submits the login form, the system verifies the authenticity of the
entered email and password against the stored data on the blockchain.
Vote Section
The vote section provides users with a straightforward and intuitive interface to
cast their votes for their chosen candidates. The design aims to ensure ease of use
and a seamless voting experience. To cast a vote, Users navigate through the list of
candidates by scrolling through the list of candidates and simply click on their
chosen candidate. This action is logged securely on the blockchain, ensuring the
transparency and immutability of the voting process.
Admin Page
CHAPTER FIVE
This system was developed to improve the state of electronic voting. The primary
aim of adding blockchain to the existing electronic voting systems is to increase
trust in the system and aid the security process of the application.
5.2 Conclusion
In conclusion, the system highlights the faults in the paper-based method of voting
as well as the limitations of a centralized voting system. This system also
illustrates the use of blockchain in other aspects of everyday livelihood and how it
can be applied to the voting domain. The system itself has some limitations in its
implementation. It uses a manual method for registering voters for particular
electoral instances. If the population of users in the system increases, it would be a
challenging task for administrators of the system to register voters for
authenticated voting instances.
REFERNCES
Agbu, O. (2016). Election Rigging and the Use of Technology: The Smart Card
Reader as the Joker in Nigeria’s 2015 Presidential Election. Journal of African
Elections, 15(2), 90–111. https://doi.org/10.20940/jae/2016/v15i2a5
Ahlkvist, J., Gustafsson, A., Lundborg, C., Mattsson, J. T., Sandstedt, A., &
Slavnic, S. (2019). A Decentralized Voting System. Gothenburg, Sweden:
Chalmers University of Technology.
Challenge of E-Voting. (2016, October 31). Retrieved June 29, 2021, from
https://www.fortinet.com/blog/industry-trends/the-challenge-of-e-voting
Chandler, S. (2021, June 3). Here Are The 5 Biggest Bitcoin Transactions In
History. Retrieved July 1, 2021, from https://www.cryptovantage.com/news/here-
are-the-5-biggest-bitcoin-transactions-in-history/
Grigoryan, A. (2018, June 20). The Benefits of Server Side Rendering Over Client
Side Rendering. Retrieved August 2, 2021, from
https://medium.com/walmartglobaltech/the-benefits-of-server-side-rendering-over-
client-side-rendering-5d07ff2cefe8
Kumar, A. (2018, July 3). Bitcoin Blockchain - What is Proof of Work? Retrieved
August 2, 2021, from https://vitalflux.com/bitcoin-blockchain-proof-work/
Loukil, F., Abed, M., & Boukadi, K. (2021). Blockchain adoption in education: a
systematic literature review. Education and Information Technologies. Published.
https://doi.org/10.1007/s10639-021-10481-8
Ma, X., Zhou, J., Yang, X., & Liu, G. (2020). A Blockchain Voting System Based
on the Feedback Mechanism and Wilson Score. Information, 11(12), 552.
https://doi.org/10.3390/info11120552
Madise, U., & Martens, T. (2005). E-voting in Estonia 2005. The first practice of
country-wide binding Internet voting in the world. Electronic voting, Bregenz,
Austria.
Marella, P. B., Milojkovic, M., Mohler, J., & Dagher, G. G. (2019). GenVote:
Blockchain-Based Customizable and Secure Voting Platform. Communications in
Computer and Information Science, 152–171. https://doi.org/10.1007/978-3-030-
25109-3_8
McCorry, P., Shahandashti, S. F., & Hao, F. (2017). A Smart Contract for
Boardroom Voting with Maximum Voter Privacy. Financial Cryptography and
Data Security, 357–375. https://doi.org/10.1007/978-3-319-70972-7_20
Rura, L., Issac, B., & Haldar, M. K. (2011). Secure electronic voting system based
on image steganography. 2011 IEEE Conference on Open Systems. Published.
https://doi.org/10.1109/icos.2011.6079268
Shift4Shop. (2020, March 5). Understanding Bitcoins and How They’re Used.
Retrieved June 29, 2021, from https://blog.shift4shop.com/accept-bitcoins-with-
bitpay
The Carter Center & National Democratic Institute for International Affair. (1999,
June). OBSERVING THE 1998–99 NIGERIA ELECTIONS.
Tso, R., Liu, Z. Y., & Hsiao, J. H. (2019). Distributed E-Voting and E-Bidding
Systems Based on Smart Contract. Electronics, 8(4), 422.
https://doi.org/10.3390/electronics8040422
Tykn. (2021, May 24). Blockchain Identity Management: The Definitive Guide
(2021 Update). Retrieved August 2, 2021, from https://tykn.tech/identity-
management-blockchain