0% found this document useful (0 votes)
14 views25 pages

Uit-Cia-Ak Set B

This document is an answer key for a Continuous Assessment exam on Cryptocurrency and Blockchain Technologies at the United Institute of Technology. It includes definitions, concepts, and explanations related to blockchain, hashing, Bitcoin mining, and Merkle trees, along with their significance and applications. The assessment is structured into two parts, with multiple-choice questions and detailed explanations required for key topics.

Uploaded by

sridhars30738
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)
14 views25 pages

Uit-Cia-Ak Set B

This document is an answer key for a Continuous Assessment exam on Cryptocurrency and Blockchain Technologies at the United Institute of Technology. It includes definitions, concepts, and explanations related to blockchain, hashing, Bitcoin mining, and Merkle trees, along with their significance and applications. The assessment is structured into two parts, with multiple-choice questions and detailed explanations required for key topics.

Uploaded by

sridhars30738
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

Reg. No.

UNITED INSTITUTE OF TECHNOLOGY


(An Autonomous Institution)
Periyanaickenpalayam, Coimbatore – 641020
Continuous Assessment - 1
Semester VI
Department of Computer Science and Engineering (Cyber Security)
CCS339- CRYPTOCURRENCY AND BLOCKCHAIN TECHNOLOGIES

(Regulations 2021)
Time: 3 Hrs Maximum: 100 marks
ANSWER KEY
Answer ALL questions.
PART A - (10 x 2 = 20 marks)
Questions CO BTL Marks
S.No

1. Define blockchain and mention its types. CO1 1 2

A blockchain is “a distributed database that maintains a continuously


growing list of ordered records, called blocks.” These blocks “are linked using
cryptography.
1. Private Blockchain
2. Public Blockchain
3. Consortium Blockchain
4.
2. What are the four key concepts behind Blockchain? CO1 1 2

1. Shared ledger.
2. Permissions
3. Smart contracts.
4. Consensus.

3. What is Hashing in Blockchain? CO1 2 2

The process of making an input item of any length represents an output item
of a fixed length is referred to as hashing in the blockchain. Take, for example,
the use of blockchain in cryptocurrencies, where transactions of varying lengths
are run through a given hashing algorithm and all produce a fixed-length
performance.

4. What is Merkel Tree? CO1 2 2


Merkel Tree is a data structure that is used for verifying a block. It is in the
form of a binary tree containing cryptographic hashes of each block. A Merkle
tree is structured similarly to a binary tree where each leaf node is a hash of a
block of transactional data and each non-leaf node is a hash of its leaf node. The
Merkel root or hash root is the final hash root of all the transaction hashes. It
encompasses all the transactions that are underlying
1 all the non-leaf nodes.

SET – B
5. What are all the types of Double Spending Attacks? CO2 2 2
Double spending means spending the same money twice. Double spending
is a potential vulnerability in digital currency systems where a user spends the
same amount of cryptocurrency more than once. It occurs when someone
attempts to use the same funds for multiple transactions, taking advantage of the
digital nature of the currency and attempting to deceive the network
participants.

6. What is Bitcoin P2P Network? CO2 2 2


The peer-to-peer architecture of blockchain allows all cryptocurrencies to be
transferred worldwide, without the need of any middle-man or intermediaries or
central serverPeer-to-Peer (P2P) network consists of a group of devices that
collectively store and share files. Each participant (Node) acts as an individual
peer.

7. What is bitcoin mining? Write any two purposes of mining process CO2 1 2
Bitcoin mining is the process by which new bitcoins are created and
ransactions are verified and added to the blockchain ledger. Miners use
specialized hardware and compete to solve complex mathematical puzzles,
known as proof-of-work (PoW), to validate transactions and secure the
network. Two purposes of the mining process are:

Transaction Verification: Miners verify and validate transactions by including


them in new blocks added to the blockchain. This ensures the integrity and
immutability of the transaction history.

Issuance of New Bitcoins: Mining also serves as the mechanism for issuing new
bitcoins into circulation. Miners who successfully mine a new block are
rewarded with a predetermined number of bitcoins, incentivizing participation
in the network and maintaining its security.

8. What is FORTH – the precursor for Bitcoin scripting? CO2 2 2


FORTH is a programming language that influenced the scripting language
used in Bitcoin.

FORTH is a stack-based, extensible programming language developed by


Charles H. Moore inthe 1970s. It is known for its simplicity, efficiency, and the
use of a stack to manipulate data.
FORTH programs are composed of a series of words (functions) that
operate on a stack of data
elements.

9. How does proof of burn work? CO3 1 2


Proof of burn (PoB) requires miners to prove burning their coins by
intentionally sending them to a verifiably unspendable address that essentially
destroys those coins. This proves their commitment to the network. The miner
2 of coins burnt, allowing the
can then mine a block in proportion to the amount
network to be secured in a trustless way.

SET – B
10. What is delegated proof of stake? CO3 2 2
Delegated proof of stake (DPoS) is a consensus mechanism where token
holders vote to select a limited set of nodes responsible for validating
transactions and proposing blocks. The stakeholder community elects
"delegates" proportional to votes received, who take turns in a round robin
fashion to participate in the block generation process.

PART B - (5 x 16 = 80 marks)
S.No Questions
CO BTL Marks
11. a. Explain the concept of public ledgers and their significance in blockchain technology. CO1 4 16
How do public ledgers ensure transparency and accountability in transactions?

A public blockchain is a type of distributed ledger technology that is open to anyone, allowing all
participants to access, view, and contribute to the network without needing permission from a central
authority.
This openness is one of its defining characteristics, fostering a decentralized and transparent
environment.
Characteristics:
Decentralization:
Public blockchains do not rely on a central authority or single entity. Instead, they operate on
a peer-to-peer network where multiple nodes validate and record transactions.
Transparency:
All transactions are visible to anyone who accesses the blockchain, ensuring that data can be
verified and audited by any participant.
Immutability:
Once data is recorded on a public blockchain, it cannot be altered or deleted easily, providing a
secure and permanent record of transactions.
Consensus Mechanisms:
Public blockchains use consensus algorithms, such as Proof of Work(PoW) or Proof of Stake
(PoS), to validate transactions and maintain the integrity of the network.
Open Participation:
Anyone can join the network, contribute to transaction validation, and access the data stored on the
blockchain, promoting inclusivity.
How do Public Blockchains Work?
Public blockchains operate through a decentralized network of nodes that validate and record
transactions. Here is an overview of working of public blockchain:
Transaction Creation:
Users initiate transactions by creating a digital request containing details like sender, recipient, and
amount. 3

SET – B
Broadcasting:
The transaction is broadcast to all nodes in the network for validation.
Validation:
Nodes use consensus mechanisms (e.g., Proof of Work or Proof of Stake) to verify transactions,
ensuring they are legitimate and not double-spent.
Block Creation:
Validated transactions are grouped into a block, which includes a reference to the previous block,
forming a chain.
Adding to the Blockchain:
Once validated, the new block is added to the blockchain, creating a permanent and immutable
record.
Synchronization:
All nodes update their copies of the blockchain to reflect the new block, maintaining consistency
across the network.
Incentives:
Nodes that successfully validate and add blocks receive cryptocurrency rewards, encouraging
participation and security.
Popular Public Blockchains:
Bitcoin (BTC):
The first and most well-known cryptocurrency, created by an anonymous person or group known
as Satoshi Nakamoto in 2009. It is primarily used for peer-to-peer transactions and as a digital store of
value.
Ethereum (ETH):
Launched in 2015, Ethereum is a decentralized platform that enables the creation of smart
contracts and decentralized applications (DApps). It supports various applications,
including decentralized finance (DeFi), non-fungible tokens (NFTs), and more.
Cardano (ADA):
Founded in 2017, Cardano is known for its research-driven approach and a layered architecture
that separates the settlement and computation layers. It supports smart contracts and aims to provide a more
sustainable and scalable blockchain for DApps.
Solana (SOL):
Known for its high throughput and low transaction fees, Solana was launched in 2020 and uses a
unique Proof of History (PoH) consensus mechanism. It is ideal for decentralized applications,
particularly in the DeFi and NFT spaces, with capabilities for high-speed transactions.
Polkadot (DOT):
Launched in 2020, Polkadot enables different blockchains to interoperate and share information
through its unique architecture of parachains. It facilitates the creation of custom blockchains while
enabling them to communicate and work together.
Binance Smart Chain (BSC):
Developed by Binance, BSC is known for its fast4transaction times and low fees, supporting

SET – B
smart contracts and DApps. It is popular for DeFi applications and trading platforms, enabling users to
execute transactions with greater efficiency.
Use Cases of Public Blockchains:
Cryptocurrency Transactions:
The primary use case of public blockchains like Bitcoin and Ethereum, allowing peer-to-peer
transfers of digital currencies without intermediaries.
Decentralized Finance (DeFi):
Public blockchains enable a range of financial services, such as lending, borrowing, and trading,
without traditional banks. Platforms like Aave and Uniswap operate on Ethereum.
Supply Chain Management:
Public blockchains enhance transparency and traceability in supply chains, allowing stakeholders to
verify the origin and journey of products. Companies like VeChain utilize blockchain for this purpose.

Or
b. Explain the cryptographic hash function and its role in securing data in a blockchain. How CO1 4 16
does hashing contribute to the immutability and integrity of a blockchain?

A hash function in cryptography is like a mathematical function that takes various inputs, like
messages or data, and transforms them into fixed-length strings of characters.

Means the input to the hash function is of any length but output is always of fixed length.

Hash functions play a crucial role in various security applications, including password storage
(hash values instead of passwords), digital signatures, and data integrity checks. Hash values, or
message digests, are values that a hash function returns.

Operation of Cryptographic Hash Functions:


In computing systems, hash functions are frequently used data structures for tasks like
information authentication and message integrity checks. They are not easily decipherable, but
5
because they can be solved in polynomial time, they are regarded as cryptographically "weak".

SET – B
Typical hash functions have been improved with security characteristics by cryptographic
hash functions, which make it more challenging to decipher message contents or recipient and
sender information.
Specifically, cryptographic hash functions display the following three characteristics
1. The hash function are called as "collision-free." As a result, no two input hashes should
be equal to the same output hash.
2. They are hidden. A hash function's output should make it difficult to figure out the input
value from it.
3. They should to be friendly to puzzles. The selection of an input that generates a
predetermined result needs to be difficult.
Properties of hash functions:
Pre-Image Resistance:
Reversing a hash function should be computationally difficult. This feature defends against
an attacker attempting to locate the input with just the hash value.
Second Pre-Image Resistance:
This property says that given an input and its hash, it should be difficult to find another input
with the same hash.
Collision Resistance:
It should be difficult to identify two different inputs of any length that produce the same
hash. This characteristic is also known as a collision-free hash function.
Efficiency of Operation:
Hash functions are computationally considerably faster than symmetric encryption.
Fixed Output Size:
Hashing generates an output of a specific length, regardless of the input size, and helps to
make an output of the same size from different input sizes. Usually, they range from 128 bits to
512 bits.
Deterministic:
For a given input, the hash function consistently produces the same output, like a recipe that
always yields the same dish when followed precisely.
Fast Computation:
Hashing operations occur rapidly, even for large amounts of data sets.

Design of Hashing Algorithms:


Hashing essentially involves a mathematical function that takes two data blocks of fixed
size and converts them into a hash code. The function is a key part of the hashing algorithm. The
length of these data blocks differ according to the algorithm used.
6

SET – B
Hashing algorithms use a sequence of rounds, similar to a block cipher, to process a
message. In each round, a fixed-size input is used, which usually combines the current message
block and the result from the previous round.
Due to the interconnected nature of hashing, where the output of one operation affects
the input of the next, even a minor change (a single bit difference) in the original message can
drastically alter the final hash value.

This phenomenon is known as the avalanche effect.


Popular Hash Functions:
1. Message Digest (MD)
The hash functions MD2, MD4, MD5, and MD6 are members of the MD family. It was
adopted as the RFC 1321, Internet Standard. It is a 128-bit hash function.
In the software industry, MD5 digests are frequently used to ensure the integrity of
transferred files.
Secure Hash Function (SHA):
The four SHA algorithms which make up the SHA family are SHA-0, SHA-1, SHA-2, and
SHA-3. Despite coming from the same family, the structure of it differs.
The National Institute of Standards and Technology (NIST) released the first iteration of
the 160-bit hash algorithm, known as SHA-0, in 1993. It did not gain much popularity and had
few drawbacks.
SHA-1 is the most widely used of the existing SHA hash functions. It is used in most of the
applications and protocols including Secure Socket Layer (SSL) security in SHA-1 collision
detection that can be used in a realistic time frame. So it is doubtful on SHA-1's long-term
usability.
SHA-2 is a strong hash function. Though significantly different, its basic design still
follows the design of SHA-1.
CityHash:
CityHash is another non-cryptographic hash function that is designed for fast hashing of
large amounts of data. It is optimized for modern processors
7 and offers good performance on
both 32-bit and 64-bit architectures.

SET – B
BLAKE2:
BLAKE2 is a fast and secure hash function that improves upon SHA-3.

It is widely used in applications like cryptocurrency mining that need fast hashing.
CRC (Cyclic Redundancy Check):
CRC (Cyclic Redundancy Check) is a technique used to detect errors in data transfer.
It involves adding a special value called a checksum to the end of a message. This
checksum is calculated based on the message's content and is included during transmission.
Applications of Hash Functions:
1. Password Storage
2. Data Integrity Check
Hashing vs Encryption:
Encryption transforms data into a disguised form, requiring a cipher (key) to decipher and
read it.
Encryption and decryption are reversible processes enabled by the cipher. Encryption is used
with the goal of later deciphering the data.
Hashing transforms data of any size into a fixed-length output. Unlike encryption, hashing
is typically a one-way function. The high computational effort needed to reverse a hash makes it
difficult to retrieve the original data from the hashed output.
Data is protected during transmission by encryption, which stops unwanted access. hashing
ensures the integrity of the data. Encryption keeps data confidential, while hashing ensures
authenticity by detecting any modifications.

12. a. Explain the concept of a Merkle tree and its significance in blockchain data structures. CO1 4 16
How does a Merkle tree enable efficient verification of data integrity in a blockchain
network?

Merkle tree:

A Merkle tree is a binary tree formed by hash pointers, and named after its creator, Ralph
Merkle.

As mentioned earlier, each block is supposed to hold a certain number of transactions.


Now the question arises, how to store these transactions within a block?

A regular pointer stores the memory address of data.

A hash pointer is a pointer to where data is stored and with the pointer, the cryptographic
hash of the data is also stored.

8 us to verify the data. A hash pointer


So a hash pointer points to the data and also allows

SET – B
can be used to build all kinds of data structures such as blockchain and Merkle tree.

Hash pointers are a data structure containing the previous block’s hash value and a pointer to that
block. Here is a demonstration,

Here, we have four blocks that are connected. “Block 0” does not point to another block as it’s
the first block in the chain.

Block 0 is also identified as the genesis block. “Block 1” has a hash value stored in it that
is calculated on the basis of the data present in the previous block. The previous value in this
block is “Block 0.” Similarly, “Block 2” has the hash value of its previous block, and so on.
Properties of good hash functions:
A good hash function is collision-free, meaning different inputs can’t be mapped to the
same output.
After the hash function is applied to a string/input, it returns a different output. This
property of the hash function helps us hide the actual data. A small change in the input will result
in a significantly different hash value.
Good hash functions are computationally efficient to calculate. This ensures that the
performance of the application is not compromised.
Hash functions are one-way functions, meaning the original input can’t be derived from the
hash value, without an exhaustive search (brute-force attack).
9

SET – B
Hash pointers in blockchain:
Hash pointers are the building blocks of blockchain. Each block contains a hash pointer
that points to the previous block and contains its hash.
The immutability of blockchain is one of its most significant aspects, and hash pointers
allow us to attain this property. Hash pointers help us validate if a block is modified or not.

Or
b. Explain how hash pointers are useful in Merkle tree? CO1 4 16
Merkle tree:

A Merkle tree is a binary tree formed by hash pointers, and named after its creator, Ralph
Merkle.

As mentioned earlier, each block is supposed to hold a certain number of transactions.


Now the question arises, how to store these transactions within a block?

A regular pointer stores the memory address of data.

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.

10

SET – B
13. a. How to buy a bitcoin and perform transactions. Also explain how to determine the value of CO2 4 16
bitcoin.

A blockchain, like a database, can be used to store data. However, the structure in which the data is
stored is different. In a database, data is stored in the form of tables. However, in a blockchain, data is
stored in blocks (chunks of data) that are chained together.

A chunk of data (or a few transactions) is grouped to form a block in a blockchain.

These blocks are linked together by adding previous blocks' hashes to the next block.

A transaction is a chunk of data stored on the blockchain.


11
It can contain different forms
of data depending on the purpose for which the blockchain is being used.

SET – B
A few types of data that can be stored in a transaction are as follows:

Votes:

If we use the blockchain for electronic voting.

Property documents:

If we use the blockchain for keeping property records.

Smart contracts:

If we use the blockchain for running our code.

Local currency transactions (Bitcoin): I

If we use the blockchain for cryptocurrency.

Examples

1. Bitcoin transaction

2. Ethereum transaction

To understand the workings of blockchain transactions, let’s consider a Bitcoin transfer from one person
to another using blockchain technology.

Here’s a blockchain example showing transactions.

 A company in one country wants to send a payment to a supplier in another country. The sender
initiates the transaction by creating a request with payment details (amount, recipient details,
etc.), signed with their private key.

 The transaction is broadcast to a decentralized blockchain network, which includes nodes from
multiple participants (banks, financial institutions, etc.) in different regions.

 The blockchain network validates the transaction through consensus mechanisms (such as proof-
of-work or proof-of-stake), ensuring that the funds are legitimate and the sender has enough
balance to complete the transfer.

Proof of Work :

Proof of Work (PoW) is a consensus mechanism in which miners must solve a cryptographic
puzzle to confirm transactions and add a new block to the chain. The difficulty of the puzzle keeps the
system secure and prevents malicious actors from taking control.

Example:

In Bitcoin's PoW system, miners can add a block to the blockchain only after solving a difficult
mathematical problem.

Proof of Stake:

In this alternative method, validators are selected based on the number of tokens they possess and
12 the higher the chance of getting chosen to
are willing to "stake" as collateral. The more tokens are staked,

SET – B
validate the next block.

PoW offers strong security but at the cost of high energy consumption and lower scalability,

while PoS is more energy-efficient, faster, and scalable.

Example:

In Ethereum 2.0, validators are chosen based on how the amount of Ethereum staked.

Or
b. Explain two separate incentive mechanism block reward, transaction fee used in bitcoin. CO2 4 16
The bitcoin block reward is made up of two components: newly generated coins and
transaction fees. They are given to miners for successfully securing the network by validating
blocks. Watch Perry Hothi, Argo's Chief Technology Officer, briefly explain how blocks are
mined and rewards are returned for successfully mining a block.
The current bitcoin block reward is composed of 6.25 newly generated coins per block.
The number of newly generated coins is governed by a halvening event that takes place roughly
every 4 years. This halvening event cuts the supply of newly generated bitcoins in half and aims
to tighten the issuance of supply until all 21 million bitcoins have been mined.

The Last Bitcoin is Scheduled to Be Mined in the Year 2140

While the block reward is stable and predictable, fees can fluctuate due to multiple
factors, such as increased activity on the network and transaction size. Unlike newly generated
coins, which are minted by the protocol, transaction fees are paid by users from their own
existing coins.

For illustrative purposes, it’s best to walk through the process of how a Bitcoin
transaction takes place and understand the dynamics of how the block reward affects the entire
system. A transaction begins with a wallet.

Initiating A Bitcoin Transaction And The Network Signature Validation Process

When the transaction is initiated, the details are transmitted to a decentralized network of
computers around the world. These specialized computers are known as nodes. A node is simply
a computer that is connected to a network of other computers on the internet for the purposes of
relaying information to one another. Since all nodes transmit near identical information at the
same time, they enable the network to be decentralized.

One of the most important components of the Bitcoin network is the fact that nodes must
come to a unanimous consensus in order to validate information.

13 wallet address from which the sender


The details of the transactions include the Bitcoin

SET – B
will debit from, the public key of the receiver (wallet address), and the amount the sender would
like to send. That information is transmitted to the Bitcoin network where a node verifies that the
sender does, in fact, own the Bitcoin they wish to send and that the alleged receiver's wallet
address is properly formatted.

The process of authentication ensures the source wallet has custody of that wallet's entire
history of transactions, and can therefore flag any instance that suggests a wallet is attempting to
send Bitcoin it doesn't actually have.

What Role Do Nodes Play In Securing Bitcoin's Blockchain Network?

Nodes, in essence, provide oversight and public reporting, much like 3rd-party financial
institutions play in our current traditional financial system. The only difference is that nodes are
decentralized and are virtually impossible to shut down, since each node is independent of the
other. One dramatic instance of this resilience occurred in 2021 when a significant portion of the
network went offline.

The node that picks up the transaction is typically a 'light node,' which is only meant to validate
the signature and authenticity of a transaction. Once authenticated, it is transmitted to a full node,
which carries the full history of the Blockchain ledger. The transaction data is then moved into
that full node’s mempool (memory pool) where it awaits until a specialized node called mining
node assembles it into a candidate block.

At this point, the transaction between two parties has been broadcast on the network, it has not
yet been validated. So far neither party has benefited from the security and oversight provided by
a mining node. Without the guarantee and validation of settlement provided by solving the proof-
of-work algorithm, a transaction cannot be settled. It is for this guarantee of confirmed financial
settlement that miners are rewarded a block reward.

14. a. Define double spending in the context of cryptocurrency transactions. How does the CO2 4 16
blockchain prevent double spending, and what role do confirmations play in transaction
security?

Double spending means the expenditure of the same digital currency twice or more to
avail the multiple services.
In the world of digital currency, double spending is a big concern. In blockchain
technology, double spending happens when someone tries to use the same digital money more
than once.
Blockchains are designed to prevent this by keeping
14
a public record of all transactions.
Every time someone spends cryptocurrency, the blockchain updates to show that the money has

SET – B
already been used.
This way, it’s almost impossible to cheat and spend the same digital money more than
once.
This issue can also occur if there is an alteration in the network or copies of the currency
are only used and not the original one.
There are also double spends that allow hackers to reverse transactions so that
transaction happens two times.
By doing this, the user loses money two times one for the fake block created by the
hacker and for the original block as well.
The hacker gets incentives as well for the fake blocks that have been mined and
confirmed.
The Double Spending Problem:
Here’s a simplified example using transactions to illustrate how it can happen,
Initial Transaction:
Alice has 1 Bitcoin (BTC). She decides to send 1 BTC to Bob. This transaction is
broadcast to the network and is pending confirmation.
Attempt to Double Spend:
While the transaction to Bob is still pending, Alice tries to spend the same 1 BTC again.
She creates a second transaction, sending the same 1 BTC to Charlie. This second transaction is
also broadcast to the network.
Network Propagation:
The two transactions (to Bob and Charlie) are now challenging to be included in the
blockchain. Each transaction is seen by different nodes in the network, and there may be a delay
in the entire network agreeing on which transaction is valid.

Block Confirmation:
The network eventually confirms one of the transactions (e.g., the transaction to Bob). This
transaction is added to a block in the blockchain, making it permanent.
Conflict Resolution:
If the transaction to Bob is confirmed first, the network sees that Alice has already spent the 1
BTC, so the transaction to Charlie is invalidated. If the transaction to Charlie somehow gets confirmed

first, Bob’s transaction will be rejected.


Final Outcome:
The blockchain only records one transaction because it is designed to prevent double-spending.
The system resolves the conflict by ensuring that only one of Alice’s transactions is valid.
Finney Attack: 15

SET – B
Pre-mining a block with a conflicting transaction and then spending the same funds before the pre-
mined block is added to the blockchain.
51% Attack:
Gaining control of more than half of the network’s computing power to reverse or alter
transactions.
Mechanisms to Prevent Double Spending:
Here is an overview of different mechanisms that can help to prevent double-spending Different
consensus mechanisms can be with the network.
Consensus Mechanisms:
Proof of Work (PoW):
This method requires participants (miners) to solve complex mathematical problems to validate
transactions and add them to the blockchain. The computational effort involved makes it difficult for any
single entity to alter the blockchain, thus preventing double-spending.
Proof of Stake (PoS):
In PoS, validators are chosen based on the amount of cryptocurrency they hold and are willing to
“stake” as collateral. Validators are incentivized to act honestly to avoid losing their staked funds, making it
difficult to carry out double-spending attacks.
Delegated Proof of Stake (DPoS):
This is a variation of PoS where stakeholders vote for a small number of delegates who are
responsible for validating transactions. This system can provide faster transaction processing while still
preventing double-spending.
Transaction Verification:
Nodes in a blockchain network independently verify each transaction to ensure it doesn’t conflict
with previously confirmed transactions. If a double-spending attempt is detected, the conflicting transaction
is rejected.
Unspent Transaction Outputs (UTXOs):
In systems like Bitcoin, each transaction references a previous unspent output. The blockchain
ensures that each output can only be used once, thus preventing double-spending.
Public Ledger:
The blockchain acts as a public ledger where all transactions are recorded and visible to all
participants. This transparency makes it easy to detect and prevent double spending, as any attempt to
spend the same funds twice will be evident to the entire network.
Chain of Blocks:
Transactions are grouped into blocks and linked together in sequential order. Once a transaction is
added to the blockchain, it is included in a block that is cryptographically linked to previous blocks, making
alterations or duplications difficult.
Transaction Confirmations:
A transaction typically needs to be included in a block and receive multiple confirmations to be
considered final. The more confirmations a transaction has, the more secure it is against double-spending
attempts. 16

SET – B
Or
b. Describe the architecture and operation of the Bitcoin peer-to-peer (P2P) network. How do CO2 4 16
nodes communicate and propagate transactions and blocks in the Bitcoin network?

What is P2P (Peer-to-Peer):


The P2P process deals with a network structure where any participant in the network
known as a node acts as both a client and a server.
This means that, rather than relying on a basis server to supply resources or services,
everybody from the network of nodes can trade resources and services with one another. In a P2P
system, every node has an equal role to play and the same functionalities, which means that the
loads are well shared.
What Is a Peer-to-Peer (P2P) Service?
A peer-to-peer network is a simple network of computers. It first came into existence in the
late 1970s. Here each computer acts as a node for file sharing within the formed network.
Here each node acts as a server and thus there is no central server in the network. This
allows the sharing of a huge amount of data. The tasks are equally divided amongst the nodes.
Each node connected in the network shares an equal workload. For the network to stop
working, all the nodes need to individually stop working. This is because each node works
independently.
Types of P2P Networks:
Unstructured P2P Networks:
In this type of P2P network, each device is able to make an equal contribution. This
network is easy to build as devices can be connected randomly in the network. But being
unstructured, it becomes difficult to find content. For example, Napster, Gnutella, etc.
Structured P2P Networks:
It is designed using software that creates a virtual layer in order to put the nodes in a
specific structure. These are not easy to set up but can give easy access to users to the content. For
example, P-Grid, Kademlia, etc.
Hybrid P2P Networks:
It combines the features of both P2P networks and client-sever architecure. An example
of such a network is to find a node using the central server.
Features of P2P Network:
 These networks do not involve a large number of nodes, usually less than 12. All the
computers in the network store their own data but this data is accessible by the group.
 Unlike client-server networks, P2P uses resources and also provides them. This results in
additional resources if the number of nodes increases. It requires specialized software. It
allows resource sharing among the network.
 Since the nodes act as clients and servers, there17is a constant threat of attack.

SET – B
 Almost all OS today support P2P networks.
The computers connect with each other in a workgroup to share files, and access to internet
and printers.

 Each computer in the network has the same set of responsibilities and capabilities.
 Each device in the network serves as both a client and server.
 The architecture is useful in residential areas, small offices, or small companies where each
computer act as an independent workstation and stores the data on its hard drive.
 Each computer in the network has the ability to share data with other computers in the
network.
 The architecture is usually composed of workgroups of 12 or more computers.
How Does P2P Network Work?
Let’s understand the working of the Peer-to-Peer network through an example. Suppose,
the user wants to download a file through the peer-to-peer network then the download will be
handled in this way:
 If the peer-to-peer software is not already installed, then the user first has to install the
peer-to-peer software on his computer.
 This creates a virtual network of peer-to-peer application users.
 The user then downloads the file, which is received in bits that come from multiple
computers in the network that have already that file.
 The data is also sent from the user’s computer to other computers in the network that ask
for the data that exist on the user’s computer.
How to Use a P2P Network Efficiently?
Firstly secure your network via privacy solutions. Below are some of the measures to keep
the P2P network secure
Share and Download Legal Files:
18
Double-check the files that are being downloaded before sharing them with other

SET – B
employees. It is very important to make sure that only legal files are downloaded.
Design Strategy for Sharing:
Design a strategy that suits the underlying architecture in order to manage applications and
underlying data.
Keep Security Practices Up-to-Date:
Keep a check on the cyber security threats which might prevail in the network. Invest in
good quality software that can sustain attacks and prevent the network from being exploited.
Update your software regularly.
Scan All Downloads:
This is used to constantly check and scan all the files for viruses before downloading them.
This helps to ensure that safe files are being downloaded and in case, any file with potential threat
is detected then report to the IT Staff.
Proper Shutdown of P2P Networking After Use:
It is very important to correctly shut down the software to avoid unnecessary access to
third persons to the files in the network.
Even if the windows are closed after file sharing but the software is still active then the
unauthorized user can still gain access to the network which can be a major security breach in the
network.
Why Are P2P Services Popular?
P2P services have gained widespread popularity due to their decentralized nature, which
eliminates the need for a central authority or server.
It allows users to directly interact with each other, reducing costs by sharing resources
like bandwidth and storage. P2P networks also offers better performance for certain tasks, such
as file sharing, where data can be retrieved from multiple sources.
Applications of P2P Network:
File Sharing:
P2P network is the most convenient, cost-efficient method for file sharing for businesses.
Using this type of network there is no need for intermediate servers to transfer the file.
Blockchain:
The P2P architecture is based on the concept of decentralization. When a peer-to-peer
network is enabled on theblockchain it helps in the maintenance of a complete replica of the
records ensuring the accuracy of the data at the same time. At the same time, peer-to-peer
networks ensure security also.
Direct Messaging:
P2P network provides a secure, quick, and efficient way to communicate. This is
possible due to the use of encryption at both the peers and access to easy messaging tools.
19
Collaboration:

SET – B
The easy file sharing also helps to build collaboration among other peers in the network.
File Sharing Networks:
Many P2P file sharing networks like G2, and eDonkey have popularized peer-to-peer
technologies.
Content Distribution:
In a P2P network, unline the client-server system so the clients can both provide and use
resources. Thus, the content serving capacity of the P2P networks can actually increase as more
users begin to access the content.
IP Telephony:
Skype is one good example of a P2P application in VoIP.
Advantages of P2P Network
Easy to Maintain:
The network is easy to maintain because each node is independent of the other.
Less Costly:
Since each node acts as a server, therefore the cost of the central server is saved. Thus,
there is no need to buy an expensive server.
No Network Manager:
In a P2P network since each node manages his or her own computer, thus there is no need
for a network manager.
Adding Nodes is Easy:
Adding, deleting, and repairing nodes in this network is easy.
Less Network Traffic:
In a P2P network, there is less network traffic than in a client/ server network.
Disadvantages of P2P Network
Data is Vulnerable:
Because of no central server, data is always vulnerable to getting lost because of no
backup.
Less Secure:
It becomes difficult to secure the complete network because each node is independent.
Slow Performance:
In a P2P network, each computer is accessed by other computers in the network which
slows down the performance of the user.
Files Hard to Locate:
In a P2P network, the files are not centrally stored, rather they are stored on individual
computers which makes it difficult to locate the files.

20

SET – B
15. a. Where are permissioned blockchains commonly used? Discuss their applications in CO3 4 16
enterprise and consortium settings.

Permissioned blockchains are most commonly used in enterprise and consortium settings,
particularly in industries like finance, healthcare, and supply chain management, where secure
data sharing and transparent transaction tracking are crucial, as they allow organizations to
leverage the benefits of blockchain technology while maintaining control over who can access
and modify data on the network, ensuring privacy and compliance with regulations.

Key applications of permissioned blockchains in enterprise and consortium settings:

 Supply Chain Management:

 Tracking product movement from origin to delivery, verifying authenticity, and


reducing fraud by creating an immutable record of transactions across the supply chain.

 Enhancing visibility for all stakeholders involved, improving operational


efficiency and compliance.
 Financial Services:

 Streamlining cross-border payments and settlements, reducing processing time


and costs.

 Improving trade finance by enabling secure and transparent record-keeping of


transactions.

 Enhancing KYC (Know Your Customer) procedures and fraud detection


through shared identity verification.
 Healthcare:

 Securely storing and sharing patient medical records across different healthcare
providers, ensuring data privacy and compliance with regulations like HIPAA.

 Facilitating clinical research by providing a tamper-proof record of patient data.


 Government Services:
 Managing public records like land registries and identity documents with
increased transparency and security against corruption.

 Streamlining administrative processes and improving data integrity.


Consortium Blockchain Use Cases:

 Industry-Specific Networks:

Multiple companies within a particular industry can collaborate on a shared blockchain


21
network to streamline processes, share data, and improve overall efficiency, such as in energy

SET – B
trading or insurance claims processing.

 Shared Data Governance:


A consortium allows for a collaborative approach to data management, where all participating
entities have a say in access controls and data privacy rules.
Benefits of using permissioned blockchains in enterprise and consortium settings:

 Enhanced Security:

Access control mechanisms ensure only authorized entities can interact with the network,
protecting sensitive data.

 Improved Transparency:

Immutable record-keeping on the blockchain allows for auditability and traceability of


transactions.

 Cost Reduction:

Streamlining processes and eliminating the need for intermediaries can lead to significant cost
savings.

 Regulatory Compliance:
Designed to meet industry-specific regulations by providing a robust framework for data
management and tracking.

Or
b. What is the proof of work consensus mechanism and how does it help secure the Bitcoin CO3 4 16
network? Explain the role of miners in the process.

Bitcoin consensus is the process of reaching an agreement on the validity of


transactions on the Bitcoin blockchain. This process is achieved through a consensus
mechanism, which is a set of rules and software protocols.

22

SET – B
What Is A Consensus Mechanism?
A consensus mechanism is a process used in blockchain networks to achieve agreement on a
single data value among distributed processes or systems. It ensures that all nodes in the network are
synchronized and have the same version of the blockchain.

How does Bitcoin consensus work?


Proof of Work (PoW)
The consensus mechanism used by Bitcoin, which involves solving a mathematical challenge to
validate a block. The node that solves the challenge receives a reward.

23

SET – B
How it works
 Miners compete to solve complex puzzles to create valid alphanumeric codes (hashes)
 The first miner to solve the puzzle receives a reward
 The miner then adds the next block to the blockchain
Security:
 PoW is highly secure due to the computational power required to solve cryptographic
puzzles.
 An attacker would need to control more than 50% of the network's hashing power to alter
the blockchain, making it extremely difficult and costly.
Decentralization:
 PoW promotes decentralization as it allows anyone with the necessary hardware to
participate in mining.
 This reduces the risk of central authority or control over the network.
Incentive Structure:
 Miners are rewarded with cryptocurrency for their efforts, providing a financial incentive
to maintain the network.
 This encourages more participants to join, enhancing the network's security and reliability.
Proven Track Record:
 PoW has been successfully used since Bitcoin's inception in 2009, demonstrating its
effectiveness over time.
 Its long-standing use has built trust among users and developers.
Resistance to Spam Attacks:
 The computational effort required to mine blocks acts as a deterrent against spam attacks.
 This ensures that only legitimate transactions are processed, maintaining network integrity.
Disadvantages And Criticisms Of PoW:
High Energy Consumption:
 PoW requires significant energy to power mining operations, leading to environmental
concerns.
 Some estimates suggest that Bitcoin mining consumes more energy than entire countries.
Centralization Risks:
 While PoW promotes decentralization, it can lead to centralization in practice.
 Large mining pools can dominate the network, reducing the diversity of participants.
51% Attack Vulnerability:
 Although difficult, a 51% attack is theoretically possible if a single entity gains control of
the majority of the network's hashing power.
 This could allow them to double-spend coins or block transactions.
Slow Transaction Times:
 PoW can lead to slower transaction confirmation times compared to other consensus
mechanisms.
 This can be a drawback for applications requiring quick transaction processing.

24

SET – B
Table of Specification
Total Marks for
Blooms Taxonomy Marks in each Divisions % of Distribution
each BTL
Level (BTL)
Part - A Part - B
Remember 1 8 12 20 11.11
Understand 2
Apply 3
Analyze 4 160 160 88.88
Evaluate* 5
Create* 6
Total 8 172 180 100

Prepared by Verified by HoD Principal


(Name, Desig. & Dept) (Name, Desig. & Dept)

25

SET – B

You might also like