E Voting System Using Ethereum Blockchain-DOCUMENT
E Voting System Using Ethereum Blockchain-DOCUMENT
ABSTRACT
ABSTRACT
1.INTRODUCTION
Every six out of ten country is a democracy. Election plays an important role in
democracy. It gives the rights to the citizen to elect the leader and the country’s
representative, But the process of voting is flawed as the voting infrastructure is
not using a proper architecture. The voting machines that are used in almost all the
democracies are centralized i.e, a particular person or community controls and
analyses the collected data from the voting process. Which makes the process
vulnerable to many flaws in the system and lack of transparency to the voters. To
overcome this situation and to empower the democracy the Blockchain technology
can be used. The blockchain technology provides a decentralized and distributed
architecture for development of applications. The ethereum community introduced
the concept of decentralized applications which uses the blockchain technology to
create an app. The major difference between a centralized and a decentralized
application is, In decentralized application instead of using the traditional database
at its backend the blockchain is used. Blockchain serves as the decentralized and
distributed database system which uses cryptography for the storage of information
which helps in storage of immutable data. The Blockchain technology provides a
peer to peer communication and eliminates the third party. Initially the blockchain
technology was used in cryptocurrencies but the introduction of decentralized
applications have opened a door of opportunities for the exploitation of the
blockchain technology. As already mentioned, with its unique distributed ,
decentralized and distributed architecture the blockchain technology may resolve
many issues in the digital age and it may help in the implementation of an e-voting
platform which is not mostly used do to the presence of many threats in the web
like hackers and security issues so with the introduction of decentralized
application a secure, safe, decentralized and distributed e-voting platform can be
implemented which will be free from all vulnerabilities and threats and yet keep
the voters vote and identity intact.
Operating system is one of the first requirements mentioned when defining system
requirements (software). Software may not be compatible with different versions
of same line of operating systems, although some measure of backward
compatibility is often maintained. For example, most software designed for
Microsoft Windows XP does not run on Microsoft Windows 98, although the
converse is not always true. Similarly, software designed using newer features of
Linux Kernel v2.6 generally does not run or compile properly (or at all) on Linux
distributions using Kernel v2.2 or v2.4.
APIs and drivers – Software making extensive use of special hardware devices,
like high-end display adapters, needs special API or newer device drivers. A good
example is DirectX, which is a collection of APIs for handling tasks related to
multimedia, especially game programming, on Microsoft platforms.
Web browser – Most web applications and software depending heavily on Internet
technologies make use of the default browser installed on system. Microsoft
Internet Explorer is a frequent choice of software running on Microsoft Windows,
which makes use of ActiveX controls, despite their vulnerabilities.
Memory – All software, when run, resides in the random access memory (RAM)
of a computer. Memory requirements are defined after considering demands of the
application, operating system, supporting software and files, and other running
processes. Optimal performance of other unrelated software running on a multi-
tasking computer system is also considered when defining this requirement.
4)Hard Disk : 50 GB
FEASIBILITY STUDY
2. FEASIBILITY STUDY
The feasibility of the project is analyzed in this phase and business
proposal is put forth with a very general plan for the project and some cost
estimates. During system analysis the feasibility study of the proposed system is
to be carried out. This is to ensure that the proposed system is not a burden to
the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.
ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY
This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into the
research and development of the system is limited. The expenditures must be
justified. Thus the developed system as well within the budget and this was
achieved because most of the technologies used are freely available. Only the
customized products had to be purchased.
The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently.
The user must not feel threatened by the system, instead must accept it as a
necessity. The level of acceptance by the users solely depends on the methods that
are employed to educate the user about the system and to make him familiar with
it. His level of confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the system.
LITERATURE SURVEY
3.LITERATURE SURVEY
https://www.semanticscholar.org/paper/ETHEREUM%3A-A-SECURE-DECENTRALISED-GENERALISED-
LEDGER-Wood/da082d8dcb56ade3c632428bfccb88ded0493214
https://www.researchgate.net/publication/
305779577_Smart_Contract_Templates_foundations_design_landscape_and_research_directions_CDCl
ack_VABakshi_and_LBraine_arxiv160800771_2016
ABSTRACT: This paper gives an overview about the Estonian e-voting system.
Paper discusses how the concept of e-voting system is designed to resist some of
the main challenges of remote e-voting: secure voters authentication, assurance of
privacy of voters, giving the possibility of re-vote, and how an e-voting system can
be made comprehensible to build the public trust.
https://www.researchgate.net/publication/308796230_E-
Democracy_The_Next_Generation_Direct_Democracy_and_Applicability_in_Turkey
ABSTRACT: In 21. century, fast expansion of the internet has made all people a
potential internet user. At the same time, the advance in the digital technology, the
internet has become a suitable yet ideal platform for delivering public services.
Hence, many public services are started to be offered to citizens through the
internet in all over the World. But, general elections and votes couldn’t be moved
to the Internet completely because of lack of infrastructure, and security and
privacy concerns. In this work, an e-democracy model is introduced, where
elections and votes can be made online; pros and cons of this model are
investigated, current practices are analyzed, solutions to some problems are given
and potential contribution of the internet to the direct democracy is discussed. In
themodelthat we proposed, any citizen who has a legislative proposal, shall be able
to start an online petition, time and location independent. The petitions with
enough support, shall be accepted or put forward as a referendum, with approval of
local or country administration. Hence, via technology, it will be possible for
people to attend the government administration more actively and transition to the
direct democracy that is the essence of the democracy will be enabled.
SYSTEM ANALYSIS
4.SYSTEM ANALYSIS
4.1 EXISTING SYSTEM:
1. Block storage with the help of hashcodes and if verification failed then
Blockchain or users will get notification of data changed
Usability requirement
Serviceability requirement
Manageability requirement
Recoverability requirement
Security requirement
Data Integrity requirement
Capacity requirement
Availability requirement
Scalability requirement
Interoperability requirement
Reliability requirement
Maintainability requirement
Regulatory requirement
Environmental requirement
SYSTEM DESIGN
5. SYSTEM DESIGN
Home
NO PROCESS
Yes NO
VERIFY
Admin login
End process
Fig.5.1.3 Dataflow diagram
GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide users a ready-to-use, expressive visual modeling Language so that
they can develop and exchange meaningful models.
2. Provide extendibility and specialization mechanisms to extend the core
concepts.
3. Be independent of particular programming languages and development
process.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations,
frameworks, patterns and components.
7. Integrate best practices.
Admin
Candidate login
Class diagram:
The class diagram is used to refine the use case diagram and define a detailed design of
the system. The class diagram classifies the actors defined in the use case diagram into a set of
interrelated classes. The relationship or association between the classes can be either an "is-a" or
"has-a" relationship. Each class in the class diagram may be capable of providing certain
functionalities. These functionalities provided by the class are termed "methods" of the class.
Apart from this, each class may have certain "attributes" that uniquely identify the class.
Cast your vote
candidate id
voter name
aadhar number
admin.
username
password
login()
view vote count()
Activity diagram:
The process flows in the system are captured in the activity diagram. Similar to a state
diagram, an activity diagram also consists of activities, actions, transitions, initial and final
states, and guard conditions.
Home
Admin login
Sequence diagram:
A sequence diagram represents the interaction between different objects in the system. The
important aspect of a sequence diagram is that it is time-ordered. This means that the exact
sequence of the interactions between the objects is represented step by step. Different objects in
the sequence diagram interact with each other by passing "messages".
candidate admin application
admin login
Collaboration diagram:
A collaboration diagram groups together the interactions between different objects. The
interactions are listed as numbered interactions that help to trace the sequence of the interactions.
The collaboration diagram helps to identify all the possible interactions that each object has with
other objects.
candidat
e
applicati admin
on
3: admin login
4: view vote count
Component diagram:
The component diagram represents the high-level parts that make up the system. This
diagram depicts, at a high level, what components form part of the system and how they are
interrelated. A component diagram depicts the components culled after the system has undergone
the development or construction phase.
Admin
application candidate
blockchain
Deployment diagram:
The deployment diagram captures the configuration of the runtime elements of the
application. This diagram is by far most useful when a system is built and ready to be deployed.
User System
MODULES:
1. Admin
2. Candidate
Admin module: Using this module admin can login with his details and he can
view the count of votes
Candidate module: Using this module candidate can cast his vote with his details
#!/usr/bin/env python3
import os
import pathlib
import subprocess
import sys
here = pathlib.Path(__file__).parent
if len(args) == 0:
print("Parameters required")
return 1
if sys.platform == "win32":
script = "activated.ps1"
command = ["powershell",
os.fspath(here.joinpath(script)),
*args]
else:
script = "activated.sh"
command = ["sh",
os.fspath(here.joinpath(script)),
*args]
completed_process =
subprocess.run(command)
return completed_process.returncode
sys.exit(main(*sys.argv[1:]))
#
# Install helper code to manage inserting the correct version for the GUI
# Gets the version from the result of "chia version"
# Converts to proper symver format so NPM doesn't complain
# Adds the version info to the package.json file
#
from __future__ import annotations
import json
import os
import subprocess
from os.path import exists
#
# The following function is borrowed from
#
https://github.com/inveniosoftware/invenio-assets/blob/maint-1.0/invenio_as
sets/npm.py
# Copyright (C) 2015-2018 CERN.
#
def make_semver(version_str: str) -> str:
v = parse_version(version_str)
major = v._version.release[0]
try:
minor = v._version.release[1]
except IndexError:
minor = 0
try:
patch = v._version.release[2]
except IndexError:
patch = 0
prerelease = []
if v._version.pre:
prerelease.append("".join(str(x) for x in v._version.pre))
if v._version.dev:
prerelease.append("".join(str(x) for x in v._version.dev))
local = v.local
if prerelease:
version += "-{0}".format(".".join(prerelease))
if local:
version += "+{0}".format(local)
return version
with open(package_json_path) as f:
data = json.load(f)
data["version"] = get_chia_version()
if __name__ == "__main__":
update_version(f"{os.path.dirname(__file__)}/chia-blockchain-gui/
package.json")
update_version(f"{os.path.dirname(__file__)}/chia-blockchain-gui/packages/
gui/package.json")
from __future__
import annotations
import os
dependencies = [
"clvm==0.9.7",
"clvm_tools==0.4.6", # Currying, Program.to, other
conveniences
"chia_rs==0.1.16",
"concurrent-log-handler==0.9.20", # Concurrently
log and rotate logs
"cryptography==38.0.3", # Python cryptography
library for TLS - keyring conflict
"filelock==3.8.0", # For reading and writing config
multiprocess and multithread safely (non-reentrant
locks)
"keyring==23.9.3", # Store keys in MacOS Keychain,
Windows Credential Locker
"PyYAML==6.0", # Used for config file format
"psutil==5.9.1",
upnp_dependencies = [
dev_dependencies = [
"anyio",
"build",
"coverage",
"diff-cover",
"pre-commit",
"py3createtorrent",
"pylint",
"pytest",
"pytest-xdist",
"twine",
"isort",
"flake8",
"mypy",
"black==22.10.0",
"pyinstaller==5.6.2",
"types-aiofiles",
"types-cryptography",
"types-pkg_resources",
"types-pyyaml",
"types-setuptools",
legacy_keyring_dependencies = [
"keyrings.cryptfile==1.3.9",
kwargs = dict(
name="chia-blockchain",
author="Mariano Sorgente",
author_email="[email protected]",
license="Apache License",
python_requires=">=3.7, <4",
install_requires=dependencies,
extras_require=dict(
dev=dev_dependencies,
upnp=upnp_dependencies,
legacy_keyring=legacy_keyring_dependencies,
),
packages=[
"build_scripts",
"chia",
"chia.cmds",
"chia.clvm",
"chia.consensus",
"chia.daemon",
"chia.data_layer",
"chia.full_node",
"chia.timelord",
"chia.farmer",
"chia.harvester",
"chia.introducer",
"chia.plot_sync",
"chia.plotters",
"chia.plotting",
"chia.pools",
"chia.protocols",
"chia.rpc",
"chia.seeder",
"chia.server",
"chia.simulator",
"chia.types.blockchain_format",
"chia.types",
"chia.util",
"chia.wallet",
"chia.wallet.db_wallet",
"chia.wallet.puzzles",
"chia.wallet.cat_wallet",
"chia.wallet.did_wallet",
"chia.wallet.nft_wallet",
"chia.wallet.settings",
"chia.wallet.trading",
"chia.wallet.util",
"chia.ssl",
"mozilla-ca",
],
entry_points={
"console_scripts": [
"chia = chia.cmds.chia:main",
"chia_daemon = chia.daemon.server:main",
"chia_wallet = chia.server.start_wallet:main",
"chia_full_node =
chia.server.start_full_node:main",
"chia_harvester =
chia.server.start_harvester:main",
"chia_farmer = chia.server.start_farmer:main",
"chia_introducer =
chia.server.start_introducer:main",
"chia_crawler = chia.seeder.start_crawler:main",
"chia_seeder = chia.seeder.dns_server:main",
"chia_timelord = chia.server.start_timelord:main",
"chia_timelord_launcher =
chia.timelord.timelord_launcher:main",
"chia_full_node_simulator =
chia.simulator.start_simulator:main",
"chia_data_layer =
chia.server.start_data_layer:main",
"chia_data_layer_http =
chia.data_layer.data_layer_server:main",
]
},
package_data={
"chia": ["pyinstaller.spec"],
},
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
zip_safe=False,
project_urls={
"Source": "https://github.com/Chia-Network/chia-
blockchain/",
"Changelog": "https://github.com/Chia-Network/chia-
blockchain/blob/main/CHANGELOG.md",
},
PYTHON LANGUAGE:
Python is a dynamic, high-level, free open source, and interpreted programming language. It
supports object-oriented programming as well as procedural-oriented programming. In Python,
we don’t need to declare the type of variable because it is a dynamically typed language. For
example, x = 10 Here, x can be anything such as String, int, etc.
Features in Python:
There are many features in Python, some of which are discussed below as
follows:
Python language is freely available at the official website and you can download
it from the given download link below click on the Download
Python keyword. Download Python Since it is open-source, this means that
source code is also available to the public. So you can download it, use it as well
as share it.
2. Easy to code
As you will see, learning Python is quite simple. As was already established,
Python’s syntax is really straightforward. The code block is defined by the
indentations rather than by semicolons or brackets.
4. Object-Oriented Language
Graphical User interfaces can be made using a module such as PyQt5, PyQt4,
wxPython, or Tk in python. PyQt5 is the most popular option for creating
graphical apps with Python.
6. High-Level Language
7. Extensible feature
Python is an Extensible language. We can write some Python code into C or C++
language and also we can compile that code in C/C++ language.
8. Easy to Debug
Excellent information for mistake tracing. You will be able to quickly identify
and correct the majority of your program’s issues once you understand how
to interpret Python’s error traces. Simply by glancing at the code, you can
determine what it is designed to perform.
Python has a large standard library that provides a rich set of modules and
functions so you do not have to write your own code for every single thing. There
are many libraries present in Python such as regular expressions, unit-testing,
web browsers, etc.
Python is a dynamically-typed language. That means the type (for example- int,
double, long, etc.) for a variable is decided at run time not in advance because of
this feature we don’t need to specify the type of variable.
With a new project py script, you can run and write Python codes in HTML with
the help of some simple tags <py-script>, <py-env>, etc. This will help you do
frontend development work in Python like javascript. Backend is the strong forte
of Python it’s extensively used for this work cause of its frameworks
like Django and Flask.
In Python, the variable data type does not need to be specified. The memory is
automatically allocated to a variable at runtime when it is given a value.
Developers do not need to write int y = 18 if the integer value 15 is set to y. You
may just type y=18.
LIBRARIES/PACKGES :-
Tensorflow
TensorFlow is a free and open-source software library for dataflow and differentiable
programming across a range of tasks. It is a symbolic math library, and is also used
for machine learning applications such as neural networks. It is used for both research and
production at Google.
TensorFlow was developed by the Google Brain team for internal Google use. It was released
under the Apache 2.0 open-source license on November 9, 2015.
Numpy
It is the fundamental package for scientific computing with Python. It contains various features
including these important ones:
Pandas
Pandas is an open-source Python Library providing high-performance data manipulation and analysis
tool using its powerful data structures. Python was majorly used for data munging and preparation. It
had very little contribution towards data analysis. Pandas solved this problem. Using Pandas, we can
accomplish five typical steps in the processing and analysis of data, regardless of the origin of data load,
prepare, manipulate, model, and analyze. Python with Pandas is used in a wide range of fields including
academic and commercial domains including finance, economics, Statistics, analytics, etc.
Matplotlib
For simple plotting the pyplot module provides a MATLAB-like interface, particularly when
combined with IPython. For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface or via a set of functions
familiar to MATLAB users.
Scikit – learn
SYSTEM TESTING
8. SYSTEM TESTING
System testing, also referred to as system-level tests or system-integration testing,
is the process in which a quality assurance (QA) team evaluates how the various
components of an application interact together in the full, integrated system or
application. System testing verifies that an application performs tasks as designed.
This step, a kind of black box testing, focuses on the functionality of an
application. System testing, for example, might check that every kind of user input
produces the intended output across the application.
A video tutorial about this test level. System testing examines every component of
an application to make sure that they work as a complete and unified whole. A QA
team typically conducts system testing after it checks individual modules with
functional or user-story testing and then each component through integration
testing.
If a software build achieves the desired results in system testing, it gets a final
check via acceptance testing before it goes to production, where users consume the
software. An app-dev team logs all defects, and establishes what kinds and amount
of defects are tolerable.
Static Testing:
It is not possible to effectively test software without running it. Structural testing,
also known as white-box testing, is required to detect and fix bugs and errors
emerging during the pre-production stage of the software development process. At
this stage, unit testing based on the software structure is performed using
regression testing. In most cases, it is an automated process working within the test
automation framework to speed up the development process at this stage.
Developers and QA engineers have full access to the software’s structure and data
flows (data flows testing), so they could track any changes (mutation testing) in the
system’s behavior by comparing the tests’ outcomes with the results of previous
iterations (control flow testing).
Behavioral Testing:
The final stage of testing focuses on the software’s reactions to various activities
rather than on the mechanisms behind these reactions. In other words, behavioral
testing, also known as black-box testing, presupposes running numerous tests,
mostly manual, to see the product from the user’s point of view. QA engineers
usually have some specific information about a business or other purposes of the
software (‘the black box’) to run usability tests, for example, and react to bugs as
regular users of the product will do. Behavioral testing also may include
automation (regression tests) to eliminate human error if repetitive activities are
required. For example, you may need to fill 100 registration forms on the website
to see how the product copes with such an activity, so the automation of this test is
preferable.
8.2 TEST CASES:
7. SCREENSHOTS
CONCLUSION
10.CONCLUSION
[3] C.D. Clack, V.A. Bakshi, and L. Braine, “Smart contract templates: foundations, design
landscape and research directions”, Mar 2017, arXiv:1608.00771.
[4] E. Maaten, “Towards remote e-voting: Estonian case”, Electronic Voting in Europe-
Technology, Law, Politics and Society, vol. 47, pp. 83-100, 2004.
[5] U.C. Çabuk, A. Çavdar, and E. Demir, "E-Demokrasi: Yeni Nesil Do÷rudan Demokrasi ve
Türkiye’deki Uygulanabilirli÷i", [Online]