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

Module-1&2_miss

The document provides an overview of cryptography and blockchain technologies, focusing on symmetric and asymmetric encryption methods, particularly the Data Encryption Standard (DES) and Advanced Encryption Standard (AES). It explains the foundational concepts of blockchain, including its decentralized nature, cryptographic security, and the structure of transactions and blocks. Additionally, it highlights the significance of Bitcoin as the first practical implementation of an electronic cash system and discusses the elements that constitute a blockchain network.

Uploaded by

777amru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Module-1&2_miss

The document provides an overview of cryptography and blockchain technologies, focusing on symmetric and asymmetric encryption methods, particularly the Data Encryption Standard (DES) and Advanced Encryption Standard (AES). It explains the foundational concepts of blockchain, including its decentralized nature, cryptographic security, and the structure of transactions and blocks. Additionally, it highlights the significance of Bitcoin as the first practical implementation of an electronic cash system and discusses the elements that constitute a blockchain network.

Uploaded by

777amru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 148

CST 428

Blockchain
Technologies

Module 1
Introduction to Cryptography

 Cryptography is the study of secure communications


techniques that allow only the sender and intended
recipient of a message to view its contents.
 Basically 2 methods:

 1. Symmetric encryption/Conventional encryption/single-


key encryption
 2. Asymmetric encryption
Terminologies in cryptography (Symmetric)
 Plaintext: original intelligible message or data that is fed into the algorithm as
input.

 Encryption algorithm: performs various substitutions and transformations on the


plaintext

 Secret key: given as input into the encryption algorithm that has a value
independent of the plaintext and of the algorithm and produce a different output
depending on the specific key being used at the time.

 Ciphertext: is the scrambled message produced as output that depends on the


plaintext and the secret key.
Terminologies in cryptography (Symmetric)
 Decryption algorithm: This is the encryption algorithm run in reverse that
takes the ciphertext and the secret key and produces the original plaintext.
Examples for Symmetric
encryption:
1. Substitution ciphers
2. transposition ciphers
Caesar Cipher
Caesar Cipher
Similar examples for substitution ciphers
(Assignment 1)

 Monoalphabetic cipher: Hill cipher

 Polyalphabetic cipher : Playfair cipher, Vigenere cipher


Vigenere cipher
Examples for transposition ciphers
 rail fence technique
Examples for transposition ciphers
Stream ciphers and Block ciphers

 A stream cipher is one that encrypts a digital data stream one bit
or one byte at a time.
 Eg: Caeser cipher, Vigenere cipher

 A block cipher is one in which a block of plaintext is treated as a


whole and used to produce a ciphertext block of equal length
 Eg: DES (Data Encryption Standard), AES (Advanced Encryption
Standard)
Block Ciphers : (DES, AES)

 Data Encryption Standard (DES)


 There are two inputs to the encryption function: the plaintext
to be encrypted and the key.
 Plaintext must be 64 bits in length

 Ciphertext 64 bits in length

 Key is 56 bits in length


Data Encryption Standard (DES)

 First, the 64-bit plaintext passes through an initial permutation (IP) that rearranges the bits to produce
the permuted input.

 This is followed by a phase consisting of sixteen rounds of the same function, which involves both
permutation and substitution functions.

 The output of the last (sixteenth) round consists of 64 bits that are a function of the input plaintext
and

 the key.

 The left and right halves of the output are swapped to produce the preoutput.

 Finally, the preoutput is passed through a permutation that is the inverse of the initial permutation
function, to produce the 64-bit ciphertext
Data Encryption Standard (DES)

 Initially, the key is passed through a permutation function.

 Then, for each of the sixteen rounds, a subkey (Ki ) is produced by the
combination of a left circular shift and a permutation.

 The permutation function is the same for each round, but a different subkey is
produced because of the repeated shifts of the key bits.

 The Initial permutation and its inverse are defined by below tables

 The input to a table consists of 64 bits numbered from 1 to 64.

 The 64 entries in the permutation table contain a permutation of the numbers


from 1 to 64.
Data Encryption Standard (DES)
Details of Single round
Advanced Encryption Standard (AES)

 AES is a symmetric block cipher that is intended to replace DES

 The cipher takes a plaintext block size of 128 bits, or 16 bytes.

 The key length can be 16, 24, or 32 bytes (128, 192, or 256 bits).

 The algorithm is referred to as AES-128, AES-192, or AES-256,


depending on the key length.
 128 bit block represented as 4x4 square matrix

Advanced This block is copied into the State array
 After the final stage, State is copied to an output matrix
Encryption
 The ordering of bytes within a matrix is by column.
Standard

(AES) First four bytes of a 128-bit plaintext input to the encryption
cipher occupy the first column of the in matrix, the second four
bytes occupy the second column, and so on
 key is depicted as a square matrix of bytes.
Advanced  key is then expanded into an array of key schedule words
Encryption  Each word is four bytes, and the total key schedule is 44
Standard words for the 128-bit key.
(AES)  first four bytes of the expanded key, which form a word,
occupy the first column of the w matrix.
Advanced  The cipher consists of rounds, where the
Encryption number of rounds depends on the key
Standard (AES)
length: 10 rounds for a 16-byte key, 12
rounds for a 24-byte key, and 14 rounds
for a 32-byte key
Advanced Encryption Standard (AES)
 The first N-1 rounds consist of four distinct transformation functions:
SubBytes, ShiftRows, MixColumns, and AddRoundKey,

 The final round contains only three transformations, and there is a initial single
transformation (AddRoundKey) before the first round which can be considered
Round 0.

 Each transformation takes one or more matrices as input and produces a 4x4
matrix as output
Advanced Encryption Standard (AES)

 key expansion function generates N+1 round keys, each of which is a 4x4 distinct
matrix.

 Each round key serve as one of the inputs to the AddRoundKey transformation in
each round.

 not a Feistel structure

 AES instead processes the entire data block as a single matrix during each round
using substitutions and permutation.

 The key that is provided as input is expanded into an array of forty-four 32-bit
words, w[i]. Four distinct words (128 bits) serve as a round key for each round
Advanced Encryption Standard (AES)
 Four different stages are used, one of permutation and three of substitution:

 • Substitute bytes: Uses an S-box to perform a byte-by-byte substitution of

 the block

 • ShiftRows: A simple permutation

 • MixColumns: A substitution that makes use of arithmetic over

 • AddRoundKey: A simple bitwise XOR of the current block with a portion

 of the expanded key

 Only the AddRoundKey stage makes use of the key. For this reason, the cipher begins and ends with an
AddRoundKey stage.
Advanced Encryption Standard (AES)
 AddRoundKey stage is, in effect, a form of Vernam cipher

 For the Substitute Byte, ShiftRows, and MixColumns stages, an inverse


function is used in the decryption algorithm.
Substitute Bytes Transformation

 AES defines a 16x16 matrix of byte values, called an S-box, that contains a
permutation of all possible 256 8-bit values.

 Each individual byte of State is mapped into a new byte in the following way:
The leftmost 4 bits of the byte are used as a row value and the rightmost 4 bits
are used as a column value.

 These row and column values serve as indexes into the S-box to select a unique
8-bit output value.
 128 bits of State are bitwise XORed with the 128 bits of the

AddRoundKey round key.

Transformatio  operation is viewed as a columnwise operation between the

n 4 bytes of a State column and one word of the round key

 The first matrix is State, and the second matrix is the round
key.

 The inverse add round key transformation is identical to


the forward add round key transformation, because the
XOR operation is its own inverse.
 The first row of State is not altered.

 For the second row, a 1-byte circular left shift is performed.

ShiftRows  For the third row, a 2-byte circular left shift is performed.
Transformation  For the fourth row, a 3-byte circular left shift is performed.

 The inverse shift row transformation, called InvShiftRows,


performs the circular shifts in the opposite direction for each of
the last three rows, with a 1-byte circular right shift for the
second row, and so on.
 Each byte of a column is mapped
MixColumns into a new value that is a function
Transformation of all four bytes in that column.
 The MixColumns transformation on a
MixColumns
single column of State can be expressed
Transformation
as
Example
inverse mix column transformation, called
InvMixColumns
Key Expansion Algorithm
Introductio Growth of Blockchain
n to
Blockchain
Bitcoin in 2008

Proof of concepts came out regarding


the application of blockchain in areas
other than cryptocurrency in 2013

Around 2025, blockchain is expected to


become widely adopted with high
number of users
Introduction to Blockchain
 Distributed system

 blockchain is a distributed system at its core

 It is a distributed ledger which can be centralized or decentralized

 It is usually used as a decentralized platform.

 It is a decentralized-distributed system

 Distributed systems are a computing paradigm whereby two or more nodes


work with each other in a coordinated fashion to achieve a common outcome. It
is modeled in such a way that end users see it as a single logical platform. For
example, Google's search engine
Electronic cash
Introductio
n to
Blockchain Two fundamental e-cash system issues need
to be addressed: accountability and
anonymity.

Accountability is required to ensure that


cash is spendable only once (double-spend
problem) and that it can only be spent by its
rightful owner.

Anonymity is required to protect users'


privacy. (sol: blind signature)
Introduction to Blockchain
 First practical implementation of an electronic cash (e-cash) system :
Bitcoin (2008)

 used public key cryptography (asymmetric cryptography) with a Proof of


Work (PoW) mechanism

 Other technologies include Merkle trees, hash functions, and hash chains.

 concepts from electronic cash schemes and distributed systems were


combined to create Bitcoin
Ideas that supported invention of bitcoin and
blockchain
Introduction to Blockchain
 In 2008, a groundbreaking paper entitled Bitcoin: A Peer-to-Peer Electronic Cash
System was written under the pseudonym Satoshi Nakamoto.

 It introduced the term chain of blocks.

 Definition

 Blockchain is a peer-to-peer, decentralized, distributed ledger that is


cryptographically-secure, append-only, immutable (extremely hard to change), and
updateable only via consensus or agreement among peers.
Blockchain
 peer-to-peer:

 This means that there is no central controller in the network, and all participants
talk to each other directly.

 This property allows for cash transactions to be exchanged directly among the
peers without a third-party involvement, such as by a bank.

 decentralization

 the transfer of control and decision-making from a centralized entity (individual,


organization, or group thereof) to a distributed network.
Blockchain
 Distributed ledger
 A ledger is spread across the network among all peers in the network, and each peer
holds a copy of the complete ledger.

 Cryptographically-secure
 cryptography has been used to provide security services which make this ledger
secure against tampering and misuse.

 These services include non-repudiation, data integrity, and data origin


authentication.
Blockchain
 Append-only

 Data can only be added to the blockchain in time-ordered sequential


order.
 This property implies that once data is added to the blockchain, it is
almost impossible to change that data and can be considered practically
immutable.
Blockchain
 Updateable via consensus
 This is what gives it the power of decentralization.

 In this scenario, no central authority is in control of updating the ledger.


Instead, any update made to the blockchain is validated against strict
criteria defined by the blockchain protocol and added to the blockchain
only after a consensus has been reached among all participating
peers/nodes on the network
Network
view of a
blockchain
Network view of a blockchain

 Internet : provides a basic communication layer for any network.

 A peer-to-peer network runs on top of the internet, which hosts another


layer of blockchain.
 That layer contains transactions, blocks, consensus mechanisms, state
machines, and blockchain smart contracts
 At the top, there are users or nodes that connect to the blockchain and
perform various operations such as consensus, transaction verification, and
processing.
Network view of a blockchain
 Block : a selection of transactions bundled together and organized
logically.
 A transaction is a record of an event, for example, the event of
transferring cash from a sender's account to a beneficiary's account.
Hash Functions

 A hash function H accepts a variable-


length block of data M as input and
produces a fixed-size hash value h =
H(M).
 A change to any bit or bits in M results,
with high probability, in a change to
the hash code.
Simplified Examples of the Use of a Hash Function
for Message Authentication
Generic structure of a blockchain
 A genesis block is the first block in the blockchain that is hardcoded at the
time the blockchain was first started.
 Block header and Block Body

 Block header is composed of of pointer to previous block, the timestamp,


nonce, Merkle root, and the block body that contains transactions.
 A nonce is a number that is generated and used only once to (provide
replay protection, authentication, and encryption)
 Merkle root is a hash of all of the nodes of a Merkle tree.
Generic elements of a blockchain
Generic elements of a blockchain
 Address: Addresses are unique identifiers used in a blockchain transaction to denote senders
and recipients.

 An address is usually a public key or derived from a public key.

 A new address is generated for each transaction, and it is unique.

 A good practice is for users to generate a new address for each transaction in order to avoid
linking transactions to the common owner, thus preventing identification.

 Transaction: A transaction is the fundamental unit of a blockchain. A transaction represents


a transfer of value from one address to another.

 Block: A block is composed of multiple transactions and other elements, such as the previous
block hash (hash pointer), timestamp, and nonce.
Generic elements of a blockchain
 Node: A node in a blockchain network performs various functions such as propose
and validate transactions and perform mining to facilitate consensus and secure
the blockchain.

 Nodes are either miners who create new blocks and mint cryptocurrency (coins) or
block signers who validates and digitally sign the transactions.

 Transactions are first created by nodes and then also digitally signed by nodes using
private keys as proof that they are the legitimate owner of the asset that they wish to
transfer to someone else on the blockchain network.

 Other function :simple payment verification (lightweight nodes), validation,


transaction signing function
Generic elements of a blockchain

 Smart contract: These programs run on top of the blockchain and encapsulate the business
logic to be executed when certain conditions are met. These programs are enforceable and
automatically executable.

 Use cases (identity management, trade finance, record management, insurance, and e-
governance.

 Peer-to-peer network: As the name implies, a peer-to-peer network is a network topology


wherein all peers can communicate with each other and send and receive messages.

 Scripting or programming language: Scripts or programs perform various operations on a


transaction in order to facilitate various functions.
Generic elements of a blockchain
 Virtual machine: Various blockchains use virtual machines to run programs
such as Ethereum Virtual Machine (EVM) and Chain Virtual Machine
(CVM). EVM is used in Ethereum blockchain, while CVM is a virtual
machine developed for and used in an enterprise-grade blockchain called
Chain Core.

 State machine: A blockchain can be viewed as a state transition mechanism


whereby a state is modified from its initial form to the next one and
eventually to a final form by nodes on the blockchain network as a result of a
transaction execution, validation, and finalization process.
Benefits and Limitations of Blockchain
Decentralization: There is no need for a trusted third party or intermediary to
validate transactions; instead, a consensus mechanism is used to agree on the
validity of transactions.

Transparency and trust: Because blockchains are shared and everyone can see
what is on the blockchain, this allows the system to be transparent. As a result,
trust is established.

Immutability: Once the data has been written to the blockchain, it is extremely
difficult to change it back. It is not genuinely immutable, but because changing
data is so challenging and nearly impossible, this is seen as a benefit to
maintaining an immutable ledger of transactions.
Benefits and Limitations of Blockchain
 High availability: As the system is based on thousands of nodes in a peer-to-peer
network, and the data is replicated and updated on every node, the system becomes
highly available. Even if some nodes leave the network or become inaccessible, the
network as a whole continues to work, thus making it highly available.

 Highly secure: All transactions on a blockchain are cryptographically secured and


thus provide network integrity.

 Simplification of current paradigms: as a blockchain can serve as a single shared


ledger among many interested parties, this can result in simplifying the model by
reducing the complexity of managing the separate systems maintained by each entity.
Benefits and Limitations of Blockchain
 Faster dealings: Blockchain does not require a lengthy process of verification,
reconciliation, and clearance because a single version of agreed-upon data is
already available on a shared ledger between financial organizations.

 Cost saving: As no trusted third party or clearing house is required in the


blockchain model, this can massively eliminate overhead costs in the form of the
fees which are paid to such parties.
Benefits and Limitations of Blockchain
 The most sensitive blockchain problems are as follows:

• Scalability

• Adaptability

• Regulation

• Relatively immature technology

• Privacy
Basic concepts

•Distributed ledgers
•Distributed Ledger Technology (DLT)
•Blockchains
•Ledgers
Distributed ledgers

 Distributed ledgers are a type of digital database that is decentralized and maintained by multiple
participants (or nodes) in a network

 All blockchains are fundamentally distributed ledgers, all distributed ledgers are not necessarily
a blockchain.

 A critical difference between a distributed ledger and blockchain is that a distributed ledger does
not necessarily consist of blocks of transactions to keep the ledger growing.

 Rather, a blockchain is a special type of shared database that is comprised of blocks of transactions.

 R3's Corda. Corda is a distributed ledger which is developed to record and manage agreements
and is especially focused on financial services industry. On the other hand, more widely-known
blockchains like Bitcoin and Ethereum make use of blocks to update the shared database.
Distributed ledgers
 A distributed ledger is distributed among its participants and spread across
multiple sites or organizations. This type of ledger can be either private or
public.

 Records are stored contiguously instead of being sorted into blocks.

 Eg: Ripple which is a blockchain and cryptocurrency based global


payment network .
Distributed ledger technology (DLT)
 DLTs are permissioned blockchains that are shared and used between
known participants.

 DLTs usually serve as a shared database, with all participants known and
verified.

 They do not have a cryptocurrency or do not require mining to secure the


ledger.

 Different types of DLT’s are: blockchain, Directed Acyclic Graph (DAG),


Hashgraph
Types of Blockchains

 Based on visibility of network:

 Public blockchain

 Private blockchain

 Based on accessibility:

 Permissioned

 Permissionless
Based on visibility of network:

PUBLIC P R I VAT E

 Publicly available  Access controlled

 Anyone can read, write and join  they are open only to a consortium
the network or group of individuals or

 Anyone can participate as a node organizations who have decided to


share the ledger among themselves .
in the decision-making process.
 Hyperledger Fabric, Hydrachain,
 Nobody has control over the
Quorum
network , eg: Bitcoin, Ethereum
Based on accessibility:

Blockchain network enables their members to participate in the process of block


verification.

PE RMISS IONL E SS PE RMISS IONE D

 Anyone can join and verify  Few members verify data


Blockchain variants

Public Permission-less.

Public Permissioned.

Private Permission-less.

Private Permissioned.
Public Permission-less Blockchain
• Anyone can participate without permission.
 Require Native Assets (Crypto-Currency).

 Transaction are Transparent.

 Remove middleman in current business system.

 Low Scalable

 Example:–Bitcoin, Ethereum

 Applications: Cryptocurrency, Decentralized finance, crowdfunding


Public Permissioned Blockchain

 Maintainer has the ability to appoint privileged parties.

 Only privileged parities can write data.

 Transactions are transparent.

 Require native assets.

 Example: –Ripple, EOS

 Applications: supply chain management, financial services,


government and public services
Private Permission-less Blockchain

• Only participants with known identity can join and read data.

 •All of the participants can write data.

 •Data is confidential.

 •Does not require native assets.

 •High Scalability.

 •Example:–LTO Network, Holochain

 Applications: IoT Device Networks in Restricted Environments,


Decentralized Private Voting Systems
Private Permissioned Blockchain

• Enterprise Oriented

 The enterprise writes and verifies each transactions.

 Only privileged participant can write data.

 Verify transactions internally.

 Reduces transaction costs and data redundancies and replaces legacy


systems, simplifying document handling.

 May have security breaches.

 Example –Hyperledger Fabric

 Applications: Energy Sector, Insurance, Aerospace and Defense


Semiprivate Blockchain

 With semiprivate blockchains, part of the blockchain is private and part of it is


public.

 just a concept today, and no real world POCs have yet been developed.

 With a semi-private blockchain, the private part is controlled by a group of


individuals, while the public part is open for participation by anyone.
Semiprivate Blockchain
 This hybrid model can be used in scenarios where the private part of the
blockchain remains internal and shared among known participants, while
the public part of the blockchain can still be used by anyone, optionally
allowing mining to secure the blockchain.

 This type of blockchain can also be called a semi-decentralized model,


where it is controlled by a single entity but still allows for multiple users
to join the network by following appropriate procedures.
Sidechains
 Assignment 2
Permissioned Ledger
 Discussed before under permissioned blockchain
Shared Ledger
 used to describe any application or database that is shared by the public or
a consortium.

 Generally, all blockchains, fall into the category of a shared ledger.


Fully private and proprietary blockchains
 There is no mainstream application of these types of blockchains, as they
deviate from the core concept of decentralization in blockchain
technology.

 An example of this type of blockchain might be to allow for collaboration


and the sharing data between various government departments.
Tokenized blockchains
 These blockchains are standard blockchains that generate cryptocurrency
as a result of a consensus process via mining or initial distribution.

 Bitcoin and Ethereum are prime examples of this type of blockchain.


Tokenless blockchains
 These blockchains are designed in such a way that they do not have the
basic unit for the transfer of value.

 they are still valuable in situations where there is no need to transfer value
between nodes and only the sharing of data among various trusted parties
is required.

 a shared distributed ledger used for storing data.


Assignment 2
 Describe the different tiers of blockchain

 Differentiate symmetric and asymmetric ciphers

 Describe the features of blockchain

 Implement DES in Java/Python/C


Consensus mechanism
 A consensus mechanism is a set of steps that are taken by most or all nodes in a blockchain to agree
on a proposed state or value.

 The following describes these requirements:

• Agreement: All honest nodes decide on the same value

• Termination: All honest nodes terminate execution of the consensus process and eventually reach a
decision

• Validity: The value agreed upon by all honest nodes must be the same as the initial value proposed
by at least one honest node

• Fault tolerant: The consensus algorithm should be able to run in the presence of faulty or malicious
nodes (Byzantine nodes)

• Integrity: This is a requirement that no node can make the decision more than once in a single
consensus cycle
Types of consensus mechanisms
 All consensus mechanisms are developed to deal with faults in a distributed system
and to allow distributed systems to reach a final state of agreement.

 These common types of consensus mechanisms are as follows:

• Traditional Byzantine Fault Tolerance (BFT)-based: this method relies on a


simple scheme of nodes that are publisher-signed messages. Eventually, when a
certain number of messages are received, then an agreement is reached.

 Leader election-based consensus mechanisms: This arrangement requires nodes to


compete in a leader-election lottery, and the node that wins proposes a final value.
Types of consensus mechanisms

 Paxos is the most famous of these protocols.

 It was introduced by Leslie Lamport in 1989. With Paxos, nodes are assigned
various roles such as Proposer, Acceptor, and Learner.

 An alternative to Paxos is RAFT, which works by assigning any of three states;


that is, follower, candidate, or leader to the nodes.
Consensus in blockchain
 Under module 3
Decentralization

 The basic idea of decentralization is to distribute control and authority to the


peripheries of an organization instead of one central body being in full control of the
organization.

 several benefits for organizations, such as increased efficiency, expedited decision


making, better motivation, and a reduced burden on top management.
Decentralization using blockchain

 This model allows anyone to compete to become the decision-making authority.

 This competition is governed by a consensus mechanism

 Decentralization is applied in varying degrees from a semi-decentralized model


to a fully decentralized one depending on the requirements and circumstances.

 Decentralization can be viewed from a blockchain perspective as a mechanism


that provides a way to remodel existing applications and paradigms, or to build
new applications, in order to give full control to users.
Decentralization using blockchain

 Information and Communication Technology (ICT) has conventionally been


based on a centralized paradigm whereby database or application servers are
under the control of a central authority, such as a system administrator.

 With Bitcoin and the advent of blockchain technology, this model has changed
and now the technology exists, which allows anyone to start a decentralized
system and operate it with no single point of failure or single trusted authority.
Decentralization
using blockchain

 The following diagram shows the


different types of systems that
currently exist: central, decentralized,
and distributed.
 This concept was first published by
Paul Baran in On Distributed
Communications: I. Introduction to
Distributed Communications
Networks (Rand Corporation, 1964):
Centralized systems
 conventional (client-server) IT systems in which there is a single authority
that controls the system, and who is solely in charge of all operations on
the system.

 All users of a centralized system are dependent on a single source of


service.

 The majority of online service providers including Google, Amazon, eBay,


Apple's App Store, and others use this conventional model for delivering
services.
Distributed system,

 Data and computation are spread across multiple nodes in the network.

 Sometimes, this term is confused with parallel computing.

 The main difference between these systems is that in a parallel computing system, computation
is performed by all nodes simultaneously in order to achieve the result;

 for example, parallel computing platforms are used in weather research and forecasting,
simulation and financial modeling.

 On the other hand, in a distributed system, computation may not happen in parallel and data is
replicated across multiple nodes that users view as a single, coherent system.

 Variations of both of these models are used with to achieve fault tolerance and speed.

 In the parallel system model, there is still a central authority that has control over all nodes,
which governs processing.

 This means that the system is still centralized in nature.


Distributed system vs Decentralized
system

 The critical difference between a decentralized system and distributed


system is that in a distributed system, there still exists a central
authority that governs the entire system; whereas, in a decentralized
system, no such authority exists.
Decentralized system
 A type of network where nodes are not dependent on a single master node;
instead, control is distributed among many nodes.

 A significant innovation in the decentralized paradigm that has given rise to


this new era of decentralization of applications is decentralized consensus.

 This mechanism came into play with Bitcoin, and it enables a user to agree
on something via a consensus algorithm without the need for a central,
trusted third party, intermediary, or service provider.
Methods of decentralization

 Two methods can be used to achieve decentralization:


disintermediation and competition (Contest-driven decentralization).
Disintermediation

 The intermediary; eg: bank, is no longer required

 Decentralization is achieved by disintermediation.

 It is debatable, however, how practical decentralization through disintermediation is


in the financial sector due to massive regulatory and compliance requirements.
Contest-driven decentralization

 In the method involving competition, different service providers compete with


each other in order to be selected for the provision of services by the system.

 In the context of blockchain technology, a system can be envisioned in which


smart contracts can choose an external data provider from a large number of
providers based on their reputation, previous score, reviews, and quality of
service.

 This method will not result in full decentralization, but it allows smart
contracts to make a free choice based on the criteria just mentioned.
 On the left-hand side, the conventional approach is shown
where a central system is in control; on the right-hand side,
Scale of complete disintermediation is achieved as intermediaries are
decentralizati entirely removed. Competing intermediaries or service
on providers are shown in the center. At that level, intermediaries
or service providers are selected based on reputation or voting,
thus achieving partial decentralization.
Decentralization

A D VA N TA G E S D I S A D VA N TA G E S

 transparency,  security requirements,

 efficiency,  software bugs,

 cost saving,  human errors


 development of trusted
ecosystems, privacy and
anonymity,
Routes to decentralization
 BitTorrent and the Gnutella file sharing system, which to a certain degree
could be classified as decentralized (existed before bitcoin and blockchain)

 Bitcoin was the first choice

 Ethereum has become a more prominent choice because of the flexibility it


allows for programming any business logic into the blockchain by using
smart contracts.
Decentralization framework
 A money transfer system as an example of an application selected to be
decentralized. The four questions discussed previously are used to evaluate
the decentralization requirements of this application. The answers to these
questions are as follows:

 What is being decentralized? : Money transfer system

 What level of decentralization is required? : Disintermediation

 What blockchain is used? : Bitcoin

 What security mechanism is used? : Atomicity


Blockchain and full ecosystem decentralization

 To achieve complete decentralization, it is necessary that the environment around


the blockchain also be decentralized.

 The blockchain is a distributed ledger that runs on top of conventional systems.

 These elements include storage, communication, and computation.


Storage
 Data can be stored directly in a blockchain, and with this fact it achieves decentralization.

 A significant disadvantage of this approach is that a blockchain is not suitable for storing large
amounts of data by design.

 A better alternative for storing data is to use Distributed Hash Tables (DHTs)

 DHTs were used initially in peer-to-peer file sharing software, such as BitTorrent, Napster,
Kazaa, and Gnutella.

 DHT research was made popular by the CAN, Chord, Pastry, and Tapestry projects.

 BitTorrent is the most scalable and fastest network

 The issue with BitTorrent and the others is that there is no incentive for users to keep the files
indefinitely.
Storage

 Two primary requirements here are high availability and link stability,
which means that data should be available when required and network
links also should always be accessible.
 InterPlanetary File System (IPFS) by Juan Benet possesses both of
these properties, and its vision is to provide a decentralized World Wide
Web by replacing the HTTP protocol.
 IPFS uses Kademlia DHT and Merkle Directed Acyclic Graph (DAG) to
provide storage and searching functionality, respectively.
Tutorial 3
 Explore IPFS and DHT

 Bitswap mechanism https://docs.ipfs.tech/concepts/bitswap/

 Ethereum Swarm

 Whisper protocol

 BitAuth

 OpenID

 BigchainDB
Storage
 The incentive mechanism for storing data is based on a protocol known as Filecoin, which
pays incentives to nodes that store data using the Bitswap mechanism.

 Bitswap mechanism lets nodes keep a simple ledger of bytes sent or bytes received in a
one-to-one relationship.

 Git-based version control mechanism is used in IPFS to provide structure and control
over the versioning of data.

 Ethereum has its own decentralized and distributed ecosystem that uses Swarm for storage
and the Whisper protocol for communication.

 BigchainDB is another storage layer decentralization project aimed at providing a scalable,


fast, and linearly-scalable decentralized database as opposed to a traditional filesystem.
Communication

 The original vision of the internet was to develop a decentralized


communications system.

 Services such as email and online storage are now all based on a paradigm where
the service provider is in control, and users trust such providers to grant them
access to the service as requested.

 This model is based on unconditional trust of a central authority (the service


provider) where users are not in control of their data.

 Even user passwords are stored on trusted third-party systems.


Communication
 Access to the internet (the communication layer) is based on Internet Service
Providers (ISPs) who act as a central hub for internet users.

 Over the years, with the advent of large-scale service providers such as Google,
Amazon, and eBay, control is shifting towards these big players.

 For example, email is a decentralized system at its core; that is, anyone can run an
email server with minimal effort and can start sending and receiving emails.
Computing power and decentralization

 Decentralization of computing or processing power is achieved by a blockchain


technology such as Ethereum, where smart contracts with embedded business logic
can run on the blockchain network.
Computing power and decentralization
 At the bottom layer, the internet or Meshnets provide a decentralized
communication layer.

 On the next layer up, a storage layer uses technologies such as IPFS and
BigchainDB to enable decentralization.

 Finally, at the next level up, you can see that blockchain serves as a decentralized
processing (computation) layer.

 Blockchain can, in a limited way, provide a storage layer too, but that severely
hampers the speed and capacity of the system.

 Therefore, other solutions such as IPFS and BigchainDB are more suitable to store
large amounts of data in a decentralized way.
Computing
power and
decentralization
 The Identity, Wealth layers are
shown at the top level.
 Systems such as BitAuth and
OpenID provide authentication
and identification services with
varying degrees of
decentralization and security
assumptions
Computing
power and
decentralization
 A concept relevant to identity known
as Zooko's Triangle requires that the
naming system in a network protocol
be secure, decentralized, and is able to
provide human-meaningful and
memorable names to the users
Smart contracts
 A smart contract is a decentralized program.

 Smart contracts do not necessarily need a blockchain to run; however, due to


the security benefits that blockchain technology provides, blockchain has
become a standard decentralized execution platform for smart contracts.

 A smart contract usually contains some business logic and a limited amount of
data.

 The business logic is executed if specific criteria are met.

 Actors or participants in the blockchain use these smart contracts, or they run
autonomously on behalf of the network participants.
Decentralized Organizations
 DOs are software programs that run on a blockchain and are based on the
idea of actual organizations with people and protocols.

 Once a DO is added to the blockchain in the form of a smart contract or a


set of smart contracts, it becomes decentralized and parties interact with
each other based on the code defined within the DO software.
Decentralized Autonomous Organizations
 Decentralized Autonomous Organization (DAO) is also a computer program that
runs atop a blockchain and embedded within it are governance and business logic
rules

 DAOs are autonomous, which means that they are fully automated and contain
artificially-intelligent logic.

 DOs, on the other hand, lack this feature and rely on human input to execute
business logic

 The Ethereum blockchain led the way with the initial introduction of DAOs.
Decentralized Autonomous Corporations
 DAOs are usually considered to be nonprofit; whereas DACs can earn a
profit via shares offered to the participants and to whom they can pay
dividends.

 DACs can run a business automatically without human intervention based


on the logic programmed into them.
Decentralized Autonomous Societies
 Decentralized Autonomous Societies (DASs) are a concept whereby an entire
society can function on a blockchain with the help of multiple, complex smart
contracts and a combination of DAOs and Decentralized Applications (DApps)
running autonomously.

 If a government is corrupt and central systems do not provide the satisfactory levels
of trust that a society needs, then that society can start its own virtual one on a
blockchain that is driven by decentralized consensus and transparency.
Decentralized Applications (DApps)
 DAOs, DACs, and DOs are DApps that run on top of a blockchain in a peer-to-
peer network.

 Digital applications that run on a blockchain network of computers instead of


relying on a single computer.

 Because DApps are decentralized, they are free from the control and
interference of a single authority

 DApps, are software programs that can run on their respective blockchains, use
an existing established blockchain, or use only the protocols of an existing
blockchain.

 These are called Type I, Type II, and Type III DApps.
Requirements of a Decentralized Application

 The DApp should be fully open source and autonomous, and no single entity
should be in control of a majority of its tokens.

 All changes to the application must be consensus-driven based on the feedback


given by the community.

 Data and records of operations of the application must be cryptographically


secured and stored on a public, decentralized blockchain to avoid any central points
of failure.
Requirements of a Decentralized
Application

 A cryptographic token must be used by the application to


provide access and rewards to those who contribute value to the
applications, for example, miners in Bitcoin.
 The tokens must be generated by the DApp according to a
standard cryptographic algorithm. This generation of tokens acts
as a proof of the value to contributors (for example, miners).
Operations of a DApp

 Establishment of consensus by a DApp can be achieved using


consensus algorithms such as PoW and PoS.
 PoW has been found to be incredibly resistant to 51% attacks, as
is evident from Bitcoin.
 Furthermore, a DApp can distribute tokens (coins) via mining,
fundraising, and development.
DApp examples

 KYC-Chain: This application provides the facility to manage Know Your


Customer (KYC) data securely and conveniently based on smart contracts.

 This is a decentralized peer-to-peer network that enables commercial activities


directly between sellers and buyers instead of relying on a central party, such
as eBay and Amazon.

 It should be noted that this system is not built on top of a blockchain;


instead, DHTs are used in a peer-to-peer network to enable direct
communication and data sharing among peers.

 It makes use of Bitcoin and various other cryptocurrencies as a payment


method.
DApp examples
 Lazooz

 Decentralized transportation platform

 It allows peer-to-peer ride sharing and users to be incentivized by proof of


movement, and they can earn Zooz coins.
Platforms for decentralization
 Ethereum:

 MaidSafe

 Lisk
Ethereum

 Ethereum tops the list as being the first blockchain to introduce a Turing-
complete language and the concept of a virtual machine.

 This is in stark contrast to the limited scripting language in Bitcoin and many
other cryptocurrencies.

 With the availability of its Turing-complete language called Solidity, endless


possibilities have opened for the development of decentralized applications.

 This blockchain was first proposed in 2013 by Vitalik Buterin, and it provides
a public blockchain to develop smart contracts and decentralized applications.

 Currency tokens on Ethereum are called Ethers.


MaidSafe
 MaidSafe provides a Secure Access For Everyone (SAFE) network that is
made up of unused computing resources, such as storage, processing power,
and the data connections of its users.

 The files on the network are divided into small chunks of data, which are
encrypted and distributed randomly throughout the network.

 This data can only be retrieved by its respective owner.

 One key innovation of MaidSafe is that duplicate files are automatically


rejected on the network, which helps reduce the need for additional computing
resources needed to manage the load.

 It uses Safecoin as a token to incentivize its contributors.


Lisk

 Lisk is a blockchain application development and cryptocurrency platform.

 It allows developers to use JavaScript to build decentralized applications and host them in their
respective sidechains.

 Lisk uses the Delegated Proof of Stake (DPOS) mechanism for consensus whereby 101 nodes
can be elected to secure the network and propose blocks.

 It uses the Node.js and JavaScript backend, while the frontend allows the use of standard
technologies, such as CSS3, HTML5, and JavaScript.

 Lisk uses LSK coin as a currency on the blockchain.

 Another derivative of Lisk is Rise, which is a Lisk-based decentralized application and digital
currency platform.

 It offers a greater focus on the security of the system.

You might also like