Part 2 Blockchain
Part 2 Blockchain
INTRODUCTION
1. INTRODUCTION TO PROJECT
1.1. What is Blockchain?
A blockchain is an assembly of cryptographically connected blocks. Strong cryptographic
foundations enable apps to harness blockchain's capabilities to produce robust security
solutions. Blockchain is one of the emerging technologies with these capabilities. In this case,
the data is connected and separated into blocks. A hash value, or representation of the block,
is assigned to each block, and the link between them is created by listing the hash of the
previous block into the current block. A block is composed of the data section, hash, section,
hash, and prior hash, to sum it up.
As of right now, more than one machine does not save the generated chain of blocks.
Every user has a copy of the distributed ledger, or blockchain, on their own.
The hash value is modified and the link is broken if someone attempts to alter the
data. In order to succeed, the attacker must modify and recalculate the hashes of the blocks
that come after. Users curate each block when it is formed, based on their consensus, and the
block may be accepted or rejected. Thus, security, immutability, and transparency are
provided by blockchains.
In practical terms, there exist three primary types of blockchains: Public, Private, and
Consortium Blockchains.
1.1.1. Ethereum
Ethereum is like a super-smart computer that runs on the internet. Instead of being controlled
by one person or company, it's managed by lots of people all over the world.
Ethereum is fundamentally a framework for creating decentralized apps, or DApps. These are
not single-server programs; rather, they operate on a network of computers. They become
safer and more impervious to censorship as a result.
1
Ethereum's ability to use smart contracts is one of its primary characteristics.
Comparable to digital contracts, these take effect automatically upon fulfillment of specific
requirements. A smart contract could be used, for instance, to buy or sell anything without the
requirement for an intermediary.
Ethereum also has its own cryptocurrency called Ether. You can use Ether to pay for
transactions on the Ethereum network, just like you use money to pay for things in the real
world. Overall, Ethereum opens up a world of possibilities for developers to create new kinds
of applications that are decentralized, transparent, and secure.
2
1.2. OBJECTIVE
The main objective of this project is to develop a web application that will enable users to
cast ballots from any location as long as they are a valid citizen of the relevant nation using
blockchain technology. Choose the country in which you want to vote, then protect each
ballot to make sure it is counted. Most of the effort that is done now addresses security,
correctness, respectability, speed, protection, and reviewability; yet, established frameworks
eventually become weak points for assaults.
One drawback of the current system is
1. Its centralized architecture.
2. Attack prone.
3. Not trustworthy.
4. Not very transparent voting process
Current systems are hard to maintain, readily hacked, and vulnerable to assault. The primary
issues are security and data integrity, and the suggested solution should be able to fix any
flaw in the current systems.
1.3. SCOPE
Transparent transaction using Blockchain technology increases the security of crypto
transaction which runs towards cyber security.
All information is authentic and safe. Cryptography is used in encryption to solve security
gaps like illegal data modification, which will boost cryptocurrency payments.
3
1.4.2. Technical Feasibility
The study of performance, function, and constraints is what could have an impact on the
development of a workable system. In order to determine whether the system could actually
provide all of the functionality outlined in the System Requirements Specification (SRS)
, we examined the system's full capabilities utilizing several front-end and back-end platform
types.
4
CHAPTER – 2
LITERATURE SURVEY
5
2.2. RESEARCH PAPERS REVIEW
The proposed work intends to demonstrate a secure voting system that makes use of a
fundamental method of image processing. Get the Haar classifier fountains ready to
recognize features on a human face, like the nose, eyes, and lips. The framework developed
by Viola and Jones has a 95% accuracy rate for identifying human faces by employing 200
basic characteristics.
The suggested work makes use of the Haar classification technique for a safe voting
system and the OpenCV library in the framework for voter recognition. The accuracy
percentage of Viola and Jones' framework for identifying human faces is 95%.
6
The proposed system successfully incorporated the CNN-based facial recognition
model, which achieved high accuracy in voter identification, with recognition durations
between 0.13 and 0.15 seconds. Voter fraud was eliminated and the overall integrity of the
voting process was improved thanks to the high level of accuracy and speed with which the
face recognition method verified voters' security.
6. Remote and cost-optimizing voting system using blockchain and smart contract
This study's main goals are complex. Initially, the researchers want to address the issues that
come with traditional voting methods, which are frequently laborious, less secure, and non-
remote. In order to guarantee the integrity and reliability of the election process, the study
also aims to provide a safe and transparent voting procedure by using the decentralized and
unchangeable feature of blockchain technology. By putting in place a hybrid storage system
where only necessary data is kept on the blockchain network, the researchers also hope to
lower the expenses related to transactions. With blockchain technology and smart contracts,
the study effectively shows that a safe, transparent, and economical voting system may be
established. The method guarantees the integrity of the voting process while giving voters a
safe and secure platform by utilizing blockchain's decentralized and unchangeable
capabilities. The system becomes more efficient and economical when a hybrid storage
system is used since it successfully lowers transaction costs.
13. E- voting with blockchain: An e-voting protocol with decentralization and voter
privacy.
This model suggests an electronic voting system that is decentralized to some extent,
conforms to electronic voting regulations, and is based on blockchain technology. Complies
with fundamental requirements for electronic voting and exhibits some degree
of decentralization. Voters may update or change their vote within the allotted voting period.
The model efficiently implements an online voting system that provides several advantages,
such as increased voter accessibility and awareness, through the utilization of remote voting
capabilities. discusses the potential advantages and disadvantages of using blockchain
technology to electronic voting systems, emphasizing the benefits that blockchain-based e-
voting offers, such as increased transparency, built-in anonymity, security, dependability, and
immutability. The protocol, which is based on a peer-to-peer network, requires that every
voter uphold consensus in accordance with the election regulations.
10
2.3. PROBLEM WITH CURRENT SYSTEMS
11
on Inventive
Research in
Computing
Applications
(ICIRCA) (pp. 890-
895).
IEEE.
Revathy, G., Raj, Investigation of E- 2021 Facial recognition
K. B., Kumar, votingsystem using
accuracy is only
A., Adibatti, S., face recognition using
95%
Dahiya, P., & convolutional neural
network (CNN).
Latha, T. M
12
2.4. LANGUAGES & TOOLS
2.4.1. Languages
1. HTML
The backbone of the World Wide Web is HTML, or Hypertext Markup Language, that
provides web pages their essential structure. HTML is mainly made up of elements that are
tagged to describe various aspects on a website, including headings, paragraphs, images, and
links. Additionally, these tags may contain features that provide additional information about
the elements. With the introduction of HTML5, semantic markup has become crucial,
improving accessibility and SEO by conveying meaning about the content. Governed by the
W3C, HTML adheres to standards ensuring compatibility across browsers and devices. It
seamlessly integrates with CSS for styling and JavaScript for interactivity, forming the basis
of modern web development. Continually evolving, HTML evolves to meet the demands of
the ever-changing web landscape, maintaining its role as the foundational language of the
internet.
2. CSS
HTML elements are presented and styled more effectively with the help of Cascading Style
Sheets, or CSS, which is essential to web development. The layout, style, and visual appeal of
web pages can be precisely and flexibly controlled by developers using CSS. Selectors and
declarations are used in CSS to define styles for HTML components, including fonts, colors,
margins, padding, and placement. Declaratives define the style characteristics and values
applied to elements, whereas selectors target individual HTML elements or groups of
components. Coherent branding and user experiences may be created on a website by using
CSS, which promotes uniformity throughout. Furthermore, it makes responsive design easier,
allowing websites to adjust to various screen sizes and devices without any problems. By
separating content from presentation, CSS promotes cleaner code, easier maintenance, and
improved accessibility. Additionally, CSS frameworks and preprocessors provide developers
with tools and methodologies to streamline development workflows and enhance
productivity. As web design trends evolve, CSS continues to evolve with new features and
capabilities, ensuring its relevance in modern web development.
13
3. JAVASCRIPT
JavaScript is a dynamic programming language which provides interactivity into the web
pages, revolutionizing web development. It runs within web browsers and is executed on the
client-side, allowing for real-time responses without requiring server connectivity.
Developers may do a wide range of activities with JavaScript, including event management,
DOM manipulation, form validation, and asynchronous communication. Its acceptance is
aided by its syntax, which is similar to that of well-known languages like Java, and its
foundation is strengthened by the presence of variables, functions, and data types. Most
importantly, JavaScript allows developers to dynamically change the content and structure of
HTML pages by dynamically manipulating the Document Object Model (DOM). Event-
driven architecture makes it easier to create responsive user interfaces since it reacts to user
input with ease. Additionally, JavaScript's ability to enable asynchronous programming
guarantees that tasks—such as animations and data fetching—are handled effectively.
Despite its ubiquity across modern browsers, developers must navigate browser
inconsistencies judiciously. Overall, JavaScript stands as a cornerstone of web development,
enabling rich, interactive experiences across the digital landscape.
4. REACT
Facebook's React JavaScript framework completely changes how web application developers
create user interfaces. React component-based architecture makes it possible to create
modular, reusable user interface elements that have their own state and logic. Because
developers may divide large user interfaces into smaller, more manageable components, this
method encourages code organization, maintainability, and scalability. React makes efficient
use of a virtual DOM, which is a lightweight replica of the real DOM, to render and update
UI components more quickly and with more responsiveness. React declarative syntax also
makes it easier to understand and debug code by streamlining the process of specifying how
user interfaces should appear and function. React capabilities and extensibility are improved
by the surrounding ecosystem, which includes programs like Redux for state management
and React Router for navigation. With its emphasis on efficiency, scalability, and developer
experience, React has become the go-to choice for building modern, interactive web
applications, powering some of the most popular websites and web-based applications on the
internet.
14
5. SOLIDITY
Development of smart contracts on blockchain platforms such as Ethereum is based on a
high-level programming language called Solidity. Using a syntax similar to JavaScript,
Solidity enables developers to write smart contracts that, in the absence of middlemen, carry
out specified activities when certain conditions are met. Transactions on the blockchain can
be transparent and impenetrable thanks to smart contracts, which are self-executing contracts
with the conditions of the agreement explicitly put into code. Flexible and modular contract
design is made possible by Solidity's object-oriented capabilities, which include inheritance,
libraries, and user-defined data structures. Developers may create strong and safe smart
contracts with Solidity's integrated security features, which include automatic checks for
common vulnerabilities. In spite of its power, Solidity needs to be carefully evaluated for
possible weaknesses like integer overflow and reentrancy in order to guarantee the integrity
of smart contracts. Solidity is still an essential tool for developers hoping to take advantage of
the possibilities offered by decentralized apps and programmable money as blockchain
technology evolves.
6. MYSQL
One popular open-source relational database management system (RDBMS) that is well-
known for its dependability, scalability, and user-friendliness is MySQL. Currently owned by
Oracle Corporation, MySQL AB developed it. MySQL is a highly preferred platform among
webmasters, developers, and organizations due to its versatility and strong performance while
managing huge information across multiple operating systems. Its adaptability enables it to
support intricate corporate applications and power content management systems, among other
uses. MySQL is still the preferred option for businesses looking for a reliable and affordable
database solution because of its capabilities, which include multi-user access, ACID
compliance, and support for a number of programming languages. Its vibrant community also
consistently advances its growth, guaranteeing its continued relevance in the everchanging
field of data management.
15
2.4.2. TOOLS
2. GOOGLE CHROME
One of the most popular web browsers is Google Chrome, which is well-known for its speed,
versatility, and user-friendly interface. Google's Chrome provides a smooth surfing
experience on a variety of operating systems, including Windows, macOS, Linux, Android,
and iOS. Its straightforward layout puts an emphasis on use and simplicity, making it suitable
for users with varying degrees of experience. One of Chrome's many strong points is its
potent V8 JavaScript engine, which guarantees quick page loads and seamless browsing even
when you have multiple tabs open. Features that protect users against online risks, including
as sandboxing, automatic updates, and secure browsing, demonstrate the browser's dedication
to security and privacy. Furthermore, users may personalize their browsing experience with
Chrome thanks to its wide range of customization options, which include a big library of
extensions and themes. With the help of its synchronization tool, bookmarks, browsing
history, passwords, and settings are easily synchronized between devices, allowing for a
consistent and customized surfing experience. All things considered, Google Chrome remains
16
the preferred option for millions of users across the globe, providing dependability,
efficiency, and innovation in the field of web browsing.
3. METAMASK
In the field of blockchain technology and decentralized apps (DApps), MetaMask is a crucial
tool which serves as a bridge between web browsers and the Ethereum blockchain. Using it,
users may store Ether (ETH), manage their Ethereum accounts, and easily engage with
Ethereum-based DApps right from their web browsers. It also serves as a cryptocurrency
wallet and a portal to the decentralized web. With the help of the browser plugin MetaMask,
users of well-known browsers like Chrome, Firefox, and Brave may access applications
powered by Ethereum without requiring an extra wallet or piece of software. Sending and
receiving ETH, as well as working with smart contracts and decentralized exchanges, are
made easier by its intuitive UI. Furthermore, by giving users authority over their private
keys—which are kept encrypted and locally saved on their devices—MetaMask improves
security. Token management, custom network support, and interaction with hardware wallets
for increased security are among the other features that MetaMask provides. MetaMask is
still a vital tool for developers interested in exploring the decentralized web as well as
cryptocurrency aficionados as the use of blockchain technology and decentralized
applications increases.
4. GANACHE
Ganache stands as a vital tool for blockchain developers, offering a local Ethereum
blockchain environment for testing, development, and debugging smart contracts without the
need for a live network connection. Developed by Truffle, Ganache provides a simulated
Ethereum blockchain with configurable parameters, such as gas limits, block times, and
account balances, enabling developers to mimic real-world scenarios and test their
decentralized applications (DApps) under various conditions. Its user-friendly interface and
intuitive features allow developers to quickly deploy smart contracts, interact with them
through a graphical user interface or command-line interface, and inspect transaction logs and
blockchain state changes in real-time. Ganache also includes built-in tools for managing
Ethereum accounts, viewing transaction histories, and monitoring gas usage, providing
valuable insights into contract deployment and execution. Furthermore, Ganache seamlessly
integrates with popular development frameworks like Truffle and Remix, streamlining the
17
development workflow and accelerating the process of building and testing Ethereum-based
applications. Whether for local development, testing, or educational purposes, Ganache
remains an indispensable tool for blockchain developers seeking to build and deploy robust
and secure smart contracts on the Ethereum blockchain.
There is no voting backlog, which will save a ton of time and lessen workload;
We worked on the following topics using the two different sets of modules: the electoral
commission and the voter(s). The Electoral Commission, which also includes registered
candidates and participating parties, creates elections. Using the Ethereum Blockchain-hosted
election's REST API, voters can examine the details and cast their ballots. Votes are tracked
on our blockchain system after the poll, providing the Electoral Commission with the overall
number of votes cast. We encountered a problem by not using the traditional form of smart
contracts, which is that the blockchain framework we designed cannot function on the
mainnet because it needs to be hosted and requires the usage of a different web3 provider for
interaction. Additionally, the absence of a public voter ID API results in the drawback of not
having a voter validated.
The objectives to develop the project are the following:
18
CHAPTER – 3
PROJECT DESIGN
3.1. WORKFLOW
A. BLOCKCHAIN
Blockchain serves as a distributed, decentralized public leader. Private, public, and
consortium blockchains are the three types of blockchains. Public blockchains include the
ones used by Ethereum and Bitcoin. Complex mathematical functions are among the
examples of this. The public blockchain Ethereum is used in this investigation. In essence, a
blockchain is made up of several blocks, each of which serves as the foundational unit. The
transactions that are being written to the network are contained in the block's body, which is
composed of the header and body. Block-specific information, such as transactions, nonce
value and difficulty, previous hashes, and block timestamp, are contained in the block header.
Additionally, each block includes details about the parties to the transaction.
The block length can vary, but its estimated size is between 1 and 8 MB. The block
header uniquely defines the block that has to be placed.
1) How Blockchain Operates: The blockchain is a peer-to-peer system that allows users to
freely share information and create an unchangeable record of transactions. A transaction
must take place before the authenticity of the transaction can be confirmed, and only then can
a block be generated. After that, the transaction will be kept on the block, and in order to seal
it, the block has to receive a hash value. This is the process of making and sealing a block.
19
Fig 3.1: Blockchain
B. CONSENSUS MECHANISM
Consensus mechanism is a set of protocols or rules used to reach consensus among nodes in a
distributed network. In blockchain technology, consensus mechanisms are essential to ensure
that all network participants can agree on the integrity of transactions and the status of the
ledger without the need for central authority
Various consensus approaches have been developed to address the various challenges and
requirements of distributed systems. Some commonly approved methods include:
1. Proof of Work (PoW): This mechanism is used by some cryptocurrencies such as Bitcoin.
Miners compete to solve complex mathematical puzzles, and the first solver gets to add a new
block to the blockchain. PoW is known for its security but requires a great deal of computing
power and energy consumption.
2. Proof of Stake (PoS): In PoS, provers are selected to create new blocks based on how
much money they have and are willing to "stake" as collateral. This mechanism aims to
reduce energy consumption compared to PoW but still maintain security through financial
incentives.
20
C. HASHING
Fitting an arbitrary and changeable input size to a preset output size is the process of hashing.
There are numerous functions that carry out various hashing levels. SHA-256 has been used
in our security implementation. SHA-1, commonly known as SHA-2, is replaced by the hash
function SHA-256. It is thought to be among the most powerful hash algorithms out there.
SHA-256 is unbroken and slightly more difficult to encode than SHA-1. [3] Due to its 256-bit
key, which is used for symmetric key ciphers—that is, utilizing the same key for both
encryption and decryption—AES is an advantageous auxiliary feature. Unlike its
predecessors, which produce a given output length, the algorithm's adaptability rests in its
capacity to take any input length and produce an arbitrary length of output. Enrollment
module.
D. Enrollment Module
After completing the registration form in the process' registration module, the customer or
person can vote for the candidate of their choice because their input will be stored in the
database. If the voter registration form is not filled out, they do not have the right to vote or
are unable to vote. The voter's information is placed into the database after completing the
registration form and uploading any required documents. Once the registration form has been
submitted and the user's phone number and email address have been verified, the registration
process is complete.
21
E. Result
It is showing the login screen, where users can continue with the process by logging in with
their user ID and password if they are already registered users, or by registering for the app if
they are new users. The user will receive confirmation of their credentials after logging in.
The user won't be able to access the dashboard until this process is complete. The initial
procedure that is put into place is OTP verification. The voter wallet cannot be formed or a
token to cast a vote issued to them until the user's identity has been verified . By sending their
wallet token to the selected candidate's wallet, voters cast their votes. To enable a new user to
register and vote in favor of the procedure, provide a link to the registration module. Users
may only register once and are not allowed to do so again in order to avoid duplication.
22
3.2. SDLC MODEL
Agile methodologies are utilized in an iterative model approach for this project. Incremental
and iterative development are the most frequently used phrases to characterize agile software
development methodologies. The foundation of agile methodologies, the most well-known of
which are SCRUM, DSDM, and FDD, is iterative strategy. Partitioning the software
development process into several cycles, or iterations, is the basic principle. At every
iteration, a time box, or a fixed amount of time, is released.
Process:
Planning and needs: The first stage of any development project, like most others,
involves initial planning to create software or hardware needs, map out specification
documents, and get everything ready for the cycle's subsequent stages.
Analysis & Design: The planning phase is followed by an analysis to identify the
appropriate database models, business logic, and other components that will be
required at this stage of the project. Additionally, the design stage is conducted here,
where any technological specifications (languages, data layers, services, etc.) that are
required to meet the requirements of the analysis phase are defined.
Implementation: After the planning and analysis are finished, the actual coding and
implementation process can now begin. All planning, specification, and design
23
documents up to this point have been coded and implemented for the first time in the
project's iteration.
Testing: A set of testing procedures will be conducted in order to find and identify
any potential flaws or problems that may have emerged after this build iteration's
coding and implementation.
Assessment: Once all prior stages have been finished, a comprehensive analysis of the
progress made thus far ought to be carried out.
3.2.1. ADVANTAGES
1. Involvement of Customers: Agile Iterative development promotes user input.
Following every iterative cycle, consumer input is gathered and used to inform any
necessary modifications to the product. This feature adds flexibility to the project's
design.
2. Increased adaptability: Project teams that successfully implement Agile have
unparalleled flexibility at their disposal. Teams work in shorter bursts, with the
product owner's continuous involvement and input acting as a boost.
3. Risk Assessment: To prevent roadblocks later in the project, agile iteration enables
early risk assessment and mitigation.
4. Rapid Delivery: Because the job is broken up into manageable cycles, team members
can focus and complete tasks on schedule. Additionally, every iteration's testing of
the design and code is done concurrently, which drastically cuts down on the amount
of time needed to finish.
5. Favors Evolution: Unlike Waterfall, where significant planning comes only before
execution and testing, Agile Iterative development allows for continuous planning
that makes room for growing concepts.
3.2.2. DISADVANTAGES
1. Complexity: Blockchain tech is tricky, and adding new features regularly can make it
even more confusing. This might lead to problems in keeping the system organized and
efficient.
2. Security Issues: Making changes too quickly might make the system vulnerable to
hackers or mistakes, risking the integrity of the voting process.
24
3. Regulatory Challenges: Following rules and laws is crucial for voting systems, but
agile methods prioritize fast changes over sticking to strict plans, which can clash with
legal requirements.
4. Resource Demands: Working in an agile way needs lots of communication and
cooperation. Developing a blockchain e-voting system needs experts in many areas,
making it more challenging to coordinate everyone effectively.
5. Integration Problems: Connecting blockchain technology with other voting systems
can be tricky. Agile methods focus on making things work fast, but integrating
different systems needs careful planning and can cause headaches.
Overall, while agile methods can be flexible, they also bring challenges like managing
complexity, ensuring security, following regulations, coordinating resources, and dealing
with integration issues when building blockchain e- voting systems.
DFD LEVEL 0
25
DFD LEVEL 1
DFD LEVEL2
26
CHAPTER – 4
ALGORITHM
The primary purpose of SHA-256 is to take enter facts and produce a hash value that
uniquely represents that records. It is designed to be a one-way function, which means it is
almost infeasible to reverse the manner and retrieve the authentic input information from its
hash cost. Additionally, even a small change in the input information will produce a
extensively extraordinary hash cost, which is a property referred to as the avalanche impact.
SHA-256 is widely utilized in diverse applications which includes digital signatures, message
authentication codes (MACs), and cryptographic protocols to make certain records integrity
and protection.
27
Here's how it works:
3. TIP: The miners race to find the solut ion to the pu zzle. Various combinat ions
are repeatedly considered and developed until they get it right.
4. Verification: Once the miner finds a solution, it is sent to the network. Other
nodes can immediately verify that the solution is correct by running the puzzle
with the given solut ion.
5. Reward: The miner who solves the first puzzle gets to add the next block of
transact ions to the blockchain and is rewarded with a cryptocurrency (such as
bitcoin) for their efforts.
This process ensures that transact ions are veri fied in a decentralized and secure
manner, as it would require an immense amount of computational power to alter
the blockchain's history.
Proof of Stake (PoS) is a dist inct ive way to steady and validate transact ions on a
blockchain, where the validator's danger of creating the next block and incomes
rewards is proportional to the quant it y of cryptocurrency they maintain and are
willing to "stake" or lock up as collateral. Here's the way it works:
28
2.Selection of Validators: Validators are selected to create new blocks and
validate transact ions based on different factors, which include the amount of
cryptocurrency they are staking. Generally, the extra cryptocurr ency a validator
stakes, the higher the threat they have of being selected to create the next block.
3.Validation: Validators validate transact ions and create new blocks based at the
guidelines of the blockchain protocol. This includes confirming the valid it y o f
transact ions and adding them to the blockchain.
2. Identity Verification: The PoA process requires authent icators to verify their
ident it y, usually t hrough a formal verification process. This ensures that only
trusted organizat ions have the right to participate in block construction.
3. Block Creation: Validators gradually create new blocks and add them to the
blockchain. Depending on the specific applicat ion, the frequency of rotating
29
blocks and authent icators may vary.
4.4 NODEMAILER
A module called Nodemailer makes it simple to send emails from Node.js apps. It offers an
easy-to-use interface for composing and forwarding email messages. The steps involved in
using Nodemailer are as follows:
1. Installation:
First, you need to install Nodemailer in your Node.js project using npm or yarn:
npm install nodemailer
2. Import Nodemailer:
In your Node.js application, you import the Nodemailer module:
const nodemailer = require('nodemailer');
3. Create a Transporter:
You create a transporter object which defines the email sending configuration, such as the
SMTP server details and authentication credentials:
4. Compose Email:
You compose the email
30
message by specifying the sender, recipient, subject, and body of the email:
5. Send Email:
You use the transporter object to send the email message by calling the sendMail() method
and passing the mail options:
6. Handle Response:
You handle the response from the sendMail() method to check if the email was sent
successfully or if there was an error.
7. Optional Configuration:
Nodemailer provides various configurat ion options, such as attachments, HTML
content, and custom headers, which you can use to customize the email message
according to your requirements.
In summary, Nodemailer offers an easy and adaptable API that makes sending emails from
Node.js apps easier. After composing the email message and creating a transporter object
with your email server information, you use the transporter to send the email. With
Nodemailer, you can concentrate on developing your application while they manage the
intricacies of email distribution.
31
CHAPTER – 5
IMPLEMENTATION
1. Migration.sol
2. Contest.sol
32
3. App.js
4. Main.js
33
5. Login.js
6. Admin.js
34
7. Package.json
35
5.2 SNAPSHOTS
36
Fig 8.3 Information
37
Fig 8.5 Voting Area
38
Fig 8.7 Candidates Details
39
Fig 8.9 Register
40
CHAPTER – 6
RESULTS
In India, the current voting system is based on electronic voting machines, or EVMs. Paper
ballots and manual counting were used in the system that came before it. Because of
fraudulent voting and booth seizing, in which party loyalists seize booths and cram them with
pre-filled bogus ballots, the paper ballot method was heavily condemned. It is imperative to
replace the current election system with a new one in order to prevent fraud and ensure that
the voting process is traceable and verifiable. As we can see, the internet has enabled a
revolution in every field by attempting to move the current system to an online platform in
order to expedite and facilitate user convenience.
Even though we are aware of the current system's dependability, we still think it is
important to move forward with improving it. Blockchain-based online voting could be that
next step. A distributed, public, irreversible, and unchangeable ledger is called a blockchain.
There are four primary ways that this new technology features:
• The ledger can be found in numerous locations: No single point of failure exists when it
comes to distributed ledger maintenance.
• The authority to add new transactions to the ledger is extend.
• To prevent tampering with the integrity of earlier entries and create an immutable chain
that gives rise to the name "blockchain," any proposed "new block" to the ledger must
make reference to the prior version of the ledger.
We have tried to build a user interface of the decentralized application that will make the
voting process more convenient. The UI portion can be assumed as 30% of the total work that
is to be completed. The major portion in this system is related to the blockchain technology
which will be responsible for the reliable voting process
41
CHAPTER – 7
CONCLUSION, LIMITATION AND FUTURE WORK
A reliable and transparent option for safe elections is decentralized voting using the Ethereum
blockchain. Voter integrity is guaranteed, and a tamper-proof platform is provided by
utilizing blockchain technology. It has the potential to completely transform democracy and
enable people to take part in a reliable and effective voting system with further
improvements, such as increased user experience, scalability, and integration with other
cutting-edge technology. In the direction of creating a society that is more accountable and
democratic, it is a major step forward.
Limitations:
For small organizations, implementing a blockchain-based voting system presents both
opportunities and challenges. While the transparency and security benefits of blockchain are
appealing, limitations such as scalability issues and complexities in implementation.
Future Work:
Future versions of the decentralized voting system could benefit from the addition of new
features including safe voter identification methods, real-time vote counting, enhanced voter
insights through data analytics and integration with cutting-edge technology like biometrics
and artificial intelligence. By adding these improvements, the voting process will become
even more accessible, secure, and efficient—along with being more reliable and inclusive.
42
CHAPTER – 8
REFERENCES
[1] Akinbohun, S., Apeh, S., Olaye, E. O., & Dele Ogbeide, O. Literature Review of
Blockchain-Based Voting System: Framework and Concept.
[2] B. Shahzad and J. Crowcroft, “Trustworthy electronic voting using adjusted blockchain
technology,” IEEE Access, vol. 7, pp. 24 477–24 488, 2019.
[3] B. Alaya, L. Laouamer, and N. Msilini, “Homomorphic encryption systems statement:
Trends and challenges,” Computer Science Review, vol. 36, p. 100235, 2020.
[4] Chhabra, R., & Rathor, M. G. H. S. A STUDY ON VOTING SYSTEM THROUGH
FACE RECOGNITION.
[5] Hardwick, F. S., Gioulis, A., Akram, R. N., & Markantonakis, K. (2018, July). E-voting
with blockchain: An e-voting protocol with decentralisation and voter privacy. In 2018 IEEE
International Conference on Internet of Things (iThings) and IEEE Green Computing and
Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom)
and IEEE Smart Data (SmartData) (pp. 1561-1567). IEEE.
[6] H. Yi, “Securing e-voting based on blockchain in p2p network,” EURASIP Journal on
Wireless Communications and Networking, vol. 2019, no. 1, pp. 1– 9, 2019.
[7] K. M. Khan, J. Arshad, and M. M. Khan, “Investigating performance constraints for
blockchain based secure e-voting system,” Future Generation Computer Systems, vol. 105,
pp. 13–26, 2020.
[8] Li, H., Li, Y., Yu, Y., Wang, B., & Chen, K. (2020). A blockchain-based traceable self-
tallying E-voting protocol in AI era. IEEE Transactions on Network Science and
Engineering, 8(2), 1019-1032.
[9] M. Chaieb, M. Koscina, S. Yousfi, P. Lafourcade, and R. Robbana, “Dabsters: Distributed
authorities using blind signature to effect robust security in e-voting,” in International
Conference on Security and Cryptography (SECRYPT), 2019.
[10] P. McCorry, S. F. Shahandashti, and F. Hao, “A smart contract for boardroom voting
with maximum voter privacy,” in International Conference on Financial Cryptography and
Data Security. Springer, 2017, pp. 357–375.
43
[11] S. Zhang, L. Wang, and H. Xiong, “Chaintegrity: blockchain-enabled largescale e-voting
system with robustness and universal verifiability,” International Journal of Information
Security, vol. 19, no. 3, pp. 323–341, 2020.
[12] S. Gao, D. Zheng, R. Guo, C. Jing, and C. Hu, “An anti-quantum e-voting protocol in
blockchain with audit function,” IEEE Access, vol. 7, pp. 115 304– 115 316, 2019.
[13] T. M. Fern´andez-Carames and P. Fraga-Lamas, “Towards post-quantum blockchain: A
review on blockchain cryptography resistant to quantum computing attacks,” IEEE access,
vol. 8, pp. 21 091–21 116, 2020.
[14] V. Torra, “Random dictatorship for privacy-preserving social choice,” International
Journal of Information Security, vol. 19, no. 5, pp. 537–545, 2020.
[15] Vardhan, G. H., Shah, S., Gupta, V., BC, R., & Bisht, T. (2021). Voting System Using
Blockchain (Face Recognition).
[16] W.-J. Lai, Y.-C. Hsieh, C.-W. Hsueh, and J.-L. Wu, “Date: a decentralized, anonymous,
and transparent e-voting system,” in 2018 1st IEEE International Conference on Hot
Information-Centric Networking (HotICN). IEEE, 2018, pp. 24–29.
44