Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

E-Voting Using Blockchain As a Service

Colloquium Report

Submitted in Partial Fulfillment of Requirements for the


Degree of Masters of Technology

By
Pundlik Rathod
M.Tech 3rd Semester
Registration no. 2017SW16

COMPUTER SCIENCE AND ENGINEERING DEPARTMENT


MOTILAL NEHRU NATIONAL INSTITUTE OF TECHNOLOGY
ALLAHABAD, UTTAR PRADESH, INDIA, 211004
2018-19
Abstract

Electronic voting machine is always a topic of debate at the time of elections.


Many governments had switched from paper based mode to digital mode of
voting. But still there is a need of a secure system which will be transparent
and can gain the trust of voters or users. There are certain cases of data
tampering and (Electronic voting machine) EVM hacking as well. Blockchain
is one of the evolving technology and has a potential to overcome the disad-
vantages of traditional voting approach. There is a need of gaining trust by
the system because such applications affects the society. This technology is
showing revolutionary impact on various industries and succeeded in gain-
ing trust of its users with providing distributed, shared and consensus based
mechanisms. Blockchain as a service removes almost all the disadvantages of
traditional E-Voting and also boost this technology by its secure, distributed,
and well defined incentive mechanisms. This technology is just in a begin-
ning phase. In this paper I have proposed a separate model for E-Voting using
blockchain as a service.

I
Contents

Abstract I

1 Introduction 1

2 Technical background 3
2.1 Cryptographic hash function (SHA256) . . . . . . . . . . . . . . 3
2.2 Decentralization . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Immutability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5 Open source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Blockchain Technology 5
3.1 Minors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Consensus Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3 Proof of Work (PoW) . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.4 Proof of Stake (PoS) . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.5 Smart Contract . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.6 Structure of Blockchain . . . . . . . . . . . . . . . . . . . . . . . 7
3.6.1 Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.6.2 Magic number . . . . . . . . . . . . . . . . . . . . . . . . 7
3.6.3 Block Size . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.6.4 Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.6.5 Main Data . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.6.6 Merkle root . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.6.7 Nonce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.6.8 Timestamp . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.6.9 Hash of current block . . . . . . . . . . . . . . . . . . . . 9
3.7 Life cycle of transaction in Blockchain . . . . . . . . . . . . . . 9

II
4 Blochain Enabled E-Voting 11
4.1 Traditional Approach . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Blockchain Based Approach[3] . . . . . . . . . . . . . . . . . . . 12
4.2.1 Terminologies used . . . . . . . . . . . . . . . . . . . . . 12
4.3 Phases of E-Voting . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3.1 Initialization Phase . . . . . . . . . . . . . . . . . . . . . 13
4.3.2 Preparation Phase . . . . . . . . . . . . . . . . . . . . . . 14
4.3.3 Voting phase . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3.4 Counting phase . . . . . . . . . . . . . . . . . . . . . . . 16
4.3.5 Challenging Phase . . . . . . . . . . . . . . . . . . . . . 17

5 Security Issues and Challenges 18


5.1 The Majority Attack (51% attack) . . . . . . . . . . . . . . . . . . 18
5.2 Fork Problems (Hard fork and soft fork)[1] . . . . . . . . . . . . 19

6 Conclusion 22

III
List of Figures

3.1 Merkel Tree for Transactions A, B and C . . . . . . . . . . . . . 8

5.1 A Hard Fork: Non-upgradable nodes rejects the new rules,


Diverging the chain . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2 A Soft Fork: Blocks violating mew rules are made by the up-
graded mining majority . . . . . . . . . . . . . . . . . . . . . . . 20

IV
Chapter 1

Introduction

Introduction Blockchain technology is one of the fastest evolving and influ-


ential issue in these days. Over the past few years it has widely affected the
lifestyle of the people’s. In its current scenario it is on verge of disrupting
many industries and business by overcoming their disadvantages and short-
comings. In future there is possibility that blockchain technology will be at
the core of majority of services as well as businesses. This technology is
popular because of its features like security, decentralization, open source,
autonomous, immutability and anonymity.
An abstract view of the power of blockchain can be seen from the revolu-
tionary evolution of the digital cryptocurrency named bitcoin. As a result of
the evolution of bitcoin most of the governments, banks as well as businesses
started trading in bitcoin and also thinking about its deployment. The most
important impact factor of this technology is that it build and gains trust of the
user (or public). Because of the huge success of bitcoin, industry started to
widely accept this technology. As a result blockchain is having application in
many industries like financial sector, IOT, supply chain, E-voting, healthcare
data preservation and many more.[11]
In this paper I will enlighten the major application of blockchain technol-
ogy in the field of E-Voting which plays major role in changing and reshaping
our life. Here I have used blockchain as a service for developing voting plat-
form which can overcome all the disadvantages of the traditional approach
of voting. This platform plays a major role in gaining trust of a voter/user.
Because of the transparent and tamper proof nature of this platform, there is
a possibility of its acceptance in the real life scenarios. I have also enlisted
some of the popular use cases and their outcomes.[2]
Blockchain technology deals with the revolutionary concept of blocks
which are linked by one another with the combination of cryptography (Hash-
SHA256), mathematical/computational puzzle, proof of work, economic model,

1
distributed nature and consensus algorithms[4]. Each block in the blockchain
technology contains multiple fields like its unique number, hash of previous
block, block header, nonce, merkle root and hash of the block. Alternatively
we can define blockchain as an inherently decentralized systems which con-
tains different acting entities who will act upon their incentives as well as
information available to them. Here consensus is achieved when majority of
acting entities contribute for the single deciding state.

2
Chapter 2

Technical background

Blockchain technology deals with the revolutionary concept of blocks which


are linked by one another with the combination of cryptography (Hash-
SHA256), mathematical/computational puzzle, proof of work, economic model,
distributed nature and consensus algorithms. Each block in the blockchain
technology contains multiple fields like its unique number, hash of previous
block, block header, nonce, merkle root and hash of the block. Alternatively
we can define blockchain as an inherently decentralized systems which con-
tains different acting entities who will act upon their incentives as well as
information available to them. Here consensus is achieved when majority of
acting entities contribute for the single deciding state. The key elements of
blockchain technology are listed below[1].

2.1 Cryptographic hash function (SHA256)


Here SHA stands for Secure Hash Algorithm. This algorithm is mostly used
to prove data integrity. This is similar to the unique signature for a particular
text or data file. It generates almost 256 bit (32 Bytes) unique signature for
the text. Same input will always produce exact same output. Multiple hash
values are stored in the form of merkle tree.

2.2 Decentralization
Blockchain technology is independent of centralized node/server. Here each
node behave as a client as well as server. Operations on the data can be
performed in a distributed manner.

3
2.3 Immutability
Record once stored cannot be modified later. These records are permanently
stored and linked by cryptographic hash. Data tampering can be encouraged
only in the case when an attacker takes the control of more than 51 per-
cent nodes of the distributed environment at a particular time. Blockchain
technology succeeded in gaining trust of the user and because of this a node
can transfer or make transactions to other node by just knowing its public
address. This feature encourages global acceptance of this technology.

2.4 Transparency
The same ledger or records are stored at each and every nodes in the dis-
tributed environment. Any changed are verified and reflected in all the nodes.

2.5 Open source


Most of the blockchains are public in nature and its source code is available
for use. All the records are public while user identities are encrypted/hidden.
We can use blockchain technology to developing any application according
to our need.

4
Chapter 3

Blockchain Technology

There are many scheme to detection of black hole attack so in this chapter
we will read about some detection schemes of black hole attack.

3.1 Minors
These are the nodes who participate in the competition of validating transac-
tions and creating block from them in order to get incentives related to those
transaction validation. Minor’s main job is to add a block to the blockchain
which can be done by solving a mathematical puzzle which requires a higher
computational power. Minor who adds a block in the blockchain gets all the
rewards which are related with the validation of transactions and blocks.

3.2 Consensus Algorithm


It is a phenomenon in which all or majority of blockchain nodes have agree-
ment on a particular massage or task. In blockchain we use different algorithm
to verify if consensus is reached. It is useful to elect a leader who will decide
the content of the next block. This leader has responsibility of broadcasting
just created block to the network. Two different consensus algorithms are
Proof of work (PoW) and Proof of Stake (Pos).

3.3 Proof of Work (PoW)


In this consensus algorithm, a leader is elected on the basis of solving a
mathematical puzzle which requires a higher computational power. The puzzle
every miner gets is different for each block with same difficulty. In this problem

5
he has to find a hash output for data in its block which will start with certain
zeros. A hash function is simply a mathematical problem that is very hard to
solve, but where the answer is very easy to verify. To solve the problem, if data
of block doesn’t hash it into the required output string which start with few
leading zero’s, a miner need to change a data field repeatedly inside a block
called nonce. By changing nonce after many computation miner will able to
get the output hash. Then miner broadcasts his hash to all the nodes and all
nodes provides their views to reach consensus. All this process requires lot
of electric as well as computational power consumption[1].

3.4 Proof of Stake (PoS)


It overcomes shortcomings of the PoW. Here miner makes a bid ad keep few
part of their resources as stake and get elected as a leader or validators. A
miner making highest bid will get the highest share of validating transactions
and rewards related to them. This algorithm is biased towards rich people,
but it stabilizes system by avoiding possibility of 51 percent attack which can
be possible in case of PoW. In this case it is not possible because executing
attack might result into the loss of validator’s stake and also as he has the
resources in the blockchain, so it will result in loss of attacker from his own
attack. So, this attack is not possible as it work like self-destructive mode[1].

3.5 Smart Contract


These are digital contracts that can control user’s digital assets, formulating
the participant’s right and obligation, will automatically execute by computer
system. It’s not only just a computer procedure, it can be seen as one of
a contract participants, will response to message what it receive and store
the data, it can also send message or value to outside. Smart Contract is
just like a person can be trusted, can hold the assets temporarily and will
follow the order which has already been program. Ethereum is an open source
blockchain platform combining Smart Contract, offering decentralized virtual
machine to handle the contract, by using its digital currency called ETH,
people can create many different services, applications or contracts on this
platform[1].

6
3.6 Structure of Blockchain
Generally blockchain can be considered as a singly linked list in which
pointer pointing to the next node/block can be linked in a dynamic man-
ner (i.e. changes reflected with respect to change in the hash) and a new
node/block will only get added to the end of the linked list. Blockchain con-
tains multiple blocks linked by cryptographic hash and each block contains
main data, magic number, block size, version, hash of previous block, hash of
current block, merkle root, nonce, timestamp and other information.

3.6.1 Block
It is a collection of records or transactions made by uses and are residing in
the pool of unconfirmed transactions. All ledgers are stored in the block and
all blocks are linked to one another in which previous blocks are immutable
and tamper proof.

3.6.2 Magic number


It works as the identifier for a blockchain network and it has a constant value
of 0xD9B4BEF9.

3.6.3 Block Size


It indicates the size of the block. Maximum number of transactions to be
added in the block is dependent on the block size.

3.6.4 Version
This is the application specific field. For example in case of all nodes running
bitcoin protocol have same value in this field.

3.6.5 Main Data


It is dependent on the type of service or application. For example transaction
records, voting ballots, healthcare data, IOT data records, etc. Hash of pre-
vious block: This field establishes link with the previous block and maintains
integrity of the blockchain.

7
3.6.6 Merkle root
A particular nodes block may contain thousands of transaction records. In
blockchain all these transactions are stored in the form of merkle tree and
final merkle root is generated by hashing transactions in bottom up manner.
We can retrieve a while ledger if we know the merkle root only. This merkle
root is included in the block header which will contribute to the computation
of hash of the block. It is also called as binary hash tree. Tree represented
in upside down manner and leaf nodes are stores as transactions.
Each node can be taken as a cryptographic hash of a transaction. Here I
have shown merkle root of four transactions[8].

Figure 3.1: Merkel Tree for Transactions A, B and C

In the above merkle tree, transactions A, B, C, C are the leaves. Here


transaction C is added twice because the leaves of the tree must be even. In
case of odd count, last transaction is added again in merkle tree. Merkle tree
just contains hash of all transactions as a tree structure.

3.6.7 Nonce
It is 32 bit and arbitrary random number used in a block and is used in the
mining process while solving mathematical puzzle requiring higher computa-
tional power to get the hash function below certain hash (target hash). Mostly
used by miner in proof of work.

8
3.6.8 Timestamp
It is the unique identification entity for any transaction so that we can check
which transaction happened earlier. Also useful to identify previous transac-
tion which is to be modified later in current block.

3.6.9 Hash of current block


This gives a unique hash value with respect to hash of previous block hash,
merkle root, main data, block header and data related with it. This is the
final hash for a particular block and is used in the next block to be added.

3.7 Life cycle of transaction in Blockchain


Here I have described transaction of a blockchain as a seven step process.
By assuming the test case of bitcoin cryptocurrency, a step by step procedure
followed is given below[7]:

Step 1: User A wants to send some amount of bitcoin to User B. Then user A
should know the public address of user B to send money (User B requested
for money in the network by sharing his public key).

Step 2: This transaction made by user A goes to the ‘Pool of unconfirmed


nodes’ where all the unconfirmed or newly made transaction resides.

Step 3: Here comes the role of miners (mostly referred to nodes) in the
network. They pick the transactions in order of their order of increasing
timestamp and add them to their block (collection of transactions) with some
additional information about the block.
Every miner has right to create their own block, but multiple miners can
add the same transaction into the blocks created by them. For example if
there are two miners A and B. Both of them decided to include transaction T
into their block. Before adding any transaction to the block, miner needs to
verify them. They should check whether these transaction are in the order for
execution according to the blockchain. This verification is done by checking
the supposed balance of the sender on the blockchain. Sender should have
sufficient balance to get added to the blockchain.

Step 4: After filling the block with verified transactions, a miner will have to
solve a mathematical puzzle which can be a complicated enough to take up

9
to 10 minutes with higher computational power. Such puzzle are unique for
that particular block with similar difficulty and miner has to solve it in order
to add that particular block to the blockchain.

Step 5: The miner who succeeded in finding the solution for the mathe-
matical puzzle first, broadcasts this solution to the all node or miners. This
means that he is sending his proof of work to everyone in the distributed
network.

Step 6: Then all the miner checks whether the solution resembles with the
problem of senders block. If it resembles with senders block then miners will
grant permission to add that block to the blockchain. Before granting this
permission they will again verify validity of all the transactions. The process
in which majority of the miners agree for particular transaction, then we can
say that consensus is reached.

Step 7: New block always gets added to the top of the blockchain. There
might be possibility of getting multiple ‘confirmations’ for any block. After
addition of block to the blockchain, the transaction from A to B is updated
and B receives money from A. For addition of a block it will take nearly 10
minutes. After that all the miners need to start all over again from step three
by generating new block of transactions.
Miners cannot continue the mining old block because of the two reasons.
First, it may contain transactions from the last block which are added in the
blockchain and therefore they are invalid by making the whole block invalid.
Second, every block requires a previous block’s hash but miner did not able
to add the recently added top block of the blockchain. So, if miner goes the
old way, his block will always get rejected.

10
Chapter 4

Blochain Enabled E-Voting

4.1 Traditional Approach


Voting has played a major role in changing the current status of the society.
If we observe from the initial phases of evolution, we have accepted a polling
based methodology. In this methodology, everyone gather at a one place and
raise their hands or give signals according to their decisions. This method is
still useful, but only at particular place or small town. We cannot deploy it
on a large scale[2].
This method does not give freedom and anonymity to the user. Then paper
ballot based approach is invented which will give freedom to vote, privacy of
vote but it still involves so many physical tasks involved. It was also possible
that votes can be altered and they are not tamper proof. Then we moved to
the digital voting machine. This e-voting machine is also hackable and votes
are not tamper proof. Few cases of biased voting machine and its hacking are
also registered.
Till now we have seen that each voting mechanism has certain flaws or
shortcomings. So, clearly there is a need of a voting platform which will
succeed in gaining the trust of users and have a transparent voting mechanism.
To secure the voting and store them in a tamper proof environment we can use
blockchain as a service. It will also share voting in a distributed environment
and continuously update the voting ballets. This platform also verifies the
authenticity of the user. Votes shared on the blockchain cannot be altered.
So, from this approach we can say that blockchain based E-voting overcomes
the shortcomings of traditional approach of voting and also provides additional
advantages.
In this paper we have discussed following phenomenon:
1) This paper proposes e-voting scheme which uses blockchain as a service to

11
overcome the disadvantages of traditional approach and at the same time it
provides the decentralized environment to provide the control of the process
in the hands of user.
2) I have also discussed the implementation with various platforms used and
the limitations of the proposed methodology.

4.2 Blockchain Based Approach[3]


4.2.1 Terminologies used
Voter: Since we are following asymmetric key encryption, we can identify a
used based on their public key only. Private Key of user is not shared with
anyone. Consider a public key of a voter as Vipub and we can use this key for
casting a vote of the candidate. Voter/client can access the e-voting platform
through the distributed app (Dapp) installed on the clients machine or device.
During the election, a voter has to make a choice (Let’s assume Ci) which can
be revealed at the time of the counting stage of the election.

Central Authority (CA): In order to ensure that only legitimate voters are
able to vote, we need to introduce the concept of central authority. No user
can cat vote without getting authentication from CA. We can say that CA is
gives a token which can prove the eligibility to vote. It can have its own
centralized database which will contain all the legitimate voters’ information.
The implementation of CA is always application or user dependent. We can
use method of our choice for authentication of voter by CA.

Vote: This is one of the important entity and it has a predefined structure.
We can relate this with the bitcoin transaction analogy. A vote is required
to include a ballot with some extra information. Each vote will have a unique
voting ID and can be uniquely identified by it.

Ballot: This is the digital representation of the physical ballot (i.e. a paper
use to write vote choice). Ballot should be sealed till the counting phase of
voting. So, only voter will able to identify the vote and its state. Any other
party could not able to alter the state of the vote because it is sealed on the
ballot with some hash value of that ballot and public key of voter only. After
opening the seal of the ballot its privacy commitment is not compromised (i.e.
it will only reveal the vote given, but it will never tell anything about voter).
With the public key given in the ballot a voter can extend or alter their vote.
This gives rise to the concept of alteration ballot.

12
Alteration Ballot: This is the additional facility provided by blockchain en-
abled voting and because of this it is gaining more popularity and accurate
count of votes. In this ballot, voters can alter their vote by discarding the
previous vote on the block. The alteration block contains following elements.
1) A voter that has voted x, with unique VID and public key of user will be
discarded and it will not be counted towards the final voting.
2) Public key of the voter also acts as a major validation key.
3) The new vote of the voter is captured with the new VID and can be kept
sealed until the final voting period is started.

4.3 Phases of E-Voting


4.3.1 Initialization Phase
In this phase all the rules and regulations which are required for governing
any election are identified and initialized. This initialization includes CA, the
blockchain and all the other required protocols are initialized. The organizers
or creators of elections have full right to initialize additional protocols and
providing permissions for vote cancellation. The rules will be publicized and
a CA and blockchain environment is created to govern the election.
CA provides the list of eligible voters as well as the algorithm used to
authentic those users (i.e. Identity criteria is disclosed). A pair of signing
and verifying keys for the public signature scheme will be generated and the
verifying key will be publicized as a system wide parameter[3].
The blockchain is initialized with the initialization of the genesis block
of the chain which contains all the required information at the start of the
blockchain based voting. This block will not contain any votes at the start,
but it will definitely have the CA and unique validating key and the set of
valid choices out of which one has to be chosen.

13
While placing a genesis block we should ensure that there is no any block
placed before that block. Alteration ballot contracts should be available to
each and every user in the blockchain. When the contract is created, this
information will be passed in by the client responsible for pushing the contract
to the blockchain. It will then be stored in the contract state.

4.3.2 Preparation Phase


In this particular voter will authenticated by CA using client application of
e-voting platform. CA uses the list of eligible voters for this purpose and
check if that voter is eligible to vote. We can call this phase as pre voting
phase. When the voter is validated, it will generate a pair of public key. Then
it will also prompt a list of choices for voters so that it can be preserved in
the blockchain. CA will never bind ones true identity with the vote. Rather
it will use a binding signature scheme for this purpose[3].

4.3.3 Voting phase


After the preparation phase of the voter it will then constructs and broadcasts
their vote to the respective network. Each voter can avail the responsibility
of vote collection, vote validation and after that inserting valid ones into the
blockchain. While checking whether a vote should be validated and accepted,
one should make sure that the voter should have not casted a vote previously.
In addition to that the validated token given by CA is included in the vote
ballot or not. The casted vote must resembles with the predefined structure.

14
In case of any condition mentioned above fails, then we can discard that vote
and considered as invalid.

In this phase a voter has also provides an opportunity to alter their vote
even after the casting. Ballot cancellation can be performed multiple times
and only the final ballot will be included in the count. The algorithm for two
voting phases namely initial ballot voting phase and alteration ballot voting
phase is given below:
While placing a ballot in the blockchain a voter should have been validated
by CA and must have received token from CA so that they can authorize the
ballot. While submission a voter must include a component parts of this signed
token of CA. Along with vote a voter must have to submit their unique VID
which will help in identifying that token in later part of time. This will avoid
the problem of double spending. The message token gets validated and signed
by public key of the election. The current time is verified in order to check
whether that vote is placed after the election end. After these requirements
are satisfied, a ballot will be created and VID is assigned to it. Only then
this ballot is pushed to the blockchain.

15
The phenomenon of inserting an alternate ballot is almost same as that
of creating an initial ballot. The voter must have a signed token given by CA
which can authorize the ballot. The component part of this token is useful for
submission into the blockchain. Previous ballot with given VID is altered and
not considered for final voting. With timestamp and new VID the previously
generated ballot of ignored. Time period is also verified to maintain the time
bounded election policy[3].

4.3.4 Counting phase


This phase starts at the end of the voting phase. Where election concludes.
While retrieving votes from ballot, it is first time those votes are getting
retrieved. In such cases the ballot which are marked as sealed will be marked
as unsealed at the time of their retrieval. The VID is public foe any vote and
using this we can also alter the previous vote by checking its validity as well
as time period in which it id recorded. Every node has access to information
so that independent verification of final count should be done.

16
4.3.5 Challenging Phase
While using blockchain as a service we can also verify the blockchain. With
the help of VID, the nodes can retrieve information about current sealed state
state of a ballot and the time at which the ballot was unsealed. If there is a
possibility of the particular block opened early, or was uncounted, the given
information support such operations.

This phase ensures that there is a transperency in the elections and


concludes the voting session by invoking result declaration module of the
system[3].

17
Chapter 5

Security Issues and Challenges

Whenever blockchain technology is considered, we take it as a secure, free


from attacks and problems. But, there are certain exceptions to that. I will
discuss two problems in this paper. First is the majority attack (or 51 %
attack) and another is fork problems. Let’s discuss these problems one by
one.

5.1 The Majority Attack (51% attack)


In case of bitcoin we have deployed proof of work as a consensus algorithm.
In this algorithm miners add a block to the blockchain based on the work done
by them. This work done is dependent on the clock aped or computational
speed of the node and the availability of electricity for that node. To get
the higher incentives and rewards related to blocks and transactions, miners
started to combine and form a mining pools.
This strategy definitely increased their profit but, it also shifted the flow
of technology in the centralized direction. There might be possibility that top
few miners may combine and can control more than 50% of the blockchain.
When miners are controlling a major chunk of the blockchain, it will be easier
for them to achieve consensus and take decisions according to their wish. So,
here users trust will be compromised and mining pools became the owner and
deciding committee of the blockchain. This is called as the majority attack.
If someone gains access to more than 51% computing power, then he can
find the nonce more easily than others and solve the mathematical puzzles.
It means he can decide if the block is permissible or not. He can do certain
things like modifying transactions data which may lead to double spending
attack, he can stop a block transaction verification or he can also stop any
miner mining other blocks. So, this attack is very harmful for the blockchain.

18
5.2 Fork Problems (Hard fork and soft fork)[1]
This kind of problems are related to with upgradation or decision making for
a blockchain based decentralized product. In this case many of the decen-
tralized nodes shows different opinions for a change in the software. There
might be a one community who wants to accept changes and another who do
not want to leave its traditional approach.
Whenever any new version of blockchain based software or product is
published, a rules are also defined for consensus at all the nodes. Therefore,
the nodes in blockchain network can be divided into two types, the New
Nodes and the Old Nodes. Because of these old and new nodes, following
four situations may arise:
1) The new nodes agree with transaction done by old nodes.
2) The new nodes don’t agree with transaction done by the old nodes.
3) Old nodes agree with transaction done by the new nodes.
4) Old nodes don’t agree with transaction done by the new nodes.
These four cases are responsible for the fork problems. There are two
types of forks Hard Fork and Soft Fork. To differentiate between the new and
old nodes we need to compute or find out the computational power of these
nodes and based on that we can distinguish between them.
Hard Fork: Whenever a system deals with the change or update to a
newer version or agreement, and it do not show compatibility with its previous
version. Here the old nodes are not able to compatible with the mining of
newer nodes, and this results in creation of two copies of the chain. We can
say that new nodes computing power is greater than that of the old nodes,
but old nodes still continues to maintain the chain which it though was right.
Whenever Hard Fork happens, we have to request all nodes in the network
to upgrade the rules and bounded with the newer agreement, the nodes which
haven’t been upgraded or which do not want to upgrade will not continue to
work as usual. If there were more old nodes didn’t upgrade, then they will
continue to work on the other completely different chain, which means the
ordinary chain will fork into two chains.

19
Figure 5.1: A Hard Fork: Non-upgradable nodes rejects the new rules, Di-
verging the chain

Soft Fork: In case of the Soft Fork when a blockchain platform based
system changes or updates to a newer version or agreement, it do not show
compatibility with its previous version and the newer nodes do not agree
with the mining of old nodes. Because the computing power of new nodes
are stronger than old nodes, the block which is mining by the old nodes will
never be approve by the new nodes, but new nodes and old nodes will still
continue to work on the same chain.

Figure 5.2: A Soft Fork: Blocks violating mew rules are made by the upgraded
mining majority

When Soft Fork happens, nodes in the network don’t have to upgrade the
new agreement at the same time, it allows to upgrade gradually. Not like
Hard Fork, Soft Fork will only have one chain, it won’t affect the stability
and effectiveness of system when nodes upgrade. However, Soft Fork makes
the old nodes unaware that the consensus rule is changed, contrary to the
principle of every nodes can verify correctly to some extent.

20
The nodes which are no upgraded are also works as usual in case of soft
fork, but it will create ambiguity in case of hard fork. So, it seperates and
creates two copy of the came blockchain. The recent example of hard forking
is bitcoin cash and bitcoin. Bitcoin cash changed the block size, which means
that blocks can be greater than 8MB. In case of bitcoin it continues with 1
MB blocks.

21
Chapter 6

Conclusion

This paper contains detailed overview of blockchain technology. I have con-


sidered a bitcoin cryptocurrency analogy and described a life cycle of a trans-
action in a blockchain. The basis idea of this paper is to propose a better
e-voting system by using blockchain as a service. The newly proposed system
addresses the issues and shortcoming of traditional approach of e-voting. The
blockchain enabled e-voting is secure, distribute and trustworthy platform. In
addition to that this system also preserves voting data permanently with-
out any kind of data tampering. The proposed system satisfies the need of a
transparent system for e-voting which can build the trust among users. Almost
all the needs of a traditional approach of voting are satisfied in this paper. I
have also elaborated the issues and challenges of blockhain technology.

22
Bibliography

[1] Lin, I.C. and Liao, T.C., 2017. A Survey of Blockchain Security Issues and
Challenges. IJ Network Security, 19(5), pp.653-659.

[2] Kshetri, N. and Voas, J., 2018. Blockchain-Enabled E-Voting. IEEE Soft-
ware, 35(4).

[3] Hardwick, F.S., Akram, R.N. and Markantonakis, K., 2018. E-Voting with
Blockchain: An E-Voting Protocol with Decentralisation and Voter Pri-
vacy. arXiv preprint arXiv:1805.10258.

[4] Nakamoto, S., 2008. Bitcoin: A peer-to-peer electronic cash system.

[5] https://medium.com/coinmonks/blockchain-for-beginners-what-is-
blockchain-519db8c6677a

[6] Li, X., Jiang, P., Chen, T., Luo, X. and Wen, Q., 2017. A survey on the
security of blockchain systems. Future Generation Computer Systems.

[7] https://medium.com/coinmonks/how-a-miner-adds-transactions-to-the-
blockchain-in-seven-steps-856053271476

[8] Wüst, K. and Gervais, A., 2017. Do you need a Blockchain?. IACR Cryp-
tology ePrint Archive, 2017, p.375.

[9] Wood, G., 2014. Ethereum: A secure decentralised generalised transac-


tion ledger. Ethereum project yellow paper, 151, pp.1-32.

[10] https://bitcoin.org/en/

[11] https://www.coindesk.com/information/

[12] https://anders.com/blockchain/blockchain.html

23

You might also like