KEMBAR78
Unit 1 - BC | PDF | Bitcoin | Public Key Cryptography
0% found this document useful (0 votes)
84 views81 pages

Unit 1 - BC

Uploaded by

Sangeta
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)
84 views81 pages

Unit 1 - BC

Uploaded by

Sangeta
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/ 81

BLOCKCHAIN

ARCHITECTURE KCA041
SYLLABUS
UNIT 1
• Introduction to Blockchain: Digital Money to Distributed
Ledgers,
• Design Primitives: Protocols, Security, Consensus,
Permissions, Privacy.
• Blockchain Architecture and Design: Basic crypto primitives:
Hash, Signature, Hashchain to Blockchain, Bitcoin Basic, Basic
consensus mechanisms.
SYLLABUS
UNIT 2
• Consensus: Requirements for the consensus protocols, Proof
of Work (PoW), Scalability aspects of Blockchain consensus
protocols, distributed consensus, consensus in Bitcoin.
• Permissioned Blockchains: Design goals, Consensus
protocols for Permissioned Blockchains
SYLLABUS
UNIT 3
• Hyperledger Fabric: Decomposing the consensus process,
Hyperledger fabric components.
• Chaincode Design and Implementation Hyperledger
Fabric: Beyond Chaincode: fabric SDK and Front End,
Hyperledger composer tool.
SYLLABUS
UNIT 4
• Use case 1: Blockchain in Financial Software and Systems
(FSS): (i) Settlements, (ii) KYC, (iii) Capital markets, (iv)
Insurance.
• Use case 2: Blockchain in trade/supply chain: (i) Provenance
of goods, visibility, trade/supply chain finance, invoice
management discounting, etc.
SYLLABUS
UNIT 5
• Use case 3: Blockchain for Government: (i) Digital identity,
land records and other kinds of record keeping between
government entities, (ii) public distribution system social
welfare systems, Blockchain Cryptography, Privacy and
Security on Blockchain
Digital Money to Distributed Ledger
• Distributed ledger technology (DLT) is a digital system for recording the transaction of assets in which the
transactions and their details are recorded in multiple places at the same time. Unlike traditional databases,
distributed ledgers have no central data store or administration functionality.
• In a distributed ledger, each node processes and verifies every item, thereby generating a record of each item
and creating a consensus on its veracity. A distributed ledger can be used to record static data, such as a
registry, and dynamic data, such as financial transactions.
• A distributed ledger is a type of database that is shared, replicated, and synchronized among the members of
a decentralized network.
• The distributed ledger records the transactions, such as the exchange of assets or data, among the participants
in the network.
• A peer-to-peer network is required as well as consensus algorithms to ensure replication across nodes is
undertaken. One form of distributed ledger design is the blockchain system, which can be either public or
private.
What is distributed ledger
technology?
• Distributed ledger technology (DLT) refers specifically to the
technological infrastructure and protocols that allow the simultaneous
access, validation and updating of records that characterizes
distributed ledgers. It works on a computer network spread over
multiple entities or locations.
• DLT uses cryptography to securely store data, cryptographic
signatures and keys to allow access only to authorized users.
• The technology also creates an immutable database, which means
information, once stored, cannot be deleted and any updates are
permanently recorded for posterity.
Features of Distributed Ledger Technology
• Decentralized
• Immutable
• Append only
• Distributed
• Shared
• Smart Contracts
• Fault Tolerance
• Transparency
• Efficiency
• Security
Overview of Blockchain
• Blockchain is a shared, immutable ledger that facilitates the process of
recording transactions and tracking assets in a business network.
• An asset can be tangible (a house, car, cash, land) or intangible
(intellectual property, patents, copyrights, branding).
• Virtually anything of value can be tracked and traded on a blockchain
network, reducing risk and cutting costs for all involved.
Importance of Blockchain
• Business runs on information. The faster it’s received and the more
accurate it is, the better.
• Blockchain is ideal for delivering that information because it provides
immediate, shared and completely transparent information stored on an
immutable ledger that can be accessed only by permissioned network
members.
• A blockchain network can track orders, payments, accounts, production
and much more.
• And because members share a single view of the truth, you can see all
details of a transaction end to end, giving you greater confidence, as well
as new efficiencies and opportunities.
Key elements of a blockchain

• Distributed ledger technology


• All network participants have access to the distributed ledger and its immutable
record of transactions. With this shared ledger, transactions are recorded only
once, eliminating the duplication of effort that’s typical of traditional business
networks.
• Immutable records
• No participant can change or tamper with a transaction after it’s been recorded to
the shared ledger. If a transaction record includes an error, a new transaction must
be added to reverse the error, and both transactions are then visible.
• Smart contracts
• To speed transactions, a set of rules — called a smart contract — is stored on the
blockchain and executed automatically. A smart contract can define conditions for
corporate bond transfers, include terms for travel insurance to be paid and much
more.
Working of Blockchain
• As each transaction occurs, it is recorded as a “block” of data
• Those transactions show the movement of an asset that can be tangible (a product) or
intangible (intellectual). The data block can record the information of your choice: who,
what, when, where, how much and even the condition — such as the temperature of a
food shipment.
• Each block is connected to the ones before and after it
• These blocks form a chain of data as an asset moves from place to place or ownership
changes hands. The blocks confirm the exact time and sequence of transactions, and the
blocks link securely together to prevent any block from being altered or a block being
inserted between two existing blocks.
• Transactions are blocked together in an irreversible chain: a blockchain
• Each additional block strengthens the verification of the previous block and hence the
entire blockchain. This renders the blockchain tamper-evident, delivering the key strength
of immutability. This removes the possibility of tampering by a malicious actor — and
builds a ledger of transactions you and other network members can trust.
Benefits of Blockchain
• Greater trust
• With blockchain, as a member of a members-only network, you can rest assured that
you are receiving accurate and timely data and that your confidential blockchain
records will be shared only with network members to whom you have specifically
granted access.
• Greater security
• Consensus on data accuracy is required from all network members, and all validated
transactions are immutable because they are recorded permanently. No one, not even a
system administrator, can delete a transaction.
• More efficiencies
• With a distributed ledger that is shared among members of a network, time-wasting
record reconciliations are eliminated. And to speed transactions, a set of rules — called
a smart contract — can be stored on the blockchain and executed automatically.
Types of Blockchain Networks
• Public blockchain networks
• A public blockchain is one that anyone can join and participate in, such as
Bitcoin. Drawbacks might include substantial computational power required,
little or no privacy for transactions, and weak security. These are important
considerations for enterprise use cases of blockchain.
• Private blockchain networks
• A private blockchain network, similar to a public blockchain network, is a
decentralized peer-to-peer network. However, one organization governs the
network, controlling who is allowed to participate, execute a consensus protocol
and maintain the shared ledger. Depending on the use case, this can significantly
boost trust and confidence between participants. A private blockchain can be run
behind a corporate firewall and even be hosted on premises.
Types of Blockchain Networks
• Permissioned blockchain networks
• Businesses who set up a private blockchain will generally set up a
permissioned blockchain network. It is important to note that public
blockchain networks can also be permissioned. This places restrictions on who
is allowed to participate in the network and in what transactions. Participants
need to obtain an invitation or permission to join.
• Consortium blockchains
• Multiple organizations can share the responsibilities of maintaining a
blockchain. These pre-selected organizations determine who may submit
transactions or access the data. A consortium blockchain is ideal for business
when all participants need to be permissioned and have a shared responsibility
for the blockchain.
Protocols
• Blockchain protocols are a set of protocols used to govern the blockchain
network. The rules define the interface of the network, the interaction between the
computers, incentives, kind of data, etc. The protocols aim to address the four
principles:
1.Security
2.Decentralization
3.Consistency
4.Scalability
Protocols: Terminologies for Blockchain
Protocol
• Distributed Ledgers: Distributed ledgers are a type of database that are spread
across the multiple peers and the records are stored one after the other in a
continuous ledger. A distributed ledger, also known as a shared ledger, replicates,
shares, and synchronizes data digitally and shares it across the network in various
sites.
• Smart Contracts: a set of logic rules in the form of a coded script which can be
embedded into the blockchain to govern a transaction. It is an agreement
between two parties stored on a blockchain. It is a set of code that executes
automatically when the predetermined conditions are met. A smart contract is
stored on the public database; it cannot be moved or changed.
Protocols: Terminologies for Blockchain
Protocol
• Consensus algorithm: an algorithm that defines the way consensus will be
reached on the network to verify the transactions. A consensus algorithm
determines who is responsible for validating the records’ blocks and how
other participants can authenticate them. The algorithm ensures a standard
agreement among the participants regarding the state of a distributed ledger.
Protocols: Terminologies for Blockchain
Protocol
• Coins and Tokens: Every blockchain protocol needs a digital asset to keep the
network running. These are also used as incentives for the peers who
participate in the network. This entails the presence of digital assets such as
coins and tokens. The two terms are often used interchangeably in the realm
of blockchain but there is a subtle difference between the two.
• Coins are defined at the lowest level by the protocol itself. Coins are
the native digital asset of a blockchain network. For instance, bitcoin
protocol’s native currency is Bitcoin.
• Tokens are the digital assets that are defined at a higher level not by the
protocol but by smart contracts. For instance, the Ethereum protocol has a
native coin Ether. Ethereum allows developers to build, among other things,
Decentralized Applications (dApps) on its protocol. The node-communication
rules for one dApp can be different from another dApp which are defined by
smart contracts. Tokens are, therefore, the native digital asset of dApps.
Protocols: Terminologies for Blockchain
Protocol
• 51% Attack: the ability of someone controlling more than 50% of network nodes to revise
transaction history and indulge in double spending.
• A 51% attack occurs on the Proof-of-Work (PoW) algorithm when miners or groups of miners try to
hoard more than 50% of the network’s mining or computing power. The control of such mining
power can lead to blocking new transactions from being placed or getting confirmed. The PoW
algorithm is responsible for validating transactions and avoiding the double spending of
cryptocurrencies.
• Example: The nodes on a blockchain network are supposed to broadcast the blocks they form to the
entire network. If a node, or a group of nodes, begin to control more than 50% of the network, it can
indulge in forming blocks privately and not broadcast those to the network. The network would still
follow the public version of the blockchain and the node can indulge in double-spending by first
spending their money on the public blockchain and then on the private one.
• After that, since they control 51% of the network, they can broadcast their private version of the
blockchain and form longer chains. Because of the longest chain rule (which regards the longest
chain to be the most legitimate chain to mine on), the other participants will consider this to be the
correct chain. The previous transactions that were not included in this chain (because it was private)
will be reversed giving the malicious nodes access to other people’s money.
Protocols: Steps to Create
• Step-by-step Guide
• Find Your Niche. ...
• Design a Workflow for Blockchain Integration. ...
• Choose Between New and Existing Blockchain. ...
• Choose Between Private and Public Blockchain.
• Choose a Relevant Consensus Mechanism.
• Choose a Relevant Platform. ...
• Decide Whether You Need Smart Contracts. ...
• Making a Final Decision.
Protocols: Bitcoin
• allowing crypto payment transactions over a decentralized network.
• Public, permissionless blockchain which anyone can join.
• Underlying technology components: cryptographic hash function,
digital signature, p2p network, private-and-public key encryption,
and proof-of-work (PoW) consensus algorithm.
• Every node has access to complete information on the blockchain.
Therefore, Decentralised.
• Users can conduct non-reversible transactions without the need to
explicitly trust a third-party.
• Native cryptocurrency Bitcoin
Protocols: Ethereum
• The goal of Ethereum Enterprise is to increase the business use cases
of Blockchain software development.
• With Ethereum Enterprise, businesses can rapidly develop large-
scale applications to exchange value.
• The major advantage of Ethereum Enterprise is that it allows
businesses to create proprietary variants of Ethereum while still taking
full advantage of the latest Ethereum code.
• Under ordinary circumstances, Ethereum's license makes it difficult to
build proprietary variants of the software, but the enterprise version
gives businesses an option for getting around this issue.
Protocols: Hyperledger
• Hyperledger is an open-source enterprise project and acts as an umbrella for
frameworks, guidelines and standards, and tools to build blockchains and
blockchain-based enterprise applications.
• The libraries included in the Hyperledger protocol aims to develop and deploy
blockchain solutions fast and efficiently.
• It provides industry-wide association and a framework that can be used across many
industries to enhance a transactions’ performance and speed.
• It is hosted by the Linux Foundation, and thus works effectively on servers across
enterprises.
• It includes member organizations that are leaders in finance, IoT, supply chains, etc.
• The sub-projects operating under Hyperledger are Hyperledger Fabric, Sawtooth,
Composer, Burrow, Explorer, and Cello.
Protocols: Corda
• It is another open-source blockchain project that is specifically designed for
businesses.
• It is used to build blockchain platforms that can solve complex enterprise-related
problems.
• It helps cut down record-keeping costs and provides development services such as
Corda App Consulting, User Interfaces, Regulated Tokens, etc.
• Corda allows businesses to transact directly with the help of its smart contract
technology.
• Therefore, it can create interoperable blockchain networks to complete the transactions
in a secured infrastructure, ensuring transparency, traceability, and validation.
• The R3 banking consortium develops Corda, and most of the applications developed
through it have been implemented or deployed in the finance and banking industry.
Protocols: Quorum
• Invented by JP Morgan, Quorum is an open-source blockchain protocol beneficial for
businesses in the finance sector.
• A Quorum was built on the Ethereum framework, and it is growing towards becoming
the best possible enterprise blockchain protocol.
• It can be used to develop in-house tools or third-party applications. It was
specifically designed to be permissioned, ensuring the transactions are private.
• It uses a consortium approach, meaning it has to be authorized by a specified
entity.
• Quorum architecture includes three components — Quorum Node, Constellation —
Transaction Manager, and Constellation — Enclave.
• The architecture maintains a permissioned network with privacy and enhanced
performance.
Protocols: MultiChain
• MultiChain is also an open-source blockchain platform that offers APIs to provide
blockchain development services to update integration and complete the deployment
speedily.
• It provides a command-line interface along with the API to preserve and build the
chain.
• It helps enterprises to create private blockchains for carrying out efficient
transactions and build blockchain-based applications.
• It allows for creating multiple key-value and identity databases on a blockchain network
for timestamping and data sharing.
• MultiChain technology is used by enterprises to conduct financial transactions.
• It allows the creation and deployment of private blockchains within the enterprise or
among two or more enterprises. Before carrying out the transfer of assets on the chain,
every node must be configured with MultiChain.
Blockchain Security
• Blockchain security is a comprehensive risk management system for a blockchain network, using
cybersecurity frameworks, assurance services, and best practices to reduce risks against attacks
and fraud
• Blockchain technology's data structures have inherent security qualities because they are based
on consensus, cryptography, and decentralization principles. Each new block of information
connects to all the previous blocks in a way that is nearly impossible to tamper with. In addition,
all transactions in a block get validated and agreed on by a consensus mechanism (authorized
users), guaranteeing that each transaction is true and accurate. Thus, there is no point of failure,
and a user can’t change transaction records.
• The records on a blockchain are secured through cryptography. Network participants have their
own private keys that are assigned to the transactions they make and act as a personal
digital signature. If a record is altered, the signature will become invalid and the peer network will
know right away that something has happened. Early notification is crucial to preventing further
damage.
Blockchain Security
• A blockchain network is only as secure as its infrastructure
• When establishing a private blockchain, you must decide the best platform for deployment. Even
though blockchain has inherent properties that provide security, known vulnerabilities in your
infrastructure can be manipulated by those with ill intent. Ideally, you should have an
infrastructure with integrated security that can:
• Prevent anyone — even root users and administrators — from accessing sensitive
information
• Deny illicit attempts to change data or applications within the network.
• Carefully guard encryption keys using the highest-grade security standards so they can never
be misappropriated.
• With these capabilities, your blockchain network will have the added protection it needs to
prevent attacks from within and without.
Blockchain Security
• Blockchain Security Challenges
• Blockchain isn’t perfect. There are ways that cyber criminals can manipulate blockchain’s
vulnerabilities and cause severe damage. Here are four ways that hackers can attack blockchain
technology.
• Routing attacks. Blockchains depend on immense data transfers performed in real-time.
Resourceful hackers can intercept the data on its way to ISPs (Internet Service Providers).
Unfortunately, blockchain users don’t notice anything amiss.
• 51% attacks. Large-scale public blockchains use a massive amount of computing power to
perform mining. However, a group of unethical miners can seize control over a ledger if they can
bring together enough resources to acquire more than 50% of a blockchain network’s mining
power. Private blockchains aren’t susceptible to 51% attacks, however.
• Sybil attacks. Named for the book that deals with multiple personality disorder, Sybil attacks flood
the target network with an overwhelming amount of false identities, crashing the system.
• Phishing attacks. This classic hacker tactic works with blockchain as well. Phishing is a scam
wherein cyber-criminals send false but convincing-looking emails to wallet owners, asking for
their credentials.
Blockchain Security
• Blockchain Security Examples
• Mobilecoin: This California-based cryptocurrency company is developing a secure, user-friendly
cryptocurrency for businesses that cannot afford to implement ledger security measures
independently. Mobilecoin’s cryptocurrency replaces third-party transaction vendors, keeping all the
transaction data encrypted at both ends. The product works with Facebook Messenger, WhatsApp,
and Signal.
• Coinbase: Here’s another California-based cryptocurrency company. Coinbase is an exchange for
selling and purchasing digital currency. Running entirely on encryption, Coinbase stores wallets and
passwords in a secure database. Employees must undergo a rigorous background check to ensure
cryptocurrency safety.
• J.P. Morgan: J.P. Morgan is the largest and one of the most popular financial institutions in the United
States. It has developed an enterprise-focused version of Ethereum called Quorum, using blockchain
technology to process private transactions. J.P. Morgan uses smart contracts on their Quorum network
to create transparent yet cryptographically assured transactions.
Consensus
• A consensus mechanism enables the blockchain network to attain reliability and build a level of trust
between different nodes, while ensuring security in the environment.
• Consensus decision-making is a group decision-making process in which group members develop, and
agree to support a decision in the best interest of the whole.
• Objective
• Unified Agreement: The protocols embedded in the Distributed blockchain network ensures that the
data involved in the process is true and accurate, and the status of the public ledger is up-to-date.
• Align Economic Incentive: A consensus blockchain protocol, in this situation, offers rewards for good
behavior and punishes the bad actors. This way, it ensures regulating economic incentives too.
• Fair & Equitable: Consensus mechanisms enable anyone to participate in the network and use the
same basics.
• Prevent Double Spending: Consensus mechanisms works on the basis of certain algorithms that
ensures that only those transactions are included in the public transparent ledger which are verified
and valid.
• Fault Tolerant: The governed system would work indefinite times even in the case of failures and
threats.
Consensus Algorithms: 1. Proof of Work
• Developed by Satoshi Nakamoto, Proof of Work is the oldest consensus mechanism used in the
Blockchain domain. It is also known as mining where the participating nodes are called miners.
• In this mechanism, the miners have to solve complex mathematical puzzles using comprehensive
computation power. They use different forms of mining methods, such as GPU mining, CPU mining, ASIC
mining, and FPGA mining. And the one that solves the problem at the earliest gets a block as a reward.
• The Proof of Work mechanism is used by multiple cryptocurrencies like Bitcoin, Litecoin, ZCash, Primecoin,
Monero, and Vertcoin etc..
• In bitcoin consensus algorithm each block is intended to generate a hash value, and the nonce is the
parameter that is used to generate that hash value.
• The Proof of Work (PoW) has not only influenced the financial industry, but also healthcare, governance,
management and more. It has, in fact, offered the opportunity of multichannel payments and multi-
signature transactions over an address for enhancing security.
Consensus Algorithms: 2. Proof of Stake
(PoS)
• The most basic and environmentally-friendly alternative of PoW consensus protocol.
• The block producers are not miners, but they act like validators. They get the opportunity to create a
block over everyone which saves energy and reduces the time. However, for them to become a validator,
they are supposed to invest some amount of money or stake.
• Also, unlike that in the case of PoW, miners are provided with a privilege to take their transaction fees in
this algorithm for there is no reward system in this consensus model.
• This, as a whole, encouraged brands like Ethereum to upgrade their model from PoW to PoS in their
Ethereum 2.0 update. Also, it helped various Blockchain ecosystems like Dash, Peercoin, Decred,
Reddcoin, and PivX to function properly.
• Now, while PoS solved various issues earlier associated with PoW, there were many challenges still
undusted in the market. To mitigate those challenges and deliver an enhanced blockchain environment,
several variations of PoS came into existence.
Consensus Algorithms: 2. Proof of Stake
(PoS)
• The two popular variations of Proof of Stake (PoS) are DPoS and LPoS.
• Delegated Proof of Stake (DPoS)
• In the case of Delegated Proof of Stake (DPoS), the participants stake their coin and vote
for a certain number of delegates such that the more they invest, the more weightage
they receive. For example: if user A spends 10 coins for a delegate and user B invests 5
coins, A’s vote gets more weightage than that of B.
• The delegates also get rewarded in the form of transaction fees or a certain amount of
coins.
• Because of this stake-weighted voting mechanism, DPoS is one of the fastest blockchain
consensus models and is highly preferred as a digital democracy. Some of the real-life
use cases of this blockchain consensus mechanism are Steem, EOS, and BitShares.
Consensus Algorithms: 2. Proof of Stake
(PoS)
• Leased Proof of Stake (LPoS)
• LPoS is an enhanced version of PoS consensus mechanism that operates on the Waves
platform.
• Unlike the regular Proof-of-Stake method where each node with some amount of
cryptocurrency is entitled to add the next blockchain, users can lease their balance to
full nodes in this consensus algorithm blockchain. And the one that leases the bigger
amount to the full node has a higher probability of generating the next block. Also, the
leaser is then rewarded with a percentage of transaction fee that has been collected by
the complete node.
• This PoS variant is an efficient and safe option for the development of public
cryptocurrencies.
Consensus Algorithms: 3. Proof of Authority
• Proof of Authority is a modified version of Proof of Stake in which the identities
of validators in the network are at stake.
• In this, to verify the validator’s identity, the identity is the resemblance between
validators’ personal identification and their official documentation.
• These validators put their reputation on the network. In Proof of Authority, the
nodes (that become validators) are the only ones allowed to produce new blocks.
• Validators whose identity is at risk are incentivized to secure and preserve the
blockchain network. In this proof, the number of validators are fairly small,
around 25 or less.
Consensus Algorithms: 4. Byzantine Fault Tolerance (BFT)

• Byzantine Fault Tolerance, as the name suggests, is used to deal with Byzantine fault (also
called Byzantine Generals Problem) – a situation where the system’s actors have to agree
on an effective strategy so as to circumvent catastrophic failure of the system, but some
of them are dubious.
• Two Variations of BFT
• (a) Practical Byzantine Fault Tolerance (PBFT)
• PBFT is a lightweight blockchain algorithm that solves the Byzantine General’s
problems by letting users confirm the messages that have been delivered to them by
performing a computation to evaluate the decision about the message’s validity.
• The party then announces its decision to other nodes who ultimately process a
decision over it. This way, the final decision relies upon the decisions retrieved from
the other nodes.
• Stellar, Ripple, and Hyperledger Fabric are some use cases of this blockchain
consensus mechanism.
Consensus Algorithms: 4. Byzantine Fault Tolerance (BFT)

• (b) Delegated Byzantine Fault Tolerance (DBFT)


• Introduced by NEO, the Delegated Byzantine Fault Tolerance mechanism is
similar to the Delegated Proof of Stake (DPoS) consensus model. Here also, the
NEO token holders get the opportunity to vote for the delegates.
• However, this is independent of the amount of currency they invest. Anyone who
fulfills the basic requirements, i.e., a verified identity, the right equipment, and
1,000 GAS, can become a delegate. One among those delegates is then chosen as
speaker randomly.
• The speaker creates a new block from the transaction that is waiting to be
validated. Also, he sends a proposal to the voted delegates who have the
responsibility to supervise all the transactions and record them on the network.
Consensus Algorithms: 4. Byzantine Fault Tolerance (BFT)

• These delegates have the freedom to share and analyze the proposals to check the
accuracy of data and honesty of the speaker. If then, 2/3rd of the delegates
validates it, the block is added to the blockchain.
• This type of Blockchain consensus protocol is also called ‘Ethereum of China’ and
can be a helpful resource in building a ‘smart economy’ by digitizing assets and
offering smart contracts on the blockchain.
Consensus Algorithms: 5. Direct Acyclic Graph (DAG)

• In this type of Blockchain consensus protocol, every node itself prepares to


become the ‘miners’. Now, when miners are eradicated and transactions are
validated by users itself, the associated fee reduces to zero.
• It becomes easier to validate transactions between any two closest nodes, which
makes the whole process lightweight, faster, and secure.
• The two best examples of DAG algorithms are IOTA and Hedera Hashgraph.
Consensus Algorithms:6. Proof of Capacity
• In the Proof of Capacity (PoC) mechanism, solutions for every complex
mathematical puzzle are accumulated in digital storages like Hard disks.
• Users can use these hard disks to produce blocks, in a way that those who are
fastest in evaluating the solutions get better chances for creating blocks.
• The process it follows is called Plotting. The two cryptocurrencies that rely on PoC
blockchain consensus protocol are Burstcoin and SpaceMint.
Consensus Algorithms: 7. Proof of Burn (PoB)
• This is alternate solution to PoW and PoS in terms of energy consumption
• Proof of Burn (PoB) consensus model works on the principle of letting miners
‘burn’ or ‘ruin’ the virtual cryptocurrency tokens, which further provides them
with a privilege to write blocks in proportion to the coins.
• The more coins they burn, the more are the chances of picking the new block for
every coin they get.
• But, in order to burn coins, they are required to send it to the address where it
couldn’t be spent for verifying the block.
• This is widely employed in the case of distributed consensus. And the finest
example of this consensus mechanism is the Slim coin.
Consensus Algorithms:8. Proof of Identity
• The concept of PoI (Proof of Identity) is just like that of the authorized identity.
• It is a piece of cryptographic confirmation for a users’ private key that is being
attached to each particular transaction.
• Each identified user can create and manage a block of data that can be presented
to others in the network.
• This blockchain consensus model ensures authenticity and integrity of the
created data. And thus, it is a good choice for introducing smart cities.
Consensus Algorithms: 9. Proof of Activity
• It is the convergence of PoW and PoS blockchain consensus models.
• In the case of PoA mechanism, miners race to solve a cryptographic puzzle at the
earliest using special hardware and electric energy, just like in PoW.
• However, the blocks they come across hold only the information about the
identity of the block winner and reward transaction.
• This is where the mechanism switches to PoS.
• The validators (shareholders appointed to validate transactions) test and ensure
the correctness of the block.
• If the block was checked many times, the validators activate to a complete block.
This confirms that open transactions are processes and are finally integrated into
the found block containers.
• Besides, the block reward is divided so that validators gain shares of it. E.g. Espers
and Decred coins
Consensus Algorithms: 10. Proof of Elapsed Time (PoET)

• PoET was introduced by Intel with an intent to take over cryptographic puzzles
involved in PoW mechanism by considering the fact that the CPU architecture
and the quantity of mining hardware knows when and at what frequency does a
miner win the block.
• It is based on the idea of fairly distributing and expanding the odds for a bigger
fraction of participants.
• And so, every participating node is asked to wait for a particular time to
participate in the next mining process.
• The member with the shortest hold-up time is asked to offer a block.
• At the same time, every node also comes up with their own waiting time, after
which they go into sleep mode.
Consensus Algorithms: 10.Proof of Elapsed Time (PoET)

• So, as soon as a node gets active and a block is available, that node is considered
as the ‘lucky winner’. This node can then spread the information throughout the
network, while maintaining the property of decentralization and receiving the
reward.
Consensus Algorithms:11. Proof of Importance
• Introduced by NEM, PoI is a variation of PoS protocol that considers the role of
shareholders and validators for its operation.
• However, this is not only influenced by the size and chance of their shares;
various other factors like reputation, overall balance, and no. of transactions
made through any particular address also plays a role in it.
• The networks based on POI consensus model are expensive to attack on and
rewards users for contributing to the network’s security.
Privacy
• A key aspect of privacy in blockchains is the use of private and public keys.

• Blockchain systems use asymmetric cryptography to secure transactions


between users. In these systems, each user has a public and private key.
• These keys are random strings of numbers and are cryptographically related. It is
mathematically impossible for a user to guess another user's private key from
their public key.
• This provides an increase in security and protects users from hackers. Public keys
can be shared with other users in the network because they give away no
personal data.
Privacy
• Each user has an address that is derived from the public key using a hash
function. These addresses are used to send and receive assets on the blockchain,
such as cryptocurrency.
• Because blockchain networks are shared to all participants, users can view past
transactions and activity that has occurred on the blockchain.
• Senders and receivers of past transactions are represented and signified by their
addresses; users' identities are not revealed.
• Public addresses do not reveal personal information or identification; rather, they
act as pseudonymous identities that users do not use a public address more than
once; this tactic avoids the possibility of a malicious user tracing a particular
address' past transactions in an attempt to reveal information.
Privacy
• Private keys are used to protect user identity and security through digital
signatures.
• Private keys are used to access funds and personal wallets on the blockchain;
they add a layer of identity authentication.
• When individuals wish to send money to other users, they must provide a digital
signature that is produced when provided with the private key. This process
protects against theft of funds.
HASH
• Hashing is the process of taking an unlimited amount of input data and leveraging it for the
creation of specific amounts of output data.
• The input data does not have any fixed size, thereby offering considerable flexibility in the
selection of inputs for hashing.
• The importance of hashing in blockchain security is visible in the requirement of hashing for
adding blocks.
• The hash helps in offering confirmation regarding the production of output from the hashing
procedure.
• In addition, the hash also confirms that the output of the procedure has not been subject to
any unwanted tampering.
• The verification process generally involves calculations for confirming matches between hashes
and the originally published content.
• Any form of mismatch could clearly showcase evidence of modification or tampering in the
output hash.
Hash in Blockchain
• Every new blockchain begins with a genesis block which is responsible for
capturing data regarding almost anything that has happened on the blockchain to
date.
• As a result, the output of a hash function directly points out the most recent state
of the concerning blockchain.
• The new blocks always capture details associated with the previous block. Any
form of modification could change the hash of the chain, thereby helping in
easier and precise identification.
• Hashing in cryptography and blockchain is primarily a one-way function that
features a properly crafted algorithm without any concerns for reversal of
hashing process and exposure of original input.
Hash in Blockchain
• The applications of hashing in blockchain have to follow certain important
requirements such as,
1.Input could feature variable length
2.Output must have a fixed length
3.The hash function for any specific input presents relative ease of computing
4.Hash function features the collision-free trait, which ensures that you could not
have two different messages that produce a similar hash value.
5.Hash function is always one-way and clearly implies the extreme difficulty
associated with determining the input by referring to the output.
Digital Signature in Blockchain
• Digital signatures are basically cryptographic proof systems that can help in
establishing trust on the blockchain.
• Trust in the blockchain system could ensure proving that the message could
originate from a particular source, thereby ruling out any concerns of hacking or
other discrepancies.
• Digital signatures can be considered as the digital counterparts of stamped seals
or handwritten signatures.
• However, they are capable of offering better security with the reduced possibility
of identity theft or impersonation.
• Digital signatures follow the specific precedents of asymmetric cryptography by
linking two different keys with mathematical links.
• The keys include a private key and a public key. It is possible to deploy a digital
signature system with the help of a secure hash function.
Digital Signature in Blockchain
• The importance of a digital signature in blockchain largely revolves around two
primary objectives such as,
1.Digital signatures ensure that the message received by a recipient has come from
the sender claiming to have sent the information. The property is known as non-
repudiation.
2.Digital signatures also provide assurance to recipients about the fact that
messages have not been through any modifications in transit. As a result,
infrastructures can find better safeguards against malicious intermediaries or
unintentional modifications.
Relationship between Hashing and Digital
Signature
• In the case of blockchain, a digital signature system focuses on three basic phases
such as hashing, signature, and verification.
• Step 1: First of all, the blockchain hashes the message or digital data through the
submission of data via a hashing algorithm. The algorithm helps in generating a
hash value or the message digest with messages differing profoundly in size only
to give the same length of hash values upon hashing. As we already know, this is
the most fundamental trait in a hash function and exhibits a clear influence on
digital signatures. Hashing is mandatory in most blockchain applications for the
flexibility in using fixed-length message digests for the complete process.
Relationship between Hashing and Digital
Signature
• Step 2: The next step in the working of digital signature in blockchain refers to
signing. The sender of the message must sign it after hashing of information in
the message. At this point of the process, public key cryptography plays a critical
role. Many digital signature algorithms offer unique mechanisms, albeit with the
single approach of asymmetric cryptography. Since digital signatures are related
directly to the content in each message, digitally signed messages are likely to
have different digital signatures.
• Step 3: The final step in the use of blockchain-based digital signature refers to
verification. Recipients could easily check the validity of digital signatures
through the use of a public key. The signature could work as a unique digital
fingerprint of the concerned message. However, it is also important to pay
attention to the secure storage and management of keys for avoiding unwanted
circumstances.
Hashchain to Blockchain
• A hash chain is commonly defined as the repeated application of a cryptographic
hash function to a given data asset.
• This type of hash cryptography can be extremely useful in some specific security
setups.
• This hash chain of transactions is cryptographically secure and tamper-proof.
• Any change to Transaction would cause hash value to change, and that would
require an update to the hash value stored in every subsequent transaction on
the hash chain.
Hashchain to Blockchain
• When a digital asset transfers from one owner to another, its digital signature is
examined, verified, and digitally signed by the new owner, and then registered as
a new node on the hash chain.
• Although the details of the implementation vary dramatically across blockchain
technologies and versions, the basic idea is the same for all of them.
• For example, as shown in Figure, Bill is the owner of a digital asset and uses his
private key to initiate a transfer of that digital asset to Susan.
• Susan’s transaction record uses Bill’s public key to verify his signature. After this,
Susan’s public key is used to sign the digital asset, making Susan the new owner.
This creates a new transaction record—a new link on the transaction hash chain.
Hashchain to Blockchain
• Merkle Trees Some blockchains bundle up transactions using
another kind of hash chain: the binary hash chain, or Merkle
tree. A complete Merkle tree is referred to as a binary tree
structure because it branches twice at each level starting at the
root, as shown in Figure
Hashchain to Blockchain
• The work in setting up a Merkle tree is to create a series of leaf nodes by computing the
SHA-256 hash for the data contained in each transaction object (the Bitcoin blockchain
double-hashes each Merkle node; double-hashing can help strengthen the cryptographic
value in the hash result should a vulnerability be discovered in the SHA-256 algorithm).
• The Merkle tree requires an even number of leaf nodes—it’s customary to duplicate the
last leaf node if starting with an odd number. Then each pair of leaf nodes is hashed
together, producing a new hash value.
• Leaf A shows the hash for Transaction A as HA; Leaf B shows the hash for Transaction B as
HB and so on. This pattern continues at each tree level until you reach the final root node.
• The root node’s hash value is the crypto­graphic hash sum of all of the other hash sums in
the tree. Any change to the data in any of the leaf nodes causes the recomputed Merkle
tree root hash value to change.
Hashchain to Blockchain
• The Merkle binary hash tree structure offers some advantages.
• For example, it makes it easy to update data within a transaction and compute a
new Merkle root hash without having to build the entire Merkle tree from
scratch.
• For example, if Transaction E changes (it’s highlighted in Figure), all you need to
do is walk the tree efficiently back to the Merkle root, computing new hashes
once for each level.
• Thus, you first compute the new Leaf hash HE; then compute HEF from HE and HF;
then compute HEFGH from HEFand HGH; then compute a new Merkle root hash from
HABCD and HEFGH. Updating the Merkle root hash required only four computations
versus the 15 required to build the Merkle tree from scratch!
Hashchain to Blockchain
• To build a blockchain (see Figure), the binary hash chain data object containing
transactions must somehow be committed to a tamper-proof data store that
everyone can use (remember, this is a public blockchain—any node on the
network can read from or write to it).
• The Merkle tree structure contains transactions and is tamper-proof, so it would
seem it could serve as the blockchain. But there are several problems.
• In order for Bill to send his digital asset to Susan, Bill must trust the service or
Web site that acts as an agent to process his digital-asset transfer request, and he
must trust the server that persists the hash structure.
Hashchain to Blockchain
• Without a central node to process a new transaction or a central authority to
delegate them for processing, any node could process Bill’s pending transaction.
• A rogue or dominant node having superior processing power could allow invalid
or fraudulent transactions to occur and those could propagate to honest nodes.
• To solve that, the network could try to randomly assign a node to process Bill’s
transaction, but that again centralizes control and requires trust that the random
number generator is indeed enforcing randomness. To eliminate this issue,
blockchains use consensus algorithms
Bitcoin Basic
• Bitcoin is a form of digital currency and a worldwide payment system.
Unlike traditional currency, such as minted coins or printed bills,
bitcoin is created and held electronically. And unlike traditional
currency that is controlled by a central bank, no single entity controls
bitcoin and, by extension, no single authority can manipulate the value
or destabilize the network. Bitcoin is exchanged electronically by
users via cryptographic addresses. Third-party sites, called exchanges,
help facilitate these transactions.
Bitcoin: Where Does Bitcoin come from
• The process by which bitcoins are generated is called mining. Using powerful computer
processors, individual miners or groups working together essentially solve a complex
mathematical problem, which not only uncovers new bitcoin, but also serves to maintain the
security and integrity of all bitcoin transactions that take place on the network.
• Specifically, transaction details resulting from the transfer of bitcoin around the world are
collected into a list called a block. It’s up to miners to confirm those transactions and write
them into a general ledger, which is essentially a long list of blocks, known as the blockchain.
Anyone can access the blockchain to explore any transaction made between any bitcoin
addresses, at any point on the network.
• When a block of transactions is created, miners put it through a complicated process involving
a hash algorithm and a nonce. In return for all their hard work maintaining blockchain, miners
earn bitcoins for successfully completing each complex cryptographic hash. The mining process
makes use of various checks and balances to ensure that the system’s data remains secure, as
tampering with data effectively prevents the production of new bitcoins.
• There is a finite number of bitcoins to be discovered — 21 million to be exact — and the
process of mining inherently increases in difficulty over time as a way of limiting the number of
bitcoins found each day. It is predicted that all 21 million bitcoins will be mined by 2140.
Bitcoin: Who Created Bitcoin
• It only makes sense that a cryptocurrency’s origin story should be
shrouded in mystery. The name Satoshi Nakamoto has been associated
with its invention ever since the first digital paper on bitcoin emerged in
2008. But even now, almost 10 years later, we are no closer to knowing
with certainty just who Satoshi Nakamoto is or whether bitcoin was
actually the result of a team of people working together instead.
• So far, Hal Finney, Dorian S. Nakamoto, Craig Wright, and Nick Szabo,
among others, have been considered possible candidates. As an homage
to bitcoin’s purported creator, a satoshi is the smallest divisible amount
within one bitcoin, representing 0.00000001 bitcoin or one hundred
millionth of a bitcoin.
Bitcoin: Key Features
• 1. It’s decentralized Individual users are in control of their bitcoin. There is no central
authority that can manipulate or seize control of the bitcoin network.
• 2. Personal information is not traceable to transactions This is both a pro and a con in that it
protects users from things like identity theft, but it also led to bitcoin becoming a popular
payment method for illicit black markets, such as the Silk Road, an online marketplace for
illegal weapons and drugs.
• 3. Minimal transaction fees Currently there are fairly low fees associated with bitcoin
payments. Bitcoin exchanges may offer a variety of services whereby fees vary depending on
the type of transaction, but generally speaking these fees tend to be lower than credit cards
or PayPal.
• 4. Reduced risk for merchants Since bitcoin transactions cannot be reversed, do not carry
with them any personal information, and are secure, merchants are better protected from
any losses that might occur from fraudulent credit card use.
• 5. It’s a true global currency Bitcoin’s value is the same worldwide and it can be used in any
country. No one country can overinflate the value or devalue it, for instance, by making
more.
Bitcoin: Pros
• Bitcoin is no longer just for computer geeks and libertarians. A growing number
of mainstream investors and entrepreneurs now see bitcoin as a legitimate asset
class, similar to stocks, bonds, or commodities.
• A finite supply of bitcoin could continue to drive value. It is thought that nearly
80% of all bitcoins have already been discovered and as mentioned, no new ones
will be available after 2140. In addition, some are predicting demand to increase
particularly if central banks decide to start buying them as foreign currency
reserves.
Bitcoin: Cons
• Bitcoin’s uptake as a mainstream payment system has been slow (except among
criminal entities). To date, there is still little evidence that bitcoin will replace cash
or credit cards anytime soon. Transactions are relatively slow (10 minutes in some
cases) and fees are steadily increasing.
• The bitcoin bubble could burst. Over the last decade, bitcoin has been volatile
with some fairly dramatic crashes, notably in 2013 and 2015. Also, experts
contend that this latest exponential price increase is unsustainable and once
prices drop, many buyers will exit the market.

You might also like