KEMBAR78
Blockchain Important Notes | PDF | Key (Cryptography) | Cryptography
0% found this document useful (0 votes)
55 views32 pages

Blockchain Important Notes

Blockchain is a decentralized digital ledger that securely stores records across a network, ensuring transparency and immutability. It comprises linked blocks containing data, hashes, and previous block references, and operates through consensus mechanisms to validate transactions. There are various types of blockchains, including public, private, hybrid, and consortium, each with distinct features and use cases.

Uploaded by

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

Blockchain Important Notes

Blockchain is a decentralized digital ledger that securely stores records across a network, ensuring transparency and immutability. It comprises linked blocks containing data, hashes, and previous block references, and operates through consensus mechanisms to validate transactions. There are various types of blockchains, including public, private, hybrid, and consortium, each with distinct features and use cases.

Uploaded by

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

BLOCKCHAIN DEFINITION:

Blockchain is a decentralized digital ledger that securely stores records across a


network of computers in a way that is transparent, immutable, and resistant to
tampering. Each "block" contains data, and blocks are linked in a chronological
"chain."
How does it work?
Each block contains some data, the hash of the block, and the hash of the
previous block. The data that is stored inside a block depends on the type
of blockchain. The Bitcoin blockchain for example stores the details of
the transaction, such as the sender, receiver, and the number of coins.

A block also has a hash that can be compared to a fingerprint; it


identifies a block and all of its components and is always unique just like
a fingerprint. Once a block has been created, its hash is calculated. Hash
codes are created by a math function that turns digital information into a
string of numbers and letters. If that information is edited in any way, the
hash code changes as well.

The third element inside a block is the hash of the previous block and this
effectively creates a chain of blocks.

Why is blockchain important?


Business runs on information. The faster information is received and the
more accurate it is, the better. Blockchain is ideal for delivering that
information because it provides immediate, shared, and observable
information that is stored on an immutable ledger that only permissioned
network members can access. 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, and new efficiencies and
opportunities.

Key elements of a blockchain

1.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.

2. 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.

3. Smart contracts

To speed transactions, a set of rules that are called a smart contract is


stored on the blockchain and run automatically. A smart contract defines
conditions for corporate bond transfers, include terms for travel insurance
to be paid and much more.

Component of Blockchain / Structure of Blockchain


A blockchain’s structure is made up of a number of linked blocks that are
arranged in a chronologically sequential fashion. A collection of data, a
reference to the block before it, and certain control information are all
contained in each block.

The essential blockchain structural components are broken


down as follows:

1. Blocks:

A chain of distinct blocks makes up a blockchain. Each block


consists of a grouping of data items, transactions, or other
pertinent data. The chain is created by joining these pieces in
order.

2. Transactions or Data:

A blockchain’s primary function is to store transactions or data.


Depending on the use case for the blockchain, each block
contains a set of these records. These transactions serve as a
representation of the transfer of bitcoin between addresses on
a blockchain for cryptocurrencies like Bitcoin.
3. Hash Function:

Cryptographic methods called hash functions are used to


create a fixed-size output from variable-sized input data. A
hash of each block’s contents, including the Merkle root, can
be found in the block header. The integrity of the data in the
block is ensured by this hash, which also serves as a unique
identifier for the block.

4. Chain of Blocks:

The blocks are linked together in a chain that is continuous and


sequential. The blockchain’s security and immutability depend
on this chain topology. The blockchain is impervious to
manipulation since any change to the data in a block would
require modifying all succeeding blocks as well.

Fig.1.2. Chain Of Blocks

5. Consensus Mechanism:

To verify and concur on the contents of each block, the


blockchain uses a consensus method. Proof of Work (PoW),
Proof of Stake (PoS), and other common mechanisms are
mentioned. Consensus guarantees that the blockchain’s
integrity by ensuring that only legitimate transactions are
added to it.
6. Decentralization:

The decentralized nature of blockchain is one of its distinguishing

characteristics. Blockchain relies on a network of nodes to validate

transactions and maintain the blockchain rather than a single central

authority. Decentralization improves safety and adaptability.

7. Private and Public Keys:

In blockchain networks, authentication and authorisation are done via

public and private key pairs. While private keys are kept private and are

used to sign transactions, ensuring ownership and security, public keys

are linked to addresses.

8. Network Protocol:

The network protocols that control how nodes connect, propagate

transactions, establish consensus, and synchronize the blockchain are

what make blockchains work. The peer-to-peer protocol for Bitcoin and

the Ethereum Wire Protocol are two well-known blockchain network

technologies.

Block in a Blockchain

A vital element that is essential to preserving the reliability and security

of the blockchain network is the structure of a block in a blockchain. Each

block includes a number of transactions and other bits of data that

contribute to the ledger’s transparency and immutability.


Fig.2.1. Elements of a Block in a Blockchain

Here are the essential components of a normal blockchain


block, broken down:

1. Block Header:

 Block Number: Each block has a unique identification


number, or “block number,” which indicates where that
block falls in the timeline of the blockchain. It’s common to
refer to the first block as “Block 0” or the “Genesis Block.”

 Timestamp: The block’s timestamp contains the precise


date and time of block creation. It assists in determining the
blockchain’s block order.
2. Previous Block Hash:

Each block apart from the Genesis Block makes reference to


the hash of the block before it. This links the blocks together to
form a continuous chain, hence the name “blockchain.” The
integrity of earlier data is ensured by the hash of the prior
block, which also acts as cryptographic evidence of the block’s
place in the chain.

3. Tree of Merkle:

 A cryptographic structure known as the Merkle tree root


serves as a summary of all transactions contained in a
block. The Merkle root is produced by a Merkle tree, which
divides transactions into pairs, hashes each pair, and
repeats this process until it produces a single root hash. The
block header contains the root hash.

 The Merkle tree structure makes it possible to quickly


determine whether a certain transaction is part of the block
without disclosing any of the transaction’s specifics.

4. Nonce (Number Used Once):

The nonce is a random value or counter used in the process of


mining, particularly in Proof of Work (PoW) consensus
algorithms. Miners must find a nonce that, when combined
with other block data, produces a hash that meets certain
criteria usually starts with a certain number of leading zeros.
This process is computationally intensive and ensures that
blocks are added to the blockchain at a controlled rate.
5. Transactions:

 A blockchain’s primary function is to keep track of


transactions. A block often consists of a collection of
legitimate transactions, some of which may entail the
exchange of digital currency, the execution of smart
contracts, or the transmission of important information.

 Each transaction contains the sender, receiver, amount, and


any additional data necessary for the operation of the
particular blockchain.

6. Block Dimensions and Restrictions:

 The largest amount of data that may be stored in a block,


including all of its transactions and other information, is
referred to as block size. Block size restrictions vary
amongst blockchain networks.

 The block size restriction is crucial for preserving network


efficiency and scalability. It stops blocks from growing too
big and clogging the network.

7. Target Difficulty (PoW Only):

The block header of blockchains powered by PoW, such as


Bitcoin, contains a field called “difficulty target.” The
complexity of this target determines how tough it is for miners
to locate a reliable nonce. To maintain a constant block
manufacturing rate, it makes adjustments from time to time.
8. Additional Metadata:

A block may contain additional metadata or information, such


as a version number, information on the consensus mechanism,
or a reference to the reward provided to the miner who
successfully mined the block, depending on the blockchain’s
design.

Types of Blockchain

There are four main types of blockchain networks: public blockchains,


private blockchains, consortium blockchains and hybrid blockchains. Let's
explore each of these platforms and its benefits, drawbacks and ideal uses.

1. Public blockchain
How it works. Public blockchain is where cryptocurrency like Bitcoin originated
and helped to popularize distributed ledger technology (DLT). It removes the
problems that come with centralization, including less security and transparency.
DLT doesn't store information in any one place, instead distributing it across a
peer-to-peer network. Its decentralized nature requires some method for verifying
the authenticity of data. That method is a consensus algorithm whereby
participants in the blockchain reach agreement on the current state of the ledger.
Proof of work (PoW) and proof of stake (PoS) are two common consensus
methods.

Public blockchain is non-restrictive and permissionless, and anyone with internet


access can sign on to a blockchain platform to become an authorized node. This
user can access current and past records and conduct mining activities, the complex
computations used to verify transactions and add them to the ledger. No valid
record or transaction can be changed on the network, and anyone can verify the
transactions, find bugs or propose changes because the source code is usually open
source.

Advantages. One of the advantages of public blockchains is that they are


completely independent of organizations, so if the organization that started it
ceases to exist the public blockchain will still be able to run, as long as there are
computers still connected to it. "Some blockchains incentivize users to commit
computer power to securing the network by providing a reward," noted James
Godefroy, principal, deputy enforcement head at Rouse, an intellectual property
services provider.

Another advantage of public blockchains is the network's transparency. As long as


users follow security protocols and methods fastidiously, public blockchains are
mostly secure.

Disadvantages. The network can be slow, and companies can't restrict access or
use. If hackers gain 51% or more of the computing power of a public blockchain
network, they can unilaterally alter it, Godefroy said.
Public blockchains also don't scale well. The network slows down as more nodes
join the network.

Use cases. The most common use case for public blockchains is mining and
exchanging cryptocurrencies like Bitcoin. However, it can also be used to create a
fixed record with an auditable chain of custody, such as electronic notarization of
affidavits and public records of property ownership.

This type of blockchain is ideal for organizations that are built on transparency and
trust, such as social support groups or non-governmental organizations. Because of
the public nature of the network, private businesses will likely want to steer clear.

2. Private blockchain
How it works. A private blockchain works in a restrictive environment like a
closed network or is under the control of a single entity. While it operates like a
public blockchain network in the sense that it uses peer-to-peer connections and
decentralization, this type of blockchain is on a much smaller scale. Instead of just
anyone being able to join and provide computing power, private blockchains
typically are operated on a small network inside a company or organization.
They're also known as permissioned blockchains or enterprise blockchains.

Advantages. The controlling organization sets permission levels, security,


authorizations and accessibility. For example, an organization setting up a private
blockchain network can determine which nodes can view, add or change data. It
can also prevent third parties from accessing certain information.

"You can think of private blockchains as being the intranet, while the public
blockchains are more like the internet," Godefroy said.

Because they're limited in size, private blockchains can be very fast and can
process transactions much more quickly than public blockchains.
Disadvantages. The disadvantages of private blockchains include the controversial
claim that they aren't true blockchains, since the core philosophy of blockchain is
decentralization. It's also more difficult to fully achieve trust in the information,
since centralized nodes determine what is valid. The small number of nodes can
also mean less security. If a few nodes go rogue, the consensus method can be
compromised.

Additionally, the source code from private blockchains is often proprietary and
closed. Users can't independently audit or confirm it, which can lead to less
security. There is no anonymity on a private blockchain, either.

Use cases. The speed of private blockchains makes them ideal for cases where the
blockchain needs to be cryptographically secure but the controlling entity doesn't
want the information to be accessed by the public.

"For example, companies may choose to take advantage of blockchain technology


while not giving up their competitive advantage to third parties. They can use
private blockchains for trade secret management, for auditing," Godefroy said.

Other use cases for private blockchain include supply chain management, asset
ownership and internal voting.

3. Hybrid blockchain
How it works. Hybrid blockchain combines elements of both private and public
blockchain. It lets organizations set up a private, permission-based system
alongside a public permissionless system, allowing them to control who can access
specific data stored in the blockchain, and what data will be opened up publicly.

Typically, transactions and records in a hybrid blockchain are not made public but
can be verified when needed, such as by allowing access through a smart contract.
Confidential information is kept inside the network but is still verifiable. Even
though a private entity may own the hybrid blockchain, it cannot alter transactions.
When a user joins a hybrid blockchain, they have full access to the network. The
user's identity is protected from other users, unless they engage in a transaction.
Then, their identity is revealed to the other party.

Advantages. One of the big advantages of hybrid blockchain is that, because it


works within a closed ecosystem, outside hackers can't mount a 51% attack on the
network. It also protects privacy but allows for communication with third parties.
Transactions are cheap and fast, and it offers better scalability than a public
blockchain network.

Disadvantages. This type of blockchain isn't completely transparent because


information can be shielded. Upgrading can also be a challenge, and there is no
incentive for users to participate or contribute to the network.

Use cases. Hybrid blockchain has several strong use cases, including real estate.
Companies can use a hybrid blockchain to run systems privately but show certain
information, such as listings, to the public. Retail can also streamline its processes
with hybrid blockchain, and highly regulated markets like financial services can
also see benefits from using it.

Medical records can be stored in a hybrid blockchain, according to Godefroy. The


record can't be viewed by random third parties, but users can access their
information through a smart contract. Governments could also use it to store
citizen data privately but share the information securely between institutions.

4. Consortium blockchain
How it works. The fourth type of blockchain, consortium blockchain, also known
as a federated blockchain, is similar to a hybrid blockchain in that it has private and
public blockchain features. But it's different in that multiple organizational
members collaborate on a decentralized network. Essentially, a consortium
blockchain is a private blockchain with limited access to a particular group,
eliminating the risks that come with just one entity controlling the network on a
private blockchain.
In a consortium blockchain, the consensus procedures are controlled by preset
nodes. It has a validator node that initiates, receives and validates transactions.
Member nodes can receive or initiate transactions.

Advantages. A consortium blockchain tends to be more secure, scalable and


efficient than a public blockchain network. Like private and hybrid blockchain, it
also offers access controls.

Disadvantages. Consortium blockchain is less transparent than public blockchain.


It can still be compromised if a member node is breached, and the blockchain's
own regulations can impair the network's functionality.

Use cases. Banking and payments are two uses for this type of blockchain.
Different banks can band together and form a consortium, deciding which nodes
will validate the transactions. Research organizations can create a similar model.
Consortium blockchain is ideal for supply chains, particularly food and medicine
applications.

The four main types of blockchain vary by how open or closed they are, which affects their
speed, privacy and security.

Permissionless Blockchain
A permissionless blockchain is a type of blockchain network that allows
anyone to participate in the network without requiring special permissions
or approvals.
1. Open Access: Anyone can join the network, validate transactions, and
contribute to the blockchain. This openness fosters a decentralized
environment where no single entity controls the network.
2. Decentralization: Permissionless blockchains operate on a
decentralized network of nodes, which helps to distribute power and
reduce the risk of censorship or manipulation by any single party.
3. Consensus Mechanisms: These blockchains typically use consensus
algorithms such as network participants’ Proof of Stake (PoS) to
validate transactions and secure the network. Participants compete to
solve complex mathematical problems (in the case of PoW) or stake
their own tokens (in PoS) to earn the right to validate new blocks.
4. Transparency: All transactions on a permissionless blockchain are
recorded on a public ledger, allowing anyone to view transaction
history and verify data integrity.
5. Anonymity: While transactions are transparent, participants often
remain pseudonymous. Users are identified by their public keys rather
than personal information, providing a layer of privacy.

Permissioned Blockchain

A permissioned blockchain is a type of blockchain network that restricts


access and participation to a select group of authorized users. Unlike
permissionless blockchains, where anyone can join and validate
transactions, permissioned blockchains require participants to obtain
permission before they can access the network or perform certain actions.
1. Access Control: Only authorized participants can join the network,
ensuring that all nodes are known and vetted. This allows for greater
control over who can validate transactions and access data.
2. Centralized Governance: Typically governed by a consortium of
organizations or a central authority, which makes decisions about
network rules and policies.
3. Enhanced Privacy: Transactions and data are often more private, as
sensitive information can be kept off-chain or shared only among
authorized parties.
4. Customizable Protocols: Organizations can customize consensus
mechanisms and other protocols to meet their specific needs and
requirements.

Types of Consensus protocol / Types of Consensus Algorithm


• Proof of Work(PoW) and Proof of stake(PoS): are the most
commonly used consensus mechanism in Public blockchain
for public distributed ledger.
• Proof of Authority(PoA) and Proof of Elapsed Time( PoET): are
the most commonly used consensus mechanism in Private
blockchain.
For complete details of Consensus Prorotcol refere PPT
( lecture-5)

Cryptography in Blockchain

Cryptography is a method of securing data from unauthorized access. In


the blockchain, cryptography is used to secure transactions taking place
between two nodes in a blockchain network. As discussed above, in a
blockchain there are two main concepts cryptography and hashing.
Cryptography is used to encrypt messages in a P2P network and hashing
is used to secure the block information and the link blocks in a
blockchain.
Cryptography primarily focuses on ensuring the security of participants,
transactions, and safeguards against double-spending. It helps in
securing different transactions on the blockchain network. It ensures that
only the individuals for whom the transaction data is intended can obtain,
read and process the transaction.

Cryptography

Cryptography is a technique or a set of protocols that secure information


from any third party during a process of communication. It is also made up
of two Greek terms, Kryptos term meaning “hidden” and Graphein, a term
meaning “to write”. Some terminologies related to Cryptography:
 Encryption: Conversion of normal text to a random sequence of bits.
 Key: Some amount of information is required to get the information of
the cryptographic algorithm.
 Decryption: The inverse process of encryption, conversion of a
Random sequence of bits to plaintext.
 Cipher: The mathematical function, i.e. a cryptographic algorithm
which is used to convert plaintext to ciphertext(Random sequence of
bits).

Types of Cryptography

The two types of cryptography are:


 Symmetric-key cryptography.
 Asymmetric-key cryptography.
Let’s discuss each of these topics in detail.
1. Symmetric-key Encryption: It focuses on a similar key for encryption
as well as decryption. Most importantly, the symmetric key encryption
method is also applicable to secure website connections or encryption of
data. It is also referred to as secret-key cryptography. The only problem is
that the sender and receiver exchange keys in a secure manner. The
popular symmetric-key cryptography system is Data Encryption
System(DES). The cryptographic algorithm utilizes the key in a cipher to
encrypt the data and the data must be accessed. A person entrusted with
the secret key can decrypt the data. Examples: AES, DES, etc.
Features:
 It is also known as Secret key cryptography.
 Both parties have the same key to keeping secrets.
 It is suited for bulk encryptions.
 It requires less computational power and faster transfer.

Symmetric Cryptography

2. Asymmetric-key Encryption: This cryptographic method uses


different keys for the encryption and decryption process. This encryption
method uses public and private key methods. This public key method help
completely unknown parties to share information between them like email
id. private key helps to decrypt the messages and it also helps in the
verification of the digital signature. The mathematical relation between the
keys is that the private key cannot be derived from the public key, but the
public key can be derived from the private key. Example: ECC,DSS etc.
Features:
 It is also known as Public-key cryptography.
 It is often used for sharing secret keys of symmetric cryptography.
 It requires a long processing time for execution.
 Plays a significant role in website server authenticity.

Asymmetric Cryptography

Wallets And Digital Signatures

A blockchain wallet is a special software or a hardware device that is used


to keep the transaction information and personal information of the user.
Blockchain wallets do not contain the actual currency. The wallets are
used to keep private keys and maintain a transaction balance.
Wallets are only a communication tool to communicate to carry out
transactions with other users. The real data or currency is stored in blocks
in the blockchain.
Digital signatures are like proofs that the user gives to the recipient and
other nodes in the network to prove that it is a legitimate node in the
network to carry out transactions. While initiating a transaction with other
nodes in the blockchain network, the user first has to create a unique
digital signature by combining the transaction data with the user’s private
key using a special algorithm. This process will guarantee the authenticity
of the node and the integrity of the data.

Cryptography Hash Function in Blockchain


One of the most notable uses of cryptography is cryptographic
hashing. Hashing enables immutability in the blockchain. The encryption
in cryptographic hashing does not involve any use of keys. When a
transaction is verified hash algorithm adds the hash to the block, and a
new unique hash is added to the block from the original transaction.
Hashing continues to combine or make new hashes, but the original
footprint is still accessible. The single combined hash is called the root
hash. Hash Function helps in linking the block as well as maintaining the
integrity of data inside the block and any alteration in the block data leads
to a break of the blockchain. Some commonly used hashed function is
MD5 and SHA-1.
Properties of Cryptographic Hash:
 For a particular message hash function does not change.
 Every minor change in data will result in a change in a major change in
the hash value.
 The input value cannot be guessed from the output hash function.
 They are fast and efficient as they largely rely on bitwise operations.
Benefits of Hash function in Blockchain:
1. Reduce the bandwidth of the transaction.
2. Prevent the modification in the data block.
3. Make verification of the transaction easier.

Fundamental Principles of Blockchain for Security

Blockchain technology is built on several fundamental principles that help


eliminate security threats and ensure trust in the system. These principles
include:
1. Decentralization

 Traditional systems rely on a central authority, making them vulnerable to hacking or fraud.
 Blockchain distributes data across multiple nodes (computers), eliminating a single point of
failure.

Example:
In Bitcoin, transactions are validated by multiple nodes (miners), ensuring that no single
entity can control or manipulate the data.

2. Cryptographic Security

 Blockchain uses cryptographic techniques such as hashing and digital signatures to secure
data.
 Transactions are signed using private keys, ensuring authenticity and preventing
unauthorized access.
Example:
A Bitcoin transaction is signed with the sender’s private key, and the recipient verifies it
using the sender’s public key.

3. Immutability

 Once a transaction is recorded on the blockchain, it cannot be altered or deleted.


 Each block is linked to the previous one using a cryptographic hash, making it tamper-proof.

Example:
If a hacker tries to alter a past transaction in a blockchain, they would need to change all
subsequent blocks, which is computationally impossible in large networks.

4. Consensus Mechanisms

 Blockchain networks use consensus mechanisms like Proof of Work (PoW) or Proof of Stake
(PoS) to validate transactions.
 These mechanisms prevent malicious activities by requiring participants to solve complex
mathematical problems or stake their assets.

Example:
In Bitcoin’s PoW system, miners compete to solve a cryptographic puzzle. If someone tries to
manipulate data, they would need immense computing power, making fraud impractical.

5. Smart Contracts

 Self-executing contracts with predefined rules eliminate the need for intermediaries.
 They ensure transactions occur only when specific conditions are met.

Example:
A smart contract in Ethereum can automatically release funds to a supplier when the goods
are delivered, preventing fraud or disputes.

Limitations or Disadvantages of Blockchain

While blockchain technology offers numerous benefits, it also has some limitations and
challenges. These include:

1. Scalability Issues

 Blockchain networks, especially Proof of Work (PoW)-based ones like Bitcoin, can
process only a limited number of transactions per second.
 As the number of users grows, the network slows down, leading to high transaction
fees and delays.

Example:
Bitcoin can process only 7 transactions per second, whereas Visa can handle over 24,000
transactions per second.
2. High Energy Consumption

 PoW-based blockchains require massive computational power, leading to high


electricity consumption.
 Mining operations consume more energy than some small countries.

Example:
Bitcoin mining consumes around 140 TWh per year, comparable to Argentina’s annual
energy usage.

3. Irreversibility of Transactions

 Once a transaction is added to the blockchain, it cannot be modified or reversed.


 If a user makes an incorrect transaction, recovering funds is almost impossible
without the recipient’s cooperation.

Example:
If someone accidentally sends Bitcoin to the wrong address, they cannot retrieve it unless the
receiver sends it back.

4. High Initial Cost and Complexity

 Implementing blockchain requires significant investment in infrastructure, software


development, and training.
 Businesses need skilled professionals, which adds to operational costs.

Example:
A company integrating blockchain for supply chain management may face high
development costs and long implementation times.

5. Legal and Regulatory Uncertainty

 Governments worldwide are still formulating regulations for blockchain and


cryptocurrencies.
 Legal uncertainties create challenges for businesses looking to adopt blockchain
technology.

Example:
Some countries like China have banned cryptocurrency trading, creating obstacles for
blockchain-based financial solutions.

6. Storage and Data Limitations

 As blockchain grows, the ledger becomes larger, requiring significant storage space.
 Full nodes must store the entire blockchain history, which can be hundreds of
gigabytes in size.

Example:
Bitcoin's blockchain is over 500 GB, making it difficult for regular users to run a full node.
7. Security Concerns (51% Attack)

 If a single entity gains control of more than 51% of the network’s computational
power, it can manipulate transactions.
 This is a risk in smaller blockchain networks with lower mining power.

Example:
In 2019, Ethereum Classic suffered a 51% attack, leading to fraudulent transactions worth
$1.1 million.

Centralized vs. Decentralized vs. Distributed


Systems
Understanding the architecture of systems is crucial for designing
efficient and effective solutions. Centralized, decentralized, and
distributed systems each offer unique advantages and challenges.
 Centralized systems rely on a single point of control, providing
simplicity but risking a single point of failure.
 Decentralized systems distribute control among multiple
nodes, enhancing fault tolerance and scalability.
 Distributed systems further spread resources across multiple
locations, optimizing performance and reliability.

Centralized vs. Decentralized vs. Distributed Systems

Centralized Systems
Centralized systems are a type of computing architecture where
all or most of the processing and data storage is done on a single
central server or a group of closely connected servers. This
central server manages all operations, resources, and data, acting
as the hub through which all client requests are processed. The
clients, or nodes, connected to the central server typically have
minimal processing power and rely on the server for most
computational tasks.
Key Characteristics of Centralized Systems
1. Single Point of Control:
 All data processing and management tasks are handled by
the central server.
 Easier to manage and maintain since there is one primary
location for administration.
2. Simplicity:
 Simplified architecture with a clear structure where all
operations are routed through the central node.
 Easy to deploy and manage due to centralized nature.
3. Efficiency:
 Efficient use of resources as the central server can be
optimized for performance.
 Easier to implement security measures and updates
centrally.
4. Scalability Issues:
 Limited scalability as the central server can become a
bottleneck if the load increases significantly.
 Adding more clients can strain the server’s resources,
leading to performance degradation.
5. Single Point of Failure:
 If the central server fails, the entire system can become
inoperative.
 High availability and redundancy measures are essential to
mitigate this risk.
What are Decentralized Systems?
Decentralized systems are computing architectures where
multiple nodes, often spread across different locations, share
control and processing power without a single central authority.
Each node in a decentralized system operates independently but
collaborates with others to achieve common goals. This structure
enhances fault tolerance, scalability, and resilience compared to
centralized systems.

Decentralized System

Key Characteristics of Decentralized Systems:


1. Distributed Control:
 No single point of control or failure.
 Each node operates independently, contributing to the
overall system’s functionality.
2. Fault Tolerance:
 If one node fails, the system can continue to function with
the remaining nodes.
 Enhanced resilience against failures and attacks.
3. Scalability:
 Easier to scale by adding more nodes without overwhelming
a central point.
 Load distribution across multiple nodes improves
performance and resource utilization.
4. Coordination and Communication:
 Nodes must communicate and coordinate to maintain
system integrity and consistency.
 Complex algorithms and protocols often manage this
coordination.
5. Autonomy and Redundancy:
 Each node can operate autonomously, contributing to
redundancy and reducing single points of failure.
 Data and services are often replicated across multiple nodes
for reliability.
What are Distributed Systems?
Distributed systems are computing architectures where multiple
independent nodes or computers work together to achieve a
common goal. These nodes communicate and coordinate with
each other over a network, appearing as a single coherent system
to the end user. Distributed systems aim to improve performance,
reliability, scalability, and resource sharing by leveraging the

collective power of interconnected devices.

Distributed Systems

Key Characteristics of Distributed Systems


1. Geographical Distribution:
 Nodes are spread across different physical locations.
 They communicate via a network, such as a local area
network (LAN) or the internet.
2. Resource Sharing:
 Nodes share resources such as processing power, storage,
and data.
 This enables more efficient utilization of resources.
3. Concurrency:
 Multiple nodes operate concurrently, performing tasks
simultaneously.
 This parallelism enhances the system’s overall performance
and throughput.
4. Scalability:
 Easy to scale by adding more nodes to the system.
 System capacity and performance improve with the addition
of resources.
5. Fault Tolerance:
 Designed to handle failures gracefully.
 Redundancy and replication ensure the system remains
operational even if some nodes fail.
6. Transparency:
 The complexity of the distributed system is hidden from
users.
 Users interact with the system as if it were a single entity.
Differences between Centralized, Decentralized and Distributed
Systems
Centralized Decentralized Distributed
Aspect Systems Systems Systems

Single central Multiple


Multiple nodes with
server controls and interconnected nodes
independent control,
manages all working together as a
no central authority.
Definition operations. single system.

Centralized
Distributed control, Shared control, nodes
control with a
each node operates collaborate to achieve
single point of
independently. common goals.
Control management.

High risk; if the Reduced risk; failure Reduced risk;


central server fails, of one node does not designed for fault
Single Point the whole system impact the entire tolerance and
of Failure fails. system. redundancy.

Limited
More scalable, can Highly scalable, can
scalability, can
add nodes add more nodes to
become a
independently. distribute the load.
Scalability bottleneck.

Central server
Resource Resources are spread Efficient resource
resources are
across multiple nodes. sharing across nodes.
Utilization heavily utilized.

Performance Can be high Generally good, High performance


initially but may performance due to parallel
degrade with improves with more processing and
Centralized Decentralized Distributed
Aspect Systems Systems Systems

increased load. nodes. resource sharing.

Complex, requires
More complex,
Easier to manage coordination and
requires managing
centrally. management of many
multiple nodes.
Management nodes.

Potentially higher
Lower latency, as Can vary, depends on
latency due to
operations are the distance between
network
managed centrally. nodes.
Latency communication.

Digital signature

A digital signature is a mathematical scheme that is used to verify the


integrity and authenticity of digital messages and documents. It may be
considered as a digital version of the handwritten signature or stamped
seal. The digital signatures use asymmetric cryptography i.e. also known
as public key cryptography.
What are Digital Signatures?
Digital signatures use asymmetric key cryptography. Asymmetric key
cryptography also known as public key cryptography uses public and
private keys to encrypt and decrypt data.
 The public key can be shared with anyone.
 The private key is the secret key that is kept a secret.
In short, it can be summarized as a digital signature a code that is
attached to the message sent on the network. This code acts as proof that
the message hasn’t been tampered with along its way from sender to
receiver.
A digital signature is intended to solve the problem of tampering and
impersonation and tampering thus it gives a recipient reason to believe:
 The message is sent by the claimed sender i.e. Authentication.
 The sender cannot deny having sent the message i.e. Non-
repudiation.
 The message was not altered in the transit i.e. Integrity.
Why are Digital Signatures Important?
Digital signatures are important to achieve three results: Data integrity,
authenticity, and non-repudiation.
1. Data Integrity: It is preserved by using the hash function in signing
and verifying algorithms. Any change in the message will produce a
completely different signature. This way Bob can verify that the
message sent by Alice was not modified along its way.
2. Authenticity: The message is verified using the public key of the
sender. When Alice sends a message to Bob. Bob uses the public key
of Alice for verification and Alice’s public key cannot create the same
signature as Kev’s private key.
3. Message Nonrepudiation: Once the signature is generated, Alice
cannot deny having signed it in the future, unless Alice’s private key is
compromised.

How do Digital Signatures Work?


Let’s have a look at the series of steps involved in working of digital
signatures:
1. Signing the message with the private key: Digital signature is
created using signing software that creates a one-way hash function of
the data to be signed. The private key of the sender is used to encrypt
the hash value generated. The encrypted hash value along with the
hash algorithm constitutes the digital signature. The sender will now
send the message along with the encrypted hash value to the receiver.
The receiver can only decrypt the hash value using the sender’s public
key.
2. Verifying the message with the public key: At the receiver end,
there are two steps, to generate the hash of the message and
decryption of the signature. By using the sender’s public key, the
signature can be decrypted. if the decrypted hash matches the second
computed hash value then it proves that the message hasn’t been
changed since it was signed. If the two hash values don’t match then it
means that the message has been tampered with along its way.
Numerical-1 In a RSA cryptosystem, a participant A uses two prime
numbers: p = 3 and q =11 to generate her public and private keys. If
the public key of A is 7, then the private key of A is -----
To find the private key in the RSA cryptosystem, follow these steps:

Step 1: Compute nnn

The modulus n is calculated as:

n=p×q=3×11=

Step 2: Compute Euler’s Totient Function ϕ(n)

ϕ(n)=(p−1)×(q−1)=(3−1)×(11−1)=2×10=20

Step 3: Identify the Public Key e

Given:

e=7
e should be coprime to ϕ(n), and 7 is coprime to 20, so it's valid.

Step 4: Compute the Private Key ddd

The private key d is the modular multiplicative inverse of e

d×e≡1 (mod ϕ(n))


d×7≡1 (mod 20)

7×17=119≡1 (mod 20)

Thus, decryption key= 17

Numerical-2: Dexter wants to setup his own public and private keys. He chooses p=7 and q=19
with e=29.Find d so that ed has a remainder of 1 when divided by (p−1) (q−1).

Step 1: Compute n

n=p×q=7×19=133

Step 2: Compute Euler’s Totient Function ϕ(n)

ϕ(n)=(p−1)×(q−1)=(7−1)×(19−1)=6×18=108

Step 3: Identify the Public Key e

Given:
e=29

Since 29 is coprime to 108, it is a valid choice.

Step 4: Compute the Private Key ddd

The private key ddd satisfies the equation:

d×e≡1 (mod ϕ(n))


d×29≡1 (mod 108) 108)
d=41

What is Hashing?

Hashing is the process of scrambling raw information to the extent that it cannot reproduce it
back to its original form. It takes a piece of information and passes it through a function that
performs mathematical operations on the plaintext. This function is called the hash function,
and the output is called the hash value/digest.

As seen from the above image, the hash function is responsible for converting the plaintext to
its respective hash digest. They are designed to be irreversible, which means your digest
should not provide you with the original plaintext by any means necessary. Hash functions
also provide the same output value if the input remains unchanged, irrespective of the number
of iterations.

There are two primary applications of hashing:

 Password Hashes: In most website servers, it converts user passwords into a hash value before
being stored on the server. It compares the hash value re-calculated during login to the one
stored in the database for validation.
 Integrity Verification: When it uploads a file to a website, it also shared its hash as a bundle.
When a user downloads it, it can recalculate the hash and compare it to establish data integrity.

What is the SHA-256 Algorithm?

SHA 256 is a part of the SHA 2 family of algorithms, where SHA stands for Secure Hash
Algorithm. Published in 2001, it was a joint effort between the NSA and NIST to introduce a
successor to the SHA 1 family, which was slowly losing strength against brute force attacks.

The significance of the 256 in the name stands for the final hash digest value, i.e. irrespective
of the size of plaintext/cleartext, the hash value will always be 256 bits.

The other algorithms in the SHA family are more or less similar to SHA 256. Now, look into
knowing a little more about their guidelines.

Embark on a transformative journey through our Cyber security Bootcamp, where you'll
delve deep into the intricacies of cutting-edge technologies like the SHA-256 algorithm.
Uncover the cryptographic principles that make this algorithm the cornerstone of blockchain
security, all while honing your skills in defending against cyber threats.

What are the Characteristics of the SHA-256 Algorithm?

Some of the standout features of the SHA algorithm are as follows:

 Message Length: The length of the cleartext should be less than 264 bits. The size needs to be in
the comparison area to keep the digest as random as possible.

 Digest Length: The length of the hash digest should be 256 bits in SHA 256 algorithm, 512 bits in
SHA-512, and so on. Bigger digests usually suggest significantly more calculations at the cost of
speed and space.

 Irreversible: By design, all hash functions such as the SHA 256 are irreversible. You should neither
get a plaintext when you have the digest beforehand nor should the digest provide its original
value when you pass it through the hash function again.

You might also like