Blockchain Technologies UNIT-2

1. Define a hash function and its properties. Describe how hash functions ensure  data integrity in Blockchain?

Hashing is a process used in computer science and cryptography to convert data of arbitrary  size into a fixed-size value or hash code. The primary purpose of hashing is to quickly and  efficiently retrieve or compare data. Instead of searching through an entire dataset or  comparing large amounts of data directly, you can use a hash function to generate a fixed-length  hash code that represents the original data.

A cryptographic hash function combines hash function message-passing capabilities with  security features. The original data cannot be recovered through decryption after conversion  since the algorithm is a one-way cryptographic function.

Properties of Hash Functions:

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 Hash functions ensure data integrity in Blockchain

Hashing facilitates the generation of cryptographic signatures, which aid in the identification  of genuine transactions.

On the blockchain, hashing facilitates transaction tracking. Instead of looking for a  transaction, it is easier to copy the hash into a blockchain explorer where you may examine  the transaction details.

Hash functions, which condense the data into a small value while maintaining its integrity,  are a crucial component of digital signature algorithms.  

Blockchain transactions and blocks are authenticated and data integrity is maintained via  digital signatures.

Hashing functions are crucial to crypto mining

Blockchain Technologies UNIT-2 2. Discuss about different types of Blockchain in detail.

There are four types of Blockchain  

1. Public Blockchain

2. Private Blockchain

3. Consortium Blockchain

4. Hybrid Blockchain

Public Blockchain

Public blockchains are open and permissionless networks where anyone can  participate, validate transactions, and contribute to the consensus process. These blockchains are decentralized, meaning they don't rely on a single entity for  control or decision-making.

Public blockchains typically use a cryptocurrency as an incentive mechanism to reward  participants who perform tasks like mining or validating transactions.

They provide transparency and immutability since anyone can verify transactions and  access the entire transaction history stored on the blockchain.

Public blockchains are suitable for applications that require openness, transparency,  and trustless environments, such as decentralized finance (DeFi), tokenized assets, and  public voting systems.

Features of Public Blockchain

High Security

Open Environment  

Anonymous Nature

No Regulations

Full Transparency

True Decentralization

Full User Empowerment

Disadvantages

Heavy energy consumption required to maintain them. The concern is a consensus  mechanism that requires participants to compete to validate the information and  receive a reward for letting the network use their processing power.  

Lack of complete privacy and anonymity. Public blockchains allow anyone to view  transaction amounts and the addresses involved. If the address owners become known,  the user loses their anonymity.

Most public blockchains are designed for cryptocurrencies, which by nature of their  value are a prime target for hackers and thieves.

Blockchain Technologies UNIT-2

Private Blockchain

Private blockchains, also known as permissioned blockchains, are restricted networks  where participation and access are controlled by a central authority or a group of trusted  entities.

They require permission to join, and participants are typically known and vetted. Private blockchains often have a centralized governance model, allowing the controlling  entity to define the rules and consensus mechanisms.

Examples of private blockchain use cases include supply chain management, interbank  transactions, and enterprise solutions.

Private blockchains may or may not utilize a cryptocurrency or token, as they prioritize  confidentiality and controlled access over the open participation found in public  blockchains.

While private blockchains provide some level of transparency within the network, they  often limit public visibility to specific authorized parties.

Private blockchains are advantageous for situations where privacy, efficiency, and  scalability are essential, and a trusted network of participants exist

Features of Private Blockchain

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.

Better Scalability

Being able to add nodes and services on demand can provide a great advantage to the  enterprise.

Empowering Enterprises

Stability

Disadvantages

private blockchains lose out on many of the valuable attributes of permissionless systems  simply because they are not widely applicable. They are instead built to accomplish specific  tasks and functions.

Consortium Blockchain 

A consortium blockchain is a combination of multiple private blockchains belonging to  different organizations, where each of them forms a node on the chain as a stakeholder in  the alliance — and can only leave or join the network with the authorization of the  stakeholders. 

Features of Consortium Blockchain

Data Privacy

Rapid-Fire Transaction

Regulations and Rules

Zero Probability of 51% Act

Blockchain Technologies UNIT-2

Disadvantages

Limited Transparency ad Governance Challenge.

Hybrid Blockchain

A type of blockchain technology that 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.

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.

3. Summarize the Concept of Public Accessibility in Public Blockchain. Public Blockchain

Public blockchains are open and permissionless networks where anyone can  participate, validate transactions, and contribute to the consensus process. These blockchains are decentralized, meaning they don't rely on a single entity for  control or decision-making.

Public blockchains typically use a cryptocurrency as an incentive mechanism to reward  participants who perform tasks like mining or validating transactions.

They provide transparency and immutability since anyone can verify transactions and  access the entire transaction history stored on the blockchain.

Public blockchains are suitable for applications that require openness, transparency,  and trustless environments, such as decentralized finance (DeFi), tokenized assets, and  public voting systems.

Features of Public Blockchain

High Security

Open Environment  

Anonymous Nature

No Regulations

Full Transparency

True Decentralization

Full User Empowerment

Blockchain Technologies UNIT-2

Examples  

Bitcoin: The first and most well-known blockchain, primarily used for peer-to-peer  electronic cash transactions.

Ethereum: A blockchain that supports smart contracts and decentralized applications  (DApps) in addition to cryptocurrency transactions.

Public Blockchain Use Cases

Cryptocurrencies and Tokens: Public blockchains like Bitcoin and Ethereum serve as  platforms for cryptocurrencies and tokens. They enable decentralized digital currencies,  peer-to-peer transactions, and programmable smart contracts.

Public Voting Systems: Public blockchains can provide transparent and auditable  voting systems. They can enable secure and verifiable elections by recording votes on  the blockchain, ensuring transparency, immutability, and resistance to manipulation.

Tokenized Assets: Public blockchains can tokenize various real-world assets like real  estate, art, or commodities. This allows for fractional ownership, increased liquidity, and  transparent transfer of assets, creating new opportunities for investment and asset  management.

Distributed Applications (DApps): Public blockchains support the development and  deployment of decentralized applications. These applications leverage the blockchain's  distributed nature, immutability, and smart contract capabilities to create various  solutions such as decentralized social networks, gaming platforms, and prediction  markets.

4. Discuss any one Use Case of a Blockchain.

Blockchain technology is not always the easiest to understand, and the topic is further  complicated with specific terminology and references to the minutiae of the system. So  whether or not you know what a merkle tree is, taking a look at the basics of the system  can provide insight as to why this technology is so fascinating.

Blockchain technology acts as a distributed ledger and a decentralized database for  permanent storage. There is no traditional oversight mechanism. Instead, blocks of data are  created, verified through various methods, and added to a chronological chain that builds  upon all previous transactions or data. It’s a system that excels in situations where  transparency, security, and multi-party tracking are necessary.

Blockchain platforms offer users security in a complicated encryption process known as  hashing. Users have tools called public and private keys that allow exclusive access to the  private trades, transactions, documents, and data sent over blockchain networks.

Blockchain use cases in the supply chain

As blockchain systems support and encourage transparent oversight, any company that  produces or sells goods that depend on other materials or labor could benefit. Data tracking  with comprehensive oversight in an immutable record lends itself to supply chain  management and logistics.

Blockchain Technologies UNIT-2

Supply chains—besides being responsible for bringing you everything in your life from your  tomatoes to your phone to your dinner table—are incredibly difficult to manage. Detailed  records must be preserved and safeguarded in tamper-free environments to ensure that  each raw material makes it across locations and through each stage of the manufacturing  process to become a completed, sellable product.

Bottlenecks have the potential to be disastrous in supply chain management. Paperwork can  be expensive and inefficient, and goods can be mislabeled or sourced unethically. This is  where blockchain tech comes in, streamlining and automating the supply chain process,  increasing transparency and time management, and smoothing logistics.

Entries on a blockchain can be used to queue up events with a supply chain — allocating  goods newly arrived at a port to different shipping containers, for example. Blockchain  provides a new and dynamic means of organizing tracking data and putting it to use.

Blockchain technology in banking and finance

International Payments

Blockchain provides a way to securely and efficiently create a tamper-proof log of sensitive  activity. This makes it excellent for international payments and money transfers.

in April 2018, Banco Santander launched the world’s first blockchain-based money transfer  service. Known as “Santander One Pay FX,” the service uses Ripple’s xCurrent to enable  customers to make same-day or next-day international money transfers.

By automating the entire process on the blockchain, Santander has reduced the number of  intermediaries typically required in these transactions, making the process more efficient.

As a large commercial bank, Santander has numerous retail clients who would benefit from  more efficient and cheaper payments, particularly in the area of international transfers.  Blockchain technology can be used to decrease the cost of these transfers by reducing the  need for banks to manually settle transactions.

Blockchain technology in Healthcare

Blockchain in healthcare projects can address some of the biggest challenges that the  healthcare industry faces, such as hospital cybersecurity & transparency, interoperability,  and patient privacy, while saving many costs.

Using this tech improves personal security for users of a given network, and data breaches  are much less likely to happen. Besides, blockchain use cases in healthcare can make many  operations faster and automate many of them, saving healthcare providers and patients  costs.

Blockchain Technologies UNIT-2

Patient Data Management

High-Security Standards in Data Encryption

Healthcare Transactions Control

 5. Define the terms Public and Private Blockchain and Compare Private and Public  Blockchain.

Public Blockchain

Public blockchains are open and permissionless networks where anyone can  participate, validate transactions, and contribute to the consensus process. These blockchains are decentralized, meaning they don't rely on a single entity for  control or decision-making.

Public blockchains typically use a cryptocurrency as an incentive mechanism to reward  participants who perform tasks like mining or validating transactions.

They provide transparency and immutability since anyone can verify transactions and  access the entire transaction history stored on the blockchain.

Public blockchains are suitable for applications that require openness, transparency,  and trustless environments, such as decentralized finance (DeFi), tokenized assets, and  public voting systems.

Features of Public Blockchain

High Security

Open Environment  

Anonymous Nature

No Regulations

Full Transparency

True Decentralization

Full User Empowerment

Blockchain Technologies UNIT-2

Private Blockchain

Private blockchains, also known as permissioned blockchains, are restricted networks  where participation and access are controlled by a central authority or a group of trusted  entities.

They require permission to join, and participants are typically known and vetted. Private blockchains often have a centralized governance model, allowing the controlling  entity to define the rules and consensus mechanisms.

Examples of private blockchain use cases include supply chain management, interbank transactions, and enterprise solutions.

Private blockchains may or may not utilize a cryptocurrency or token, as they prioritize  confidentiality and controlled access over the open participation found in public  blockchains.

While private blockchains provide some level of transparency within the network, they  often limit public visibility to specific authorized parties.

Private blockchains are advantageous for situations where privacy, efficiency, and  scalability are essential, and a trusted network of participants exist

Features of Private Blockchain

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.

Better Scalability

Being able to add nodes and services on demand can provide a great advantage to the  enterprise.

Empowering Enterprises

Stability

 Comparison between Private and Public Blockchain.

 

Blockchain Technologies UNIT-2

6. What is a Hash Puzzle? Explain the Purpose of Hash Puzzles in Blockchain  Mining.

A hash puzzle is a type of cryptographic puzzle that is used in blockchain networks to verify the  validity of transactions. Hash puzzles are typically solved by miners, who use specialized  hardware to try different values until they find one that produces a hash with certain  properties.

Hash puzzles are used in blockchain networks because they are very difficult to solve but very  easy to verify. This means that it is very difficult for someone to cheat the system by trying to  submit invalid transactions, but it is very easy for the network to verify that a transaction is  valid once it has been solved.

The most common type of hash puzzle used in blockchain networks is the proof-of-work (PoW)  puzzle. In a PoW puzzle, miners try to find a value, called a nonce, that, when added to the  block's header, produces a hash with a certain number of leading zeros. The first miner to find  a nonce that satisfies this condition is awarded a reward for their work, and the block is added  to the blockchain.

Hash puzzles are a key part of the security and integrity of blockchain networks. They help to  ensure that transactions are valid and that the blockchain cannot be tampered with.

Since the hash function used in cryptocurrencies, such as SHA-256 in Bitcoin, is deterministic,  finding a nonce that results in a desired hash value requires a trial-and-error approach. Miners  must perform numerous computations, changing the nonce each time, until they find a valid  solution that satisfies the specified criteria. This process is resource-intensive and requires  substantial computational power.

Blockchain Technologies UNIT-2

Hash puzzles serve several important purposes:

Consensus Mechanism: By making the process of finding a valid solution difficult and  resource-intensive, hash puzzles provide a way to establish consensus among participants  in a decentralized network. Miners invest computational power to compete for the right to  create new blocks, ensuring that only valid and legitimate transactions are added to the  blockchain.

Block Creation and Reward Distribution: Hash puzzles incentivize miners to contribute  their computational resources to secure the network and maintain the blockchain. Miners  are rewarded with cryptocurrency tokens for successfully solving the hash puzzle and  adding new blocks to the chain.

Block Time and Blockchain Stability: The difficulty of the hash puzzle can be adjusted  dynamically to regulate the block creation rate and maintain a stable blockchain. This  adjustment helps ensure that blocks are added at a consistent pace and prevents the  blockchain from growing too rapidly or too slowly.

7. Discuss how Digital Identity Verification is implemented using Blockchain  Technology

Identity Management

Identity management is the framework of processes, policies, and technologies to ensure that  only authorized people have access to technology resources, information, or services.  A digital identity is the total information about an individual or organization that exists online.  Data that forms a digital identity includes usernames, buying history, ID number, and search  history.

Almost all of our digital identities are connected through devices, services, and apps that have  dominantly used centralized and federated identity systems

There are a number of blockchain-based digital identity verification solutions currently  being developed, including:

Self-sovereign identity: This is a system where individuals control their own identity data  and can share it with third parties as needed. This can help to improve privacy and security,  as individuals can choose who they share their data with.

Decentralized identifier (DID): A DID is a unique identifier that can be used to represent a  person or entity on the blockchain. DIDs can be used to create verifiable credentials, which  are digital certificates that can be used to prove identity or other attributes.

Blockchain-based biometrics: Biometric authentication, such as fingerprint scanning or  facial recognition, can be used to verify identity on the blockchain. This can be a more secure  way to verify identity than traditional methods, such as passwords and PINs.

Decentralized Identifiers (DIDs)

Decentralized identifiers (DIDs) are a way to identify yourself on the internet without  using a central authority, like a government or a company.  

With a DID, you can prove who you are in online without having to give your personal  information to a bunch of different websites or apps.

It's like a digital version of a driver's license that can only be used by the person it's issued  to.

W3C describes DID as being “A new type of identifier that enables verifiable, decentralized  digital identity.”

Blockchain Technologies UNIT-2

Key features of DIDs

Organizations and individuals have full control and ownership over their DIDs and no  party can take them away

Enable the owner to prove cryptographic control of them  

Don’t contain personal data or wallet information

Enables private and secure connections between two parties and can be verified anywhere  at any time

DIDs can be used in the same way where people can create as many DIDs as they want for  different purposes.

For example, you can have a DID for different interactions:

DID 1: Online gaming sites

DID 2: For educational and training credentials such as a university degree, Project  Management Certificate, and health and safety training certificate

DID 3: To hold different types IDs like state ID and driver’s license

DID 4: Online shopping websites

DID 5: Crypto investment platforms and services

Verifiable Credentials (VCs)

Verifiable Credentials are a digital, cryptographically secured version of both paper and  digital credentials that people can present to organizations that need them for verification.  Identity documents like passports, IDs issued by the government, and driver’s licenses can  be issued as Verifiable Credentials.  

Each DID can have multiple Verifiable Credentials associated with them that are digitally  (cryptographically) signed by their issuers like a government driver’s licensing department.  DID owners store the credentials themselves on their phones and don’t have to rely on a  single provider like Facebook or Google.

How Blockchain identity management works

 Benefits of Blockchain Identity Solutions for Users

Consent to share identity data

Secure global ID

Blockchain Technologies UNIT-2 Complete data ownership and control

Decentralized data storage

Reduces the need for paper-based identity management

8. Explain the Concept of Non Fungible Token in the Context of Blockchain.

NFTs (non-fungible tokens) are unique cryptographic tokens that exist on a  blockchain and cannot be replicated.

NFTs can represent digital or real-world items like artwork and real estate. "Tokenizing" these real-world tangible assets makes buying, selling, and trading them  more efficient while reducing the probability of fraud.

NFTs can represent individuals' identities, property rights, and more.

Collectors and investors initially sought NFTs after the public became more aware of  them, but their popularity has since waned.

NFTs trade via blockchain technology and represent real-world commodities, such as  art, real estate, avatars, memes, video game skins, and GIFs. People buy and sell these  assets

How NFTs Work

NFTs are created through a process called minting, in which the information of the NFT is  recorded on a blockchain. At a high level, the minting process entails a new block being  created, NFT information being validated by a validator, and the block being closed. This  minting process often entails incorporating smart contracts that assign ownership and  manage the transferability of the NFT.

As tokens are minted, they are assigned a unique identifier directly linked to one blockchain  address. Each token has an owner, and the ownership information (i.e., the address in which  the minted token resides) is publicly available.

NFTs shift the crypto paradigm by making each token unique and irreplaceable, making it  impossible for one non-fungible token to be "equal" to another.

They are extensible, meaning you can combine one NFT with another to create a third,  unique NFT.

 

 Examples of NFTs

The most famous use case for NFTs is that of cryptokitties. Launched in November 2017,  cryptokitties are digital representations of cats with unique identifications on Ethereum’s  blockchain.

Each kitty is unique and has a different price. They "reproduce" among themselves and create  new offspring with other attributes and valuations compared to their "parents."

 Much of the earlier market for NFTs was centered around digital art

Digital art is a technique used to create any art digitally by using technologies. If these Digital  art is combined with Blockchain Technology for ensuring security and authentication the we  call it as crypto art.

Blockchain Technologies UNIT-2 Crypto art is digital art that uses blockchain technology to verify ownership. Just as an original  Matisse can have its authenticity verified, crypto art uses a non-fungible token (NFT) for  verification. The work’s uniqueness is what makes it valuable, because unlike ordinary digital  art that can be easily replicated, crypto art is one-of-a-kind.

How does blockchain add value to digital art

The thing that makes blockchain revolutionary for digital art is the ability to prove authenticity  and scarcity for digital artworks. Before blockchain, a digital artwork could be copied  identically, making it difficult to build a market around digital art.

Authenticity

Blockchain’s ledger technology, which acts as a public record tracking system, makes it possible  for anyone to track the history of an artwork. This allows you (the artist) to show the entirety  of the artwork’s life on this publicly trackable database, therefore proving the authenticity of a  digital artwork in a way that was impossible to do before.

Scarcity

Not only does tracking a digital artwork via blockchain allow you to prove a work is authentic,  but it also allows you to prove its scarcity. Only works that are tracked on the blockchain as  unique tokens are the originals, meaning you can prove which works are original and therefore  create scarcity for your digital pieces

9. What is Blockchain Neutrality. Discuss about the factors that affect Blockchain  neutrality.

Blockchain neutrality is the principle that all blockchain networks should be treated  equally by regulators and other stakeholders. This means that no single blockchain  network should be given preferential treatment, and that all networks should have the  same opportunities to succeed.

Blockchain neutrality is important for a number of reasons. First, it helps to ensure that the  market for blockchain technology is fair and competitive. Second, it helps to promote  innovation, as it allows new blockchain networks to enter the market and compete with  existing networks. Third, it helps to protect consumers, as it ensures that they have access  to a variety of blockchain networks to choose from.

There are a number of challenges to achieving blockchain neutrality. One challenge is that  different blockchain networks have different features and capabilities. This can make it  difficult to compare different networks and to determine which network is best for a  particular application. Another challenge is that there is a lack of consensus on what  constitutes blockchain neutrality. This can lead to disagreements between regulators,  businesses, and other stakeholders about how to implement blockchain neutrality.

Here are some of the benefits of blockchain neutrality:

Fairness: Blockchain neutrality ensures that all blockchain networks have the same  opportunities to succeed, regardless of their size or influence. This helps to create a level  playing field for businesses and developers who are building blockchain applications.

Blockchain Technologies UNIT-2 Competition: Blockchain neutrality promotes competition between blockchain networks,  which can lead to innovation and improvement. As networks compete for users and  developers, they are more likely to offer new features and services.

Innovation: Blockchain neutrality allows new blockchain networks to enter the market  and compete with existing networks. This can lead to the development of new and  innovative blockchain applications.

Consumer choice: Blockchain neutrality gives consumers the choice of which blockchain  network to use. This can help to ensure that consumers are getting the best possible  service and value.

Factors effecting Blockchain Neutrality

51% Attacks

When a miner or group of miners own more than 51% of the computing power in the network,  they can compromise the neutrality of the system.

Centralization Pressure

Corporate interests and governments can pressure network providers to centralize the system,  compromising its neutrality.

Technical Difficulties

Maintaining the protocol's neutrality requires constant attention and technical expertise from  programmers and crypto experts.

10.What is a smart Contract? Discuss how it is used in Blockchain

A smart contract is a self-executing program that automates the actions required in an  agreement or contract. Once completed, the transactions are trackable and irreversible. Smart contracts permit trusted transactions and agreements to be carried out among  disparate, anonymous parties without the need for a central authority, legal system, or  external enforcement mechanism.

Smart contracts are scripts that automate the actions specific to a contract between two  parties.

Smart contracts do not contain legal language, terms, or agreements—only code that  executes actions when specified conditions are met.

Smart contracts work by following simple “if/when…then…” statements that are written  into code on a blockchain.

A network of computers executes the actions when predetermined conditions have been  met and verified.  

smart contract can be programmed by a developer, although increasingly, organizations  that use blockchain for business provide templates, web interfaces, and other online tools  to simplify structuring smart contracts.

Benefits of smart contracts

 Speed, efficiency and accuracy

Once a condition is met, the contract is executed immediately. Because smart contracts  are digital and automated, there’s no paperwork to process and no time spent  reconciling errors that often result from manually filling in documents.

Blockchain Technologies UNIT-2  Trust and transparency

Because there’s no third party involved, and because encrypted records of transactions  are shared across participants, there’s no need to question whether information has  been altered for personal benefit.

 Security

 Savings

How smart contract works

 Applications of smart contracts

 

Safeguarding the efficacy of medications

Increasing trust in retailer-supplier relationships

Making international trade faster and more efficient

 Some of the downfalls of smart contracts are:

Permanent: They cannot be changed if there are mistakes

Human factor: They rely on the programmer to ensure the code addresses the terms of the   contract.

Loopholes: There may be loopholes in the coding, allowing for contracts to be executed in bad   Faith

11.Discuss the Concept of Extensibility in Blockchain Technology.

The extensibility of a blockchain refers to its ability to accommodate changes and improvements over  time without compromising its core functionalities, security, and consensus mechanisms. Blockchain  extensibility is an important aspect because it allows the technology to evolve and adapt to new  requirements, use cases, and technological advancements.

Blockchain Technologies UNIT-2

Here are some ways in which blockchain extensibility can be achieved:

Protocol Upgrades: Blockchain protocols can be upgraded to introduce new features, enhance  security, improve scalability, or address vulnerabilities. However, these upgrades need to be  carefully planned and executed to ensure network consensus and prevent forks.

Soft Forks and Hard Forks: Soft forks involve making changes that are backward compatible,  meaning nodes that haven't upgraded can still participate in the network but won't have access to  new features. Hard forks, on the other hand, introduce changes that are not backward compatible  and require all nodes to upgrade to the new protocol. Both approaches offer ways to extend a  blockchain's capabilities.

Smart Contracts and Decentralized Applications (DApps): Smart contracts are self-executing  programs that run on a blockchain. They enable a wide range of applications beyond simple  transactions, including decentralized finance (DeFi), supply chain management, digital identity,  and more. The extensibility of a blockchain can be greatly enhanced by allowing developers to  create and deploy their own smart contracts and DApps.

Consensus Mechanism Flexibility: Some blockchains allow for the customization of consensus  mechanisms. For example, Ethereum is transitioning from Proof of Work (PoW) to Proof of  Stake (PoS) to improve scalability and energy efficiency. This kind of transition illustrates how  consensus mechanisms can be adjusted to accommodate changing requirements.

Interoperability: Blockchain networks can be designed to communicate with each other,  enabling cross-chain interactions. This allows the benefits and capabilities of different  blockchains to be leveraged collectively, creating a more comprehensive ecosystem.

Ultimately, the extensibility of a blockchain depends on its design principles, the community's  willingness to adapt, and the technical capabilities of the underlying technology

12.Discuss about RSA and Elliptic curve cryptography algorithms. Rivest, Shamir & Adleman who first publicly described it in 1977.

• It is an algorithm for public-key cryptography.

RSA algorithm involves three steps

• Key Generation

• Encryption

• Decryption

Key Generation

1. Select p, q where p & q both prime, p≠q

2. Calculate n = p × q

3. Calculate Ø(n) = (p-1) × (q-1)

4. Select integer e such that gcd(Ø(n),e)=1; 1<e< Ø(n)

5. Calculate d, d ≡ e-1 (mod Ø(n)) or d.e ≡ 1 (mod Ø(n))

Blockchain Technologies UNIT-2 Public Key : PU = { e, n }

Private Key : PR = { d, n }

Encryption

Plaintext : M < n

Ciphertext : C = Me mod n

Decryption

Ciphertext : C

Plaintext : M = Cd mod n

Example

1. Select primes: p=17 & q=11

2. Compute n = p q =17×11=187

3. Compute ø(n)=(p–1)(q-1)=16×10=1604. Select e : gcd(e,160)=1; (e,160)=1; choose e=7 5. Determine d: de=1 mod 160 and d < 160 Value is d=23 since 23×7=161= 10×160+1 6. Publish public key PU={7,187}

7. Keep secret private key PR={23,187}

Encryption/Decryption

Message M = 88 (88<187)

Encryption: C = 887 mod 187 = 11

Decryption: M = 1123 mod 187 = 88

Elliptic Curve Cryptography (ECC)

Elliptic Curve Cryptography (ECC) is a key-based technique for encrypting data. ECC focuses  on pairs of public and private keys for decryption and encryption of web traffic.

ECC, an alternative technique to RSA, is a powerful cryptography approach. It generates  security between key pairs for public key encryption by using the mathematics of elliptic curves.

ECC has popularity due to its smaller key size and ability to maintain security.

ECC bases its approach to public key cryptographic systems on how elliptic curves are  structured algebraically over finite fields. Therefore, ECC creates keys that are more difficult,  mathematically, to crack.

An elliptic curve for current ECC purposes is a plane curve over a finite field which is made up  of the points satisfying the equation:

y²=x³ + ax + b.

Blockchain Technologies UNIT-2

In this elliptic curve cryptography example, any point on the curve can be mirrored over the x axis and the curve will stay the same. Any non-vertical line will intersect the curve in three  places or fewer.

Procedure of ECC

a) The first task in this system is to encode the plaintext message m to be sent as an x-y point Pm. b) It is the point Pm that will be encrypted as a ciphertext and subsequently decrypted.

c) We can’t simply encode the message as the x or y co-ordinate of a point, because not all such  coordinates are in Eq (a , b).

d) As with the key exchange system, an encryption / decryption system requires a point G and an  elliptic group Eq (a , b) as parameters. Each user A selects a private key nA and generates a  public key PA=nA×G.

e) To encrypt and send a message Pm to B, A chooses a random positive integer k and produces  tnhe ciphertext Cm consisting of the pair of points:

Cm=kG,Pm+kPB

f) Note that A has used B’s public key PB. To decrypt the ciphertext, B multiplies the first point in  the pair by B’s secret key and subtracts the result from the second point :

Pm+kPBnB(kG)=Pm+k(nBG)nB(kG)=Pm

g) A has masked the message Pm by adding kPB to it. Nobody but A knows the value of k, so  even though PB is a public key, nobody can remove the mask kPB. However , A also includes a  “clue”, which is enough to remove the mask if one knows the private key nB. For an attacker to  recover the message, the attacker would have to compute k given G and kG, which is assumed  hard.

Security of Elliptic Curve Cryptography :

The security of ECC depends on how difficult is to determine k given kP and P. This is referred  to as the elliptic curve logarithm problem.

The fastest known technique for taking the elliptic curve logarithm is known as the Pollard rho  method.