0% found this document useful (0 votes)
33 views26 pages

UNIT1ANS

question bank answers

Uploaded by

movinreddy2016
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)
33 views26 pages

UNIT1ANS

question bank answers

Uploaded by

movinreddy2016
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/ 26

1) Blockchain with an example use case.

A)
2) Crypto currency and how it is different from digital
currency?
A)
Traditional Bookkeeping Method:

Distributed ledger technology has the potential to effectively improve these traditional methods
of bookkeeping by updating and modifying fundamental methods of how data is collected,
shared, and managed in the ledger. To understand this, traditionally paper-based and
conventional electronic ledgers were used to manage data that had a centralized point of
control. These types of system require high computing resource and labour to maintain ledgers
and also had many points of failure. Points of failure like:

1. Mistakes made during data entry.


2. Manipulation of data could happen which increases the risk of errors.
3. Other participants contributing data to the central ledger will not able to verify the
legitimacy of data coming from other sources.

However, DLT allows real-time sharing of data with transparency which gives trust that data
in the ledger is up to date and legitimate. Also Distributed Ledger Technology eliminates the
single point of failure which prevents data in the ledger from being manipulations and errors.
In DLT, there is no need for a central authority to validate transactions here different consensus
mechanisms are used to validate transactions which eventually makes this process very fast
and real-time. Similarly, DLT can reduce the cost of transactions because of this process.

Advantages Of Distributed Ledger Technology

1. High Transparency: Distributed ledger presents a high level of transparency because


all the transaction records are visible to everyone. The addition of data needs to be
validated by nodes by using various consensus mechanisms. and if anyone tries to alter
or change data in the ledger then it is immediately reflected across all nodes of the
network which prevents invalid transactions.
2. Decentralized: In a centralized network, there may be a single point of failure and it
can disrupt the whole network because of mistakes at the central authority level. But in
the case of distributed networks, there is no risk of a single point of failure. because of
the decentralized structure trust factor also increases in participating nodes. This
decentralized nature of validation reduces the cost of transactions drastically.
3. Time Efficient: As this network is decentralized so there is no need for a central
authority to validate transactions every time. Hence this time for validation of each
transaction reduces drastically. In the case of DLT, transactions can be validated by
members of the network itself by using various consensus mechanisms.
4. Scalable: Distributed ledger technology is more scalable because many different types
of consensus mechanisms can be used to make it more reliant, fast, and updated.
Because these many advanced DLT technologies are introduced in the last few years.
Such as Holochain, hashgraph are advanced and more secure versions of Blockchain
DLT. Blockchain itself is advanced and secure but DLT provides a way to more
advanced technologies.

3) Components that make up a block.


A)

1. Header: It is used to identify the particular block in the entire blockchain. It handles
all blocks in the blockchain. A block header is hashed periodically by miners by
changing the nonce value as part of normal mining activity, also Three sets of block
metadata are contained in the block header.
2. Previous Block Address/ Hash: It is used to connect the i+1th block to the ith block
using the hash. In short, it is a reference to the hash of the previous (parent) block in
the chain.
3. Timestamp: It is a system verify the data into the block and assigns a time or date of
creation for digital documents. The timestamp is a string of characters that uniquely
identifies the document or event and indicates when it was created.
4. Nonce: A nonce number which uses only once. It is a central part of the proof of work
in the block. It is compared to the live target if it is smaller or equal to the current target.
People who mine, test, and eliminate many Nonce per second until they find that
Valuable Nonce is valid.
5. Merkel Root: It is a type of data structure frame of different blocks of data. A Merkle
Tree stores all the transactions in a block by producing a digital fingerprint of the entire
transaction. It allows the users to verify whether a transaction can be included in a block
or not.

Key Characteristics of Blockchain Architecture

• Decentralization: In centralized transaction systems, each transaction needs to be


validated in the central trusted agency (e.g., the central bank), naturally resulting in cost
and the performance jam at the central servers. In contrast to the centralized mode, a
third party is not needed in the blockchain. Consensus algorithms in blockchain are
used to maintain data stability in a decentralized network.
• Persistency: Transactions can be validated quickly, and invalid transactions would not
be admitted by persons or miners who mining the crypto. It is not possible to delete or
roll back transactions once they are included in the blockchain network. Invalid
transactions do not carry forward further.
• Anonymity: Each user can interact with the blockchain with a generated address,
which does not disclose the real identity of the miner. Note that blockchain cannot
guarantee perfect privacy preservation due to the permanent thing.
• Auditability: Blockchain stores data of users based on the Unspent Transaction
Output (UTXO) model. Every transaction has to refer to some previous unspent
transactions. Once the current transaction is recorded into the blockchain, the position
of those referred unspent transactions switches from unspent to spent.
• Due to this process, the transactions can be easily tracked and not harmed between
transactions.
• Transparency: The transparency of blockchain is like cryptocurrency, in bitcoin for
tracking every transaction is done by the address. And for security, it hides the person’s
identity between and after the transaction. All the transactions are made by the owner
of the block associated with the address, this process is transparent and there is no loss
for anyone who is involved in this transaction.
• Cryptography: The blockchain concept is fully based on security and for that, all the
blocks on the blockchain network want to be secure. And for security, it implements
cryptography and secures the data using the cipher text and ciphers.

4) Nonce and how it is useful in blockchain?


A)
Nonce:

It is abbreviated as ‘number only used once’ and it is a number which blockchain miners are
finding and on average, it takes almost 10 times to find out the correct nonce. A nonce is a 32-
bit number, having the maximum value as 2^ (32) total possible value, so the job of the bitcoins
miners is to find out the correct integer value which is a random integer between 0 and 2^(32),
so it becomes computationally expensive.

1. Proof-of-Work (PoW) Consensus: In PoW-based blockchains, miners


compete to solve a complex mathematical puzzle by finding a hash value that
meets a specific criteria or target difficulty set by the network. This puzzle is
typically solved by repeatedly hashing the block header with different nonce
values until a hash is found that meets the difficulty target.

2. Difficulty Target: The difficulty target is a value set by the network that
determines how difficult it is to find a valid hash. Miners must find a hash
value that is below the target difficulty to create a valid block. As the difficulty
target represents a specific number of leading zeros in the block hash, miners
adjust their nonce values to produce hashes that meet this requirement.

3. Random or Incremental Selection: Miners typically start with a random


nonce value and increment it sequentially or use other methods to change its
value. Each time they change the nonce, they recalculate the hash of the block
header. This process continues until a valid hash is found that satisfies the
difficulty target.

4. Preventing Manipulation: The inclusion of the nonce in the block header


ensures that miners cannot manipulate the block content to produce a desired
hash. Since the nonce is part of the block header and contributes to the final
hash, miners must expend computational effort (hashing power) to find a valid
nonce that results in a valid block hash.

5. Security and Immutability: By requiring miners to expend computational


resources to find a valid nonce, PoW-based blockchains ensure the security
and immutability of the blockchain. Altering the data in a block would require
recalculating the nonce and finding a valid hash, which is computationally
infeasible due to the amount of work required

5) Hash functions and how to compute a hash of a


block in a blockchain.
A)
How do Hash Functions work?
The hash function takes the input of variable lengths and returns outputs of fixed lengths. In
cryptographic hash functions, the transactions are taken as inputs and the hash algorithm gives
an output of a fixed size.

The below diagram shows how hashes work.

Secure Hashing Algorithm: SHA-256 is the most famous of all cryptographic hash functions
because it’s used extensively in blockchain technology. The SHA-256 Hashing algorithm was
developed by the National Security Agency (NSA) in 2001.

Uses of Hash Functions in Blockchain

The blockchain has a number of different uses for hash functions. Some of the most common
uses of the hash function in blockchain are:

• Merkle Tree: This uses hash functions to make sure that it is infeasible to find two
Merkle trees with the same root hash. This helps to protect the integrity of the block
header by storing the root hash within the block header and thus protecting the integrity
of the transactions.
• Proof of Work Consensus: This algorithm defines a valid block as the one whose
block header has a hash value less than the threshold value.
• Digital signatures: Hash functions are the vital part of digital signatures that ensures
data integrity and are used for authentication for blockchain transactions.
• The chain of blocks: Each block header in a block in the blockchain contains the hash
of the previous block header. This ensures that it is not possible to change even a single
block in a blockchain without being detected. As modifying one block requires
generating new versions of every following block, thus increasing the difficulty.

Thus, it can be concluded hash functions are a vital part of the blockchain technology used to
protect the integrity and immutability of the data stored on the blockchain.

How Block Hashes Work in Blockchain?

Blockchain is the backbone technology of the digital cryptocurrency Bitcoin. The blockchain
is a distributed database of records of all transactions or digital events that have been executed
and shared among participating parties. Each transaction is verified by many participants of the
system. It contains every single record of each transaction. A blockchain is a digital data storage
concept. This information is presented in chunks. These blocks are linked together to make the
data unchangeable. When a data block is linked with the other blocks, the data in that block
can never be altered again.

Consider the following picture, which depicts a collection of transaction data blocks.
A hash is a mathematical function that transforms an arbitrary length input into a fixed-length
encrypted output. This consensus algorithm is a collection of rules that regulates the operation
of a blockchain network. Aside from cryptocurrency, the most prevalent application of hash
functions is password storage.

The cryptographic functions have the traditional functions along with some security traits,
making them difficult to predict and determine the underlying content of the text or the
transaction.

How Do Block Hashes Actually Work?

Putting in simple words, just take any length input string and then end up with a string of a
fixed length through some work every time the hashing process needs to be done. That work is
hashing. To understand it better, look at the diagram below:
Figure 4. Understanding the Block Hash.

Example: Let’s say, for example, there is a hashing algorithm that takes an input string and
generates an output hash value.

Input String: Wow, this is a great Geeks for Geeks Tutorial


Output: tVP4UguDYLYf7BoyRPLMVpnuVGIMYJkmcn5KOnXmkwdxt8AGU5

Note: Even the slightest change in the structure of anything could have a huge impact on the
output charset generated by the hashing block.

Even if there is a change in the input string like this-

Input String: wow, this is a great geek for geeks tutorial.

The output would then turn out to be-

Output: rVuSuWYq3oE1z0ROjBPjunQ7SJbMSPTgnj7slb2Uvo9Td4Tgay

Properties Of Hash Blocks:

1. Property #1: The definiteness: This means that no matter how many times a given input is
parsed using a hash function, the result will always be the same. This is essential since it will
be hard to keep track of the input if different hashes are obtained every time.

2. Property #2: Easy yet Rapid Generation: The hash function should be able to rapidly
return the hash of input. If the procedure is not rapid enough, the system will be inefficient.
3. Property #3: Former Image Resistance: As seen in the example above, the generated hash
should have no pre or former image resistance, even a small change should be able to create a
different hash block, else it will be easy to decode the transactions, something which is not
wanted.

4. Property #4: Data Integrity Check: The most typical use of hash functions is data integrity
checking. It is used to compute checksums for data files. This program offers the user assurance
that the data is correct. The integrity check assists the user in detecting any modifications to
the original file. It does not, however, guarantee the originality of the work. Instead of changing
file data, the attacker can update the entire file, compute a new hash, and deliver it to the
recipient. This integrity testing program is only useful if the user is confident in the file’s
authenticity.

5. Property #5: Password Storage: Password storage is protected using hash functions.
Instead of saving passwords in clear text, most login procedures save password hash values to
a file. The Password file is made up of a table of pairs in the form (user ID, h(P)).

6) How a blockchain is used in representing


Bitcoins?
A)

A blockchain is a critical technology behind Bitcoin, functioning as a decentralized


and distributed digital ledger. Here’s how blockchain represents and manages
Bitcoins:

Structure and Functionality of Blockchain

1. Distributed Ledger:

• A blockchain is a distributed ledger where all transactions are recorded across


a network of computers (nodes). Each node maintains a copy of the entire
blockchain, ensuring transparency and security.

2. Blocks and Hashes:


• Transactions are grouped into blocks. Each block contains a list of
transactions and a header. The header includes a hash of the previous block’s
header, ensuring that all blocks are linked in a chain (hence the name
blockchain). This chaining of blocks guarantees the integrity of the data, as
altering any block would require altering all subsequent blocks, which is
computationally infeasible.

3. Cryptographic Security:

• Bitcoin uses the SHA-256 cryptographic hash function. This function takes an
input (in this case, the block data) and produces a fixed-size string of
characters. This hash acts as a unique digital fingerprint of the data. Even a
slight change in the input will produce a significantly different hash, which
helps in maintaining the immutability and security of the blockchain.

4. Proof of Work (PoW):

• Bitcoin employs a Proof of Work consensus mechanism. In PoW, miners


compete to solve a complex mathematical puzzle based on the hash function.
The first miner to solve the puzzle gets to add the new block of transactions
to the blockchain and is rewarded with newly created bitcoins. This process of
mining ensures that adding new blocks is resource-intensive and requires
substantial computational effort, thereby securing the network against attacks
.

5. Transaction Verification:

• Each transaction is verified by multiple nodes within the network. Nodes use
digital signatures to validate the authenticity of the transactions, ensuring that
bitcoins are not spent more than once (preventing double-spending) and that
the sender has sufficient balance to make the transaction.

6. Immutability and Transparency:

• Once a transaction is recorded in a block and added to the blockchain, it


cannot be altered. This immutability is crucial for the trustworthiness of the
blockchain. Moreover, since the ledger is distributed and publicly accessible,
anyone can verify transactions, enhancing transparency

7) Comparison of the three platforms of Blockchain


A)
Types of Blockchain Architecture

1. Public Blockchain:

A public blockchain is a concept where anyone is free to join and take part in the core activities
of the blockchain network. Anyone can read, write, and audit the ongoing activities on a public
blockchain network, which helps to achieve the self-determining, decentralized nature often
authorized when blockchain is discussed. Data on a public blockchain is secure as it is not
possible to modify once they are validated.

The public blockchain is fully decentralized, it has access and control over the ledger, and its
data is not restricted to persons, is always available and the central authority manages all the
blocks in the chain. There is publicly running all operations. Due to no one handling it singly
then there is no need to get permission to access the public blockchain. Anyone can set his/her
own node or block in the network/ chain.

After a node or a block settled in the chain of the blocks, all the blocks are connected like peer-
to-peer connections. If someone tries to attack the block, then it forms a copy of that data and
it is accessible only by the original author of the block.

Advantages:

1. A public network operates on an actuate scheme that encourages new persons to join
and keep the network better.
2. There is no agreement in the public blockchain.
3. This means that a public blockchain network is immutable.
4. It has Rapid transactions.

Disadvantages:

1. Public blockchain can be costly in some manner.


2. The person need not give identity, that’s why there is a possibility of corruption of the
block if it is in under attack.
3. Processing speed is sometimes slow.
4. It has Integration issues.
2. Private Blockchain

Miners need permission to access a private blockchain. It works based on permissions and
controls, which give limit participation in the network. Only the entities participating in a
transaction will have knowledge about it and the other stakeholders not able to access it.
By it works on the basis of permissions due to this it is also called a permission-based
blockchain. Private blockchains are not like public blockchains it is managed by the entity that
owns the network. A trusted person is in charge of the running of the blockchain it will control
who can access the private blockchain and also controls the access rights of the private chain
network. There may be a possibility of some restrictions while accessing the network of the
private blockchain.

Advantages:

1. In a private blockchain, users join the network using the invitations and all are verified.
2. Only permitted users/ persons can join the network.
3. Private Blockchain is partially immutable.

Disadvantages:
1. A private blockchain has trust issues, due to exclusive information being difficult to
access it.
2. As the number of participants increases, there is a possibility of an attack on the
registered users.

3. Consortium Blockchain

A consortium blockchain is a concept where it is permissioned by the government and a group


of organizations, not by one person like a private blockchain. Consortium blockchains are more
decentralized than private blockchains, due to being more decentralized it increases the privacy
and security of the blocks. Those like private blockchains connected with government
organizations’ blocks network.
Consortium blockchains is lies between public and private blockchains. They are designed by
organizations and no one person outside of the organizations can gain access. In Consortium
blockchains all companies in between organizations collaborate equally. They do not give
access from outside of the organizations/ consortium network.

Advantages:

1. Consortium blockchain providers will always try to give the fastest output as compared
to public blockchains.
2. It is scalable.
3. A consortium blockchain is low transaction costs.

Disadvantages:

1. A consortium blockchain is unstable in relationships.


2. Consortium blockchain lacks an economic model.
3. It has flexibility issues.

9) Hash function is used in Bitcoins and its working.


A)
The hash function used in Bitcoins is the SHA-256 (Secure Hash Algorithm 256-bit)
cryptographic hash function. Here's a detailed explanation of how it works and its
role in the Bitcoin network:

SHA-256 in Bitcoin
SHA-256 is a cryptographic algorithm that takes an input (or message) and produces
a fixed-size string of characters, which is typically a 64-character hexadecimal
number. Regardless of the size of the input, the output will always be 256 bits long.

1. One-Way Hash Function:

• SHA-256 is a cryptographic hash function that takes an input (or


'message') and returns a fixed-size string of bytes. The output is
commonly referred to as the hash value or digest.
• It is a one-way function, meaning that once the data is hashed, it
cannot be reversed back to the original input. This property is known as
preimage resistance .

2. Deterministic:

• For any given input, SHA-256 will always produce the same output. This
determinism ensures that the same transaction will always hash to the
same value, which is vital for verifying data integrity .

3. Collision Resistance:
• It is computationally infeasible to find two different inputs that produce
the same hash output. This property, known as collision resistance,
ensures that each transaction can be uniquely identified by its hash .

4. Avalanche Effect:

• A small change in the input drastically changes the output hash. This
means that even a tiny alteration in a transaction's data will result in a
completely different hash, making it easy to detect changes and
ensuring data integrity

Working of SHA-256

1. Input Processing:

• The input message is first padded to ensure its length is a multiple of 512 bits.
Padding involves appending a single '1' bit followed by a series of '0' bits, and
finally, appending the length of the original message as a 64-bit integer.

2. Message Scheduling:

• The padded message is divided into 512-bit blocks. Each block is further
divided into 16 words of 32 bits each. These words are then expanded into a
schedule array of 64 words using bitwise operations.

3. Initialization:

• SHA-256 uses eight 32-bit initial hash values, which are derived from the
fractional parts of the square roots of the first eight prime numbers.

4. Compression Function:

• Each 512-bit block is processed in a series of 64 iterations or rounds. During


each round, the main computations involve bitwise logical functions, modular
addition, and circular shifts (rotations). The intermediate hash values are
updated using these operations.

5. Final Hash Value:

• After all blocks have been processed, the final hash value is obtained by
concatenating the eight 32-bit words. This results in a 256-bit hash value.
Role of SHA-256 in Bitcoin

1. Block Hashing:

• In Bitcoin, each block contains a header, which includes metadata such as the
timestamp, the Merkle root (a hash of all transactions in the block), and the
hash of the previous block’s header. The block header is hashed twice using
SHA-256 to produce a unique identifier for the block, known as the block
hash.

2. Mining and Proof of Work:

• Bitcoin mining involves finding a nonce (a random number) that, when


combined with the block header and hashed using SHA-256, produces a hash
that is less than a specified target value. This process is computationally
intensive and requires significant trial and error, ensuring that new blocks are
added to the blockchain in a secure and controlled manner.

3. Transaction Integrity:

• Each transaction in Bitcoin is hashed using SHA-256 to create a transaction ID.


These transaction hashes are then combined in pairs and hashed again to
form a Merkle tree, culminating in a single Merkle root hash. This root hash is
included in the block header, allowing for efficient and secure verification of
transactions within the block.

4. Security and Immutability:

• The cryptographic properties of SHA-256 ensure that even a small change in


the input will produce a vastly different hash (known as the avalanche effect),
making it virtually impossible to alter transaction data without detection. This
property is crucial for maintaining the integrity and immutability of the
blockchain.

Example of SHA-256 Hashing


Here’s a simple example to illustrate how SHA-256 works: Input: "Hello, Bitcoin!" SHA-256
Hash: f8c2b5af27b874b16d4c89ff7819d4e8c317e6d50a70c8c1c8c3e7885a226d1a

Input: "Hello, Bitcoin!"

SHA-256 Hash:
f8c2b5af27b874b16d4c89ff7819d4e8c317e6d50a70c8c1c8c3e7885a226d1a

In this example, the input string "Hello, Bitcoin!" is processed by the SHA-256
algorithm to produce a unique 256-bit hash.
10) Note on i) distributed ledger ii) consensus iii)
reward (incentive) iv) miner
A)
Distributed Ledger
A distributed ledger is a decentralized database that is shared and synchronized
across multiple sites, institutions, or geographies. It allows transactions to have public
"witnesses," thereby making a cyberattack more difficult. Each participant on the
network can access the recordings shared across that network and own an identical
copy of it. This decentralization ensures that no single entity has control over the
entire database, promoting transparency and reducing the risk of data tampering .

Consensus
Consensus in a blockchain context refers to the fault-tolerant mechanism used to
achieve agreement on a single state of the network among distributed processes or
systems. This is essential for validating and verifying transactions without a central
authority. Several types of consensus mechanisms exist, including Proof of Work
(PoW), Proof of Stake (PoS), and others. These protocols ensure that all nodes in the
network agree on the validity of transactions and maintain the integrity of the
blockchain .

Reward (Incentive)
In blockchain networks, particularly those using consensus mechanisms like Proof of
Work (PoW), miners or validators are incentivized through rewards. These rewards
often come in the form of newly created cryptocurrency tokens. For instance, in
Bitcoin, miners receive a block reward for solving complex mathematical problems
and adding a new block to the blockchain. This incentive system encourages
participation and helps secure the network by ensuring a continuous effort to
validate and record transactions .

Miner
A miner in the context of blockchain is a participant who uses computational power
to solve complex cryptographic puzzles, which allows them to add new blocks to the
blockchain. This process is typically associated with the Proof of Work (PoW)
consensus mechanism. Miners compete to solve these puzzles, and the first to solve
it gets the right to add the block to the blockchain and receive a reward. Miners play
a crucial role in maintaining the blockchain by validating transactions and securing
the network against attacks .
11) Consensus algorithms
A)
Proof-of-work (PoW)

PoW is the most common consensus mechanism used by the most popular cryptocurrency like Litecoin
and Bitcoin. The PoW is known as mining and the participated nodes in the process are known as
miners. In this, miners solve complex and difficult mathematical problems and puzzles with the help of
high computation power and high processing time. The first miner who solves the puzzle to create a
block gets a reward with cryptocurrency.

PoW is required to solve a complex problem. The node that can solve the problem obtains the right to
add a new block into the blockchain.

Figure 1 shows the flowchart of the PoW consensus process. A miner computes the SHA256 of a block
header which contains a fixed value and a variable value (nonce). The fixed value is computed apriori
from the transaction information in all blocks. The miner obtains all rights to add a block to the
blockchain network, if the computed value is less than the target value. For computed value greater than
the target value, the value of nonce is changed, and the hash of the header is computed. The above
process continues until the header’s computed hash value is less than the target value. Solving the
problem is an intensive task. Nodes adjust the nonce value and compute the hash of the header until it
is less than the target value.
Figure: 1 Proof-of Work Consensus Protocol

Proof-of-Stake (PoS)

PoS is the second most common consensus mechanism alternative to PoW. It uses low energy, less
processing time, low cost, low computational power than PoW. In this consensus mechanism, it uses a
randomized method to choose who gets to create a next new block in the chain. Instead of miners,
validators are present in PoS. The users can stake their tokens to become a validator which means they
lock their money for a certain period to create a new block.

In PoW, nodes invest their resources and computation power in solving a complex problem. PoW
algorithm requires a high computation of power for mining, which leads to increased energy usage.
Moreover, the transaction rate of PoW is low. In PoS, nodes put a certain coin at stake to become a part
of the validation process. The more a node has a stake, the higher the chance of becoming a validator.
The validator is chosen pseudo-randomly and becomes a part of the consensus algorithm. A node having
the highest stake can monopolize the validation process.
Figure: 2 Proof-of Stake Consensus Protocol

13) BFT consensus with CFT.


A)
Byzantine Fault Tolerance (BFT) vs. Crash Fault Tolerance (CFT)
Byzantine Fault Tolerance (BFT)
Byzantine Fault Tolerance refers to the ability of a distributed system to continue
functioning correctly even if some of the nodes fail or act maliciously. This concept is
derived from the Byzantine Generals Problem, where the challenge is to achieve
consensus despite the presence of traitorous actors who may send conflicting
information.

Key Characteristics of BFT:

• Tolerates Malicious Actors: BFT systems are designed to function correctly even
when some nodes in the system are compromised and behave arbitrarily or
maliciously.
• Consensus Mechanism: BFT consensus algorithms require more complex
mechanisms to ensure that all non-faulty nodes agree on the same state. Examples
include Practical Byzantine Fault Tolerance (PBFT) and Delegated Byzantine Fault
Tolerance (dBFT).
• Higher Overhead: Due to the need to handle malicious behavior, BFT systems often
have higher computational and communication overhead compared to simpler
consensus mechanisms like those used in CFT.
Crash Fault Tolerance (CFT)
Crash Fault Tolerance refers to the ability of a distributed system to handle failures
where nodes simply crash and stop functioning but do not act maliciously or send
incorrect data.

Key Characteristics of CFT:

• Handles Non-Malicious Failures: CFT systems are designed to handle nodes that
fail by crashing but not those that exhibit arbitrary or malicious behavior.
• Simpler Consensus Mechanisms: CFT systems typically use simpler and less
resource-intensive consensus mechanisms such as Paxos or Raft.
• Lower Overhead: Because they only need to handle crash failures, CFT systems
generally have lower computational and communication overhead compared to BFT
systems.

Summary
• BFT is more robust as it can handle both crashes and malicious behavior but requires
more complex and resource-intensive consensus algorithms.
• CFT is simpler and more efficient but can only handle crashes and not malicious
behavior

14) Security and privacy requirements in


blockchain.
A)
Security and Privacy Requirements in Blockchain
Security Requirements

1. Immutability:
• Once a block is added to the blockchain, it cannot be altered. This is crucial
for maintaining the integrity of the data stored within the blockchain.

2. Cryptography:

• Blockchain employs cryptographic techniques to secure data. Each block


contains a unique hash, which is generated using the data within the block
and the hash of the previous block. This ensures the integrity and security of
the data as any alteration in the data would result in a change in the hash,
making tampering evident.

3. Consensus Protocols:

• Consensus mechanisms like Proof of Work (PoW) and Proof of Stake (PoS) are
used to validate transactions and add them to the blockchain. These protocols
ensure that all nodes in the network agree on the state of the blockchain,
preventing fraudulent activities.

4. Decentralization:

• The blockchain network is decentralized, meaning no single entity has control


over the entire network. This reduces the risk of centralized points of failure
and increases the security of the network.

5. Secure Transactions:

• Transactions on the blockchain are encrypted and require verification by


multiple nodes in the network. This multi-layer verification process makes it
difficult for malicious actors to alter or falsify transactions.
Privacy Requirements

1. Anonymity:

• While blockchain transactions are transparent, the identities of the


participants are often hidden. This is achieved by using public keys
(addresses) instead of personal information, thus providing a layer of privacy
to the users.

2. Data Encryption:

• Data stored on the blockchain is encrypted, ensuring that only authorized


parties can access and read the data. This prevents unauthorized access and
protects the privacy of the data.

3. Permissioned Blockchains:
• In permissioned blockchains, access to the network is restricted to certain
verified participants. This ensures that only authorized individuals can
participate in the network, providing an additional layer of privacy and
security.

4. Selective Disclosure:

• Users can choose to disclose only certain information required for a


transaction, keeping other details private. This selective disclosure mechanism
helps in maintaining user privacy while still ensuring the validity of the
transaction.

5. Privacy-Preserving Techniques:

• Advanced cryptographic techniques like Zero-Knowledge Proofs (ZKPs) and


Confidential Transactions are employed to enhance privacy. These techniques
allow the verification of transactions without revealing the underlying data.

15) Marklee tree? And how it is


used in blockchain.
A)
Introduction to Merkle Tree

Merkle tree also known as hash tree is a data structure used for data verification and
synchronization.

It is a tree data structure where each non-leaf node is a hash of its child nodes. All the leaf
nodes are at the same depth and are as far left as possible.

It maintains data integrity and uses hash functions for this purpose.

Hash Functions:

So before understanding how Merkle trees work, we need to understand how hash functions
work.
A hash function maps an input to a fixed output and this output is called hash. The output is
unique for every input and this enables fingerprinting of data. So, huge amounts of data can be
easily identified through their hash.

This is a binary Merkle tree, the top hash is a hash of the entire tree.

• This structure of the tree allows efficient mapping of huge data and small changes made
to the data can be easily identified.
• If we want to know where data change has occurred, then we can check if data is
consistent with root hash and we will not have to traverse the whole structure but only
a small part of the structure.
• The root hash is used as the fingerprint for the entire data.

Applications:

• Merkle trees are useful in distributed systems where same data should exist in multiple
places.
• Merkle trees can be used to check inconsistencies.
• Apache Cassandra uses Merkle trees to detect inconsistencies between replicas of entire
databases.
• It is used in bitcoin and blockchain.

You might also like