0% found this document useful (0 votes)
11 views

UNIT 2 Consensus Algorithms

Blockchain is a decentralized, open ledger that records transactions efficiently and permanently without a central authority. Each block in the chain contains essential information such as index, timestamp, hash, previous hash, data, and nonce, and the mining process involves finding a special hash through computational effort. Consensus algorithms ensure all nodes in the network agree on the state of the distributed ledger, with Proof of Work being one of the primary methods used to validate transactions.

Uploaded by

Rethisha 2003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

UNIT 2 Consensus Algorithms

Blockchain is a decentralized, open ledger that records transactions efficiently and permanently without a central authority. Each block in the chain contains essential information such as index, timestamp, hash, previous hash, data, and nonce, and the mining process involves finding a special hash through computational effort. Consensus algorithms ensure all nodes in the network agree on the state of the distributed ledger, with Proof of Work being one of the primary methods used to validate transactions.

Uploaded by

Rethisha 2003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

SITB3011 BLOCKCHAIN TECHNLOGIES – UNIT 2

UNIT 2

2.1 BLOCK IN A BLOCK CHAIN Definition of Blockchain

A block chain is an open, distributed ledger that can record transactions


between two parties efficiently and in a verifiable and permanent way without the
need for a central authority.

Key Characteristics to be remembered:

Open: Anyone can access blockchain.

Distributed or Decentralised: Not under the control of any single authority.

Efficient: Fast and Scalable.

Verifiable: Everyone can check the validity of information because each node
maintains a copy of the transactions.
Permanent: Once a transaction is done, it is persistent and can’t be altered.

Contents of a Block

Blockchain starts with a block called genesis block. Each block stores the following
information in it:

Index: Position of the block in blockchain. Index of genesis block is 0.

Time stamp: The time when that particular block was created.

Hash: Numeric value that uniquely identifies data just like our fingerprints.

Previous hash: Hash value of the previous block. For genesis block, this value is 0.

Data: Data stored on the node. For example, transactions.

Nonce: It is a number used to find a valid hash. To generate this number, the
processing power is used.

1
SITB3011 BLOCKCHAIN TECHNLOGIES – UNIT 2

Fig.2.1 Genesis block

Mechanism of Blockchain

Fig 2.2 Blocks connected in backward direction

• Blockchain works like a public ledger.

• Any small change in the data value can affect the hash value. Hence, affecting

the whole block chain.

• Every peer in a Blockchain network maintains a local copy of the Blockchain.

• All the replicas need to be updated with the last mined block.

• All the replicas need to be consistent — the copies of the Blockchain at

different peers need to be exactly similar.

Structure of a Block (Reference: Bitcoin)

The blockchain is a chain of data blocks. Each block can be thought of as a


page in a ledger. The individual blocks are composed of several components.
Roughly these can be differentiated into

2
SITB3011 BLOCKCHAIN TECHNLOGIES – UNIT 2

the head of the block (block header) and

the body (block body).

Block header

The head of the block is divided into six components:

1. the version number of the software

2. the hash of the previous block

3. the root hash of the Merkle tree

4. the time in seconds since 1970–01–01 T00: 00 UTC

5. the goal of the current difficulty

6. the nonce

• The version number of the software: The software version number does not
matter in most cases. However, a miner with a particular version number can signal
which protocol decisions he supports.
• The hash of the previous block: The hash of the previous block is, so to speak,
the chain of blockchains. Because the hash of the previous block is contained in
the hash of the new block, the blocks of the blockchain all build on each other.
Without this component, there would be no connection and chronology between
each block.
• The root hash of the Merkle tree: All transactions contained in a block can be
aggregated in a hash. This is the root hash of the Merkle tree.
• The time in seconds since 1970–01–01 T00: 00 UTC: A timestamp in the block
itself. The time is given in seconds since 1.1.1970.
• The goal of the current difficulty: The goal indicates how small the new hash
must be to claim validity. In other words, every hash has a size in bits. The lower
the goal in bits is, the harder it is to find a matching hash. A hash with many zeros
at the beginning is smaller than a hash without zeros. Find out more about the
difficulty of the proof of work.

3
SITB3011 BLOCKCHAIN TECHNLOGIES – UNIT 2

• The Nonce: The nonce is the variable incremented by the proof of work. In this
way, the miner guesses a valid hash, a hash that is smaller than the target.

The six components form the block header. The block header plays a
fundamental role in Bitcoin because it connects all blocks together. You can
imagine it like the cockpit of a truck. Here are the important papers with which the
truck comes through the controls of the network.

Block Body

The block body is conceivable as the loading space of a truck. It contains all
transactions that are confirmed with the block.

When a miner constructs a block, it validates the transactions. That is, he


checks that the sender actually has enough money to spend. He can easily read this
information from the blockchain. The miner looks in the past blocks to see if the
sender has even gotten ten Bitcoins if he wants to send ten Bitcoins. The
transactions in a block are not just in a list, but in a so called Merkle Tree.

Mining: The search for a special hash

In this context, it is easier to understand the mining of the proof of work.


When mining, the block header of the block is incrementally changed to get a
special hash. The header consists of five constants and one variable. The constants
are the version number of the software, the hash of the previous block, the root
hash of the Merkle tree, the timestamp, and the target size of the searched hash in
bytes.

The variable is the nonce. A nonce is a number raised by one. Then the
miner hashes the data and checks if the data results in a hash that is below the
searched target value. If the hash value is greater than the target, the miner repeats
the process; So it increases the nonce by one, hashes and checks again. It repeats
this until it finds a hash below the target, or it gets another block from another
networker whose hash is below the target. Then takes this new block and uses it as

4
the basis for the next block (using the new hash as the “hash of the previous block”).

Mining is a hyper-repetitive process whose goal is to find a special hash.


Once the hash is found, the game starts again. The probability of finding a special hash
depends on the difficulty. On average Bitcoin finds a new block every ten minutes. The
difficulty keeps adapting, so this average stays the same.

The special feature of this process is that the special hash can only be found by
guessing. This rate costs computing power and therefore energy. A look at the special
hash is enough to see that it is special because it begins with zeros.

Here is an example of such a hash from the Bitcoin blockchain:

000000000000000000094bfa4edb1245c347e42452e4418e9fe5a1d24e335b16

The architecture of Blockchain.

Figure 3.18 The architecture of Blockchain.

Table 3.2 Security and Privacy Requirements, Properties

5
S&P requirements Corresponding S&P Corresponding S&P
Supported in bitcoin techniques techniques
S&P properties

Consistency Consistency Consensus algorithms

Integrity Tamper-resistance Hash chained storage

Resistance to DDoS Consensus algorithms


Availability
attacks with Byzantine fault

Resistance to
Prevention of Signature and
double-spending
double-spending verification
attacks

Public key as
Anonymity Pseudonymity
pseudonyms
Mitigation Methods

• Performing Static Analysis testing (SAST) - analyze the source code to identify
security loopholes.
• Performing Dynamic Analysis testing (DAST) eliminate vulnerabilities during
software development

to test for security vulnerabilities in applications in the production environment.


• Performing Interactive Application analysis/testing (IAST) to thoroughly test for
hidden inputs, hidden files, and configuration information, etc. in an applicationrunning
in real-time, in the development process, QA, or in production.
• Performing Software Composition Analysis (SCA) to check for any vulnerable
outdated libraries, open-source components, and containers used in the development.
You can use thisOWASP dependency-check tool to do this.
• Performing a detailed penetration testing for your Blockchain-based application to test
and discover security loopholes and vulnerability exploits using the hacker approach.
You can do this by using a variety of open-source tools that are available on the Internet.

6
Figure 3.19 bitcoin mining process

Figure 3.20 Block

3.1 Public Key Cryptography

Public key cryptography uses a pair of a public key and a private key to perform
different tasks. Public keys are widely distributed, while private keys are kept secret. Using a
person’s public key, it is possible to encrypt a message so that only the person with the private
key can decrypt and read it. Using a private key, a digital signature can be created so that anyone
with the corresponding public key can verify that the message was created by the ownerof the
private key and was not modified since.

7
Figure 3.21 Digital signature flow diagram

Public-key algorithms are asymmetric algorithms and, therefore, are based on the use of two
different keys, instead of just one. In public-key cryptography, the two keys are called the
private key and the public key
Private key: This key must be know only by its owner.
Public key: This key is known to everyone (it is public)
Relation between both keys: What one key encrypts, the other one decrypts, and vice versa.
That means that if you encrypt something with my public key (which you would know, because
it's public :-), I would need my private key to decrypt the message.

A secure conversation using public-key cryptography

• In a basic secure conversation using public-key cryptography, the sender encrypts the
message using the receiver's public key.
• Remember that this key is known to everyone. The encrypted message is sent to the
receiving end, who will decrypt the message with his private key.

8
Only the receiver can decrypt the message because no one else has the private key.
Also, notice how the encryption algorithm is the same at both ends: what is encrypted
with one key is decrypted with the other key using the same algorithm.

Figure 3.21 secure conversation using public-key cryptography

Pros and Cons of public-key systems


• Public-key systems have a clear advantage over symmetric algorithms: there is no need
to agree on a common key for both the sender and the receiver.
• As seen in the previous example, if someone wants to receive an encrypted message,
the sender only needs to know the receiver's public key (which the receiver will provide;
publishing the public key in no way compromises the secure transmission).
• As long as the receiver keeps the private key secret, no one but the receiver will be able
to decrypt the messages encrypted with the corresponding public key.
• This is due to the fact that, in public-key systems, it is relatively easy to compute the
public key from the private key, but very hard to compute the private key from the
public key (which is the one everyone knows).
• In fact, some algorithms need several months (and even years) of constant computation
to obtain the private key from the public key.

9
Figure 3.22 public-key cryptography
Another important advantage is that, unlike symmetric algorithms, public-key systems
can guarantee integrity and authentication, not only privacy. The basic communication seen
above only guarantees privacy. We will shortly see how integrity and authentication fit into
public-key systems. The main disadvantage of using public-key systems is that they are not as
fast as symmetric algorithms.
Digital signatures: Integrity in public-key systems
Integrity is guaranteed in public-key systems by using digital signatures.
A digital signature is a piece of data which is attached to a message and which can be used to
find out if the message was tampered with during the conversation (e.g. through the
intervention of a malicious user)

Figure 3.23 Digital signature for a message The


digital signature for a message is generated in two steps:
A message digest is generated. A message digest is a 'summary' of the message we are going
to transmit, and has two important properties: (1) It is always smaller than the message itself

10
and (2) Even the slightest change in the message produces a different digest. The message
digest is generated using a set of hashing algorithms.
The message digest is encrypted using the sender's private key. The resulting encrypted
message digest is the digital signature. The digital signature is attached to the message,
and sent to the receiver. The receiver then does the following:
Using the sender's public key, decrypts the digital signature to obtain the message
digestgenerated by the sender. Uses the same message digest algorithm used by the sender
to generatea message digest of the received message. Compares both message digests (the
one sent by thesender as a digital signature, and the one generated by the receiver). If they
are not exactly thesame, the message has been tampered with by a third party. We can be
sure that the digital signature was sent by the sender (and not by a malicious user) because
only the sender's publickey can decrypt the digital signature (which was encrypted by the
sender's private key; remember that what one key encrypts, the other one decrypts, and vice
versa). If decrypting using the public key renders a faulty message digest, this means that
either the message or themessage digest are not exactly what the sender sent.
Using public-key cryptography in this manner ensures integrity, because we have a
wayof knowing if the message we received is exactly what was sent by the sender. However,
notice how the above example guarantees only integrity. The message itself is sent
unencrypted. Thisis not necessarily a bad thing: in some cases we might not be interested
in keeping the data private, we simply want to make sure it isn't tampered with. To add
privacy to this conversation,we would simply need to encrypt the message as explained in
the first diagram.
Authentication in public-key systems
The above example does guarantee, to a certain extent, the authenticity of the
sender. Since only the sender's public key can decrypt the digital signature (encrypted with
the sender'sprivate key). However, the only thing this guarantees is that whoever sent the
message has theprivate key corresponding to the public key we used to decrypt the digital
signature. Althoughthis public key might have been advertised as belonging to the sender,
how can we be absolutelycertain? Maybe the sender isn't really who he claims to be, but just
someone impersonating thesender. Some security scenarios might consider that the 'weak
authentication' shown in the previous example is sufficient. However, other scenarios
might require that there is absolutelyno doubt about a user's identity. This is achieved with
digital certificates, which are explainedin the next page.
11
2.2 DISTRIBUTED CONSENSUS

Consensus is the process by which peers agree to the addition of next block
in the block chain. Distributed Consensus ensures that different nodes in the
network see the same data at nearly the same point of time. Hence in case of any
failure, the system can still provide a service as the data is decentralised. To
maintain anonymity in this large network, the permission less protocol is used
where you don’t need to record your identity while participating in the consensus.

Consensus Algorithms

We know that Blockchain is a distributed decentralized network that


provides immutability, privacy, security, and transparency. There is no central
authority present to validate and verify the transactions, yet every transaction in the
Blockchain is considered to be completely secured and verified. This is possible

only because of the presence of the consensus protocol which is a core part of any
Blockchain network.

A consensus algorithm is a procedure through which all the peers of the


Blockchain network reach a common agreement about the present state of the
distributed ledger. In this way, consensus algorithms achieve reliability in the
Blockchain network and establish trust between unknown peers in a distributed
computing environment. Essentially, the consensus protocol makes sure that every
new block that is added to the Blockchain is the one and only version of the truth
that is agreed upon by all the nodes in the Blockchain. The Blockchain consensus
protocol consists of some specific objectives such as coming to an agreement,
collaboration, co-operation, equal rights to every node, and mandatory
participation of each node in the consensus process. Thus, a consensus algorithm
aims at finding a common agreement that is a win for the entire network.

Now, we will discuss various consensus algorithms and how they work.

2.2.1 Proof of Work (PoW):

The idea for Proof of Work (PoW) was first published in 1993 by Cynthia
12
Dwork and Moni Naor and was later applied by Satoshi Nakamoto in the Bitcoin
paper in 2008. Proof of Work consensus is the mechanism of choice for the
majority of cryptocurrencies currently in circulation. The term “proof of work”
was first used by Markus Jakobsson and Ari Juels in a publication in 1999.

Principle: A solution that is difficult to find but is easy to verify.

The purpose of a consensus mechanism is to bring all the nodes in agreement,


that is, trust one another, in an environment where the nodes don’t trust each other.

All the transactions in the new block are then validated and the new block is
then added to the blockchain. Note that, the block will get added to the chain
which has the longest block height (see blockchain forks to understand how
multiple chains can exist at a point of time). Miners (special computers on the

network) perform computation work in solving a complex mathematical problem


to add the block to the network, hence named, Proof-of-Work. With time, the
mathematical problem becomes more complex.

Working of POW (Proof of Work)

“The Proof of Work consensus algorithm involves solving a computational


challenging puzzle in order to create new blocks in the Bitcoin blockchain.
Colloquially, the process is known as ‘mining’, and the nodes in the network that
engage in mining are known as ‘miners. The incentive for mining transactions lies
in economic payoffs, where competing miners are rewarded with 12.5 bitcoins (at
the time of writing this article; this reward will get reduced by half its current
value with time) and a small transaction fee.”

The process of verifying the transactions in the block to be added,


organizing these transactions in a chronological order in the block and announcing
the newly mined block to the entire network does not take much energy and time.
The energy consuming part is solving the ‘hard mathematical problem’ to link the

13
new block to the last block in the valid blockchain. When a miner finally finds the
right solution, the node broadcasts it to the whole network at the same time,
receiving a cryptocurrency prize (the reward) provided by the PoW protocol. At
the time of writing this article, mining a block in the bitcoin network gives the
winning miner 12.5 bitcoins. The amount of bitcoins won halves every four years
or so (thats how the bitcoin network is designed). So, the next deduction in the
amount of bitcoin is due at around 2020-21(with the current rate and growth).

With more miners comes the inevitability of the time it takes to mine the
new block getting shorter. This means that the new blocks are found faster. In
order to consistently find 1, block every 10 minutes (That is the amount of time
that the bitcoin developers think is necessary for a steady and diminishing flow of
new coins until the maximum number of 21 million is reached (expected some

time with the current rate in around 2140)), the Bitcoin network regularly changes
the difficulty level of mining a new block.

Fig 2.3 Proof of Work

The fact that Block GFG1 is connected to Block GFG2 through its hash
number is important. The significance lies in the fact that this ‘hash number’
connects new block to the last block in the valid blockchain. If, on the other hand,
the Block GFG1 Hash number on Block GFG2 had a different hash number than
Block GFG1 they would not match up, and Block GFG2 would not be verified.

First block in the blockchain is called the Genesis Block and has no Prev Block Hash value.

Changing a block (which can only be done by making a new block containing the

14
same predecessor) requires regenerating all successors and redoing the work they
contain

(Amounting to calculating the entire chain of ‘hard mathematical problems’) which is


practically impossible. This protects the blockchain from tampering.

Bitcoin’s Proof-of-Work system:

Bitcoin uses the Hashcash Proof of Work system as the mining basis. The ‘hard
mathematical problem’ can be written in an abstract way like below:

Given data A, find a number x such as that the hash of x appended to A results is a
number less than B.

The miners bundle up a group of transactions into a block and try to mine.
To mine it, a hard mathematical problem has to be solved. This problem is called
the proof of work problem which has to be solved to show that the miner has done
some work in finding out the solution to the problem and hence the mined block
must be valid. The answer to the problem needs to be a lower number than the
hash of the block for it to be accepted, known as the ‘target hash’. A target hash is
a number that the header of a hashed block must be equal to or less than for a new
block, along with the reward, to be awarded to a miner. The lower a target is, the
more difficult it is to generate a block.

A miner continues testing different unique values (known as nonce(s)) until


a suitable one is produced. The miner who manages to solve the problem gets the
bitcoin reward and adds the block into the blockchain by broadcasting that the
block has been mined. The target hash adjusts once every 2016 blocks or
approximately once every 2 weeks. All the miners immediately stop work on the
said block and start mining the next block.

Common cryptographic protocols used in Proof of Work systems: The most


widely used proof-of-work consensus is based on SHA-256 and was introduced as
a part of Bitcoin. Others include Scrypt, SHA-3, scrypt-jane, scrypt-n, etc.

15
Features of Proof of Work system:

There are mainly two features that have contributed to the wide popularity of this consensus
protocol and they are:

• It is hard to find a solution for the mathematical problem

• It is easy to verify the correctness of that solution

Main issues with the Proof-of-Work consensus:

\The Proof-of-Work consensus mechanism has some issues which are as follows:
• The 51% risk: If a controlling entity owns 51% or more than 51% of nodes in
the network, the entity can corrupt the blockchain by gaining the majority of the
network.
• Time consuming: Miners have to check over many nonce values to find the right
solution to the puzzle that must be solved to mine the block, which is a time-
consuming process.
• Resource consumption: Miners consume high amounts of computing power in
order to find the solution to the hard mathematical puzzle. It leads to a waste of
precious resources (money, energy, space, hardware). It is expected that the
0.3% of the world’s electricity will be spent to verify transactions by the end of
2018.
• Transaction confirmation takes about 10–60 minutes. So, it is not an
instantaneous transaction; because it takes some time to mine the transaction
and add it to the blockchain thus committing the transaction.

Cryptocurrencies using Pow:

• Litecoin

• Ethereum

• Monero coin

• Dogecoin

2.2.2 Proof of Stake (PoS):


16
Proof of Stake (PoS) is a type of algorithm which aims to achieve
distributed consensus in a Blockchain. This way to achieve consensus was first
suggested by Quantum Mechanic here and later Sunny King and his peer wrote a
paper on it. This led to Proof-of Stake (PoS) based Peercoin. A stake is
value/money we bet on a certain outcome. The process is called staking. A more
particular meaning of stake will be defined later on.

Need of Proof-of-Stake:

Before proof of stake, the most popular way to achieve distributed


consensus was through Proof-of-Work (implemented in Bitcoin). But Proof-of-
Work is quite energy (electrical energy in mining a bitcoin) intensive. So, a proof-
of-work based consensus mechanism increases an entity’s chances of mining a
new block if it has more computation resources. Apart from the upper two points,
there are other weaknesses of a PoW based consensus mechanism which we will
discuss later on. In such a scenario, a Proof-of-Stake based mechanism holds merit.

Proof-of-Stake:

As understandable from the name, nodes on a network stake an amount of


cryptocurrency to become candidates to validate the new block and earn the fee
from it. Then, an algorithm chooses from the pool of candidates the node which
will validate the new block. This selection algorithm combines the quantity of
stake (amount of cryptocurrency) with other factors (like coin-age based selection,
randomization process) to make the selection fair to everyone on the network.

• Coin-age based selection: The algorithm tracks the time every validator
candidate node stays a validator. The older the node becomes, the higher the
chances of it becoming the new validator.

• Random Block selection: The validator is chosen with a combination of


‘lowest hash value’ and ‘highest stake’. The node having the best weighted-
combination of these becomes the new validator.

17
A typical PoS based mechanism workflow:

1. Nodes make transactions. The PoS algorithm puts all these transactions in a
pool.

2. All the nodes contending to become validator for the next block raise a stake.
This stake is combined with other factors like ‘coin-age’ or ‘randomized
block selection’ to select the validator.
3. The validator verifies all the transactions and publishes the block. His stake
still remains locked and the forging reward is also not granted yet. This is so
that the nodes on the network can ‘OK’ the new block.
4. If the block is ‘OK’-ed, the validator gets the stake back and the reward too.
If the algorithm is using a coin-age based mechanism to select validators,
the validator for the current block’s has its coin-age reset to 0. This puts him
in a low-priority for the next validator election.
5. If the block is not verified by other nodes on the network, the validator loses
its stake and is marked as ‘bad’ by the algorithm. The process again starts
from step 1 to forge the new block.

Features:

Fixed coins in existence:

There is only a finite number of coins that always circulate in the network.
There is no existence of bringing new coins into existence (as in by mining in case
of bitcoin and other PoW based systems). Note that the network starts with a finite
number of coins or

‘Initially starts with PoW, then shifts to PoS’ in some cases. This initiation with PoW is
meant to bring coins/cryptocurrency in the network.

Transaction fee as reward to minters/forgers:


Every transaction is charged some amount of fee. This is accumulated and
given to the entity who forges the new block. Note that if the forged block is found
fraudulent, the transaction fee is not rewarded. Moreover, the stake of the validator
is also lost (which is also known as slashing).

18
Impracticality of the 51% attack:

To conduct a 51% attack, the attacker will have to own 51% of the total
cryptocurrency in the network which is quite expensive. This deems doing the
attack too tedious, expensive and not so profitable. There will occur problems
when amassing such a share of total cryptocurrency as there might not be so much
currency to buy, also that buying more and more coins/value will become more
expensive. Also validating wrong transactions will cause the validator to lose its
stake, thereby being reward-negative.

Advantages of PoS:

• Energy-efficient: As all the nodes are not competing against each other to
attach a new block to the blockchain, energy is saved. Also, no problem has to
be solved (as in case of Proof-of-Work system) thus saving the energy.
• Decentralization: In blockchains like Bitcoin (Proof of Work system to achieve
distributed consensus), an extra incentive of exponential rewards are in place to
join a mining pool leading to a more centralized nature of blockchain. In the
case of a Proof-of-Stake based system (like Peercoin), rewards are
proportional(linear) to the amount of stake. So, it provides absolutely no extra
edge to join a mining pool; thus, promoting decentralization.
• Security: A person attempting to attack a network will have to own 51% of the
stakes (pretty expensive). This leads to a secure network.
Weakness of a PoS mechanism:

• Large stake validators: If a group of validator candidates combine and own a


significant share of total cryptocurrency, they will have more chances of
becoming validators. Increased chances lead to increased selections, which lead
to more and more forging reward earning, which lead to owning a huge currency
share. This can cause the network to become centralized over time.

• New technology: PoS is still relatively new. Research is ongoing to find flaws,
fix them and making it viable for a live network with actual currency
transactions.

19
• The ‘Nothing at Stake’ problem: This problem describes the little to no
disadvantage to the nodes in case they support multiple blockchains in the event
of a blockchain split (blockchain forking). In the worst-case scenario, every fork
will lead to multiple blockchains and validators will work and the nodes in the
network will never achieve consensus.

Blockchains using Proof-of-Stake:

• Ethereum (Casper update)

• Peercoin

• Nxt

Variants of Proof-of-Stake:

• Regular Proof-of-Stake

• Delegated Proof-of-Stake

• Leased Proof-of-Stake

• Master node Proof-of-Stake

2.2.3 Proof of Space/ proof of capacity

Proof of space is a type of consensus algorithm achieved by demonstrating


one's legitimate interest in a service (such as sending an email) by allocating a
non-trivial amount of memory or disk space to solve a challenge presented by the
service provider.

Proofs of space are very similar to proofs of work (PoW), except that
instead of computation, storage is used to earn cryptocurrency. Proof-of-space is
different from memory-hard functions in that the bottleneck is not in the number of
memory access events, but in the amount of memory required. the release of
Bitcoin, alternatives to its PoW mining mechanism were researched and PoS was
studied in the context of cryptocurrencies. Proofs of space are seen as a fairer and
greener alternative by blockchain enthusiasts due to the general-purpose nature of

20
storage and the lower energy cost required by storage, but have been criticized for
increasing demand for storage. Several theoretical and practical implementations of
PoS have been released and discussed, such as SpaceMint, Burstcoin, and Chia.

Concept Description

A proof-of-space is a piece of data that a prover sends to a verifier to prove that


the prover has reserved a certain amount of space. For practicality, the verification
process needs to be efficient, namely, consume a small amount of space and time. For
security, it should be hard for the prover to pass the verification if it does not actually
reserve the claimed amount of space. One way of implementing PoS is by using hard-
to-pebble graphs.The verifier asks the prover to build a labeling of a hard-to-pebble
graph. The prover commits to the labeling.

The verifier then asks the prover to open several random locations in the commitment.

Proof of Authority

In blockchain platforms, consensus mechanisms can be divided into permissionless (eg., Ethereum, Bitcoin)
and permissioned (eg Hyperledger, Ethereum Private). Unlike permissionless blockchain where anyone can
become node, in permissioned blockchain all nodes are pre-selected. This allows to use consensus types with
high scalability and bandwidth. One of these consensus types is Proof-of-Authority (PoA) consensus which
provides high performance and fault tolerance. Term was proposed in 2017 by co-founder of Ethereum and
Parity Technologies Gavin Wood.

Working of PoA :

• In PoA, rights to generate new blocks are awarded to nodes that have proven their authority to do so.
These nodes are referred to as “Validators” and they run software allowing them to put transactions in
blocks. Process is automated and does not require validators to be constantly monitoring their
computers but does require maintaining the computer uncompromised. PoA is suited for both private
networks and public networks, like POA Network, where trust is distributed.

• PoA consensus algorithm leverages value of identities, which means that block validators are not
staking coins but their own reputation instead. PoA is secured by trust on the identities selected.

PoA consensus and common attacks :

1. Distributed Denial-of-service attacks(DDos) :


A Distributed Denial of Service (DDoS) attack is an attempt to make an online service unavailable by
overwhelming it with traffic from multiple sources. An attacker sends large number of transactions
and blocks to targeted network node in an attempt to disrupt its operation and make it unavailable.

1. PoA mechanism makes it possible to defend against this attack because network nodes are
21
pre-authenticated, block generation rights can be granted only to nodes that can withstand DoS
attacks.

51%attack:

In PoA consensus, 51% attack requires an attacker to obtain control over 51% of network nodes. This is
different from 51% attack for the Proof-of-Work consensus types where an attacker needs to obtain 51% of
network computational power. Obtaining control of the nodes in permissioned blockchain network is much
harder than obtaining computational power.

With PoA, individuals earn right to become validators, so there is an incentive to retain position that
they have gained. Validators are incentivized with reputation which lets them retain their authority as
a node. PoA only allows non-consecutive block approval from any one validator, meaning that the
risk of serious damage is centralized to the authority node.

Conditions for PoA consensus :

• PoA consensus may vary according to different implementation but generally they are applied
through the following conditions :

• Validators need to confirm their real identities.

• A candidate must be willing to invest money and put his reputation at stake. A tough process
reduces risks of selecting questionable validators and incentivize long-term commitment to
the blockchain.

• Method for selecting validators must be equal to all candidates.

• Identity of validators must be verified to maintain integrity of blockchain. Some sort of process
should be their to select honest validators.

Advantages of PoA consensus :

• High risk tolerance as long as 51% of the nodes are not acting maliciously.

• Interval of time at which new blocks are generated is predictable. For PoW and PoS
consensuses, this time varies.

• High transaction rate.

• Far more sustainable than algorithms like Proof of Work which require computational power.

Limitations :

• PoA is not decentralized but is just an effort to make centralized systems more efficient.

• PoA validators are visible to anyone. Knowing validators identities could potentially lead to
third-party manipulation.

Application of PoA consensus :

• PoA consensus algorithm may be applied in variety of scenarios and is deemed great option
for logistical applications such as supply chains.

• Proof of Authority model enables companies to maintain their privacy while availing benefits
of blockchain technology. Microsoft Azure is another example where PoA is being
22
implemented. Azure platform provides solutions for private networks, with system that does
not require native currency like ether ‘gas’ on Ethereum, since there is no need for mining.
Azure nodes are pre-selected.

2.3 Types of Attacks on PoW (Proof of Work) based systems

As we know, the idea of Proof of Work was by Cynthia Dwork and Moni Naor. This
permissionless consensus uses double SHA 256 which makes it secure from hackers.
With proof of work, miners compete with each other to complete the transaction and
get the bounty. Even it has many advantages like solving the double-spending
problem and very difficult to tamper it, but it is not impossible to tamper if the hacker
has high computational power.

There are two major attacks by which PoW based systems can crash.They are :

1. Sybil Attacks

2. Denial of Service (DOS) Attacks

These are explained as following below with their solutions.

Sybil Attacks:

In Sybil attacks, the attacker attempts to fill the network with the clients under
its control. When this thing happens, the attacker can actually control or get a
monopoly over the network and these clients can do different kinds of actions based
on the instruction from the attacker. They can refuse to relay the valid blocks or they
can only relay the blocks which are generated by the attackers and those blocks can
lead to double-spending.

In Simple language, the attacker can include multiple nodes in the network who can
collectively compromise the Proof of Work mechanism.

Solution –

To prevent Sybil attacks, we have to diversify the connections i.e allowing outbound connection to
one IP per / 16 IP address. So, by diversifying the network it is expected that if the attacker
generates multiple false miners the attacker will generate them within the same clustered network
23
or subnet. Denial of Service (DOS) Attacks:

In this attack, the attacker sends a lot of data to a particular node so that node
will not able to process normal Bitcoin transactions. As a result, the metabolism of the
mining procedure will get delayed which wastes the power for computation and in that
meantime, the attacker can also send new nodes to the network resulting in a
monopoly which is nothing but a Sybil attack.

Solution –

To prevent DOS attacks there are several rules bitcoin have which are:

• No forwarding of orphaned blocks.

• No forwarding of double-spend transactions. No forwarding of


same block or transactions
• Disconnect a peer that sends too many messages
• Restrict the block size to 1 MB (1mb according to Satoshi Nakamoto)
Limit the size of the bitcoin script up to 10000 bytes.

3.2 Nash Equilibriums evolutionary stable strategies,and Pareto efficiency (game


theory)

Evolutionary game theory (EGT) is the application of game theory to evolving


populations in biology. It defines a framework of contests, strategies, and analytics into which
Darwinian competition can be modelled. The mathematical criteria that can be used to predict
the results of competing strategies.
What are market structures?

Figure 3.24 Market structure


• The organization and fundamental characteristics of any market are called market
structure.
• The market structures are differentiated based on many factors like a number of
producers, control over prices and barriers to entry. Based on these factors, there are
four different kinds of market structures:
24
Based on these factors, there are four different kinds of market structures:
• Perfect Competition.
• Monopoly.
• Monopolistic Competition.
• Oligopoly.
Perfect Competition
• Perfect competition is a market place where it is easy for anyone to get into the market
and individual sellers don’t have any power over the price of the product.
• Think of mangoes. It is easy for anyone to get into the market, all that anyone has to do
is to grow mangoes.

• Plus, they can’t willingly change the price of the mangoes. If one person sells a mango
for $10 then the buyer can simply buy it from someone who is selling mangoes for $5.
Monopoly
• A monopoly is the polar opposite of a perfect competition.

25
• This is a market place which is dominated by one corporation and the barriers to entry
are so high that nobody else can enter it.
• De beers diamonds are a great example of a monopolistic market. Monopolistic
Competition
• This is a marketplace which has a lot of sellers and very low barriers. Their products
are similar but not really identical.
• Think of the pizza delivery service. Now, dominoes and pizza hut have the same
product with subtle differences.
• Obviously one can slightly price their product a little higher based on factors like
customer preferences. However, if dominoes price their pizzas way too high, then
people will simply go over to pizza hut.
• Consequently, if dominoes and pizza hut both start overcharging, since the barriers to
entry is so low, another player can come in and take all the customers. Oligopoly
• Oligopolies are market places which are dominated by a few markets and the barriers
to entry are high.
• One of the best examples of an oligopoly is the smartphone market. The market is
dominated by few number of companies like Samsung, Apple, and Huawei. Much like
monopolistic competitions, the products are similar but not identical.
• If tomorrow, Apple decides to price their iPhones at $4000, apart from the Apple
fanatics, most will simply opt for an Android phone.
• Obviously, they can always get together and decide as a group to mutually increase the
prices, but this is called “collusion” and is illegal in many countries, including the
United States.

• So, when they can’t compete by changing prices, how can they get that edge over their
competitors? They do so by “non-price competition”, which means competing without
changing the price.
• How do they do that? They do so by changing the look and style of their products and
giving a unique experience. However, the most recognizable form of non-price
competition is advertising.
• Advertising is one of the most effective ways of showing unique qualities of your
products and to introduce new products.
• But then again, there is a problem. How many of the advertisements do you watch
actually stick? Chances are that you have been bombarded by tons of ads today itself,

26
how many of them do you actually remember? If you are a player in an oligopoly and you keep
blindly advertising, you are going to be spending a lot of money.
• As a result of that, in order to make up all that money, you are going to invariably have
to increase the price of your products.
• If that happens, your buyers are simply going to go to your competitors. So how do you
go about this? How do you advertise your products without losing out on your
customers?
• You will have to basically take decisions based on the actions that your competitors
will take. In order to do that, you will have to use Game Theory.
What is the Game theory?
Game theory is the study of strategic decision making. This is how many corporations
make decisions while keeping in mind the actions that their competitors will take. Game theory
was devised by John Van Nuemann and Osker Morgenstern in 1944 and was considered a
breakthrough in the study of oligopoly markets. Since then the game theory has found a life of
its own and has seen widespread implementations in various other technologies and fields.
A game theory model has at least 3 components:
Players: The decision makers. Eg. The managers in the firms. Strategies: The
decisions they want to take to further their companies.Payoff: Outcome of the
strategies.
In game theory, there are two types of games.
Zero sum game: It is a game in which the gain of one player comes at the expense of anotherplayer.
Non zero sum game: A game where the gain of one player doesn’t come at the expense of
another player. So, how does one apply game theory? Let’s go back to what we were discussing
again, should or shouldn’t a company advertise a particular aspect of their product. Suppose
there are two firms A and B.
Table 3.3 Pay-off matrix

The table that you see above is called a “payoff matrix”. The table basically reads like this:

27
If Firm A and B both decide to advertise then the payoff for both of them is 4 and three
respectively.
If Firm A doesn’t advertise and B decides to advertise, then the payoff is 2 and 5.
If Firm A advertises and B doesn’t advertise then the payoff is 5 and 1.
If both Firms A and B don’t advertise then the payoff is 3 and 2.
Firstly, let’s look at Firm B.
Case 1: If Firm A advertises
Then Firm B has a payoff of 3 if they advertise and one they don’t advertise. So,
obviously, their best payoff lies in advertising.
Case 2: If Firm A doesn’t advertise
Then Firm B has a payoff of 5 if they advertise and 2 if they don’t advertise. In thiscase
their best payoff lies in advertising.
Conclusion: Regardless of what Firm A does, Firm B should advertise.
Now, let’s look at Firm A.
Case 1: If Firm B advertises
The Firm A has a payoff of 4 if they advertise and 2 if they don’t advertise. So, once
again, their best payoff lies in advertising.
Case 2: If Firm B doesn’t advertise
In this case, Firm A has a payoff of 5 if they advertise and a payoff of 3 if they don’t
advertise. Once again, their best payoff lies in advertising.
Conclusion: Regardless of what Firm B does, Firm A’s best strategy lies in advertising.

So, in this example, for both Firm A and Firm B, their most stable state will be if they both
advertise, which is: For both Firm A and Firm B, this is their dominant strategy. A dominant
strategy is the best course of action for a player regardless of what the opponent does. In this
example, (4,3) is also the Nash Equilibrium.

28
Nash Equilibrium

Figure 3.25 Nash Equilibrium

• The Nash equilibrium is a solution to a game where each player chooses their optimal
strategy given the strategy was chosen by the other and they have nothing to gain by
shifting their strategy.
• This was formulated by John F Nash who was portrayed by Russell Crowe in the movie,
“A Beautiful Mind”.
• This has humongous implications in a distributed computer system like the blockchain.
In fact, the blockchain is “cheat-free” because the entire protocol is in a Nash
Equilibrium.

Blockchain and Cryptocurrency Game Theory

A block is a series of blocks which contains individual transactions in it. Each block
also contains the hash of the previous block and this, in turn, links each subsequent block to
the previous block making a chain. Hence the term, “blockchain.” This is a rough visual
representation of a blockchain.

29
Figure 3.25 Chain of blocks

Some terms:
• Genesis block: The first block of the blockchain is called a “genesis” block.
• Proof of work: The amount of computational work required to create the block.
• Parent block: The block that immediately precedes a block is the parent block of that
block. So in the diagram above, Block 50 is the parent block of Block 51.
• Every block in the blockchain has a scoring function. Score(genesis) = 0.
• Score(Block) = Score (parent block) + Proof of work
• The current state of the chain is the block with the highest score.
• In a system based on blockchain bitcoin there are two players:
• Users.
• Miners.
Users, in bitcoin, have only two functions available to them:
• Send coins.
• Receive coins.
• In order to do that they need two keys, the public, and the private key.
• What miners do is that they authenticate the transactions AND they do the process of
mining.
• Mining is how new blocks are discovered and added to the blockchain. Block Mining
• Through a series of computations, miners find a block and add it to the blockchain.In
Ethereum, adding the block gives the miner(s) a reward of 5 ether and In bitcoin, the
mining reward is 25 BTC (both as of writing).
• Miners have a lot of power in the blockchain system and if they do choose to cheat for
their own personal gain, they can cause havoc in the system.
• To mitigate that, the blockchain uses game theory mechanics to keep the system
bulletproof.

30
• In order to understand how game theory keeps the miners honest, let’s take a look at
another peer-to-peer system which has allowed its users to, time and again, get away
with cheating.
• Torrenting is one most popular peer to peer systems in the world.
• While using torrents, users have two roles: downloading and seeding.
• After downloading a file, they are supposed to share it the network via a method called
seeding.
• However, they get no compensation for seeding the said file and hence more often than
not they refuse to do so.

• Most torrent users are “cheats” because they do not seed their files.
• They can get away with cheating because the system doesn’t have a “punishment
model” the way blockchain does.
How can miners cheat? – Cryptocurrency Game Theory
• They can include an invalid transaction and give themselves extra coins.
• Add blocks randomly without worrying about Proof of work.
• Mine on top of invalid blocks to get more BTC.
• Mine on top of a sub-optimally scoring block.
• Let’s take an example. Consider the block below:

Figure 3.26 Forking of chain


• The blocks in blue are the main chain. Now suppose there is a miner who, in blue block
51, spends 20 bitcoins to get 500 litecoins (hypothetically).
• And now he wants to create a parallel chain with a new block 51 (red), where in he
never did this transaction. So, to simplify what he just did, let’s do a quick recap:
• In blue block 51 spends 20 bitcoins to get 500 litecoins.

31
• Creates a new chain (fork) from block 50 and in the alternate block 51, he doesn’t do
the litecoin transaction.
• In the end, he comes out with his original 20 BTC and 500 new litecoins.
• What just happened here is called “double spending.” Obviously now miners can,
theoretically, mine on top of the new red chain and keep double spending and mining
extra bitcoins.
• As you can imagine, this can destroy the bitcoin system.
• The blockchain was designed in a way that it is a self-enforcing Nash Equilibrium.
The reason why that happens is that mining has a recursive punishment
system.

The Nash Equilibrium in mining and the punishment system.

• If a miner creates an invalid block then others won’t mine on top of it because of a rule
that has been defined in blockchain mechanics.
• Any block that is mined on top of an invalid block becomes an invalid block.
• Using this rule, miners will simply ignore the invalid block and keep on mining on top
of the main chain aka the blue chain in the diagram.
• This similar logic stands for sub-optimally scoring block. Look at the diagram again.
• No miner will want to mine on Red Block 52 because the Blue Block 53 will have a
higher score than the red block.
• Both of these scenarios get mitigated because miners., as a group will choose the most
stable state aka the state with a Nash Equilibrium.
• Obviously, you can make all the miners mine on the red block and make it the new
blockchain.
• As the co-ordination game states, if a majority of the people in the group are not
changing their state, the minority will not have any incentive to stay in the new state.
• Seeing this, why will a miner spend all their computation power and risk ostracization
in a futile cause?
Why will users use the main chain instead of the other chain?

So, now that we have seen the reason WHY miners will prefer the blue chain…What
about the users? In the blockchain game, there are two players, miners, and users. Why will
users prefer the blue chain over the red chain? Once again, game theory mechanics come into
play. The first thing that you need to keep in mind is that cryptocurrency has value is because

32
the people give it value. So, why will a normal user assign a value to coins coming out of the
blue chain and not to the coins coming out of the red chain? The reason is simple. The main
chain is a Schelling point from the users perspective. They give it value because the main chain
seems natural and special to them.

Bounded Rationality: Another reason why users will value the main chain more is that they
are simply used to it. Like bounded rationality states, people will simply opt for the simplest
solution every time. Moving through a newer chain needlessly complicates things.

• Vitalik Buterin gave a great example of the Takeover problem and we are going to
expand on it. Suppose, someone makes a hypothetical smart contract for an activity.
The terms of the contract go like this:
• Any miner can join the activity by sending a very large deposit into the contract.
• The miners must send shares of the partially completed blocks that they have mined
into the contract and the contract verifies it and also verifies that you are a miner and
that you have sufficient hash power.
• Before 60% of the miners in the system join you can leave anytime you want.
• After 60% of the miners join, you will be bound to the contract until the 20 blocks have
been added to the hard fork chain aka the red chain.
• Yes, it is indeed very diabolical and you can see the problem that this attack can have.
• Not only will the new chain grow bigger and longer, since 60% of the entire miners are
bound contractually to this new chain this will quickly make the original older chain
aka the blue chain irrelevant. This will make double spends all over the place and the
value of the currency will fall fast.

Now, you might be asking why miners will join in a takeover?

• Well, let’s see their incentive for joining:


• The possible reward at the end.
• No risk of joining on their part.
• What is their incentive to follow through with the contract?
• The huge amount they have deposited in the beginning.
• Once again, the possibility of a great reward.
• Theoretically, a takeover like this can end any currency, but this is not that likely to
happen because of…You guessed it…. game theory mechanics.

33
Longest Chain Rule

• A blockchain is a list of blocks linked by hash values with each block containing a
batch of ordered transactions.
• To make all participants agree on the same chain of blocks, NC leverages two
components: the Proof-of-Work (PoW) mechanism and the longest chain rule (LCR).
• Each participant collects valid and unconfirmed transactions from the network, orders
and packs these transactions into a block.

Figure 3.26 Longest chain rule

• In addition, a valid block needs to contain a proof of work, i.e., its owner needs to find
a value of the nonce (i.e., a changeable data field) such that the hash value of this block
has required leading zeros.
• The length of leading zeros is also known as the mining difficulty, which can be tuned
by the system so that new blocks are mined every ten minutes on average.
• In reality, two new blocks might be mined around the same time, leading to a fork in
which two ‘‘child’’ blocks share a common ‘‘parent’’ block.
• To resolve such a fork, an honest miner always accepts the longest chain as the valid
one. See Fig. 1 for an illustration. Block B3 is a forking block, which will be abandoned
by the honest miners according to the longest chain rule.
• In Bitcoin, a block miner will receive a block reward (if its block is eventually included
in the longest chain) as well as transaction fees as another type of reward.
• In Bitcoin, the mining of blocks has two functionalities: (1) electing leaders (i.e., the
owners of valid blocks) by miners, and (2) ordering and verifying transactions.
• Transaction fee is used to incentivize miners to include transactions in their blocks.
• Therefore, the higher the transaction fee is, the more miners try to include the
transaction into the latest block.
• The results show that about 77.8% transactions have a quite small fee (less than

34
0.0001 BTC).

3.3 Incentive Structure

Figure 3.27 Blockchain incentive structure

Selfish Mining
• NC is designed to fairly reward miners according to their contributions to the system
(i.e., miners’ revenue is proportional to their devoted computation power).
• the studies show that a selfish miner can gain more revenue than its fair share by
deviating from the protocol.
• This mining attack is called selfish mining. In this attack, a selfish miner can keep its
newly generated blocks secret, mine on top of these blocks, and create forks on purpose
when necessary.

35
• In particular, when some honest miner generates a new block, a selfish miner will
publish one secret block to match this honest block as a competition or publish two
blocks to override this honest block because honest miners follow LCR.

Figure 3.28 Selfish Mining

Forks
• The Nakamoto consensus does not guarantee that the blockchains of all miners are the
same at all points in time.
• Thus, some conflicting chains may form, known as forks.
• When a fork occurs, these blocks are usually created by different creators, and these
creators are in competition; thus, only the creator in the longest chain can win the
reward.

36
• In the Nakamoto consensus, miners only admit the blocks in the longest chain, and the
transactions in other forks are invalid.
• In addition, when the longest chains are not unique, miners usually follow the highest
block they received first.

Figure 3.29 Block is added into the chain of network

The above figure shows an example of a blockchain with the Nakamoto consensus. In this
example, the longest chain is from the genesis block (A0) to the black leaf block (A8), and
other blocks in shorter forks are colored white. In this example, the miners follow block (A8).

Preventing Double-spending

• The only way is to be aware of all transactions.


• Each node (miner) verifies that this is the first spending of the Bitcoin by the payer.
• Only when it is verified it generates the proof-of-work and attach it to the current chain.

Bitcoin Network

• Each P2P node runs the following algorithm:


• New transactions are broadcast to all nodes.
• Each node (miners) collects new transactions into a block.
• Each node works on finding a proof-of-work for its block. (Hard to do.
Probabilistic. The one to finish early will probably win.)
• When a node finds a proof-of-work, it broadcasts the block to all nodes.
• Nodes accept the block only if all transactions in it are valid (digital signature
checking) and not already spent (check all the transactions).

37
• Nodes express their acceptance by working on creating the next block in the
chain, using the hash of the accepted block as the previous hash.

Tie breaking

• Two nodes may find a correct block simultaneously.


• Keep both and work on the first one
• If one grows longer than the other, take the longer one

Figure 3.30 blocks

3.4 Blockchain Security Mitigation Methods


Blockchain technology enforces distributed consensus and cryptographic transactions.
It is very difficult to compromise the integrity of its records without being noticed by an entire
network. Because of blockchain’s ability to facilitate decentralized, trustless, encrypted
transactions, and events to be recorded and stored publicly. Therefore, it can prevent online
frauds such as double spending and hacking.
Maliciousness on the Internet encompasses identity theft, fraud, and network or system
intrusions.

Figure 3.31 blockchain security threats

38
Maliciousness on the Internet encompasses identity theft, fraud, and network or system
intrusions. Blockchain can help in preventing frauds involving assets other than currency and
credit. Smart contracts used to ensure transacting parties comply with contracts, reducing
defaults by buyers or poor service by providers. blockchain technology can prevent several
types of malicious attacks and reduce many associated risks, it cannot eliminate all attacks.
Blockchain technology: unavoidable attacks The
51% Attack
• Occur when a single minor node that is having more computational resources than the
rest of the network nodes.
• In such a situation, this node dominates the verification and approval of transactions
and controls the content of a blockchain.

• As it possesses more than half (51%) of the network’s processing power, the dominant
node can outpace all other nodes.
• Thus, it can manipulate the blockchain, insert fraudulent transactions, double-spend
funds, or even steal an asset from others. Identity Theft
• Although blockchain can preserve anonymity and privacy, the security of assets
depends on safety of the private key, a form of digital identity.

• If one’s private key is acquired or stolen, no third party can recover it.
Illegal Activities
• Blockchain technology can become a venue for illegality.
• Crypto-currency that uses blockchain technology may also facilitate money laundering.
Using Detection Technologies
• blockchain technology prevents fraudulent behavior, it is not able to detect fraud by
itself.
• Implementing innovative techniques and methods that are needed to detect attacks.
• Use of machine learning and data-mining algorithms for creating new applications for
detecting fraud and intrusions in blockchain-based transactions.
• Implementation of techniques such as profiling, monitoring, and detecting behavioral
patterns based on people’s transaction histories.
• Development of supervised machine learning approaches that can help in detecting
outlier behaviors.
Establishing Identity In Blockchain Technology
• Loss of a key is equal to the loss of identity on the network.

39
• Solution : building an identity and reputation system using a blockchain that can record
“fingerprint” events.
• This can also track life events such as the opening of bank accounts, car purchases, etc.
• It is difficult to steal because it is unforgetable, publicly monitored, and time-stamped.
Mitigating Denial-of-Service (DDoS) Attacks
• A distributed denial-of-service attack occurs when a network is intentionally flooded
with unsustainable amounts of traffic or specific information that triggers a crash.
• These attacks are typically not aimed at acquiring personal information or holding a
system for ransom
• Attackers generally unleash such attacks simply to claim credit for the mayhem.
• The IoT is a primary reason why DDoS attacks were up 91% last year.
• BlockArmor – Leveraging blockchain technology to increase network size and make
DDoS attacks more difficult.
The CIA security triad model, composed of three areas;
(1) Confidentiality,
(2) Integrity
(3) Availability
• Authentication, Authorization and Audit (AAA), and Non Repudiation, fundamental
security aspects for protecting information and designing / managing new systems and
networks
Confidentiality
The property that sensitive information is not disclosed to unauthorized individuals,
entities, or processes.
• Network Access
• Data Access & Disclosure
Integrity
Integrity is defined as the “guarding against improper information modification or
destruction, and includes ensuring information non-repudiation and authenticity
Immutability
• The combination of sequential hashing and cryptography along with its decentralized
structure makes it very challenging for any party to tamper with it in contrast to a
standard database
• Right to be Forgotten
• Traceability

40
• Smart Contracts
• Data Quality
Availability
• Ensuring timely and reliable access to and use of information.
• No Single Point of Failure
• Operational Resilience
Redundancies in blockchain Network
In a blockchain network, for every node to be processed, it has to traverse and process every
intermediate node independently to reach the target node. Thus, the redundancy involved in
blockchain technology affects its performance.

Table 3.4 Preview of Blockchain Weaknesses - (Cloud Security Alliance - CSA)


Name of weakness Description
API Exposure If an API is improperly exposed an attacker can attack
it
Block Mining Race Attack A variation on the Finney attack
Block Mining Timejack By isolating a node the time signal can be manipulated
Attack getting the victim out of synchronization
Certain cryptographic operations such as using CBC
(Cipher Blocker Chaining) or ECB
Block Reordering Attack (Electronic
Codebook) incorrectly allow blocks to be re-ordered
and the results will still decrypt properly
By creating a large number of fake peers in a network
Blockchain Peer flooding (peer to peer or otherwise) an attacker can cause real
Attack nodes to slow down or become non responsive as they
attempt to connect to the newly announced peers.
Advantages of Blockchain
Blockchain Pros
• Near-instant updating
• Chronological and timestamped
• Cryptographically sealed
• Irreversible and auditable
• Operates without trust
• Fewer third parties
Weakness of Blockchain
• Blockchain is not a Distributed Computing System

41
• Scalability Is An Issue
• transactions are completed depending on the network congestion.
• Some Blockchain Solutions Consume Too Much Energy
• high energy consumption is what makes these complex mathematical problems.
• Blockchain Cannot Go Back — Data is Immutable
• He will be unable to remove its trace from the system when he doesn’t want it there.
• Blockchains are Sometimes Inefficient
• storage problems - ledger can easily cross 100’s of GBs
• Not Completely Secure
• 51% attack, Double-spending, DDoS’s attack:
Users Are Their Own Bank: Private Keys
Make sure that they do not share it with anyone else. If they fail to do so, their wallet
isin danger. Also, if they lose the private key, they will lose access to the wallet forever.
• Cost And Implementation Struggle
• Expertise Knowledge
• Maturity
o It is only a decade old and it requires time to mature.
• Interoperability
• Legacy Systems

if they want to adopt blockchain technology, they need to completely get rid of theirsystems
and change to blockchain technology

42

You might also like