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

Blockchain Unit 1 Notes

Uploaded by

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

Blockchain Unit 1 Notes

Uploaded by

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

lOMoAR cPSD| 22516561

Block Chain

unit 1 - notes
lOMoAR cPSD| 22516561

UNIT 1

Overview of blockchain

The blockchain is a distributed database of records of all transactions or digital event that
have been executed and shared among participating parties. Each transaction verified by
the majority of participants of the system. It contains every single record of each transaction.
BitCoin is the most popular cryptocurrency an example of the blockchain. Blockchain
Technology Records Transaction in Digital Ledger which is distributed over the Network thus
making it incorruptible. Anything of value like Land Assets, Cars, etc. can be recorded on
Blockchain as a Transaction.
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.

How does blockchain work?

One of the famous use of Blockchain is Bitcoin. Bitcoin is a cryptocurrency and is used to
exchange digital assets online. Bitcoin uses cryptographic proof instead of third-party trust for
two parties to execute transactions over the internet. Each transaction protects through digital
signature.

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
lOMoAR cPSD| 22516561

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.

Advantages of blockchain

Enhanced security :: Your data is sensitive and crucial, and blockchain can significantly
change how your critical information is viewed. By creating a record that can’t be altered and
is encrypted end-to-end, blockchain helps prevent fraud and unauthorized activity. Privacy
issues can also be addressed on blockchain by anonymizing personal data and using
permissions to prevent access. Information is stored across a network of computers rather
than a single server, making it difficult for hackers to view data.

Greater transparency :: Without blockchain, each organization has to keep a separate


database. Because blockchain uses a distributed ledger, transactions and data are recorded
identically in multiple locations. All network participants with permissioned access see the
same information at the same time, providing full transparency. All transactions are
immutability recorded, and are time- and date-stamped. This enables members to view the
entire history of a transaction and virtually eliminates any opportunity for fraud.

Instant traceability :: Blockchain creates an audit trail that documents the provenance of an
asset at every step on its journey. In industries where consumers are concerned about
environmental or human rights issues surrounding a product — or an industry troubled by
counterfeiting and fraud — this helps provide the proof. With blockchain, it is possible to
share data about provenance directly with customers. Traceability data can also expose
weaknesses in any supply chain — where goods might sit on a loading dock awaiting transit.

Increased efficiency and speed :: Traditional paper-heavy processes are time-consuming,


prone to human error, and often requires third-party mediation. By streamlining these
processes with blockchain, transactions can be completed faster and more efficiently.
Documentation can be stored on the blockchain along with transaction details, eliminating
the need to exchange paper. There’s no need to reconcile multiple ledgers, so clearing and
settlement can be much faster.

Automation :: Transactions can even be automated with “smart contracts,” which increase
your efficiency and speed the process even further. Once pre-specified conditions are met,
the next step in transaction or process is automatically triggered. Smart contracts reduce
human intervention as well as reliance on third parties to verify that terms of a contract have
been met. In insurance, for example, once a customer has provided all necessary
documentation to file a claim, the claim can automatically be settled and paid.

Disadvantages of blockchain
Scalability: It is one of the biggest drawbacks of blockchain technology as it cannot be
scaled due to the fixed size of the block for storing information. The block size is 1 MB due
to which it can hold only a couple of transactions on a single block.

Immaturity: Blockchain is only a couple-year-old technology so people do not have much


confidence in it, they are not ready to invest in it yet several applications of blockchain are
doing great in different industries but still it needs to win the confidence of even more people
to be recognized for its complete utilization.
lOMoAR cPSD| 22516561

Energy Consuming: For verifying any transaction a lot of energy is used so it becomes a
problem according to the survey it is considered that 0.3 percent of the world’s electricity had
been used by 2018 in the verification of transactions done using blockchain technology.

Time-Consuming: To add the next block in the chain miners need to compute nonce values
many times so this is a time-consuming process and needs to be speed up to be used for
industrial purposes.

Legal Formalities: In some countries, the use of blockchain technology applications is


banned like cryptocurrency due to some environmental issues they are not promoting to use
blockchain technology in the commercial sector.

Storage: Blockchain databases are stored on all the nodes of the network creates an issue
with the storage, increasing number of transactions will require more storage.

Regulations: Blockchain faces challenges with some financial institution. Other aspects of
technology will be required in order to adopt blockchain in wider aspect.

Public Ledger

A ledger (not to be confused with Ledger) is a record-keeping system: it tracks value as is


moves around, so the viewer can always see exactly what value resides where at a given
moment. Traditional finance systems like banks use ledgers to track all transactions
completed within a period. Blockchains are a form of digital ledgers that validate and store
all transactions within their network. For example, the Bitcoin blockchain records all
transactions involving bitcoins using blocks secured by cryptography.

A public ledger is an open-access network; anyone can join at any time. The public ledger is
fully decentralized, and no single entity controls the blockchain network. The Bitcoin and
Ethereum blockchains are both considered public ledgers. Public ledgers are also the most
secure blockchains; they maintain a pseudo-anonymous system for their users’ identities.
While all transactions are recorded publically, user identities remain private. .

Bitcoin

Satoshi Nakamoto introduced the bitcoin in the year 2008. Bitcoin is a


cryptocurrency(virtual currency), or a digital currency that uses rules of cryptography for
regulation and generation of units of currency. A Bitcoin fell under the scope of cryptocurrency
lOMoAR cPSD| 22516561

and became the first and most valuable among them. It is commonly called decentralized
digital currency.

A bitcoin is a type of digital assets which can be bought, sold, and transfer between the two
parties securely over the internet. Bitcoin can be used to store values much like fine gold,
silver, and some other type of investments. We can also use bitcoin to buy products and
services as well as make payments and exchange values electronically.

A bitcoin is different from other traditional currencies such as Dollar, Pound, and Euro, which
can also be used to buy things and exchange values electronically. There are no physical coins
for bitcoins or paper bills. When you send bitcoin to someone or used bitcoin to buy anything,
you don?t need to use a bank, a credit card, or any other third-party. Instead, you can simply
send bitcoin directly to another party over the internet with securely and almost instantly.

Bitcoin is more than a cryptocurrency used for payments or as an investment. There is an


entire ecosystem at work behind a cryptocurrency.
Bitcoin is a decentralized digital currency that operates without the need of financial system
or government authorities. It utilizes peer-to-peer transfers on a digital network that records
all cryptocurrency transactions. This network is powered by the blockchain, an open source
code that pairs (or chains) blocks of transaction histories to prevent manipulation.

Advantages and Disadvantages of Bitcoin

Advantages Disadvantages

Potential for high return No refund

Protection from payment fraud Unregulated & unbacked, cyber hacking

Immediate settlement, international Black market activity


transactions

Diversification, greater liquidity High volatility & potential fo large losses

Smart Contracts

A Smart Contract (or cryptocontract) is a computer program that directly and automatically
controls the transfer of digital assets between the parties under certain conditions.The
bitcoin network was the first to use some sort of smart contract by using them to transfer
value from one person to another. There are some common smart contract platforms like
Ethereum, Solana, Polkadot, Hyperledger fabric, etc.
Features of Smart Contract

1. Distributed: Everyone on the network is guaranteed to have a copy of all the


conditions of the smart contract and they cannot be changed by one of the
parties. A smart contract is replicated and distributed by all the nodes connected
to the network.
lOMoAR cPSD| 22516561

2. Deterministic: Smart contracts can only perform functions for which they are
designed only when the required conditions are met. The final outcome will not
vary, no matter who executes the smart contract.
3. Immutable: Once deployed smart contract cannot be changed, it can only be
removed as long as the functionality is implemented previously.
4. Autonomy: There is no third party involved. The contract is made by you and
shared between the parties. No intermediaries are involved which minimizes
bullying and grants full authority to the dealing parties. Also, the smart contract is
maintained and executed by all the nodes on the network, thus removing all the
controlling power from any one party’s hand.
5. Customizable: Smart contracts have the ability for modification or we can say
customization before being launched to do what the user wants it to do.
6. Transparent: Smart contracts are always stored on a public distributed ledger
called blockchain due to which the code is visible to everyone, whether or not
they are participants in the smart contract.
7. Trustless: These are not required by third parties to verify the integrity of the
process or to check whether the required conditions are met.
8. Self-verifying: These are self-verifying due to automated possibilities.
9. Self-enforcing: These are self-enforcing when the conditions and rules are met
at all stages.

Working of Smart Contract

A smart contract is just a digital contract with the security coding of the blockchain.
● It has details and permissions written in code that require an exact sequence of
events to take place to trigger the agreement of the terms mentioned in the smart
contract.
● It can also include the time constraints that can introduce deadlines in the
contract.
● Every smart contract has its address in the blockchain. The contract can be
interacted with by using its address presuming the contract has been
broadcasted on the network.

The idea behind smart contracts is pretty simple. They are executed on a basis of simple
logic, IF-THEN for example:
lOMoAR cPSD| 22516561

● IF you send object A, THEN the sum (of money, in cryptocurrency) will be
transferred to you.
● IF you transfer a certain amount of digital assets (cryptocurrency, for example,
ether, bitcoin), THEN the A object will be transferred to you.
● IF I finish the work, THEN the digital assets mentioned in the contract will be
transferred to me.

● Identify Agreement: Multiple parties identify the cooperative opportunity and


desired outcomes and agreements could include business processes, asset
swaps, etc.
● Set conditions: Smart contracts could be initiated by parties themselves or when
certain conditions are met like financial market indices, events like GPS locations,
etc.
● Code business logic: A computer program is written that will be executed
automatically when the conditional parameters are met.
● Encryption and blockchain technology: Encryption provides secure
authentication and transfer of messages between parties relating to smart
contracts.
● Execution and processing: In blockchain iteration, whenever consensus is
reached between the parties regarding authentication and verification then the
code is executed and the outcomes are memorialized for compliance and
verification.
● Network updates: After smart contracts are executed, all the nodes on the
network update their ledger to reflect the new state. Once the record is posted
and verified on the blockchain network, it cannot be modified, it is in append
mode only.
lOMoAR cPSD| 22516561

Applications of Smart Contracts

1. Real Estate: Reduce money paid to the middleman and distribute between the
parties actually involved. For example, a smart contract to transfer ownership of
an apartment once a certain amount of resources have been transferred to the
seller’s account(or wallet).
2. Vehicle ownership: A smart contract can be deployed in a blockchain that keeps
track of vehicle maintenance and ownership. The smart contract can, for
example, enforce vehicle maintenance service every six months; failure of which
will lead to suspension of driving license.
3. Music Industry: The music industry could record the ownership of music in a
blockchain. A smart contract can be embedded in the blockchain and royalties
can be credited to the owner’s account when the song is used for commercial
purposes. It can also work in resolving ownership disputes.
4. Government elections: Once the votes are logged in the blockchain, it would be
very hard to decrypt the voter address and modify the vote leading to more
confidence against the ill practices.
5. Management: The blockchain application in management can streamline and
automate many decisions that are taken late or deferred. Every decision is
transparent and available to any party who has the authority(an application on the
private blockchain). For example, a smart contract can be deployed to trigger the
supply of raw materials when 10 tonnes of plastic bags are produced.
6. Healthcare: Automating healthcare payment processes using smart contracts
can prevent fraud. Every treatment is registered on the ledger and in the end, the
smart contract can calculate the sum of all the transactions. The patient can’t be
discharged from the hospital until the bill has been paid and can be coded in the
smart contract.

Smart contracts have several advantages including:

1. Lower error rate. Instead of trusting humans, smart contracts allow the trust to be
shifted to mathematics, which should reduce errors stemming from malicious or
negligent human management.
2. Automatic implementation of new data and secure storage of historical data.
lOMoAR cPSD| 22516561

3. The transparency and auditability of smart contracts also increase the personal
responsibility of the humans that manage the smart contract because each
transaction with the contract is recorded along with the account that initiated the
transaction.
4. By using a smart contract, the parties commit themselves to the rules of the
underlying code. In theory, this should reduce the potential for dispute and arbitration
costs, as both parties agree to the outcome programmed into the smart contract.

Disadvantages include:

1. Legality of smart contracts is questionable. Since this structure is digital, it can


circumvent state licensing requirements. State courts do not have to recognize the
rights of investors.

2. Smart contracts are not very flexible. Once a smart contract has been executed on a
public blockchain, the contract is vulnerable to hackers. Fixing errors and changing
contract terms can be impossible.

Block in Blockchain

Blocks are data structures within the blockchain database, where transaction data in a
cryptocurrency blockchain are permanently recorded. A block records some or all of the
most recent transactions not yet validated by the network. Once the data are validated, the
block is closed. Then, a new block is created for new transactions to be entered into and
validated.

A block is thus a permanent store of records that, once written, cannot be altered or
removed.

● A block is a place in a blockchain where information is stored and encrypted.


● Blocks are identified by long numbers that include encrypted transaction information
from previous blocks and new transaction information.
● Blocks and the information within them must be verified by a network before new
blocks can be created.
● Blocks and blockchains are not used solely by cryptocurrencies. They also have
many other uses.

Transactions
A transaction is a transfer of value on the blockchain. In very simple terms, a transaction is
when one person gives a designated amount of cryptocurrency they own to another person.
lOMoAR cPSD| 22516561

To perform transactions on the blockchain, you need a wallet, a program linked with the
blockchain to which only you have access, that keeps track of the crypto you own and allows
you to transact with it. Each wallet is protected by a special cryptographic method that uses
a unique pair of distinct but connected keys: a private and a public key.

A public key, also known as the address, is a series of letters and numbers that a user must
share in order to receive funds. In contrast, a private key must be kept secret, much like your
bank card pin number, as it authorizes the spending of any funds received by the associated
public key. With their wallet, a user (whoever has the private key) can authorize or sign
transactions and thereby transfer value to a new owner. The transaction is then broadcast to
the network to be included in the blockchain.

Steps of the Blockchain Transaction Process

A blockchain transaction has to undergo several steps before it becomes a part of the
blockchain, a critical aspect of the technology being the way it authorizes and confirms
transactions. The pointers below highlight the steps involved in a blockchain transaction:

1. Entry of a new transaction

2. Transmission of the transaction to a global network of peer-to-peer computers

3. Peer network of computers confirms the validity of the transaction

4. Confirmed legitimate transactions are clustered into blocks

5. The blocks are chained together to create a long history of all transactions

6. Completion of the transaction

Distributed Consesus

A procedure to reach a common agreement in a distributed or decentralized multi-agent


platform. It is important for the message passing system.It ensures reliability and fault
tolerance in distributed systems. In the presence of faulty individuals, it is Ensure correct
operations.

Public Blockchain

A public blockchain is one where anyone is free to join and participate in the core activities of
the blockchain network. Anyone can read, write, and audit the ongoing activities on a public
blockchain network, which helps achieve the self-governed, decentralized nature often
touted when blockchain is discussed.

Some features of public blockchain are :

● High Security –
It is secure Due to Mining (51% rule).
lOMoAR cPSD| 22516561

● Open Environment –
The public blockchain is open for all.

● Anonymous Nature –
In public blockchain every one is anonymous. There is no need to use your real
name, or real identity, therefore everything would stay hidden, and no one can
track you based on that.

● No Regulations –
Public blockchain doesn’t have any regulations that the nodes have to follow. So,
there is no limit to how one can use this platform for their betterment

● Full Transparency –
Public blockchain allow you to see the ledger anytime you want. There is no
scope for any corruption or any discrepancies and everyone has to maintain the
ledger and participate in consensus.

● True Decentralization –
In this type of blockchain, there isn’t a centralized entity. Thus, the responsibility
of maintaining the network is solely on the nodes. They are updating the ledger,
and it promotes fairness with help from a consensus algorithm .

● Full User Empowerment –


Typically, in any network user has to follow a lot of rules and regulations. In many
cases, the rules might not even be a fair one. But not in public blockchain
networks. Here, all of the users are empowered as there is no central authority to
look over their every move.

● Immutable –
When something is written to the blockchain, it can not be changed.
lOMoAR cPSD| 22516561

● Distributed –
The database is not centralized like in a client-server approach, and all nodes in
the blockchain participate in the transaction validation.

Merits:

● Complete trustable and transparent


● No intermediaries
● Secured

Demerits:

● Scalability issues
● Lack of transaction speed
● Consumes a lot of energy

Private Blockchain

Participants can join a private blockchain network only through an invitation where their
identity or other required information is authentic and verified. The validation is done by the
network operator(s) or by a clearly defined set protocol implemented by the network through
smart contracts or other automated approval methods.

Private blockchains control who is allowed to participate in the network. If the network is
capable of mining, its private nature could control which users can execute the consensus
protocol that decides the mining rights and rewards. Additionally, only select users might
maintain the shared ledger. The owner or operator has the right to override, edit, or delete
the necessary entries on the blockchain as required or as they see fit.

● Full Privacy –
It focus on privacy concerns.

● Private Blockchain are more centralized.

● High Efficiency and Faster Transactions –


When you distribute the nodes locally, but also have much less nodes to
participate in the ledger, the performance is faster.
lOMoAR cPSD| 22516561

● Better Scalability –
Being able to add nodes and services on demand can provide a great advantage
to the enterprise.
Merits:

● Higher transaction per second (TPS)


● Highly scalable

Demerits:

● Less secured compared to Public blockchains


● Less decentralized
● Achieving trust is difficult

Cryptocurrency

A cryptocurrency is a digital or virtual currency secured by cryptography, which makes it


nearly impossible to counterfeit or double-spend. Many cryptocurrencies are decentralized
networks based on blockchain technology—a distributed ledger enforced by a disparate
network of computers. A defining feature of cryptocurrencies is that they are generally not
issued by any central authority, rendering them theoretically immune to government
interference or manipulation. Cryptocurrencies are not regulated or controlled by any central
authority hence cryptocurrency works outside the banking system using different types of
coins.

1. Mining: Cryptocurrencies are generated through the process called Mining. In this
process, the miners are required to solve a mathematical puzzle over a specially equipped
computer system to be rewarded with bitcoins in exchange.
2. Buying, selling, and storing: Users can buy cryptocurrencies from central
exchanges, brokers, or individual currency owners and sell crypto to them. Cryptocurrencies
can be stored in wallets.
3. Investing: Cryptocurrencies can be transferred from one digital wallet to another.
Cryptocurrencies can be used for the following purposes:
● Buying goods and services.
● Trade-in them.
● Exchange them for cash.

How To Store Cryptocurrency

Once the cryptocurrency is purchased, it needs to be stored safely to protect it from hackers.
The usual place to store cryptocurrency is crypto wallets which can be physical devices or
online software. Not all exchanges or brokers provide crypto wallet services. The
cryptocurrencies can be stored in these four places:
1. Custodial Wallet: In this approach, a third party such as a crypto exchange
stores the cryptocurrency either through cold storage or hot storage, or a
lOMoAR cPSD| 22516561

combination of the two. This is the most simplest and convenient method for the
users as it requires less work on the user part.
2. Cold Wallet: These are also known as Hardware wallets. It is an offline wallet in
which hardware connects to the computer and stores the cryptocurrency. The
device connects to the internet at the time of sending and receiving
cryptocurrency but other than that the cryptos are safely stored offline.
3. Hot Wallet: These are the applications that store cryptocurrencies online. These
are available as desktop or mobile apps.
4. Paper Wallet: This is also known as a physical wallet. It is a printout of the public
and private keys available as a string of characters or scannable QR codes. To
send crypto scan the public and private keys and crypto will be received using the
public keys.

What Can You Do With Cryptocurrency

Here are some of the examples:


● Shopping: Some luxury retailers like Rolex and Patek Philippe accept
cryptocurrency as a form of payment.
● Insurance: Some insurance companies like Premier Shield insurance accept
Bitcoin for premium payments.
● Gift: Cryptocurrency can be a great gift for persons who want to learn and invest
in new technology.
● Travel: As crypto is not tied to a specific country, thus traveling with crypto can
save a lot on money exchange fees.

Advantages of Cryptocurrencies

The following are some of the advantages of cryptocurrencies:


1. Private and Secure: Blockchain technology ensures user anonymity and at the
same time the use of cryptography in blockchain makes the network secure for
working with cryptocurrencies.
2. Decentralized, Immutable, and Transparent: The entire blockchain network
works on the principle of shared ownership where there is no single regulating
authority and the data is available to all the permissioned members on the
network and is tamper-proof.
lOMoAR cPSD| 22516561

3. Inflation Hedge: Cryptocurrencies are a good means of investing in times of


inflation as they are limited in supply and there is a cap on mining any type of
cryptocurrency.
4. Faster Settlement: Payments for most cryptocurrencies settle in seconds or
minutes. Wire transfers at banks can cost more and often take three to five
business days to settle.

5. Easy Transactions: Crypto transactions can be done more easily, in a private


manner in comparison to bank transactions. using a simple smartphone and a
cryptocurrency wallet, anyone can send or receive a variety of cryptocurrencies.

Disadvantages of Cryptocurrencies

The following are some of the drawbacks of cryptocurrencies:


1. Cybersecurity issues: Cryptocurrencies will be subject to cyber security
breaches and may fall into the hands of hackers. Mitigating this will require
continuous maintenance of security infrastructure.
2. Price Volatility: Cryptocurrencies are highly volatile in terms of price as they
have no underlying value and there is a supply-demand-like equation that is used
to determine the price of cryptocurrencies.
3. Scalability: Scalability is one of the major concerns with cryptocurrencies. Digital
coins and tokens adoption is increasing rapidly but owing to the sluggish nature
of the blockchain makes cryptocurrencies prone to transaction delays.
Cryptocurrencies cannot compete with the number of transactions that payment
giants like VISA, and Mastercard processes in a day.
4. Less awareness: Cryptocurrency is still a new concept for the people and the
long-term sustainability of cryptocurrencies remains to be seen.

Features of cryptocurrencies:

Decentralization: Cryptocurrencies are decentralized, meaning they operate on a peer-


topeer network and are not controlled by a central authority or government.
Security: Cryptocurrencies use cryptographic techniques to ensure the security and integrity
of transactions and to protect against fraud and hacking.
Transparency: Most cryptocurrencies operate on a public ledger called a blockchain, which
allows anyone to see all transactions that have occurred on the network.
Anonymity: While most cryptocurrencies are not completely anonymous, they do offer a
high degree of privacy and can allow users to transact without revealing their identity.
lOMoAR cPSD| 22516561

Limited Supply: Cryptocurrencies are designed with a limited supply to maintain their value
and prevent inflation.
Global Accessibility: Cryptocurrencies can be accessed and used from anywhere in the
world, as long as there is an internet connection.
Low Transaction Fees: Compared to traditional banking and financial institutions,
cryptocurrencies generally have lower transaction fees, making them an attractive option for
international transactions.
Programmability: Some cryptocurrencies allow for programmable transactions, meaning
that they can be programmed to execute automatically based on certain conditions.

However, there are also some potential drawbacks to cryptocurrencies, including:

Volatility: Cryptocurrencies can be highly volatile, with prices fluctuating rapidly and
unpredictably.
Lack of Regulation: Cryptocurrencies are not yet fully regulated by governments, which can
lead to uncertainty and potential risk for users.
Limited Acceptance: While the number of merchants accepting cryptocurrencies is
growing, they are still not widely accepted as a form of payment.
Hacking and Fraud: Cryptocurrencies are vulnerable to hacking and fraud, and there have
been numerous high-profile incidents of theft and scams in the cryptocurrency world.
Overall, cryptocurrencies offer a range of features that make them a unique and innovative
form of digital currency. However, they also come with potential risks and challenges that
users must be aware of before investing in or using them.

Permissioned Blockchain

A permissioned blockchain is a distributed ledger that is not publicly accessible. It can only
be accessed by users with permissions. The users can only perform specific actions granted
to them by the ledger administrators and are required to identify themselves through
certificates or other digital means.
● Permissioned blockchains provide an additional level of security over typical
blockchain systems like Bitcoin, as they require an access control layer.
● These blockchains are favored by entities who require security, identity, and role
definition within the blockchain.
● Permissioned blockchains are becoming more common as businesses realize their
benefits.

Overview of security aspects of Blockchain

Security is managed in order to protect some vital information so that hackers or other
unauthorized users do not get access to it. With the increasing dependency on Blockchain
networks, Blockchain security has become a prime concern. Blockchain security is a risk
management technique that aims to secure transactions and hence the whole blockchain
lOMoAR cPSD| 22516561

network. It is usually implemented with the help of cybersecurity, authorized services, and
ethical users.
Blockchain is an immutable ledger with no involvement of third-party organization. It also
uses cryptography to hide some details. So hackers find it almost impossible to tamper with
the blocks. But there are some loopholes that allow the malicious users to perform malicious
activities as blockchain networks are not immune to cyberattacks and fraud. Blockchain
attacks are cyber attacks that can be done by outside malicious users as well as the users
involved in the network.

Hackers and fraudsters threaten blockchains in four primary ways: phishing, routing, Sybil
and 51% attacks.
Phishing attacks : Phishing is a scamming attempt to attain a user's credentials. Fraudsters
send wallet key owners emails designed to look as though they're coming from a legitimate
source. The emails ask users for their credentials using fake hyperlinks. Having access to a
user's credentials and other sensitive information can result in losses for the user and the
blockchain network.
Routing attacks : Blockchains rely on real-time, large data transfers. Hackers can intercept
data as it's transferring to internet service providers. In a routing attack, blockchain
participants typically can't see the threat, so everything looks normal. However, behind the
scenes, fraudsters have extracted confidential data or currencies.
Sybil attacks : In a Sybil attack, hackers create and use many false network identities to
flood the network and crash the system. Sybil refers to a famous book character diagnosed
with a multiple identity disorder.
51% attacks : Mining requires a vast amount of computing power, especially for large-scale
public blockchains. But if a miner, or a group of miners, could rally enough resources, they
could attain more than 50% of a blockchain network's mining power. Having more than 50%
of the power means having control over the ledger and the ability to manipulate it. Note:
Private blockchains are not vulnerable to 51% attacks.

Basic crypto primitives

In Blockchains, there are no third parties or Governments involved. It is fully decentralized


and various transactions happen in these networks. So security is of utmost importance in
Blockchain. Cryptographic primitives are used for building cryptographic protocols for a
strong secured network. They are the low-level algorithms that are used to build algorithms.
They are the basic building blocks of the cryptosystem. The programmers develop new
cryptographic algorithms with the help of cryptographic primitives.

Cryptographic primitives are the basic building blocks for the development of security
protocols. Hence they are an integral part of the blockchain because of the following
reasons:
● Security: To secure a transaction in the network or confidential information, strong
cryptography is required. So cryptographic primitives are used to develop high-
level algorithms.
lOMoAR cPSD| 22516561

● Encryption and Decryption: The Cryptographic primitives are used to develop


encryption and decryption algorithms. Encryption algorithms encrypt the data and
decryption algorithms decrypt the data as and when required.
● Validation: The validation of data is done with the help of digital signatures. These
digital signatures are public key primitives which the receivers use to validate the
message.
● Specific: Cryptographic primitives are very specific in nature. It means one
cryptographic primitive can perform only one function. For example, The encryption
algorithms developed using crypto primitives are only responsible for encrypting
the text. It is not responsible for hashing or decryption.

Below are some of the common cryptographic primitives:


● One way Hash Functions: It is a mathematical function used to encrypt variable
length data to fixed binary data. It is a one-way function. It means that once the
input has been converted to a binary sequence, there is no scope for reverting
back. It is also known as fingerprint or compression function. It is to be noted that
a slight change in input can also change the hash function. This is known as the
avalanche effect. A popular hash function is SHA-256.
● Symmetric Key cryptography: This is also known as Symmetric Encryption.
Suppose a message is encrypted using a key. The message is now converted to
ciphertext which is readable but has no meaning. The same key is used to decrypt
the message. A key is a variable used to encrypt or decrypt a text. It is basically
used to ‘lock’ or ‘unlock’ data. In this cryptography, the key is shared between two
users. The sharing of keys is a problem. However, this technique is faster than
public-key cryptography. Examples are Advanced Encryption Standard (AES) and
the Data Encryption Standard (DES)
● Asymmetric key cryptography: It is also known as public key cryptography. Since
there is a problem with sharing keys in symmetric encryption, this method is used.
Here one key is public and another key is private. The public key is used to encrypt
or ‘lock’ data. The private key is only accessible to the receiver. The receiver uses
a private key to ‘unlock’ the data. For example, Suppose Bob encrypts the data
using the public key. The public key is available to everyone but this key works in
one way. The receiver has the private key which works in one way and is used to
decrypt the message. Examples of public key algorithms are DSA and RSA
lOMoAR cPSD| 22516561

● Randomized Algorithms: These algorithms produce random ciphertexts for


encryption. The ciphertext is an encrypted text. It is very secure as random texts
are produced for encryption. It is impossible for hackers to find various
combinations of texts. It employs randomness as a logical part. It uses random
inputs and gives correct output. For Example, Monte Carlo
● Mix Network: It is a routing algorithm that uses public key cryptography to
encrypt data. The proxy servers take messages, encrypt them and shuffle them so
that communication cannot be traced. It basically breaks the flow of messages
between the sender and the target.
● Retrieval of Private information: It is a protocol that allows the user to retrieve
information from the database. Other users don’t get to know about it. The user can
anonymously retrieve data without taking permission.
● Initialization Vector: It is a number that is used along with a key for encryption. It
is used to prevent the duplicate generation of ciphertext.

Cryptographic hash function

A cryptographic hash function is a mathematical function used in cryptography. Typical hash


functions take inputs of variable lengths to return outputs of a fixed length.

A cryptographic hash function combines the message-passing capabilities of hash functions


with security properties.

● Hash functions are mathematical functions that transform or "map" a given set of
data into a bit string of fixed size, also known as the "hash value."
● Hash functions are used in cryptography and have variable levels of complexity and
difficulty.
● Hash functions are used for cryptocurrency, password security, and message
security.
Hash functions are commonly used data structures in computing systems for tasks, such as
checking the integrity of messages and authenticating information. While they are
considered cryptographically "weak" because they can be solved in polynomial time, they
are not easily decipherable. Cryptographic hash functions add security features to typical
hash functions, making it more difficult to detect the contents of a message or information
about recipients and senders. In particular, cryptographic hash functions exhibit these three
properties:

● They are “collision-free.” This means that no two input hashes should map to the
same output hash.
● They can be hidden. It should be difficult to guess the input value for a hash function
from its output.
lOMoAR cPSD| 22516561

● They should be puzzle-friendly. It should be difficult to select an input that provides a


pre-defined output. Thus, the input should be selected from a distribution that's as
wide as possible.

Properties of hash function

A hash function is a mathematical function that takes an input string of any length and converts
it to a fixed-length output string. The fixed-length output is known as the hash value. To be
cryptographically secure and useful, a hash function should have the following properties:
● Collision resistant: Give two messages m1 and m2, it is difficult to find a hash
value such that hash(k, m1) = hash(k, m2) where k is the key value.
● Preimage resistance: Given a hash value h, it is difficult to find a message m
such that h = hash(k, m).
● Second preimage resistance: Given a message m1, it is difficult to find another
message m2 such that hash(k, m1) = hash(k, m2).
● Large output space: The only way to find a hash collision is via a brute force
search, which requires checking as many inputs as the hash function has
possible outputs.
● Deterministic: A hash function must be deterministic, which means that for any
given input a hash function must always give the same result.
● Avalanche Effect: This means for a small change in the input, the output will
change significantly.
● Puzzle Friendliness: This means even if one gets to know the first 200 bytes,
one cannot guess or determine the next 56 bytes.
● Fixed-length Mapping: For any input of fixed length, the hash function will
always generate the output of the same length.

What is Hash Pointer?

A regular pointer stores the memory address of data. With this pointer, the data can be
accessed easily. On the other hand, a hash pointer is a pointer to where data is stored and
with the pointer, the cryptographic hash of the data is also stored. So a hash pointer points
to the data and also allows us to verify the data. A hash pointer can be used to build all kinds
of data structures such as blockchain and Merkle tree.
lOMoAR cPSD| 22516561

Merkel tree

A hash tree, also known as a Merkle tree, is a tree in which each leaf node is labeled with

the cryptographic hash of a data block, and each non-leaf node is labeled with the

cryptographic hash of its child nodes' labels. The majority of hash tree implementations are

binary (each node has two child nodes), but they can also have many more child nodes.

Merkle Tree Structure

Structure of Merkle tree

1. A blockchain can potentially have thousands of blocks with thousands of transactions


in each block. Therefore, memory space and computing power are two main challenges.
2. It would be optimal to use as little data as possible for verifying transactions, which
can reduce CPU processing and provide better security, and this is exactly what Merkle
trees offer.
3. In a Merkle tree, transactions are grouped into pairs. The hash is computed for each
pair and this is stored in the parent node. Now the parent nodes are grouped into pairs and
their hash is stored one level up in the tree. This continues till the root of the tree. The
different types of nodes in a Merkle tree are:
lOMoAR cPSD| 22516561

● Root node: The root of the Merkle tree is known as the Merkle root and this
Merkle root is stored in the header of the block.
● Leaf node: The leaf nodes contain the hash values of transaction data. Each
transaction in the block has its data hashed and then this hash value (also known
as transaction ID) is stored in leaf nodes.
● Non-leaf node: The non-leaf nodes contain the hash value of their respective
children. These are also called intermediate nodes because they contain the
intermediate hash values and the hash process continues till the root of the tree.

4. Bitcoin uses the SHA-256 hash function to hash transaction data continuously till the
Merkle root is obtained.
5. Further, a Merkle tree is binary in nature. This means that the number of leaf
nodes needs to be even for the Merkle tree to be constructed properly. In case there is an
odd number of leaf nodes, the tree duplicates the last hash and makes the number of leaf
nodes even.

How Do Merkle Trees Work?

● A Merkle tree is constructed from the leaf nodes level all the way up to the Merkle
root level by grouping nodes in pairs and calculating the hash of each pair of
nodes in that particular level. This hash value is propagated to the next level. This
is a bottom-to-up type of construction where the hash values are flowing from
down to up direction.
● Hence, by comparing the Merkle tree structure to a regular binary tree data
structure, one can observe that Merkle trees are actually inverted down.

Binary tree direction vs Merkle tree direction


lOMoAR cPSD| 22516561

Example: Consider a block having 4 transactions- T1, T2, T3, T4. These four
transactions have to be stored in the Merkle tree and this is done by the following
stepsStep 1: The hash of each transaction is computed.
H1 = Hash(T1).

Step 2: The hashes computed are stored in leaf nodes of the Merkle tree.
Step 3: Now non-leaf nodes will be formed. In order to form these nodes, leaf nodes will be
paired together from left to right, and the hash of these pairs will be calculated. Firstly hash
of H1 and H2 will be computed to form H12. Similarly, H34 is computed. Values H12 and
H34 are parent nodes of H1, H2, and H3, H4 respectively. These are non-leaf nodes.
H12 = Hash(H1 + H2)

H34 = Hash(H3 + H4)

Step 4: Finally H1234 is computed by pairing H12 and H34. H1234 is the only hash
remaining. This means we have reached the root node and therefore H1234 is the Merkle
root.
H1234 = Hash(H12 + H34)

Digital Signatures

A digital signature is used for the same purpose as handwritten signature, but it is far more
secure. In blockchain when users submit transactions (or data), they must prove to every
node in the system that they are authorized to carryout that transaction. Every node in the
network then verifies the submitted transaction and also confirms that the transaction is in its
lOMoAR cPSD| 22516561

original form. This is carried out using digital signatures. Digital signature, therefore, serves
following purposes:

● The message has been created by a known sender. This is also known as
authentication.

● The sender cannot deny having sent the message. This is known as non-repudiation.

● The messages has not been altered during transmission. This is integrity.

Public Key Cryptography & Digital Signatures

Digital signatures in blockchain use public key cryptography which is also known as
asymmetric cryptography. The scheme uses two keys known as public key and private key
to encrypt and decrypt the data. Private key is known only to the user, whereas public key
can be shared with everyone. Private key is used to encrypt a message; whereas the public
key is used for decryption.

The other type of cryptography is symmetric cryptography (which is not used in blockchain).
It uses a single key. Using a common single key creates a problem of securely transferring
the key between the sender and the receiver. It is also called secret key cryptography. It
should be noted that both of the above encryption types are two-way functions. On the other
hand hash function is a one-way function only. Hash function does not have any key and it is
not possible to decrypt the data i.e. reverse the hashing.

Public key cryptography

Most of the time blockchain uses public-key cryptography, also known as asymmetric-key
cryptography. Public key cryptography uses both public key and private key in order to encrypt
and decrypt data. The public key can be distributed commonly but the private key can not be
shared with anyone. It is commonly used for two users or two servers in a secure way.
lOMoAR cPSD| 22516561

Public Key: Public keys are designed to be public. They can be freely given to everyone or
posted on the internet. By using the public key, one can encrypt the plain text message into
the cipher text. It is also used to verify the sender authentication. In simple words, one can
say that a public key is used for closing the lock.
Private Key: The private key is totally opposite of the public key. The private key is always
kept secret and never shared. Using this key we decrypt cipher text messages into plain text.
In simple words, one can say that the public is used for opening the lock.

Benefits of Public-key Cryptography

● Authentication: It ensures to the receiver that the data received has been sent
by the only verified sender.
● Data integrity: It ensures that the information and program are changed only in a
specific and authorized manner.
● Data confidentiality: It ensures that private message is not made available to an
unauthorized user. It is referred to as privacy or secrecy.
● Non-repudiation: It is an assurance that the original creator of the data cannot
deny the transmission of the said data to a third party.

Limitation of Public-Key Cryptography

● One can encrypt and decrypt the fixed size of messages or data. If there is an
attempt to encrypt or decrypt a large size of the message then the algorithm
demands high computational power.
● The main disadvantage of this algorithm is that if the receiver losses its private
key then data/message will be lost forever.
● If someone has access private key then all data will be in the wrong hand.
● There are many secret-key which is faster than public-key cryptography.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy